summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/openslx
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/openslx')
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/AuthorizationError.java8
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ClientSessionData.java202
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/DateParamError.java8
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ImageBaseWrite.java313
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ImageDetailsRead.java467
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ImagePermissions.java173
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.java442
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java680
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java286
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionWrite.java128
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/InvocationError.java8
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/LdapFilter.java188
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/LecturePermissions.java143
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java1152
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/LectureSummary.java597
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java919
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/Location.java163
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java10127
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/MasterSoftware.java163
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/MasterTag.java148
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/NetDirection.java8
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/NetRule.java162
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/NetShare.java252
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/NetShareAuth.java8
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/OperatingSystem.java242
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/Organization.java216
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java253
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/PresetNetRule.java183
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/PresetRunScript.java181
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/Role.java8
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/Satellite.java201
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java487
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java17247
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/SatelliteStatus.java143
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/SatelliteUserConfig.java128
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ServerSessionData.java133
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/SessionData.java173
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/ShareMode.java8
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/SscMode.java8
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/TAuthorizationException.java149
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/TInvalidDateParam.java149
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/TInvalidTokenException.java111
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/TInvocationException.java149
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/TNotFoundException.java135
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/TTransferRejectedException.java135
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/TransferInformation.java245
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/TransferState.java8
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/TransferStatus.java152
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/UploadOptions.java128
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/UserInfo.java227
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/Virtualizer.java153
-rw-r--r--src/main/java/org/openslx/bwlp/thrift/iface/WhoamiInfo.java157
-rw-r--r--src/main/java/org/openslx/encryption/AsymEncryptionHandler.java5
-rw-r--r--src/main/java/org/openslx/encryption/AsymKeyHolder.java5
-rw-r--r--src/main/java/org/openslx/filetransfer/ClassTest.java13
-rw-r--r--src/main/java/org/openslx/filetransfer/Downloader.java36
-rw-r--r--src/main/java/org/openslx/filetransfer/FileRange.java6
-rw-r--r--src/main/java/org/openslx/filetransfer/Listener.java38
-rw-r--r--src/main/java/org/openslx/filetransfer/Transfer.java44
-rw-r--r--src/main/java/org/openslx/filetransfer/Uploader.java50
-rw-r--r--src/main/java/org/openslx/filetransfer/util/ChunkList.java36
-rw-r--r--src/main/java/org/openslx/filetransfer/util/FileChunk.java5
-rw-r--r--src/main/java/org/openslx/filetransfer/util/HashChecker.java12
-rw-r--r--src/main/java/org/openslx/filetransfer/util/IncomingTransferBase.java51
-rw-r--r--src/main/java/org/openslx/filetransfer/util/LocalCopyManager.java5
-rw-r--r--src/main/java/org/openslx/filetransfer/util/OutgoingTransferBase.java15
-rw-r--r--src/main/java/org/openslx/firmware/FirmwareException.java25
-rw-r--r--src/main/java/org/openslx/firmware/QemuFirmware.java169
-rw-r--r--src/main/java/org/openslx/firmware/QemuFirmwareUtil.java121
-rw-r--r--src/main/java/org/openslx/imagemaster/crcchecker/CrcFile.java5
-rw-r--r--src/main/java/org/openslx/libvirt/capabilities/Capabilities.java155
-rw-r--r--src/main/java/org/openslx/libvirt/capabilities/cpu/Cpu.java165
-rw-r--r--src/main/java/org/openslx/libvirt/capabilities/cpu/Feature.java51
-rw-r--r--src/main/java/org/openslx/libvirt/capabilities/cpu/Pages.java60
-rw-r--r--src/main/java/org/openslx/libvirt/capabilities/guest/Domain.java53
-rw-r--r--src/main/java/org/openslx/libvirt/capabilities/guest/Guest.java127
-rw-r--r--src/main/java/org/openslx/libvirt/capabilities/guest/Machine.java72
-rw-r--r--src/main/java/org/openslx/libvirt/domain/Domain.java1743
-rw-r--r--src/main/java/org/openslx/libvirt/domain/DomainUtils.java118
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/Controller.java181
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/ControllerFloppy.java54
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/ControllerIde.java128
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/ControllerPci.java145
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/ControllerSata.java54
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/ControllerScsi.java138
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/ControllerUsb.java139
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/Device.java290
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/Disk.java427
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/DiskCdrom.java55
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/DiskFloppy.java52
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/DiskStorage.java54
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/FileSystem.java292
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/Graphics.java269
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/GraphicsSpice.java261
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/GraphicsVnc.java54
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/Hostdev.java175
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/HostdevAddressableSource.java26
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/HostdevAddressableTarget.java26
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/HostdevMdev.java182
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/HostdevMdevDeviceAddress.java99
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/HostdevPci.java74
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/HostdevPciDeviceAddress.java295
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/HostdevPciDeviceDescription.java186
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/HostdevUsb.java88
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/HostdevUsbDeviceAddress.java141
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/HostdevUsbDeviceDescription.java190
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/HostdevUtils.java32
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/Interface.java344
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/InterfaceBridge.java54
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/InterfaceNetwork.java54
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/Parallel.java158
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/Serial.java156
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/Shmem.java178
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/Sound.java128
-rw-r--r--src/main/java/org/openslx/libvirt/domain/device/Video.java197
-rw-r--r--src/main/java/org/openslx/libvirt/libosinfo/LibOsInfo.java158
-rw-r--r--src/main/java/org/openslx/libvirt/libosinfo/os/Os.java93
-rw-r--r--src/main/java/org/openslx/libvirt/xml/LibvirtXmlCreatable.java26
-rw-r--r--src/main/java/org/openslx/libvirt/xml/LibvirtXmlDocument.java355
-rw-r--r--src/main/java/org/openslx/libvirt/xml/LibvirtXmlDocumentException.java25
-rw-r--r--src/main/java/org/openslx/libvirt/xml/LibvirtXmlEditable.java285
-rw-r--r--src/main/java/org/openslx/libvirt/xml/LibvirtXmlNode.java350
-rw-r--r--src/main/java/org/openslx/libvirt/xml/LibvirtXmlResources.java105
-rw-r--r--src/main/java/org/openslx/libvirt/xml/LibvirtXmlSchemaValidator.java284
-rw-r--r--src/main/java/org/openslx/libvirt/xml/LibvirtXmlSerializable.java69
-rw-r--r--src/main/java/org/openslx/libvirt/xml/LibvirtXmlSerializationException.java25
-rw-r--r--src/main/java/org/openslx/libvirt/xml/LibvirtXmlValidatable.java18
-rw-r--r--src/main/java/org/openslx/libvirt/xml/LibvirtXmlValidationException.java25
-rw-r--r--src/main/java/org/openslx/sat/thrift/version/Feature.java6
-rw-r--r--src/main/java/org/openslx/thrifthelper/ImagePublishDataEx.java6
-rw-r--r--src/main/java/org/openslx/thrifthelper/TBinaryProtocolSafe.java99
-rw-r--r--src/main/java/org/openslx/thrifthelper/TConst.java1
-rw-r--r--src/main/java/org/openslx/thrifthelper/ThriftHandler.java143
-rw-r--r--src/main/java/org/openslx/thrifthelper/ThriftManager.java22
-rw-r--r--src/main/java/org/openslx/util/AppUtil.java166
-rw-r--r--src/main/java/org/openslx/util/FsUtil.java5
-rw-r--r--src/main/java/org/openslx/util/GenericDataCache.java5
-rw-r--r--src/main/java/org/openslx/util/Json.java7
-rw-r--r--src/main/java/org/openslx/util/LevenshteinDistance.java85
-rw-r--r--src/main/java/org/openslx/util/QuickTimer.java5
-rw-r--r--src/main/java/org/openslx/util/Resources.java15
-rw-r--r--src/main/java/org/openslx/util/TarArchiveUtil.java146
-rw-r--r--src/main/java/org/openslx/util/ThriftUtil.java14
-rw-r--r--src/main/java/org/openslx/util/Util.java16
-rw-r--r--src/main/java/org/openslx/util/XmlHelper.java115
-rw-r--r--src/main/java/org/openslx/util/vm/DiskImage.java205
-rw-r--r--src/main/java/org/openslx/util/vm/KeyValuePair.java13
-rw-r--r--src/main/java/org/openslx/util/vm/QemuMetaData.java233
-rw-r--r--src/main/java/org/openslx/util/vm/UnsupportedVirtualizerFormatException.java9
-rw-r--r--src/main/java/org/openslx/util/vm/VboxMetaData.java521
-rw-r--r--src/main/java/org/openslx/util/vm/VmMetaData.java399
-rw-r--r--src/main/java/org/openslx/util/vm/VmwareMetaData.java664
-rw-r--r--src/main/java/org/openslx/virtualization/Version.java321
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/VirtualizationConfiguration.java378
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationDocker.java174
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationException.java13
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationQemu.java903
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationQemuUtils.java404
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationUtils.java52
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationVirtualBox.java601
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationVirtualboxFileFormat.java (renamed from src/main/java/org/openslx/util/vm/VboxConfig.java)397
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationVmware.java741
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationVmwareFileFormat.java (renamed from src/main/java/org/openslx/util/vm/VmwareConfig.java)91
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/container/ContainerBindMount.java74
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/container/ContainerDefinition.java195
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/container/ContainerImageContext.java10
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/container/ContainerMeta.java166
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/data/ConfigurationDataDozModClientToDozModServer.java21
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/data/ConfigurationDataDozModServerToDozModClient.java116
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/data/ConfigurationDataDozModServerToStatelessClient.java79
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/logic/ConfigurationLogic.java28
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/logic/ConfigurationLogicDozModClientToDozModServer.java76
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/logic/ConfigurationLogicDozModServerToDozModClient.java197
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/logic/ConfigurationLogicDozModServerToStatelessClient.java108
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/transformation/Transformation.java65
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/transformation/TransformationException.java25
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/transformation/TransformationFunction.java39
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/transformation/TransformationGeneric.java25
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/transformation/TransformationManager.java158
-rw-r--r--src/main/java/org/openslx/virtualization/configuration/transformation/TransformationSpecific.java44
-rw-r--r--src/main/java/org/openslx/virtualization/disk/DiskImage.java253
-rw-r--r--src/main/java/org/openslx/virtualization/disk/DiskImageException.java25
-rw-r--r--src/main/java/org/openslx/virtualization/disk/DiskImageQcow2.java232
-rw-r--r--src/main/java/org/openslx/virtualization/disk/DiskImageUtils.java144
-rw-r--r--src/main/java/org/openslx/virtualization/disk/DiskImageVdi.java112
-rw-r--r--src/main/java/org/openslx/virtualization/disk/DiskImageVmdk.java282
-rw-r--r--src/main/java/org/openslx/virtualization/hardware/ConfigurationGroups.java21
-rw-r--r--src/main/java/org/openslx/virtualization/hardware/Ethernet.java20
-rw-r--r--src/main/java/org/openslx/virtualization/hardware/SoundCard.java13
-rw-r--r--src/main/java/org/openslx/virtualization/hardware/Usb.java11
-rw-r--r--src/main/java/org/openslx/virtualization/hardware/VirtOptionValue.java42
-rw-r--r--src/main/java/org/openslx/virtualization/virtualizer/Virtualizer.java68
-rw-r--r--src/main/java/org/openslx/virtualization/virtualizer/VirtualizerDocker.java55
-rw-r--r--src/main/java/org/openslx/virtualization/virtualizer/VirtualizerQemu.java72
-rw-r--r--src/main/java/org/openslx/virtualization/virtualizer/VirtualizerVirtualBox.java56
-rw-r--r--src/main/java/org/openslx/virtualization/virtualizer/VirtualizerVmware.java73
196 files changed, 39255 insertions, 19258 deletions
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/AuthorizationError.java b/src/main/java/org/openslx/bwlp/thrift/iface/AuthorizationError.java
index cacc3d8..d39865e 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/AuthorizationError.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/AuthorizationError.java
@@ -1,5 +1,5 @@
/**
- * 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
@@ -7,10 +7,7 @@
package org.openslx.bwlp.thrift.iface;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public enum AuthorizationError implements org.apache.thrift.TEnum {
GENERIC_ERROR(0),
NOT_AUTHENTICATED(1),
@@ -41,6 +38,7 @@ public enum AuthorizationError implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static AuthorizationError findByValue(int value) {
switch (value) {
case 0:
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ClientSessionData.java b/src/main/java/org/openslx/bwlp/thrift/iface/ClientSessionData.java
index 715ff3a..5b40cd0 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/ClientSessionData.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ClientSessionData.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 ClientSessionData implements org.apache.thrift.TBase<ClientSessionData, ClientSessionData._Fields>, java.io.Serializable, Cloneable, Comparable<ClientSessionData> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ClientSessionData");
@@ -43,16 +16,13 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
private static final org.apache.thrift.protocol.TField SATELLITES_FIELD_DESC = new org.apache.thrift.protocol.TField("satellites", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField USER_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("userInfo", org.apache.thrift.protocol.TType.STRUCT, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ClientSessionDataStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ClientSessionDataTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ClientSessionDataStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ClientSessionDataTupleSchemeFactory();
- public String sessionId; // required
- public String authToken; // required
- public List<Satellite> satellites; // required
- public UserInfo userInfo; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String sessionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String authToken; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<Satellite> satellites; // required
+ public @org.apache.thrift.annotation.Nullable UserInfo userInfo; // 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 {
@@ -61,10 +31,10 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
SATELLITES((short)3, "satellites"),
USER_INFO((short)4, "userInfo");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -72,6 +42,7 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
/**
* 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: // SESSION_ID
@@ -93,21 +64,22 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -116,15 +88,15 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.AUTH_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -134,7 +106,7 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Satellite.class))));
tmpMap.put(_Fields.USER_INFO, new org.apache.thrift.meta_data.FieldMetaData("userInfo", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserInfo.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ClientSessionData.class, metaDataMap);
}
@@ -142,9 +114,9 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
}
public ClientSessionData(
- String sessionId,
- String authToken,
- List<Satellite> satellites,
+ java.lang.String sessionId,
+ java.lang.String authToken,
+ java.util.List<Satellite> satellites,
UserInfo userInfo)
{
this();
@@ -165,7 +137,7 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
this.authToken = other.authToken;
}
if (other.isSetSatellites()) {
- List<Satellite> __this__satellites = new ArrayList<Satellite>(other.satellites.size());
+ java.util.List<Satellite> __this__satellites = new java.util.ArrayList<Satellite>(other.satellites.size());
for (Satellite other_element : other.satellites) {
__this__satellites.add(new Satellite(other_element));
}
@@ -188,11 +160,12 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
this.userInfo = null;
}
- public String getSessionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getSessionId() {
return this.sessionId;
}
- public ClientSessionData setSessionId(String sessionId) {
+ public ClientSessionData setSessionId(@org.apache.thrift.annotation.Nullable java.lang.String sessionId) {
this.sessionId = sessionId;
return this;
}
@@ -212,11 +185,12 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
}
}
- public String getAuthToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getAuthToken() {
return this.authToken;
}
- public ClientSessionData setAuthToken(String authToken) {
+ public ClientSessionData setAuthToken(@org.apache.thrift.annotation.Nullable java.lang.String authToken) {
this.authToken = authToken;
return this;
}
@@ -240,22 +214,24 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
return (this.satellites == null) ? 0 : this.satellites.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<Satellite> getSatellitesIterator() {
return (this.satellites == null) ? null : this.satellites.iterator();
}
public void addToSatellites(Satellite elem) {
if (this.satellites == null) {
- this.satellites = new ArrayList<Satellite>();
+ this.satellites = new java.util.ArrayList<Satellite>();
}
this.satellites.add(elem);
}
- public List<Satellite> getSatellites() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<Satellite> getSatellites() {
return this.satellites;
}
- public ClientSessionData setSatellites(List<Satellite> satellites) {
+ public ClientSessionData setSatellites(@org.apache.thrift.annotation.Nullable java.util.List<Satellite> satellites) {
this.satellites = satellites;
return this;
}
@@ -275,11 +251,12 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
}
}
+ @org.apache.thrift.annotation.Nullable
public UserInfo getUserInfo() {
return this.userInfo;
}
- public ClientSessionData setUserInfo(UserInfo userInfo) {
+ public ClientSessionData setUserInfo(@org.apache.thrift.annotation.Nullable UserInfo userInfo) {
this.userInfo = userInfo;
return this;
}
@@ -299,13 +276,13 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SESSION_ID:
if (value == null) {
unsetSessionId();
} else {
- setSessionId((String)value);
+ setSessionId((java.lang.String)value);
}
break;
@@ -313,7 +290,7 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
if (value == null) {
unsetAuthToken();
} else {
- setAuthToken((String)value);
+ setAuthToken((java.lang.String)value);
}
break;
@@ -321,7 +298,7 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
if (value == null) {
unsetSatellites();
} else {
- setSatellites((List<Satellite>)value);
+ setSatellites((java.util.List<Satellite>)value);
}
break;
@@ -336,7 +313,8 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_ID:
return getSessionId();
@@ -351,13 +329,13 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
return getUserInfo();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -370,13 +348,11 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
case USER_INFO:
return isSetUserInfo();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof ClientSessionData)
return this.equals((ClientSessionData)that);
return false;
@@ -385,6 +361,8 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
public boolean equals(ClientSessionData that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_sessionId = true && this.isSetSessionId();
boolean that_present_sessionId = true && that.isSetSessionId();
@@ -427,29 +405,25 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_sessionId = true && (isSetSessionId());
- list.add(present_sessionId);
- if (present_sessionId)
- list.add(sessionId);
+ hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287);
+ if (isSetSessionId())
+ hashCode = hashCode * 8191 + sessionId.hashCode();
- boolean present_authToken = true && (isSetAuthToken());
- list.add(present_authToken);
- if (present_authToken)
- list.add(authToken);
+ hashCode = hashCode * 8191 + ((isSetAuthToken()) ? 131071 : 524287);
+ if (isSetAuthToken())
+ hashCode = hashCode * 8191 + authToken.hashCode();
- boolean present_satellites = true && (isSetSatellites());
- list.add(present_satellites);
- if (present_satellites)
- list.add(satellites);
+ hashCode = hashCode * 8191 + ((isSetSatellites()) ? 131071 : 524287);
+ if (isSetSatellites())
+ hashCode = hashCode * 8191 + satellites.hashCode();
- boolean present_userInfo = true && (isSetUserInfo());
- list.add(present_userInfo);
- if (present_userInfo)
- list.add(userInfo);
+ hashCode = hashCode * 8191 + ((isSetUserInfo()) ? 131071 : 524287);
+ if (isSetUserInfo())
+ hashCode = hashCode * 8191 + userInfo.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -460,7 +434,7 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
+ lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -470,7 +444,7 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthToken()).compareTo(other.isSetAuthToken());
+ lastComparison = java.lang.Boolean.compare(isSetAuthToken(), other.isSetAuthToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -480,7 +454,7 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSatellites()).compareTo(other.isSetSatellites());
+ lastComparison = java.lang.Boolean.compare(isSetSatellites(), other.isSetSatellites());
if (lastComparison != 0) {
return lastComparison;
}
@@ -490,7 +464,7 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUserInfo()).compareTo(other.isSetUserInfo());
+ lastComparison = java.lang.Boolean.compare(isSetUserInfo(), other.isSetUserInfo());
if (lastComparison != 0) {
return lastComparison;
}
@@ -503,21 +477,22 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ClientSessionData(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ClientSessionData(");
boolean first = true;
sb.append("sessionId:");
@@ -571,7 +546,7 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -579,13 +554,13 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
}
}
- private static class ClientSessionDataStandardSchemeFactory implements SchemeFactory {
+ private static class ClientSessionDataStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ClientSessionDataStandardScheme getScheme() {
return new ClientSessionDataStandardScheme();
}
}
- private static class ClientSessionDataStandardScheme extends StandardScheme<ClientSessionData> {
+ private static class ClientSessionDataStandardScheme extends org.apache.thrift.scheme.StandardScheme<ClientSessionData> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ClientSessionData struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -617,8 +592,8 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
- struct.satellites = new ArrayList<Satellite>(_list16.size);
- Satellite _elem17;
+ struct.satellites = new java.util.ArrayList<Satellite>(_list16.size);
+ @org.apache.thrift.annotation.Nullable Satellite _elem17;
for (int _i18 = 0; _i18 < _list16.size; ++_i18)
{
_elem17 = new Satellite();
@@ -689,18 +664,18 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
}
- private static class ClientSessionDataTupleSchemeFactory implements SchemeFactory {
+ private static class ClientSessionDataTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ClientSessionDataTupleScheme getScheme() {
return new ClientSessionDataTupleScheme();
}
}
- private static class ClientSessionDataTupleScheme extends TupleScheme<ClientSessionData> {
+ private static class ClientSessionDataTupleScheme extends org.apache.thrift.scheme.TupleScheme<ClientSessionData> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ClientSessionData 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.isSetSessionId()) {
optionals.set(0);
}
@@ -736,8 +711,8 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ClientSessionData struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.sessionId = iprot.readString();
struct.setSessionIdIsSet(true);
@@ -748,9 +723,9 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list21 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.satellites = new ArrayList<Satellite>(_list21.size);
- Satellite _elem22;
+ org.apache.thrift.protocol.TList _list21 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.satellites = new java.util.ArrayList<Satellite>(_list21.size);
+ @org.apache.thrift.annotation.Nullable Satellite _elem22;
for (int _i23 = 0; _i23 < _list21.size; ++_i23)
{
_elem22 = new Satellite();
@@ -768,5 +743,8 @@ public class ClientSessionData implements org.apache.thrift.TBase<ClientSessionD
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/DateParamError.java b/src/main/java/org/openslx/bwlp/thrift/iface/DateParamError.java
index 23910bf..fec22bd 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/DateParamError.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/DateParamError.java
@@ -1,5 +1,5 @@
/**
- * 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
@@ -7,10 +7,7 @@
package org.openslx.bwlp.thrift.iface;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public enum DateParamError implements org.apache.thrift.TEnum {
TOO_LOW(0),
TOO_HIGH(1),
@@ -33,6 +30,7 @@ public enum DateParamError implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static DateParamError findByValue(int value) {
switch (value) {
case 0:
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageBaseWrite.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageBaseWrite.java
index 6e35111..1c796fa 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/ImageBaseWrite.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageBaseWrite.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 ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, ImageBaseWrite._Fields>, java.io.Serializable, Cloneable, Comparable<ImageBaseWrite> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageBaseWrite");
@@ -48,25 +21,22 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
private static final org.apache.thrift.protocol.TField ADD_TAGS_FIELD_DESC = new org.apache.thrift.protocol.TField("addTags", org.apache.thrift.protocol.TType.LIST, (short)8);
private static final org.apache.thrift.protocol.TField REM_TAGS_FIELD_DESC = new org.apache.thrift.protocol.TField("remTags", org.apache.thrift.protocol.TType.LIST, (short)9);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ImageBaseWriteStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ImageBaseWriteTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ImageBaseWriteStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ImageBaseWriteTupleSchemeFactory();
- public String imageName; // required
- public String description; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageName; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String description; // required
public int osId; // required
- public String virtId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String virtId; // required
public boolean isTemplate; // required
- public ImagePermissions defaultPermissions; // required
+ public @org.apache.thrift.annotation.Nullable ImagePermissions defaultPermissions; // required
/**
*
* @see ShareMode
*/
- public ShareMode shareMode; // required
- public List<String> addTags; // optional
- public List<String> remTags; // optional
+ public @org.apache.thrift.annotation.Nullable ShareMode shareMode; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> addTags; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> remTags; // 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 {
@@ -84,10 +54,10 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
ADD_TAGS((short)8, "addTags"),
REM_TAGS((short)9, "remTags");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -95,6 +65,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
/**
* 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_NAME
@@ -126,21 +97,22 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -149,7 +121,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -159,9 +131,9 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
private static final int __ISTEMPLATE_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.ADD_TAGS,_Fields.REM_TAGS};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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_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,
@@ -182,7 +154,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
tmpMap.put(_Fields.REM_TAGS, new org.apache.thrift.meta_data.FieldMetaData("remTags", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImageBaseWrite.class, metaDataMap);
}
@@ -190,10 +162,10 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
}
public ImageBaseWrite(
- String imageName,
- String description,
+ java.lang.String imageName,
+ java.lang.String description,
int osId,
- String virtId,
+ java.lang.String virtId,
boolean isTemplate,
ImagePermissions defaultPermissions,
ShareMode shareMode)
@@ -233,11 +205,11 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
this.shareMode = other.shareMode;
}
if (other.isSetAddTags()) {
- List<String> __this__addTags = new ArrayList<String>(other.addTags);
+ java.util.List<java.lang.String> __this__addTags = new java.util.ArrayList<java.lang.String>(other.addTags);
this.addTags = __this__addTags;
}
if (other.isSetRemTags()) {
- List<String> __this__remTags = new ArrayList<String>(other.remTags);
+ java.util.List<java.lang.String> __this__remTags = new java.util.ArrayList<java.lang.String>(other.remTags);
this.remTags = __this__remTags;
}
}
@@ -261,11 +233,12 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
this.remTags = null;
}
- public String getImageName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageName() {
return this.imageName;
}
- public ImageBaseWrite setImageName(String imageName) {
+ public ImageBaseWrite setImageName(@org.apache.thrift.annotation.Nullable java.lang.String imageName) {
this.imageName = imageName;
return this;
}
@@ -285,11 +258,12 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
}
}
- public String getDescription() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getDescription() {
return this.description;
}
- public ImageBaseWrite setDescription(String description) {
+ public ImageBaseWrite setDescription(@org.apache.thrift.annotation.Nullable java.lang.String description) {
this.description = description;
return this;
}
@@ -320,23 +294,24 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
}
public void unsetOsId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OSID_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __OSID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OSID_ISSET_ID);
}
public void setOsIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value);
}
- public String getVirtId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getVirtId() {
return this.virtId;
}
- public ImageBaseWrite setVirtId(String virtId) {
+ public ImageBaseWrite setVirtId(@org.apache.thrift.annotation.Nullable java.lang.String virtId) {
this.virtId = virtId;
return this;
}
@@ -367,23 +342,24 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
}
public void unsetIsTemplate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
}
public void setIsTemplateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, value);
}
+ @org.apache.thrift.annotation.Nullable
public ImagePermissions getDefaultPermissions() {
return this.defaultPermissions;
}
- public ImageBaseWrite setDefaultPermissions(ImagePermissions defaultPermissions) {
+ public ImageBaseWrite setDefaultPermissions(@org.apache.thrift.annotation.Nullable ImagePermissions defaultPermissions) {
this.defaultPermissions = defaultPermissions;
return this;
}
@@ -407,6 +383,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
*
* @see ShareMode
*/
+ @org.apache.thrift.annotation.Nullable
public ShareMode getShareMode() {
return this.shareMode;
}
@@ -415,7 +392,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
*
* @see ShareMode
*/
- public ImageBaseWrite setShareMode(ShareMode shareMode) {
+ public ImageBaseWrite setShareMode(@org.apache.thrift.annotation.Nullable ShareMode shareMode) {
this.shareMode = shareMode;
return this;
}
@@ -439,22 +416,24 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
return (this.addTags == null) ? 0 : this.addTags.size();
}
- public java.util.Iterator<String> getAddTagsIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> getAddTagsIterator() {
return (this.addTags == null) ? null : this.addTags.iterator();
}
- public void addToAddTags(String elem) {
+ public void addToAddTags(java.lang.String elem) {
if (this.addTags == null) {
- this.addTags = new ArrayList<String>();
+ this.addTags = new java.util.ArrayList<java.lang.String>();
}
this.addTags.add(elem);
}
- public List<String> getAddTags() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getAddTags() {
return this.addTags;
}
- public ImageBaseWrite setAddTags(List<String> addTags) {
+ public ImageBaseWrite setAddTags(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> addTags) {
this.addTags = addTags;
return this;
}
@@ -478,22 +457,24 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
return (this.remTags == null) ? 0 : this.remTags.size();
}
- public java.util.Iterator<String> getRemTagsIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> getRemTagsIterator() {
return (this.remTags == null) ? null : this.remTags.iterator();
}
- public void addToRemTags(String elem) {
+ public void addToRemTags(java.lang.String elem) {
if (this.remTags == null) {
- this.remTags = new ArrayList<String>();
+ this.remTags = new java.util.ArrayList<java.lang.String>();
}
this.remTags.add(elem);
}
- public List<String> getRemTags() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getRemTags() {
return this.remTags;
}
- public ImageBaseWrite setRemTags(List<String> remTags) {
+ public ImageBaseWrite setRemTags(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> remTags) {
this.remTags = remTags;
return this;
}
@@ -513,13 +494,13 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case IMAGE_NAME:
if (value == null) {
unsetImageName();
} else {
- setImageName((String)value);
+ setImageName((java.lang.String)value);
}
break;
@@ -527,7 +508,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
if (value == null) {
unsetDescription();
} else {
- setDescription((String)value);
+ setDescription((java.lang.String)value);
}
break;
@@ -535,7 +516,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
if (value == null) {
unsetOsId();
} else {
- setOsId((Integer)value);
+ setOsId((java.lang.Integer)value);
}
break;
@@ -543,7 +524,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
if (value == null) {
unsetVirtId();
} else {
- setVirtId((String)value);
+ setVirtId((java.lang.String)value);
}
break;
@@ -551,7 +532,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
if (value == null) {
unsetIsTemplate();
} else {
- setIsTemplate((Boolean)value);
+ setIsTemplate((java.lang.Boolean)value);
}
break;
@@ -575,7 +556,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
if (value == null) {
unsetAddTags();
} else {
- setAddTags((List<String>)value);
+ setAddTags((java.util.List<java.lang.String>)value);
}
break;
@@ -583,14 +564,15 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
if (value == null) {
unsetRemTags();
} else {
- setRemTags((List<String>)value);
+ setRemTags((java.util.List<java.lang.String>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case IMAGE_NAME:
return getImageName();
@@ -620,13 +602,13 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
return getRemTags();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -649,13 +631,11 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
case REM_TAGS:
return isSetRemTags();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof ImageBaseWrite)
return this.equals((ImageBaseWrite)that);
return false;
@@ -664,6 +644,8 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
public boolean equals(ImageBaseWrite that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_imageName = true && this.isSetImageName();
boolean that_present_imageName = true && that.isSetImageName();
@@ -751,54 +733,41 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_imageName = true && (isSetImageName());
- list.add(present_imageName);
- if (present_imageName)
- list.add(imageName);
+ hashCode = hashCode * 8191 + ((isSetImageName()) ? 131071 : 524287);
+ if (isSetImageName())
+ hashCode = hashCode * 8191 + imageName.hashCode();
- boolean present_description = true && (isSetDescription());
- list.add(present_description);
- if (present_description)
- list.add(description);
+ hashCode = hashCode * 8191 + ((isSetDescription()) ? 131071 : 524287);
+ if (isSetDescription())
+ hashCode = hashCode * 8191 + description.hashCode();
- boolean present_osId = true;
- list.add(present_osId);
- if (present_osId)
- list.add(osId);
+ hashCode = hashCode * 8191 + osId;
- boolean present_virtId = true && (isSetVirtId());
- list.add(present_virtId);
- if (present_virtId)
- list.add(virtId);
+ hashCode = hashCode * 8191 + ((isSetVirtId()) ? 131071 : 524287);
+ if (isSetVirtId())
+ hashCode = hashCode * 8191 + virtId.hashCode();
- boolean present_isTemplate = true;
- list.add(present_isTemplate);
- if (present_isTemplate)
- list.add(isTemplate);
+ hashCode = hashCode * 8191 + ((isTemplate) ? 131071 : 524287);
- boolean present_defaultPermissions = true && (isSetDefaultPermissions());
- list.add(present_defaultPermissions);
- if (present_defaultPermissions)
- list.add(defaultPermissions);
+ hashCode = hashCode * 8191 + ((isSetDefaultPermissions()) ? 131071 : 524287);
+ if (isSetDefaultPermissions())
+ hashCode = hashCode * 8191 + defaultPermissions.hashCode();
- boolean present_shareMode = true && (isSetShareMode());
- list.add(present_shareMode);
- if (present_shareMode)
- list.add(shareMode.getValue());
+ hashCode = hashCode * 8191 + ((isSetShareMode()) ? 131071 : 524287);
+ if (isSetShareMode())
+ hashCode = hashCode * 8191 + shareMode.getValue();
- boolean present_addTags = true && (isSetAddTags());
- list.add(present_addTags);
- if (present_addTags)
- list.add(addTags);
+ hashCode = hashCode * 8191 + ((isSetAddTags()) ? 131071 : 524287);
+ if (isSetAddTags())
+ hashCode = hashCode * 8191 + addTags.hashCode();
- boolean present_remTags = true && (isSetRemTags());
- list.add(present_remTags);
- if (present_remTags)
- list.add(remTags);
+ hashCode = hashCode * 8191 + ((isSetRemTags()) ? 131071 : 524287);
+ if (isSetRemTags())
+ hashCode = hashCode * 8191 + remTags.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -809,7 +778,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName());
+ lastComparison = java.lang.Boolean.compare(isSetImageName(), other.isSetImageName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -819,7 +788,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ lastComparison = java.lang.Boolean.compare(isSetDescription(), other.isSetDescription());
if (lastComparison != 0) {
return lastComparison;
}
@@ -829,7 +798,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOsId()).compareTo(other.isSetOsId());
+ lastComparison = java.lang.Boolean.compare(isSetOsId(), other.isSetOsId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -839,7 +808,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetVirtId()).compareTo(other.isSetVirtId());
+ lastComparison = java.lang.Boolean.compare(isSetVirtId(), other.isSetVirtId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -849,7 +818,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsTemplate()).compareTo(other.isSetIsTemplate());
+ lastComparison = java.lang.Boolean.compare(isSetIsTemplate(), other.isSetIsTemplate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -859,7 +828,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDefaultPermissions()).compareTo(other.isSetDefaultPermissions());
+ lastComparison = java.lang.Boolean.compare(isSetDefaultPermissions(), other.isSetDefaultPermissions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -869,7 +838,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetShareMode()).compareTo(other.isSetShareMode());
+ lastComparison = java.lang.Boolean.compare(isSetShareMode(), other.isSetShareMode());
if (lastComparison != 0) {
return lastComparison;
}
@@ -879,7 +848,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAddTags()).compareTo(other.isSetAddTags());
+ lastComparison = java.lang.Boolean.compare(isSetAddTags(), other.isSetAddTags());
if (lastComparison != 0) {
return lastComparison;
}
@@ -889,7 +858,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetRemTags()).compareTo(other.isSetRemTags());
+ lastComparison = java.lang.Boolean.compare(isSetRemTags(), other.isSetRemTags());
if (lastComparison != 0) {
return lastComparison;
}
@@ -902,21 +871,22 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ImageBaseWrite(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ImageBaseWrite(");
boolean first = true;
sb.append("imageName:");
@@ -1006,7 +976,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -1016,13 +986,13 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
}
}
- private static class ImageBaseWriteStandardSchemeFactory implements SchemeFactory {
+ private static class ImageBaseWriteStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ImageBaseWriteStandardScheme getScheme() {
return new ImageBaseWriteStandardScheme();
}
}
- private static class ImageBaseWriteStandardScheme extends StandardScheme<ImageBaseWrite> {
+ private static class ImageBaseWriteStandardScheme extends org.apache.thrift.scheme.StandardScheme<ImageBaseWrite> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ImageBaseWrite struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1095,8 +1065,8 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list34 = iprot.readListBegin();
- struct.addTags = new ArrayList<String>(_list34.size);
- String _elem35;
+ struct.addTags = new java.util.ArrayList<java.lang.String>(_list34.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem35;
for (int _i36 = 0; _i36 < _list34.size; ++_i36)
{
_elem35 = iprot.readString();
@@ -1113,8 +1083,8 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list37 = iprot.readListBegin();
- struct.remTags = new ArrayList<String>(_list37.size);
- String _elem38;
+ struct.remTags = new java.util.ArrayList<java.lang.String>(_list37.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem38;
for (int _i39 = 0; _i39 < _list37.size; ++_i39)
{
_elem38 = iprot.readString();
@@ -1178,7 +1148,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
oprot.writeFieldBegin(ADD_TAGS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.addTags.size()));
- for (String _iter40 : struct.addTags)
+ for (java.lang.String _iter40 : struct.addTags)
{
oprot.writeString(_iter40);
}
@@ -1192,7 +1162,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
oprot.writeFieldBegin(REM_TAGS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.remTags.size()));
- for (String _iter41 : struct.remTags)
+ for (java.lang.String _iter41 : struct.remTags)
{
oprot.writeString(_iter41);
}
@@ -1207,18 +1177,18 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
}
- private static class ImageBaseWriteTupleSchemeFactory implements SchemeFactory {
+ private static class ImageBaseWriteTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ImageBaseWriteTupleScheme getScheme() {
return new ImageBaseWriteTupleScheme();
}
}
- private static class ImageBaseWriteTupleScheme extends TupleScheme<ImageBaseWrite> {
+ private static class ImageBaseWriteTupleScheme extends org.apache.thrift.scheme.TupleScheme<ImageBaseWrite> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ImageBaseWrite 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.isSetImageName()) {
optionals.set(0);
}
@@ -1271,7 +1241,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
if (struct.isSetAddTags()) {
{
oprot.writeI32(struct.addTags.size());
- for (String _iter42 : struct.addTags)
+ for (java.lang.String _iter42 : struct.addTags)
{
oprot.writeString(_iter42);
}
@@ -1280,7 +1250,7 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
if (struct.isSetRemTags()) {
{
oprot.writeI32(struct.remTags.size());
- for (String _iter43 : struct.remTags)
+ for (java.lang.String _iter43 : struct.remTags)
{
oprot.writeString(_iter43);
}
@@ -1290,8 +1260,8 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ImageBaseWrite struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(9);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(9);
if (incoming.get(0)) {
struct.imageName = iprot.readString();
struct.setImageNameIsSet(true);
@@ -1323,9 +1293,9 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
}
if (incoming.get(7)) {
{
- org.apache.thrift.protocol.TList _list44 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.addTags = new ArrayList<String>(_list44.size);
- String _elem45;
+ org.apache.thrift.protocol.TList _list44 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.addTags = new java.util.ArrayList<java.lang.String>(_list44.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem45;
for (int _i46 = 0; _i46 < _list44.size; ++_i46)
{
_elem45 = iprot.readString();
@@ -1336,9 +1306,9 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
}
if (incoming.get(8)) {
{
- org.apache.thrift.protocol.TList _list47 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.remTags = new ArrayList<String>(_list47.size);
- String _elem48;
+ org.apache.thrift.protocol.TList _list47 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.remTags = new java.util.ArrayList<java.lang.String>(_list47.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem48;
for (int _i49 = 0; _i49 < _list47.size; ++_i49)
{
_elem48 = iprot.readString();
@@ -1350,5 +1320,8 @@ public class ImageBaseWrite implements org.apache.thrift.TBase<ImageBaseWrite, I
}
}
+ 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();
+ }
}
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<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");
@@ -55,32 +28,29 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
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)18);
- 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());
- }
+ 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<ImageVersionDetails> versions; // required
- public String imageName; // required
- public String description; // required
- public List<String> 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<ImageVersionDetails> 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<java.lang.String> 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<ImageDetailsRea
DEFAULT_PERMISSIONS((short)16, "defaultPermissions"),
USER_PERMISSIONS((short)18, "userPermissions");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
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<ImageDetailsRea
/**
* 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
@@ -161,21 +132,22 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -184,7 +156,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -196,9 +168,9 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
private static final int __ISTEMPLATE_ISSET_ID = 3;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.USER_PERMISSIONS};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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<ImageDetailsRea
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);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImageDetailsRead.class, metaDataMap);
}
@@ -241,18 +213,18 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
}
public ImageDetailsRead(
- String imageBaseId,
- String latestVersionId,
- List<ImageVersionDetails> versions,
- String imageName,
- String description,
- List<String> tags,
+ java.lang.String imageBaseId,
+ java.lang.String latestVersionId,
+ java.util.List<ImageVersionDetails> versions,
+ java.lang.String imageName,
+ java.lang.String description,
+ java.util.List<java.lang.String> 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<ImageDetailsRea
this.latestVersionId = other.latestVersionId;
}
if (other.isSetVersions()) {
- List<ImageVersionDetails> __this__versions = new ArrayList<ImageVersionDetails>(other.versions.size());
+ java.util.List<ImageVersionDetails> __this__versions = new java.util.ArrayList<ImageVersionDetails>(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<ImageDetailsRea
this.description = other.description;
}
if (other.isSetTags()) {
- List<String> __this__tags = new ArrayList<String>(other.tags);
+ 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;
@@ -359,11 +331,12 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
this.userPermissions = null;
}
- public String getImageBaseId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageBaseId() {
return this.imageBaseId;
}
- public ImageDetailsRead setImageBaseId(String imageBaseId) {
+ public ImageDetailsRead setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.String imageBaseId) {
this.imageBaseId = imageBaseId;
return this;
}
@@ -383,11 +356,12 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
}
}
- public String getLatestVersionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getLatestVersionId() {
return this.latestVersionId;
}
- public ImageDetailsRead setLatestVersionId(String latestVersionId) {
+ public ImageDetailsRead setLatestVersionId(@org.apache.thrift.annotation.Nullable java.lang.String latestVersionId) {
this.latestVersionId = latestVersionId;
return this;
}
@@ -411,22 +385,24 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
return (this.versions == null) ? 0 : this.versions.size();
}
+ @org.apache.thrift.annotation.Nullable
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 = new java.util.ArrayList<ImageVersionDetails>();
}
this.versions.add(elem);
}
- public List<ImageVersionDetails> getVersions() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<ImageVersionDetails> getVersions() {
return this.versions;
}
- public ImageDetailsRead setVersions(List<ImageVersionDetails> versions) {
+ public ImageDetailsRead setVersions(@org.apache.thrift.annotation.Nullable java.util.List<ImageVersionDetails> versions) {
this.versions = versions;
return this;
}
@@ -446,11 +422,12 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
}
}
- public String getImageName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageName() {
return this.imageName;
}
- public ImageDetailsRead setImageName(String imageName) {
+ public ImageDetailsRead setImageName(@org.apache.thrift.annotation.Nullable java.lang.String imageName) {
this.imageName = imageName;
return this;
}
@@ -470,11 +447,12 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
}
}
- public String getDescription() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getDescription() {
return this.description;
}
- public ImageDetailsRead setDescription(String description) {
+ public ImageDetailsRead setDescription(@org.apache.thrift.annotation.Nullable java.lang.String description) {
this.description = description;
return this;
}
@@ -498,22 +476,24 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
return (this.tags == null) ? 0 : this.tags.size();
}
- public java.util.Iterator<String> getTagsIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> 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<String>();
+ this.tags = new java.util.ArrayList<java.lang.String>();
}
this.tags.add(elem);
}
- public List<String> getTags() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getTags() {
return this.tags;
}
- public ImageDetailsRead setTags(List<String> tags) {
+ public ImageDetailsRead setTags(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> tags) {
this.tags = tags;
return this;
}
@@ -544,23 +524,24 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
}
public void unsetOsId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OSID_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __OSID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OSID_ISSET_ID);
}
public void setOsIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value);
}
- public String getVirtId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getVirtId() {
return this.virtId;
}
- public ImageDetailsRead setVirtId(String virtId) {
+ public ImageDetailsRead setVirtId(@org.apache.thrift.annotation.Nullable java.lang.String virtId) {
this.virtId = virtId;
return this;
}
@@ -591,16 +572,16 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
}
public void unsetCreateTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
}
public void setCreateTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
}
public long getUpdateTime() {
@@ -614,23 +595,24 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
}
public void unsetUpdateTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATETIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.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);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPDATETIME_ISSET_ID);
}
public void setUpdateTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATETIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPDATETIME_ISSET_ID, value);
}
- public String getOwnerId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getOwnerId() {
return this.ownerId;
}
- public ImageDetailsRead setOwnerId(String ownerId) {
+ public ImageDetailsRead setOwnerId(@org.apache.thrift.annotation.Nullable java.lang.String ownerId) {
this.ownerId = ownerId;
return this;
}
@@ -650,11 +632,12 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
}
}
- public String getUpdaterId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUpdaterId() {
return this.updaterId;
}
- public ImageDetailsRead setUpdaterId(String updaterId) {
+ public ImageDetailsRead setUpdaterId(@org.apache.thrift.annotation.Nullable java.lang.String updaterId) {
this.updaterId = updaterId;
return this;
}
@@ -678,6 +661,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
*
* @see ShareMode
*/
+ @org.apache.thrift.annotation.Nullable
public ShareMode getShareMode() {
return this.shareMode;
}
@@ -686,7 +670,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
*
* @see ShareMode
*/
- public ImageDetailsRead setShareMode(ShareMode shareMode) {
+ public ImageDetailsRead setShareMode(@org.apache.thrift.annotation.Nullable ShareMode shareMode) {
this.shareMode = shareMode;
return this;
}
@@ -717,23 +701,24 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
}
public void unsetIsTemplate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
}
public void setIsTemplateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, value);
}
+ @org.apache.thrift.annotation.Nullable
public ImagePermissions getDefaultPermissions() {
return this.defaultPermissions;
}
- public ImageDetailsRead setDefaultPermissions(ImagePermissions defaultPermissions) {
+ public ImageDetailsRead setDefaultPermissions(@org.apache.thrift.annotation.Nullable ImagePermissions defaultPermissions) {
this.defaultPermissions = defaultPermissions;
return this;
}
@@ -753,11 +738,12 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
}
}
+ @org.apache.thrift.annotation.Nullable
public ImagePermissions getUserPermissions() {
return this.userPermissions;
}
- public ImageDetailsRead setUserPermissions(ImagePermissions userPermissions) {
+ public ImageDetailsRead setUserPermissions(@org.apache.thrift.annotation.Nullable ImagePermissions userPermissions) {
this.userPermissions = userPermissions;
return this;
}
@@ -777,13 +763,13 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
}
}
- public void setFieldValue(_Fields field, Object value) {
+ 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((String)value);
+ setImageBaseId((java.lang.String)value);
}
break;
@@ -791,7 +777,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
if (value == null) {
unsetLatestVersionId();
} else {
- setLatestVersionId((String)value);
+ setLatestVersionId((java.lang.String)value);
}
break;
@@ -799,7 +785,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
if (value == null) {
unsetVersions();
} else {
- setVersions((List<ImageVersionDetails>)value);
+ setVersions((java.util.List<ImageVersionDetails>)value);
}
break;
@@ -807,7 +793,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
if (value == null) {
unsetImageName();
} else {
- setImageName((String)value);
+ setImageName((java.lang.String)value);
}
break;
@@ -815,7 +801,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
if (value == null) {
unsetDescription();
} else {
- setDescription((String)value);
+ setDescription((java.lang.String)value);
}
break;
@@ -823,7 +809,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
if (value == null) {
unsetTags();
} else {
- setTags((List<String>)value);
+ setTags((java.util.List<java.lang.String>)value);
}
break;
@@ -831,7 +817,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
if (value == null) {
unsetOsId();
} else {
- setOsId((Integer)value);
+ setOsId((java.lang.Integer)value);
}
break;
@@ -839,7 +825,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
if (value == null) {
unsetVirtId();
} else {
- setVirtId((String)value);
+ setVirtId((java.lang.String)value);
}
break;
@@ -847,7 +833,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
if (value == null) {
unsetCreateTime();
} else {
- setCreateTime((Long)value);
+ setCreateTime((java.lang.Long)value);
}
break;
@@ -855,7 +841,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
if (value == null) {
unsetUpdateTime();
} else {
- setUpdateTime((Long)value);
+ setUpdateTime((java.lang.Long)value);
}
break;
@@ -863,7 +849,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
if (value == null) {
unsetOwnerId();
} else {
- setOwnerId((String)value);
+ setOwnerId((java.lang.String)value);
}
break;
@@ -871,7 +857,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
if (value == null) {
unsetUpdaterId();
} else {
- setUpdaterId((String)value);
+ setUpdaterId((java.lang.String)value);
}
break;
@@ -887,7 +873,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
if (value == null) {
unsetIsTemplate();
} else {
- setIsTemplate((Boolean)value);
+ setIsTemplate((java.lang.Boolean)value);
}
break;
@@ -910,7 +896,8 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case IMAGE_BASE_ID:
return getImageBaseId();
@@ -961,13 +948,13 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
return getUserPermissions();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -1004,13 +991,11 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
case USER_PERMISSIONS:
return isSetUserPermissions();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof ImageDetailsRead)
return this.equals((ImageDetailsRead)that);
return false;
@@ -1019,6 +1004,8 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
public boolean equals(ImageDetailsRead 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();
@@ -1169,89 +1156,65 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- 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<ImageDetailsRea
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ lastComparison = java.lang.Boolean.compare(isSetImageBaseId(), other.isSetImageBaseId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1272,7 +1235,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLatestVersionId()).compareTo(other.isSetLatestVersionId());
+ lastComparison = java.lang.Boolean.compare(isSetLatestVersionId(), other.isSetLatestVersionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1282,7 +1245,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetVersions()).compareTo(other.isSetVersions());
+ lastComparison = java.lang.Boolean.compare(isSetVersions(), other.isSetVersions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1292,7 +1255,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName());
+ lastComparison = java.lang.Boolean.compare(isSetImageName(), other.isSetImageName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1302,7 +1265,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ lastComparison = java.lang.Boolean.compare(isSetDescription(), other.isSetDescription());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1312,7 +1275,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTags()).compareTo(other.isSetTags());
+ lastComparison = java.lang.Boolean.compare(isSetTags(), other.isSetTags());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1322,7 +1285,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOsId()).compareTo(other.isSetOsId());
+ lastComparison = java.lang.Boolean.compare(isSetOsId(), other.isSetOsId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1332,7 +1295,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetVirtId()).compareTo(other.isSetVirtId());
+ lastComparison = java.lang.Boolean.compare(isSetVirtId(), other.isSetVirtId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1342,7 +1305,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime());
+ lastComparison = java.lang.Boolean.compare(isSetCreateTime(), other.isSetCreateTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1352,7 +1315,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUpdateTime()).compareTo(other.isSetUpdateTime());
+ lastComparison = java.lang.Boolean.compare(isSetUpdateTime(), other.isSetUpdateTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1362,7 +1325,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ lastComparison = java.lang.Boolean.compare(isSetOwnerId(), other.isSetOwnerId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1372,7 +1335,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUpdaterId()).compareTo(other.isSetUpdaterId());
+ lastComparison = java.lang.Boolean.compare(isSetUpdaterId(), other.isSetUpdaterId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1382,7 +1345,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetShareMode()).compareTo(other.isSetShareMode());
+ lastComparison = java.lang.Boolean.compare(isSetShareMode(), other.isSetShareMode());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1392,7 +1355,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsTemplate()).compareTo(other.isSetIsTemplate());
+ lastComparison = java.lang.Boolean.compare(isSetIsTemplate(), other.isSetIsTemplate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1402,7 +1365,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDefaultPermissions()).compareTo(other.isSetDefaultPermissions());
+ lastComparison = java.lang.Boolean.compare(isSetDefaultPermissions(), other.isSetDefaultPermissions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1412,7 +1375,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUserPermissions()).compareTo(other.isSetUserPermissions());
+ lastComparison = java.lang.Boolean.compare(isSetUserPermissions(), other.isSetUserPermissions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1425,21 +1388,22 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ImageDetailsRead(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ImageDetailsRead(");
boolean first = true;
sb.append("imageBaseId:");
@@ -1578,7 +1542,7 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -1588,13 +1552,13 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
}
}
- private static class ImageDetailsReadStandardSchemeFactory implements SchemeFactory {
+ private static class ImageDetailsReadStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ImageDetailsReadStandardScheme getScheme() {
return new ImageDetailsReadStandardScheme();
}
}
- private static class ImageDetailsReadStandardScheme extends StandardScheme<ImageDetailsRead> {
+ private static class ImageDetailsReadStandardScheme extends org.apache.thrift.scheme.StandardScheme<ImageDetailsRead> {
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<ImageDetailsRea
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list58 = iprot.readListBegin();
- struct.versions = new ArrayList<ImageVersionDetails>(_list58.size);
- ImageVersionDetails _elem59;
+ struct.versions = new java.util.ArrayList<ImageVersionDetails>(_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<ImageDetailsRea
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list61 = iprot.readListBegin();
- struct.tags = new ArrayList<String>(_list61.size);
- String _elem62;
+ struct.tags = new java.util.ArrayList<java.lang.String>(_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<ImageDetailsRea
oprot.writeFieldBegin(TAGS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tags.size()));
- for (String _iter65 : struct.tags)
+ for (java.lang.String _iter65 : struct.tags)
{
oprot.writeString(_iter65);
}
@@ -1866,18 +1830,18 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
}
- private static class ImageDetailsReadTupleSchemeFactory implements SchemeFactory {
+ private static class ImageDetailsReadTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ImageDetailsReadTupleScheme getScheme() {
return new ImageDetailsReadTupleScheme();
}
}
- private static class ImageDetailsReadTupleScheme extends TupleScheme<ImageDetailsRead> {
+ private static class ImageDetailsReadTupleScheme extends org.apache.thrift.scheme.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();
+ 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<ImageDetailsRea
if (struct.isSetTags()) {
{
oprot.writeI32(struct.tags.size());
- for (String _iter67 : struct.tags)
+ for (java.lang.String _iter67 : struct.tags)
{
oprot.writeString(_iter67);
}
@@ -1991,8 +1955,8 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
@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(16);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(16);
if (incoming.get(0)) {
struct.imageBaseId = iprot.readString();
struct.setImageBaseIdIsSet(true);
@@ -2003,9 +1967,9 @@ public class ImageDetailsRead implements org.apache.thrift.TBase<ImageDetailsRea
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list68 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.versions = new ArrayList<ImageVersionDetails>(_list68.size);
- ImageVersionDetails _elem69;
+ org.apache.thrift.protocol.TList _list68 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.versions = new java.util.ArrayList<ImageVersionDetails>(_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<ImageDetailsRea
}
if (incoming.get(5)) {
{
- org.apache.thrift.protocol.TList _list71 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.tags = new ArrayList<String>(_list71.size);
- String _elem72;
+ org.apache.thrift.protocol.TList _list71 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.tags = new java.util.ArrayList<java.lang.String>(_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<ImageDetailsRea
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImagePermissions.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImagePermissions.java
index 57cc72e..5b0d739 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/ImagePermissions.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImagePermissions.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 ImagePermissions implements org.apache.thrift.TBase<ImagePermissions, ImagePermissions._Fields>, java.io.Serializable, Cloneable, Comparable<ImagePermissions> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImagePermissions");
@@ -43,11 +16,8 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
private static final org.apache.thrift.protocol.TField EDIT_FIELD_DESC = new org.apache.thrift.protocol.TField("edit", org.apache.thrift.protocol.TType.BOOL, (short)3);
private static final org.apache.thrift.protocol.TField ADMIN_FIELD_DESC = new org.apache.thrift.protocol.TField("admin", org.apache.thrift.protocol.TType.BOOL, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ImagePermissionsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ImagePermissionsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ImagePermissionsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ImagePermissionsTupleSchemeFactory();
public boolean link; // required
public boolean download; // required
@@ -61,10 +31,10 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
EDIT((short)3, "edit"),
ADMIN((short)4, "admin");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -72,6 +42,7 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
/**
* 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: // LINK
@@ -93,21 +64,22 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -116,7 +88,7 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -127,9 +99,9 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
private static final int __EDIT_ISSET_ID = 2;
private static final int __ADMIN_ISSET_ID = 3;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.LINK, new org.apache.thrift.meta_data.FieldMetaData("link", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.DOWNLOAD, new org.apache.thrift.meta_data.FieldMetaData("download", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -138,7 +110,7 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.ADMIN, new org.apache.thrift.meta_data.FieldMetaData("admin", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImagePermissions.class, metaDataMap);
}
@@ -200,16 +172,16 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
}
public void unsetLink() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LINK_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LINK_ISSET_ID);
}
/** Returns true if field link is set (has been assigned a value) and false otherwise */
public boolean isSetLink() {
- return EncodingUtils.testBit(__isset_bitfield, __LINK_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LINK_ISSET_ID);
}
public void setLinkIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LINK_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LINK_ISSET_ID, value);
}
public boolean isDownload() {
@@ -223,16 +195,16 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
}
public void unsetDownload() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __DOWNLOAD_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __DOWNLOAD_ISSET_ID);
}
/** Returns true if field download is set (has been assigned a value) and false otherwise */
public boolean isSetDownload() {
- return EncodingUtils.testBit(__isset_bitfield, __DOWNLOAD_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __DOWNLOAD_ISSET_ID);
}
public void setDownloadIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __DOWNLOAD_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __DOWNLOAD_ISSET_ID, value);
}
public boolean isEdit() {
@@ -246,16 +218,16 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
}
public void unsetEdit() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EDIT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EDIT_ISSET_ID);
}
/** Returns true if field edit is set (has been assigned a value) and false otherwise */
public boolean isSetEdit() {
- return EncodingUtils.testBit(__isset_bitfield, __EDIT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EDIT_ISSET_ID);
}
public void setEditIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EDIT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EDIT_ISSET_ID, value);
}
public boolean isAdmin() {
@@ -269,25 +241,25 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
}
public void unsetAdmin() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ADMIN_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ADMIN_ISSET_ID);
}
/** Returns true if field admin is set (has been assigned a value) and false otherwise */
public boolean isSetAdmin() {
- return EncodingUtils.testBit(__isset_bitfield, __ADMIN_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ADMIN_ISSET_ID);
}
public void setAdminIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ADMIN_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ADMIN_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case LINK:
if (value == null) {
unsetLink();
} else {
- setLink((Boolean)value);
+ setLink((java.lang.Boolean)value);
}
break;
@@ -295,7 +267,7 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
if (value == null) {
unsetDownload();
} else {
- setDownload((Boolean)value);
+ setDownload((java.lang.Boolean)value);
}
break;
@@ -303,7 +275,7 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
if (value == null) {
unsetEdit();
} else {
- setEdit((Boolean)value);
+ setEdit((java.lang.Boolean)value);
}
break;
@@ -311,14 +283,15 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
if (value == null) {
unsetAdmin();
} else {
- setAdmin((Boolean)value);
+ setAdmin((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case LINK:
return isLink();
@@ -333,13 +306,13 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
return isAdmin();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -352,13 +325,11 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
case ADMIN:
return isSetAdmin();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof ImagePermissions)
return this.equals((ImagePermissions)that);
return false;
@@ -367,6 +338,8 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
public boolean equals(ImagePermissions that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_link = true;
boolean that_present_link = true;
@@ -409,29 +382,17 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_link = true;
- list.add(present_link);
- if (present_link)
- list.add(link);
+ hashCode = hashCode * 8191 + ((link) ? 131071 : 524287);
- boolean present_download = true;
- list.add(present_download);
- if (present_download)
- list.add(download);
+ hashCode = hashCode * 8191 + ((download) ? 131071 : 524287);
- boolean present_edit = true;
- list.add(present_edit);
- if (present_edit)
- list.add(edit);
+ hashCode = hashCode * 8191 + ((edit) ? 131071 : 524287);
- boolean present_admin = true;
- list.add(present_admin);
- if (present_admin)
- list.add(admin);
+ hashCode = hashCode * 8191 + ((admin) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -442,7 +403,7 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetLink()).compareTo(other.isSetLink());
+ lastComparison = java.lang.Boolean.compare(isSetLink(), other.isSetLink());
if (lastComparison != 0) {
return lastComparison;
}
@@ -452,7 +413,7 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDownload()).compareTo(other.isSetDownload());
+ lastComparison = java.lang.Boolean.compare(isSetDownload(), other.isSetDownload());
if (lastComparison != 0) {
return lastComparison;
}
@@ -462,7 +423,7 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetEdit()).compareTo(other.isSetEdit());
+ lastComparison = java.lang.Boolean.compare(isSetEdit(), other.isSetEdit());
if (lastComparison != 0) {
return lastComparison;
}
@@ -472,7 +433,7 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAdmin()).compareTo(other.isSetAdmin());
+ lastComparison = java.lang.Boolean.compare(isSetAdmin(), other.isSetAdmin());
if (lastComparison != 0) {
return lastComparison;
}
@@ -485,21 +446,22 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ImagePermissions(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ImagePermissions(");
boolean first = true;
sb.append("link:");
@@ -534,7 +496,7 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -544,13 +506,13 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
}
}
- private static class ImagePermissionsStandardSchemeFactory implements SchemeFactory {
+ private static class ImagePermissionsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ImagePermissionsStandardScheme getScheme() {
return new ImagePermissionsStandardScheme();
}
}
- private static class ImagePermissionsStandardScheme extends StandardScheme<ImagePermissions> {
+ private static class ImagePermissionsStandardScheme extends org.apache.thrift.scheme.StandardScheme<ImagePermissions> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ImagePermissions struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -627,18 +589,18 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
}
- private static class ImagePermissionsTupleSchemeFactory implements SchemeFactory {
+ private static class ImagePermissionsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ImagePermissionsTupleScheme getScheme() {
return new ImagePermissionsTupleScheme();
}
}
- private static class ImagePermissionsTupleScheme extends TupleScheme<ImagePermissions> {
+ private static class ImagePermissionsTupleScheme extends org.apache.thrift.scheme.TupleScheme<ImagePermissions> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ImagePermissions 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.isSetLink()) {
optionals.set(0);
}
@@ -668,8 +630,8 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ImagePermissions struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.link = iprot.readBool();
struct.setLinkIsSet(true);
@@ -689,5 +651,8 @@ public class ImagePermissions implements org.apache.thrift.TBase<ImagePermission
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.java
index 9226df6..541b4ea 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImagePublishData.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-04-20")
+@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");
@@ -53,26 +26,23 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ImagePublishDataStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ImagePublishDataTupleSchemeFactory());
- }
+ 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 String imageBaseId; // required
- public String imageVersionId; // required
- public String imageName; // required
- public String description; // required
+ 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 UserInfo uploader; // required
+ public @org.apache.thrift.annotation.Nullable UserInfo uploader; // required
public long fileSize; // required
- public List<String> software; // required
- public List<String> tags; // 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 String virtId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String virtId; // required
public boolean isTemplate; // required
- public UserInfo owner; // required
- public ByteBuffer machineDescription; // 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 {
@@ -91,10 +61,10 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
OWNER((short)13, "owner"),
MACHINE_DESCRIPTION((short)14, "machineDescription");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -102,6 +72,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
/**
* 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
@@ -143,21 +114,22 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -166,7 +138,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -177,9 +149,9 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
private static final int __OSID_ISSET_ID = 2;
private static final int __ISTEMPLATE_ISSET_ID = 3;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.IMAGE_VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("imageVersionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -210,7 +182,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
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 = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImagePublishData.class, metaDataMap);
}
@@ -218,20 +190,20 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
}
public ImagePublishData(
- String imageBaseId,
- String imageVersionId,
- String imageName,
- String description,
+ java.lang.String imageBaseId,
+ java.lang.String imageVersionId,
+ java.lang.String imageName,
+ java.lang.String description,
long createTime,
UserInfo uploader,
long fileSize,
- List<String> software,
- List<String> tags,
+ java.util.List<java.lang.String> software,
+ java.util.List<java.lang.String> tags,
int osId,
- String virtId,
+ java.lang.String virtId,
boolean isTemplate,
UserInfo owner,
- ByteBuffer machineDescription)
+ java.nio.ByteBuffer machineDescription)
{
this();
this.imageBaseId = imageBaseId;
@@ -277,11 +249,11 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
}
this.fileSize = other.fileSize;
if (other.isSetSoftware()) {
- List<String> __this__software = new ArrayList<String>(other.software);
+ java.util.List<java.lang.String> __this__software = new java.util.ArrayList<java.lang.String>(other.software);
this.software = __this__software;
}
if (other.isSetTags()) {
- List<String> __this__tags = new ArrayList<String>(other.tags);
+ 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;
@@ -323,11 +295,12 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
this.machineDescription = null;
}
- public String getImageBaseId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageBaseId() {
return this.imageBaseId;
}
- public ImagePublishData setImageBaseId(String imageBaseId) {
+ public ImagePublishData setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.String imageBaseId) {
this.imageBaseId = imageBaseId;
return this;
}
@@ -347,11 +320,12 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
}
}
- public String getImageVersionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageVersionId() {
return this.imageVersionId;
}
- public ImagePublishData setImageVersionId(String imageVersionId) {
+ public ImagePublishData setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.String imageVersionId) {
this.imageVersionId = imageVersionId;
return this;
}
@@ -371,11 +345,12 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
}
}
- public String getImageName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageName() {
return this.imageName;
}
- public ImagePublishData setImageName(String imageName) {
+ public ImagePublishData setImageName(@org.apache.thrift.annotation.Nullable java.lang.String imageName) {
this.imageName = imageName;
return this;
}
@@ -395,11 +370,12 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
}
}
- public String getDescription() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getDescription() {
return this.description;
}
- public ImagePublishData setDescription(String description) {
+ public ImagePublishData setDescription(@org.apache.thrift.annotation.Nullable java.lang.String description) {
this.description = description;
return this;
}
@@ -430,23 +406,24 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
}
public void unsetCreateTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
}
public void setCreateTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, 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(UserInfo uploader) {
+ public ImagePublishData setUploader(@org.apache.thrift.annotation.Nullable UserInfo uploader) {
this.uploader = uploader;
return this;
}
@@ -477,38 +454,40 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
}
public void unsetFileSize() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
}
public void setFileSizeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, 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();
}
- public java.util.Iterator<String> getSoftwareIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> getSoftwareIterator() {
return (this.software == null) ? null : this.software.iterator();
}
- public void addToSoftware(String elem) {
+ public void addToSoftware(java.lang.String elem) {
if (this.software == null) {
- this.software = new ArrayList<String>();
+ this.software = new java.util.ArrayList<java.lang.String>();
}
this.software.add(elem);
}
- public List<String> getSoftware() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getSoftware() {
return this.software;
}
- public ImagePublishData setSoftware(List<String> software) {
+ public ImagePublishData setSoftware(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> software) {
this.software = software;
return this;
}
@@ -532,22 +511,24 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
return (this.tags == null) ? 0 : this.tags.size();
}
- public java.util.Iterator<String> getTagsIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> 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<String>();
+ this.tags = new java.util.ArrayList<java.lang.String>();
}
this.tags.add(elem);
}
- public List<String> getTags() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getTags() {
return this.tags;
}
- public ImagePublishData setTags(List<String> tags) {
+ public ImagePublishData setTags(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> tags) {
this.tags = tags;
return this;
}
@@ -578,23 +559,24 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
}
public void unsetOsId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OSID_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __OSID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OSID_ISSET_ID);
}
public void setOsIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value);
}
- public String getVirtId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getVirtId() {
return this.virtId;
}
- public ImagePublishData setVirtId(String virtId) {
+ public ImagePublishData setVirtId(@org.apache.thrift.annotation.Nullable java.lang.String virtId) {
this.virtId = virtId;
return this;
}
@@ -625,23 +607,24 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
}
public void unsetIsTemplate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
}
public void setIsTemplateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, 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(UserInfo owner) {
+ public ImagePublishData setOwner(@org.apache.thrift.annotation.Nullable UserInfo owner) {
this.owner = owner;
return this;
}
@@ -666,16 +649,16 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
return machineDescription == null ? null : machineDescription.array();
}
- public ByteBuffer bufferForMachineDescription() {
+ public java.nio.ByteBuffer bufferForMachineDescription() {
return org.apache.thrift.TBaseHelper.copyBinary(machineDescription);
}
public ImagePublishData setMachineDescription(byte[] machineDescription) {
- this.machineDescription = machineDescription == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(machineDescription, machineDescription.length));
+ this.machineDescription = machineDescription == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(machineDescription.clone());
return this;
}
- public ImagePublishData setMachineDescription(ByteBuffer machineDescription) {
+ public ImagePublishData setMachineDescription(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer machineDescription) {
this.machineDescription = org.apache.thrift.TBaseHelper.copyBinary(machineDescription);
return this;
}
@@ -695,13 +678,13 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
}
}
- public void setFieldValue(_Fields field, Object value) {
+ 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((String)value);
+ setImageBaseId((java.lang.String)value);
}
break;
@@ -709,7 +692,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
if (value == null) {
unsetImageVersionId();
} else {
- setImageVersionId((String)value);
+ setImageVersionId((java.lang.String)value);
}
break;
@@ -717,7 +700,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
if (value == null) {
unsetImageName();
} else {
- setImageName((String)value);
+ setImageName((java.lang.String)value);
}
break;
@@ -725,7 +708,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
if (value == null) {
unsetDescription();
} else {
- setDescription((String)value);
+ setDescription((java.lang.String)value);
}
break;
@@ -733,7 +716,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
if (value == null) {
unsetCreateTime();
} else {
- setCreateTime((Long)value);
+ setCreateTime((java.lang.Long)value);
}
break;
@@ -749,7 +732,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
if (value == null) {
unsetFileSize();
} else {
- setFileSize((Long)value);
+ setFileSize((java.lang.Long)value);
}
break;
@@ -757,7 +740,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
if (value == null) {
unsetSoftware();
} else {
- setSoftware((List<String>)value);
+ setSoftware((java.util.List<java.lang.String>)value);
}
break;
@@ -765,7 +748,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
if (value == null) {
unsetTags();
} else {
- setTags((List<String>)value);
+ setTags((java.util.List<java.lang.String>)value);
}
break;
@@ -773,7 +756,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
if (value == null) {
unsetOsId();
} else {
- setOsId((Integer)value);
+ setOsId((java.lang.Integer)value);
}
break;
@@ -781,7 +764,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
if (value == null) {
unsetVirtId();
} else {
- setVirtId((String)value);
+ setVirtId((java.lang.String)value);
}
break;
@@ -789,7 +772,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
if (value == null) {
unsetIsTemplate();
} else {
- setIsTemplate((Boolean)value);
+ setIsTemplate((java.lang.Boolean)value);
}
break;
@@ -805,14 +788,19 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
if (value == null) {
unsetMachineDescription();
} else {
- setMachineDescription((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setMachineDescription((byte[])value);
+ } else {
+ setMachineDescription((java.nio.ByteBuffer)value);
+ }
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case IMAGE_BASE_ID:
return getImageBaseId();
@@ -857,13 +845,13 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
return getMachineDescription();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -896,13 +884,11 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
case MACHINE_DESCRIPTION:
return isSetMachineDescription();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof ImagePublishData)
return this.equals((ImagePublishData)that);
return false;
@@ -911,6 +897,8 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
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();
@@ -1043,79 +1031,57 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_imageBaseId = true && (isSetImageBaseId());
- list.add(present_imageBaseId);
- if (present_imageBaseId)
- list.add(imageBaseId);
-
- boolean present_imageVersionId = true && (isSetImageVersionId());
- list.add(present_imageVersionId);
- if (present_imageVersionId)
- list.add(imageVersionId);
-
- 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_createTime = true;
- list.add(present_createTime);
- if (present_createTime)
- list.add(createTime);
-
- boolean present_uploader = true && (isSetUploader());
- list.add(present_uploader);
- if (present_uploader)
- list.add(uploader);
-
- boolean present_fileSize = true;
- list.add(present_fileSize);
- if (present_fileSize)
- list.add(fileSize);
-
- boolean present_software = true && (isSetSoftware());
- list.add(present_software);
- if (present_software)
- list.add(software);
-
- 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_isTemplate = true;
- list.add(present_isTemplate);
- if (present_isTemplate)
- list.add(isTemplate);
-
- boolean present_owner = true && (isSetOwner());
- list.add(present_owner);
- if (present_owner)
- list.add(owner);
-
- boolean present_machineDescription = true && (isSetMachineDescription());
- list.add(present_machineDescription);
- if (present_machineDescription)
- list.add(machineDescription);
-
- return list.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
@@ -1126,7 +1092,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ lastComparison = java.lang.Boolean.compare(isSetImageBaseId(), other.isSetImageBaseId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1136,7 +1102,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ lastComparison = java.lang.Boolean.compare(isSetImageVersionId(), other.isSetImageVersionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1146,7 +1112,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName());
+ lastComparison = java.lang.Boolean.compare(isSetImageName(), other.isSetImageName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1156,7 +1122,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ lastComparison = java.lang.Boolean.compare(isSetDescription(), other.isSetDescription());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1166,7 +1132,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime());
+ lastComparison = java.lang.Boolean.compare(isSetCreateTime(), other.isSetCreateTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1176,7 +1142,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUploader()).compareTo(other.isSetUploader());
+ lastComparison = java.lang.Boolean.compare(isSetUploader(), other.isSetUploader());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1186,7 +1152,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFileSize()).compareTo(other.isSetFileSize());
+ lastComparison = java.lang.Boolean.compare(isSetFileSize(), other.isSetFileSize());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1196,7 +1162,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSoftware()).compareTo(other.isSetSoftware());
+ lastComparison = java.lang.Boolean.compare(isSetSoftware(), other.isSetSoftware());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1206,7 +1172,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTags()).compareTo(other.isSetTags());
+ lastComparison = java.lang.Boolean.compare(isSetTags(), other.isSetTags());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1216,7 +1182,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOsId()).compareTo(other.isSetOsId());
+ lastComparison = java.lang.Boolean.compare(isSetOsId(), other.isSetOsId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1226,7 +1192,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetVirtId()).compareTo(other.isSetVirtId());
+ lastComparison = java.lang.Boolean.compare(isSetVirtId(), other.isSetVirtId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1236,7 +1202,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsTemplate()).compareTo(other.isSetIsTemplate());
+ lastComparison = java.lang.Boolean.compare(isSetIsTemplate(), other.isSetIsTemplate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1246,7 +1212,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOwner()).compareTo(other.isSetOwner());
+ lastComparison = java.lang.Boolean.compare(isSetOwner(), other.isSetOwner());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1256,7 +1222,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMachineDescription()).compareTo(other.isSetMachineDescription());
+ lastComparison = java.lang.Boolean.compare(isSetMachineDescription(), other.isSetMachineDescription());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1269,21 +1235,22 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ImagePublishData(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ImagePublishData(");
boolean first = true;
sb.append("imageBaseId:");
@@ -1404,7 +1371,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -1414,13 +1381,13 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
}
}
- private static class ImagePublishDataStandardSchemeFactory implements SchemeFactory {
+ private static class ImagePublishDataStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ImagePublishDataStandardScheme getScheme() {
return new ImagePublishDataStandardScheme();
}
}
- private static class ImagePublishDataStandardScheme extends StandardScheme<ImagePublishData> {
+ 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;
@@ -1493,8 +1460,8 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list74 = iprot.readListBegin();
- struct.software = new ArrayList<String>(_list74.size);
- String _elem75;
+ 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();
@@ -1511,8 +1478,8 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list77 = iprot.readListBegin();
- struct.tags = new ArrayList<String>(_list77.size);
- String _elem78;
+ 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();
@@ -1616,7 +1583,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
oprot.writeFieldBegin(SOFTWARE_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.software.size()));
- for (String _iter80 : struct.software)
+ for (java.lang.String _iter80 : struct.software)
{
oprot.writeString(_iter80);
}
@@ -1628,7 +1595,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
oprot.writeFieldBegin(TAGS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tags.size()));
- for (String _iter81 : struct.tags)
+ for (java.lang.String _iter81 : struct.tags)
{
oprot.writeString(_iter81);
}
@@ -1663,18 +1630,18 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
}
- private static class ImagePublishDataTupleSchemeFactory implements SchemeFactory {
+ private static class ImagePublishDataTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ImagePublishDataTupleScheme getScheme() {
return new ImagePublishDataTupleScheme();
}
}
- private static class ImagePublishDataTupleScheme extends TupleScheme<ImagePublishData> {
+ 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 {
- 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);
}
@@ -1742,7 +1709,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
if (struct.isSetSoftware()) {
{
oprot.writeI32(struct.software.size());
- for (String _iter82 : struct.software)
+ for (java.lang.String _iter82 : struct.software)
{
oprot.writeString(_iter82);
}
@@ -1751,7 +1718,7 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
if (struct.isSetTags()) {
{
oprot.writeI32(struct.tags.size());
- for (String _iter83 : struct.tags)
+ for (java.lang.String _iter83 : struct.tags)
{
oprot.writeString(_iter83);
}
@@ -1776,8 +1743,8 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ImagePublishData struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(14);
+ 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);
@@ -1809,9 +1776,9 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
}
if (incoming.get(7)) {
{
- org.apache.thrift.protocol.TList _list84 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.software = new ArrayList<String>(_list84.size);
- String _elem85;
+ 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();
@@ -1822,9 +1789,9 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
}
if (incoming.get(8)) {
{
- org.apache.thrift.protocol.TList _list87 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.tags = new ArrayList<String>(_list87.size);
- String _elem88;
+ 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();
@@ -1857,5 +1824,8 @@ public class ImagePublishData implements org.apache.thrift.TBase<ImagePublishDat
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java
index b52289b..35c0ddc 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageSummaryRead.java
@@ -1,46 +1,20 @@
/**
- * 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 = "2018-12-07")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRead, ImageSummaryRead._Fields>, java.io.Serializable, Cloneable, Comparable<ImageSummaryRead> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageSummaryRead");
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 LATEST_VERSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("latestVersionId", org.apache.thrift.protocol.TType.STRING, (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)23);
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)5);
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)6);
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)7);
@@ -60,35 +34,33 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
private static final org.apache.thrift.protocol.TField FILE_SIZE_SUM_FIELD_DESC = new org.apache.thrift.protocol.TField("fileSizeSum", org.apache.thrift.protocol.TType.I64, (short)21);
private static final org.apache.thrift.protocol.TField VERSION_COUNT_FIELD_DESC = new org.apache.thrift.protocol.TField("versionCount", org.apache.thrift.protocol.TType.I32, (short)22);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ImageSummaryReadStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ImageSummaryReadTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ImageSummaryReadStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ImageSummaryReadTupleSchemeFactory();
- public String imageBaseId; // required
- public String latestVersionId; // required
- public String imageName; // 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.lang.String imageName; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String description; // 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 long uploadTime; // required
public long expireTime; // required
- public String ownerId; // required
- public String uploaderId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String ownerId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String uploaderId; // required
/**
*
* @see ShareMode
*/
- public ShareMode shareMode; // required
+ public @org.apache.thrift.annotation.Nullable ShareMode shareMode; // required
public long fileSize; // required
public boolean isRestricted; // required
public boolean isValid; // required
public boolean isProcessed; // 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
public long fileSizeSum; // optional
public int versionCount; // optional
@@ -97,6 +69,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
IMAGE_BASE_ID((short)1, "imageBaseId"),
LATEST_VERSION_ID((short)3, "latestVersionId"),
IMAGE_NAME((short)4, "imageName"),
+ DESCRIPTION((short)23, "description"),
OS_ID((short)5, "osId"),
VIRT_ID((short)6, "virtId"),
CREATE_TIME((short)7, "createTime"),
@@ -120,10 +93,10 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
FILE_SIZE_SUM((short)21, "fileSizeSum"),
VERSION_COUNT((short)22, "versionCount");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -131,6 +104,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
/**
* 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
@@ -139,6 +113,8 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return LATEST_VERSION_ID;
case 4: // IMAGE_NAME
return IMAGE_NAME;
+ case 23: // DESCRIPTION
+ return DESCRIPTION;
case 5: // OS_ID
return OS_ID;
case 6: // VIRT_ID
@@ -186,21 +162,22 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -209,7 +186,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -229,15 +206,17 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
private static final int __VERSIONCOUNT_ISSET_ID = 11;
private short __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.USER_PERMISSIONS,_Fields.FILE_SIZE_SUM,_Fields.VERSION_COUNT};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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,
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.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,
@@ -274,7 +253,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.VERSION_COUNT, new org.apache.thrift.meta_data.FieldMetaData("versionCount", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImageSummaryRead.class, metaDataMap);
}
@@ -282,17 +261,18 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
public ImageSummaryRead(
- String imageBaseId,
- String latestVersionId,
- String imageName,
+ java.lang.String imageBaseId,
+ java.lang.String latestVersionId,
+ java.lang.String imageName,
+ java.lang.String description,
int osId,
- String virtId,
+ java.lang.String virtId,
long createTime,
long updateTime,
long uploadTime,
long expireTime,
- String ownerId,
- String uploaderId,
+ java.lang.String ownerId,
+ java.lang.String uploaderId,
ShareMode shareMode,
long fileSize,
boolean isRestricted,
@@ -305,6 +285,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
this.imageBaseId = imageBaseId;
this.latestVersionId = latestVersionId;
this.imageName = imageName;
+ this.description = description;
this.osId = osId;
setOsIdIsSet(true);
this.virtId = virtId;
@@ -346,6 +327,9 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (other.isSetImageName()) {
this.imageName = other.imageName;
}
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
this.osId = other.osId;
if (other.isSetVirtId()) {
this.virtId = other.virtId;
@@ -387,6 +371,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
this.imageBaseId = null;
this.latestVersionId = null;
this.imageName = null;
+ this.description = null;
setOsIdIsSet(false);
this.osId = 0;
this.virtId = null;
@@ -419,11 +404,12 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
this.versionCount = 0;
}
- public String getImageBaseId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageBaseId() {
return this.imageBaseId;
}
- public ImageSummaryRead setImageBaseId(String imageBaseId) {
+ public ImageSummaryRead setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.String imageBaseId) {
this.imageBaseId = imageBaseId;
return this;
}
@@ -443,11 +429,12 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
}
- public String getLatestVersionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getLatestVersionId() {
return this.latestVersionId;
}
- public ImageSummaryRead setLatestVersionId(String latestVersionId) {
+ public ImageSummaryRead setLatestVersionId(@org.apache.thrift.annotation.Nullable java.lang.String latestVersionId) {
this.latestVersionId = latestVersionId;
return this;
}
@@ -467,11 +454,12 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
}
- public String getImageName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageName() {
return this.imageName;
}
- public ImageSummaryRead setImageName(String imageName) {
+ public ImageSummaryRead setImageName(@org.apache.thrift.annotation.Nullable java.lang.String imageName) {
this.imageName = imageName;
return this;
}
@@ -491,6 +479,31 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
}
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getDescription() {
+ return this.description;
+ }
+
+ public ImageSummaryRead 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 int getOsId() {
return this.osId;
}
@@ -502,23 +515,24 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
public void unsetOsId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OSID_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __OSID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OSID_ISSET_ID);
}
public void setOsIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value);
}
- public String getVirtId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getVirtId() {
return this.virtId;
}
- public ImageSummaryRead setVirtId(String virtId) {
+ public ImageSummaryRead setVirtId(@org.apache.thrift.annotation.Nullable java.lang.String virtId) {
this.virtId = virtId;
return this;
}
@@ -549,16 +563,16 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
public void unsetCreateTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
}
public void setCreateTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
}
public long getUpdateTime() {
@@ -572,16 +586,16 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
public void unsetUpdateTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATETIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.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);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPDATETIME_ISSET_ID);
}
public void setUpdateTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATETIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPDATETIME_ISSET_ID, value);
}
public long getUploadTime() {
@@ -595,16 +609,16 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
public void unsetUploadTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPLOADTIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __UPLOADTIME_ISSET_ID);
}
/** Returns true if field uploadTime is set (has been assigned a value) and false otherwise */
public boolean isSetUploadTime() {
- return EncodingUtils.testBit(__isset_bitfield, __UPLOADTIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPLOADTIME_ISSET_ID);
}
public void setUploadTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPLOADTIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPLOADTIME_ISSET_ID, value);
}
public long getExpireTime() {
@@ -618,23 +632,24 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
public void unsetExpireTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXPIRETIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EXPIRETIME_ISSET_ID);
}
/** Returns true if field expireTime is set (has been assigned a value) and false otherwise */
public boolean isSetExpireTime() {
- return EncodingUtils.testBit(__isset_bitfield, __EXPIRETIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXPIRETIME_ISSET_ID);
}
public void setExpireTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXPIRETIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EXPIRETIME_ISSET_ID, value);
}
- public String getOwnerId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getOwnerId() {
return this.ownerId;
}
- public ImageSummaryRead setOwnerId(String ownerId) {
+ public ImageSummaryRead setOwnerId(@org.apache.thrift.annotation.Nullable java.lang.String ownerId) {
this.ownerId = ownerId;
return this;
}
@@ -654,11 +669,12 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
}
- public String getUploaderId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUploaderId() {
return this.uploaderId;
}
- public ImageSummaryRead setUploaderId(String uploaderId) {
+ public ImageSummaryRead setUploaderId(@org.apache.thrift.annotation.Nullable java.lang.String uploaderId) {
this.uploaderId = uploaderId;
return this;
}
@@ -682,6 +698,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
*
* @see ShareMode
*/
+ @org.apache.thrift.annotation.Nullable
public ShareMode getShareMode() {
return this.shareMode;
}
@@ -690,7 +707,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
*
* @see ShareMode
*/
- public ImageSummaryRead setShareMode(ShareMode shareMode) {
+ public ImageSummaryRead setShareMode(@org.apache.thrift.annotation.Nullable ShareMode shareMode) {
this.shareMode = shareMode;
return this;
}
@@ -721,16 +738,16 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
public void unsetFileSize() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
}
public void setFileSizeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value);
}
public boolean isIsRestricted() {
@@ -744,16 +761,16 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
public void unsetIsRestricted() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
}
/** Returns true if field isRestricted is set (has been assigned a value) and false otherwise */
public boolean isSetIsRestricted() {
- return EncodingUtils.testBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
}
public void setIsRestrictedIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID, value);
}
public boolean isIsValid() {
@@ -767,16 +784,16 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
public void unsetIsValid() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISVALID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISVALID_ISSET_ID);
}
/** Returns true if field isValid is set (has been assigned a value) and false otherwise */
public boolean isSetIsValid() {
- return EncodingUtils.testBit(__isset_bitfield, __ISVALID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISVALID_ISSET_ID);
}
public void setIsValidIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISVALID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISVALID_ISSET_ID, value);
}
public boolean isIsProcessed() {
@@ -790,16 +807,16 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
public void unsetIsProcessed() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISPROCESSED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISPROCESSED_ISSET_ID);
}
/** Returns true if field isProcessed is set (has been assigned a value) and false otherwise */
public boolean isSetIsProcessed() {
- return EncodingUtils.testBit(__isset_bitfield, __ISPROCESSED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISPROCESSED_ISSET_ID);
}
public void setIsProcessedIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISPROCESSED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISPROCESSED_ISSET_ID, value);
}
public boolean isIsTemplate() {
@@ -813,23 +830,24 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
public void unsetIsTemplate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID);
}
public void setIsTemplateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISTEMPLATE_ISSET_ID, value);
}
+ @org.apache.thrift.annotation.Nullable
public ImagePermissions getDefaultPermissions() {
return this.defaultPermissions;
}
- public ImageSummaryRead setDefaultPermissions(ImagePermissions defaultPermissions) {
+ public ImageSummaryRead setDefaultPermissions(@org.apache.thrift.annotation.Nullable ImagePermissions defaultPermissions) {
this.defaultPermissions = defaultPermissions;
return this;
}
@@ -849,11 +867,12 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
}
+ @org.apache.thrift.annotation.Nullable
public ImagePermissions getUserPermissions() {
return this.userPermissions;
}
- public ImageSummaryRead setUserPermissions(ImagePermissions userPermissions) {
+ public ImageSummaryRead setUserPermissions(@org.apache.thrift.annotation.Nullable ImagePermissions userPermissions) {
this.userPermissions = userPermissions;
return this;
}
@@ -884,16 +903,16 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
public void unsetFileSizeSum() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILESIZESUM_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FILESIZESUM_ISSET_ID);
}
/** Returns true if field fileSizeSum is set (has been assigned a value) and false otherwise */
public boolean isSetFileSizeSum() {
- return EncodingUtils.testBit(__isset_bitfield, __FILESIZESUM_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FILESIZESUM_ISSET_ID);
}
public void setFileSizeSumIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILESIZESUM_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FILESIZESUM_ISSET_ID, value);
}
public int getVersionCount() {
@@ -907,25 +926,25 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
public void unsetVersionCount() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __VERSIONCOUNT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VERSIONCOUNT_ISSET_ID);
}
/** Returns true if field versionCount is set (has been assigned a value) and false otherwise */
public boolean isSetVersionCount() {
- return EncodingUtils.testBit(__isset_bitfield, __VERSIONCOUNT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VERSIONCOUNT_ISSET_ID);
}
public void setVersionCountIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __VERSIONCOUNT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VERSIONCOUNT_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ 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((String)value);
+ setImageBaseId((java.lang.String)value);
}
break;
@@ -933,7 +952,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (value == null) {
unsetLatestVersionId();
} else {
- setLatestVersionId((String)value);
+ setLatestVersionId((java.lang.String)value);
}
break;
@@ -941,7 +960,15 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (value == null) {
unsetImageName();
} else {
- setImageName((String)value);
+ setImageName((java.lang.String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((java.lang.String)value);
}
break;
@@ -949,7 +976,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (value == null) {
unsetOsId();
} else {
- setOsId((Integer)value);
+ setOsId((java.lang.Integer)value);
}
break;
@@ -957,7 +984,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (value == null) {
unsetVirtId();
} else {
- setVirtId((String)value);
+ setVirtId((java.lang.String)value);
}
break;
@@ -965,7 +992,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (value == null) {
unsetCreateTime();
} else {
- setCreateTime((Long)value);
+ setCreateTime((java.lang.Long)value);
}
break;
@@ -973,7 +1000,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (value == null) {
unsetUpdateTime();
} else {
- setUpdateTime((Long)value);
+ setUpdateTime((java.lang.Long)value);
}
break;
@@ -981,7 +1008,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (value == null) {
unsetUploadTime();
} else {
- setUploadTime((Long)value);
+ setUploadTime((java.lang.Long)value);
}
break;
@@ -989,7 +1016,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (value == null) {
unsetExpireTime();
} else {
- setExpireTime((Long)value);
+ setExpireTime((java.lang.Long)value);
}
break;
@@ -997,7 +1024,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (value == null) {
unsetOwnerId();
} else {
- setOwnerId((String)value);
+ setOwnerId((java.lang.String)value);
}
break;
@@ -1005,7 +1032,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (value == null) {
unsetUploaderId();
} else {
- setUploaderId((String)value);
+ setUploaderId((java.lang.String)value);
}
break;
@@ -1021,7 +1048,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (value == null) {
unsetFileSize();
} else {
- setFileSize((Long)value);
+ setFileSize((java.lang.Long)value);
}
break;
@@ -1029,7 +1056,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (value == null) {
unsetIsRestricted();
} else {
- setIsRestricted((Boolean)value);
+ setIsRestricted((java.lang.Boolean)value);
}
break;
@@ -1037,7 +1064,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (value == null) {
unsetIsValid();
} else {
- setIsValid((Boolean)value);
+ setIsValid((java.lang.Boolean)value);
}
break;
@@ -1045,7 +1072,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (value == null) {
unsetIsProcessed();
} else {
- setIsProcessed((Boolean)value);
+ setIsProcessed((java.lang.Boolean)value);
}
break;
@@ -1053,7 +1080,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (value == null) {
unsetIsTemplate();
} else {
- setIsTemplate((Boolean)value);
+ setIsTemplate((java.lang.Boolean)value);
}
break;
@@ -1077,7 +1104,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (value == null) {
unsetFileSizeSum();
} else {
- setFileSizeSum((Long)value);
+ setFileSizeSum((java.lang.Long)value);
}
break;
@@ -1085,14 +1112,15 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (value == null) {
unsetVersionCount();
} else {
- setVersionCount((Integer)value);
+ setVersionCount((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case IMAGE_BASE_ID:
return getImageBaseId();
@@ -1103,6 +1131,9 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
case IMAGE_NAME:
return getImageName();
+ case DESCRIPTION:
+ return getDescription();
+
case OS_ID:
return getOsId();
@@ -1158,13 +1189,13 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return getVersionCount();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -1174,6 +1205,8 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return isSetLatestVersionId();
case IMAGE_NAME:
return isSetImageName();
+ case DESCRIPTION:
+ return isSetDescription();
case OS_ID:
return isSetOsId();
case VIRT_ID:
@@ -1211,13 +1244,11 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
case VERSION_COUNT:
return isSetVersionCount();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof ImageSummaryRead)
return this.equals((ImageSummaryRead)that);
return false;
@@ -1226,6 +1257,8 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
public boolean equals(ImageSummaryRead 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();
@@ -1254,6 +1287,15 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
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_osId = true;
boolean that_present_osId = true;
if (this_present_osId || that_present_osId) {
@@ -1421,114 +1463,77 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- 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_imageName = true && (isSetImageName());
- list.add(present_imageName);
- if (present_imageName)
- list.add(imageName);
-
- 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_uploadTime = true;
- list.add(present_uploadTime);
- if (present_uploadTime)
- list.add(uploadTime);
-
- boolean present_expireTime = true;
- list.add(present_expireTime);
- if (present_expireTime)
- list.add(expireTime);
-
- boolean present_ownerId = true && (isSetOwnerId());
- list.add(present_ownerId);
- if (present_ownerId)
- list.add(ownerId);
-
- boolean present_uploaderId = true && (isSetUploaderId());
- list.add(present_uploaderId);
- if (present_uploaderId)
- list.add(uploaderId);
-
- boolean present_shareMode = true && (isSetShareMode());
- list.add(present_shareMode);
- if (present_shareMode)
- list.add(shareMode.getValue());
-
- boolean present_fileSize = true;
- list.add(present_fileSize);
- if (present_fileSize)
- list.add(fileSize);
-
- boolean present_isRestricted = true;
- list.add(present_isRestricted);
- if (present_isRestricted)
- list.add(isRestricted);
-
- boolean present_isValid = true;
- list.add(present_isValid);
- if (present_isValid)
- list.add(isValid);
-
- boolean present_isProcessed = true;
- list.add(present_isProcessed);
- if (present_isProcessed)
- list.add(isProcessed);
-
- 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);
-
- boolean present_fileSizeSum = true && (isSetFileSizeSum());
- list.add(present_fileSizeSum);
- if (present_fileSizeSum)
- list.add(fileSizeSum);
-
- boolean present_versionCount = true && (isSetVersionCount());
- list.add(present_versionCount);
- if (present_versionCount)
- list.add(versionCount);
-
- 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 + ((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 + 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 + org.apache.thrift.TBaseHelper.hashCode(uploadTime);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(expireTime);
+
+ hashCode = hashCode * 8191 + ((isSetOwnerId()) ? 131071 : 524287);
+ if (isSetOwnerId())
+ hashCode = hashCode * 8191 + ownerId.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetUploaderId()) ? 131071 : 524287);
+ if (isSetUploaderId())
+ hashCode = hashCode * 8191 + uploaderId.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetShareMode()) ? 131071 : 524287);
+ if (isSetShareMode())
+ hashCode = hashCode * 8191 + shareMode.getValue();
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(fileSize);
+
+ hashCode = hashCode * 8191 + ((isRestricted) ? 131071 : 524287);
+
+ hashCode = hashCode * 8191 + ((isValid) ? 131071 : 524287);
+
+ hashCode = hashCode * 8191 + ((isProcessed) ? 131071 : 524287);
+
+ 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();
+
+ hashCode = hashCode * 8191 + ((isSetFileSizeSum()) ? 131071 : 524287);
+ if (isSetFileSizeSum())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(fileSizeSum);
+
+ hashCode = hashCode * 8191 + ((isSetVersionCount()) ? 131071 : 524287);
+ if (isSetVersionCount())
+ hashCode = hashCode * 8191 + versionCount;
+
+ return hashCode;
}
@Override
@@ -1539,7 +1544,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ lastComparison = java.lang.Boolean.compare(isSetImageBaseId(), other.isSetImageBaseId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1549,7 +1554,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLatestVersionId()).compareTo(other.isSetLatestVersionId());
+ lastComparison = java.lang.Boolean.compare(isSetLatestVersionId(), other.isSetLatestVersionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1559,7 +1564,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName());
+ lastComparison = java.lang.Boolean.compare(isSetImageName(), other.isSetImageName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1569,7 +1574,17 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOsId()).compareTo(other.isSetOsId());
+ 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(isSetOsId(), other.isSetOsId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1579,7 +1594,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetVirtId()).compareTo(other.isSetVirtId());
+ lastComparison = java.lang.Boolean.compare(isSetVirtId(), other.isSetVirtId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1589,7 +1604,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime());
+ lastComparison = java.lang.Boolean.compare(isSetCreateTime(), other.isSetCreateTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1599,7 +1614,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUpdateTime()).compareTo(other.isSetUpdateTime());
+ lastComparison = java.lang.Boolean.compare(isSetUpdateTime(), other.isSetUpdateTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1609,7 +1624,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUploadTime()).compareTo(other.isSetUploadTime());
+ lastComparison = java.lang.Boolean.compare(isSetUploadTime(), other.isSetUploadTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1619,7 +1634,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetExpireTime()).compareTo(other.isSetExpireTime());
+ lastComparison = java.lang.Boolean.compare(isSetExpireTime(), other.isSetExpireTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1629,7 +1644,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ lastComparison = java.lang.Boolean.compare(isSetOwnerId(), other.isSetOwnerId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1639,7 +1654,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUploaderId()).compareTo(other.isSetUploaderId());
+ lastComparison = java.lang.Boolean.compare(isSetUploaderId(), other.isSetUploaderId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1649,7 +1664,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetShareMode()).compareTo(other.isSetShareMode());
+ lastComparison = java.lang.Boolean.compare(isSetShareMode(), other.isSetShareMode());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1659,7 +1674,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFileSize()).compareTo(other.isSetFileSize());
+ lastComparison = java.lang.Boolean.compare(isSetFileSize(), other.isSetFileSize());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1669,7 +1684,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsRestricted()).compareTo(other.isSetIsRestricted());
+ lastComparison = java.lang.Boolean.compare(isSetIsRestricted(), other.isSetIsRestricted());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1679,7 +1694,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsValid()).compareTo(other.isSetIsValid());
+ lastComparison = java.lang.Boolean.compare(isSetIsValid(), other.isSetIsValid());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1689,7 +1704,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsProcessed()).compareTo(other.isSetIsProcessed());
+ lastComparison = java.lang.Boolean.compare(isSetIsProcessed(), other.isSetIsProcessed());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1699,7 +1714,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsTemplate()).compareTo(other.isSetIsTemplate());
+ lastComparison = java.lang.Boolean.compare(isSetIsTemplate(), other.isSetIsTemplate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1709,7 +1724,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDefaultPermissions()).compareTo(other.isSetDefaultPermissions());
+ lastComparison = java.lang.Boolean.compare(isSetDefaultPermissions(), other.isSetDefaultPermissions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1719,7 +1734,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUserPermissions()).compareTo(other.isSetUserPermissions());
+ lastComparison = java.lang.Boolean.compare(isSetUserPermissions(), other.isSetUserPermissions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1729,7 +1744,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFileSizeSum()).compareTo(other.isSetFileSizeSum());
+ lastComparison = java.lang.Boolean.compare(isSetFileSizeSum(), other.isSetFileSizeSum());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1739,7 +1754,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetVersionCount()).compareTo(other.isSetVersionCount());
+ lastComparison = java.lang.Boolean.compare(isSetVersionCount(), other.isSetVersionCount());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1752,21 +1767,22 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ImageSummaryRead(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ImageSummaryRead(");
boolean first = true;
sb.append("imageBaseId:");
@@ -1793,6 +1809,14 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
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("osId:");
sb.append(this.osId);
first = false;
@@ -1917,7 +1941,7 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -1927,13 +1951,13 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
}
}
- private static class ImageSummaryReadStandardSchemeFactory implements SchemeFactory {
+ private static class ImageSummaryReadStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ImageSummaryReadStandardScheme getScheme() {
return new ImageSummaryReadStandardScheme();
}
}
- private static class ImageSummaryReadStandardScheme extends StandardScheme<ImageSummaryRead> {
+ private static class ImageSummaryReadStandardScheme extends org.apache.thrift.scheme.StandardScheme<ImageSummaryRead> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ImageSummaryRead struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1969,6 +1993,14 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 23: // 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: // OS_ID
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.osId = iprot.readI32();
@@ -2217,24 +2249,29 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
oprot.writeI32(struct.versionCount);
oprot.writeFieldEnd();
}
+ if (struct.description != null) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
- private static class ImageSummaryReadTupleSchemeFactory implements SchemeFactory {
+ private static class ImageSummaryReadTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ImageSummaryReadTupleScheme getScheme() {
return new ImageSummaryReadTupleScheme();
}
}
- private static class ImageSummaryReadTupleScheme extends TupleScheme<ImageSummaryRead> {
+ private static class ImageSummaryReadTupleScheme extends org.apache.thrift.scheme.TupleScheme<ImageSummaryRead> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ImageSummaryRead 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);
}
@@ -2244,61 +2281,64 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (struct.isSetImageName()) {
optionals.set(2);
}
- if (struct.isSetOsId()) {
+ if (struct.isSetDescription()) {
optionals.set(3);
}
- if (struct.isSetVirtId()) {
+ if (struct.isSetOsId()) {
optionals.set(4);
}
- if (struct.isSetCreateTime()) {
+ if (struct.isSetVirtId()) {
optionals.set(5);
}
- if (struct.isSetUpdateTime()) {
+ if (struct.isSetCreateTime()) {
optionals.set(6);
}
- if (struct.isSetUploadTime()) {
+ if (struct.isSetUpdateTime()) {
optionals.set(7);
}
- if (struct.isSetExpireTime()) {
+ if (struct.isSetUploadTime()) {
optionals.set(8);
}
- if (struct.isSetOwnerId()) {
+ if (struct.isSetExpireTime()) {
optionals.set(9);
}
- if (struct.isSetUploaderId()) {
+ if (struct.isSetOwnerId()) {
optionals.set(10);
}
- if (struct.isSetShareMode()) {
+ if (struct.isSetUploaderId()) {
optionals.set(11);
}
- if (struct.isSetFileSize()) {
+ if (struct.isSetShareMode()) {
optionals.set(12);
}
- if (struct.isSetIsRestricted()) {
+ if (struct.isSetFileSize()) {
optionals.set(13);
}
- if (struct.isSetIsValid()) {
+ if (struct.isSetIsRestricted()) {
optionals.set(14);
}
- if (struct.isSetIsProcessed()) {
+ if (struct.isSetIsValid()) {
optionals.set(15);
}
- if (struct.isSetIsTemplate()) {
+ if (struct.isSetIsProcessed()) {
optionals.set(16);
}
- if (struct.isSetDefaultPermissions()) {
+ if (struct.isSetIsTemplate()) {
optionals.set(17);
}
- if (struct.isSetUserPermissions()) {
+ if (struct.isSetDefaultPermissions()) {
optionals.set(18);
}
- if (struct.isSetFileSizeSum()) {
+ if (struct.isSetUserPermissions()) {
optionals.set(19);
}
- if (struct.isSetVersionCount()) {
+ if (struct.isSetFileSizeSum()) {
optionals.set(20);
}
- oprot.writeBitSet(optionals, 21);
+ if (struct.isSetVersionCount()) {
+ optionals.set(21);
+ }
+ oprot.writeBitSet(optionals, 22);
if (struct.isSetImageBaseId()) {
oprot.writeString(struct.imageBaseId);
}
@@ -2308,6 +2348,9 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
if (struct.isSetImageName()) {
oprot.writeString(struct.imageName);
}
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
if (struct.isSetOsId()) {
oprot.writeI32(struct.osId);
}
@@ -2366,8 +2409,8 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ImageSummaryRead struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(21);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(22);
if (incoming.get(0)) {
struct.imageBaseId = iprot.readString();
struct.setImageBaseIdIsSet(true);
@@ -2381,81 +2424,88 @@ public class ImageSummaryRead implements org.apache.thrift.TBase<ImageSummaryRea
struct.setImageNameIsSet(true);
}
if (incoming.get(3)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(4)) {
struct.osId = iprot.readI32();
struct.setOsIdIsSet(true);
}
- if (incoming.get(4)) {
+ if (incoming.get(5)) {
struct.virtId = iprot.readString();
struct.setVirtIdIsSet(true);
}
- if (incoming.get(5)) {
+ if (incoming.get(6)) {
struct.createTime = iprot.readI64();
struct.setCreateTimeIsSet(true);
}
- if (incoming.get(6)) {
+ if (incoming.get(7)) {
struct.updateTime = iprot.readI64();
struct.setUpdateTimeIsSet(true);
}
- if (incoming.get(7)) {
+ if (incoming.get(8)) {
struct.uploadTime = iprot.readI64();
struct.setUploadTimeIsSet(true);
}
- if (incoming.get(8)) {
+ if (incoming.get(9)) {
struct.expireTime = iprot.readI64();
struct.setExpireTimeIsSet(true);
}
- if (incoming.get(9)) {
+ if (incoming.get(10)) {
struct.ownerId = iprot.readString();
struct.setOwnerIdIsSet(true);
}
- if (incoming.get(10)) {
+ if (incoming.get(11)) {
struct.uploaderId = iprot.readString();
struct.setUploaderIdIsSet(true);
}
- if (incoming.get(11)) {
+ if (incoming.get(12)) {
struct.shareMode = org.openslx.bwlp.thrift.iface.ShareMode.findByValue(iprot.readI32());
struct.setShareModeIsSet(true);
}
- if (incoming.get(12)) {
+ if (incoming.get(13)) {
struct.fileSize = iprot.readI64();
struct.setFileSizeIsSet(true);
}
- if (incoming.get(13)) {
+ if (incoming.get(14)) {
struct.isRestricted = iprot.readBool();
struct.setIsRestrictedIsSet(true);
}
- if (incoming.get(14)) {
+ if (incoming.get(15)) {
struct.isValid = iprot.readBool();
struct.setIsValidIsSet(true);
}
- if (incoming.get(15)) {
+ if (incoming.get(16)) {
struct.isProcessed = iprot.readBool();
struct.setIsProcessedIsSet(true);
}
- if (incoming.get(16)) {
+ if (incoming.get(17)) {
struct.isTemplate = iprot.readBool();
struct.setIsTemplateIsSet(true);
}
- if (incoming.get(17)) {
+ if (incoming.get(18)) {
struct.defaultPermissions = new ImagePermissions();
struct.defaultPermissions.read(iprot);
struct.setDefaultPermissionsIsSet(true);
}
- if (incoming.get(18)) {
+ if (incoming.get(19)) {
struct.userPermissions = new ImagePermissions();
struct.userPermissions.read(iprot);
struct.setUserPermissionsIsSet(true);
}
- if (incoming.get(19)) {
+ if (incoming.get(20)) {
struct.fileSizeSum = iprot.readI64();
struct.setFileSizeSumIsSet(true);
}
- if (incoming.get(20)) {
+ if (incoming.get(21)) {
struct.versionCount = iprot.readI32();
struct.setVersionCountIsSet(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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java
index abba44a..27d3256 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionDetails.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 ImageVersionDetails implements org.apache.thrift.TBase<ImageVersionDetails, ImageVersionDetails._Fields>, java.io.Serializable, Cloneable, Comparable<ImageVersionDetails> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageVersionDetails");
@@ -48,21 +21,18 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
private static final org.apache.thrift.protocol.TField IS_PROCESSED_FIELD_DESC = new org.apache.thrift.protocol.TField("isProcessed", org.apache.thrift.protocol.TType.BOOL, (short)9);
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)10);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ImageVersionDetailsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ImageVersionDetailsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ImageVersionDetailsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ImageVersionDetailsTupleSchemeFactory();
- public String versionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String versionId; // required
public long createTime; // required
public long expireTime; // required
public long fileSize; // required
- public String uploaderId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String uploaderId; // required
public boolean isRestricted; // required
public boolean isValid; // required
public boolean isProcessed; // required
- public List<String> software; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> software; // 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 {
@@ -76,10 +46,10 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
IS_PROCESSED((short)9, "isProcessed"),
SOFTWARE((short)10, "software");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -87,6 +57,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
/**
* 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: // VERSION_ID
@@ -118,21 +89,22 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -141,7 +113,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -154,9 +126,9 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
private static final int __ISVALID_ISSET_ID = 4;
private static final int __ISPROCESSED_ISSET_ID = 5;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.VERSION_ID, new org.apache.thrift.meta_data.FieldMetaData("versionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
tmpMap.put(_Fields.CREATE_TIME, new org.apache.thrift.meta_data.FieldMetaData("createTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -176,7 +148,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
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))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImageVersionDetails.class, metaDataMap);
}
@@ -184,15 +156,15 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
}
public ImageVersionDetails(
- String versionId,
+ java.lang.String versionId,
long createTime,
long expireTime,
long fileSize,
- String uploaderId,
+ java.lang.String uploaderId,
boolean isRestricted,
boolean isValid,
boolean isProcessed,
- List<String> software)
+ java.util.List<java.lang.String> software)
{
this();
this.versionId = versionId;
@@ -230,7 +202,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
this.isValid = other.isValid;
this.isProcessed = other.isProcessed;
if (other.isSetSoftware()) {
- List<String> __this__software = new ArrayList<String>(other.software);
+ java.util.List<java.lang.String> __this__software = new java.util.ArrayList<java.lang.String>(other.software);
this.software = __this__software;
}
}
@@ -258,11 +230,12 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
this.software = null;
}
- public String getVersionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getVersionId() {
return this.versionId;
}
- public ImageVersionDetails setVersionId(String versionId) {
+ public ImageVersionDetails setVersionId(@org.apache.thrift.annotation.Nullable java.lang.String versionId) {
this.versionId = versionId;
return this;
}
@@ -293,16 +266,16 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
}
public void unsetCreateTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
}
public void setCreateTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
}
public long getExpireTime() {
@@ -316,16 +289,16 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
}
public void unsetExpireTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXPIRETIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EXPIRETIME_ISSET_ID);
}
/** Returns true if field expireTime is set (has been assigned a value) and false otherwise */
public boolean isSetExpireTime() {
- return EncodingUtils.testBit(__isset_bitfield, __EXPIRETIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXPIRETIME_ISSET_ID);
}
public void setExpireTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXPIRETIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EXPIRETIME_ISSET_ID, value);
}
public long getFileSize() {
@@ -339,23 +312,24 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
}
public void unsetFileSize() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
}
public void setFileSizeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value);
}
- public String getUploaderId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUploaderId() {
return this.uploaderId;
}
- public ImageVersionDetails setUploaderId(String uploaderId) {
+ public ImageVersionDetails setUploaderId(@org.apache.thrift.annotation.Nullable java.lang.String uploaderId) {
this.uploaderId = uploaderId;
return this;
}
@@ -386,16 +360,16 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
}
public void unsetIsRestricted() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
}
/** Returns true if field isRestricted is set (has been assigned a value) and false otherwise */
public boolean isSetIsRestricted() {
- return EncodingUtils.testBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
}
public void setIsRestrictedIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID, value);
}
public boolean isIsValid() {
@@ -409,16 +383,16 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
}
public void unsetIsValid() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISVALID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISVALID_ISSET_ID);
}
/** Returns true if field isValid is set (has been assigned a value) and false otherwise */
public boolean isSetIsValid() {
- return EncodingUtils.testBit(__isset_bitfield, __ISVALID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISVALID_ISSET_ID);
}
public void setIsValidIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISVALID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISVALID_ISSET_ID, value);
}
public boolean isIsProcessed() {
@@ -432,38 +406,40 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
}
public void unsetIsProcessed() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISPROCESSED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISPROCESSED_ISSET_ID);
}
/** Returns true if field isProcessed is set (has been assigned a value) and false otherwise */
public boolean isSetIsProcessed() {
- return EncodingUtils.testBit(__isset_bitfield, __ISPROCESSED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISPROCESSED_ISSET_ID);
}
public void setIsProcessedIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISPROCESSED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISPROCESSED_ISSET_ID, value);
}
public int getSoftwareSize() {
return (this.software == null) ? 0 : this.software.size();
}
- public java.util.Iterator<String> getSoftwareIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> getSoftwareIterator() {
return (this.software == null) ? null : this.software.iterator();
}
- public void addToSoftware(String elem) {
+ public void addToSoftware(java.lang.String elem) {
if (this.software == null) {
- this.software = new ArrayList<String>();
+ this.software = new java.util.ArrayList<java.lang.String>();
}
this.software.add(elem);
}
- public List<String> getSoftware() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getSoftware() {
return this.software;
}
- public ImageVersionDetails setSoftware(List<String> software) {
+ public ImageVersionDetails setSoftware(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> software) {
this.software = software;
return this;
}
@@ -483,13 +459,13 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case VERSION_ID:
if (value == null) {
unsetVersionId();
} else {
- setVersionId((String)value);
+ setVersionId((java.lang.String)value);
}
break;
@@ -497,7 +473,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
if (value == null) {
unsetCreateTime();
} else {
- setCreateTime((Long)value);
+ setCreateTime((java.lang.Long)value);
}
break;
@@ -505,7 +481,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
if (value == null) {
unsetExpireTime();
} else {
- setExpireTime((Long)value);
+ setExpireTime((java.lang.Long)value);
}
break;
@@ -513,7 +489,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
if (value == null) {
unsetFileSize();
} else {
- setFileSize((Long)value);
+ setFileSize((java.lang.Long)value);
}
break;
@@ -521,7 +497,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
if (value == null) {
unsetUploaderId();
} else {
- setUploaderId((String)value);
+ setUploaderId((java.lang.String)value);
}
break;
@@ -529,7 +505,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
if (value == null) {
unsetIsRestricted();
} else {
- setIsRestricted((Boolean)value);
+ setIsRestricted((java.lang.Boolean)value);
}
break;
@@ -537,7 +513,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
if (value == null) {
unsetIsValid();
} else {
- setIsValid((Boolean)value);
+ setIsValid((java.lang.Boolean)value);
}
break;
@@ -545,7 +521,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
if (value == null) {
unsetIsProcessed();
} else {
- setIsProcessed((Boolean)value);
+ setIsProcessed((java.lang.Boolean)value);
}
break;
@@ -553,14 +529,15 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
if (value == null) {
unsetSoftware();
} else {
- setSoftware((List<String>)value);
+ setSoftware((java.util.List<java.lang.String>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case VERSION_ID:
return getVersionId();
@@ -590,13 +567,13 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
return getSoftware();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -619,13 +596,11 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
case SOFTWARE:
return isSetSoftware();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof ImageVersionDetails)
return this.equals((ImageVersionDetails)that);
return false;
@@ -634,6 +609,8 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
public boolean equals(ImageVersionDetails that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_versionId = true && this.isSetVersionId();
boolean that_present_versionId = true && that.isSetVersionId();
@@ -721,54 +698,33 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_versionId = true && (isSetVersionId());
- list.add(present_versionId);
- if (present_versionId)
- list.add(versionId);
+ hashCode = hashCode * 8191 + ((isSetVersionId()) ? 131071 : 524287);
+ if (isSetVersionId())
+ hashCode = hashCode * 8191 + versionId.hashCode();
- boolean present_createTime = true;
- list.add(present_createTime);
- if (present_createTime)
- list.add(createTime);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(createTime);
- boolean present_expireTime = true;
- list.add(present_expireTime);
- if (present_expireTime)
- list.add(expireTime);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(expireTime);
- boolean present_fileSize = true;
- list.add(present_fileSize);
- if (present_fileSize)
- list.add(fileSize);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(fileSize);
- boolean present_uploaderId = true && (isSetUploaderId());
- list.add(present_uploaderId);
- if (present_uploaderId)
- list.add(uploaderId);
+ hashCode = hashCode * 8191 + ((isSetUploaderId()) ? 131071 : 524287);
+ if (isSetUploaderId())
+ hashCode = hashCode * 8191 + uploaderId.hashCode();
- boolean present_isRestricted = true;
- list.add(present_isRestricted);
- if (present_isRestricted)
- list.add(isRestricted);
+ hashCode = hashCode * 8191 + ((isRestricted) ? 131071 : 524287);
- boolean present_isValid = true;
- list.add(present_isValid);
- if (present_isValid)
- list.add(isValid);
+ hashCode = hashCode * 8191 + ((isValid) ? 131071 : 524287);
- boolean present_isProcessed = true;
- list.add(present_isProcessed);
- if (present_isProcessed)
- list.add(isProcessed);
+ hashCode = hashCode * 8191 + ((isProcessed) ? 131071 : 524287);
- boolean present_software = true && (isSetSoftware());
- list.add(present_software);
- if (present_software)
- list.add(software);
+ hashCode = hashCode * 8191 + ((isSetSoftware()) ? 131071 : 524287);
+ if (isSetSoftware())
+ hashCode = hashCode * 8191 + software.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -779,7 +735,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetVersionId()).compareTo(other.isSetVersionId());
+ lastComparison = java.lang.Boolean.compare(isSetVersionId(), other.isSetVersionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -789,7 +745,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime());
+ lastComparison = java.lang.Boolean.compare(isSetCreateTime(), other.isSetCreateTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -799,7 +755,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetExpireTime()).compareTo(other.isSetExpireTime());
+ lastComparison = java.lang.Boolean.compare(isSetExpireTime(), other.isSetExpireTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -809,7 +765,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFileSize()).compareTo(other.isSetFileSize());
+ lastComparison = java.lang.Boolean.compare(isSetFileSize(), other.isSetFileSize());
if (lastComparison != 0) {
return lastComparison;
}
@@ -819,7 +775,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUploaderId()).compareTo(other.isSetUploaderId());
+ lastComparison = java.lang.Boolean.compare(isSetUploaderId(), other.isSetUploaderId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -829,7 +785,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsRestricted()).compareTo(other.isSetIsRestricted());
+ lastComparison = java.lang.Boolean.compare(isSetIsRestricted(), other.isSetIsRestricted());
if (lastComparison != 0) {
return lastComparison;
}
@@ -839,7 +795,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsValid()).compareTo(other.isSetIsValid());
+ lastComparison = java.lang.Boolean.compare(isSetIsValid(), other.isSetIsValid());
if (lastComparison != 0) {
return lastComparison;
}
@@ -849,7 +805,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsProcessed()).compareTo(other.isSetIsProcessed());
+ lastComparison = java.lang.Boolean.compare(isSetIsProcessed(), other.isSetIsProcessed());
if (lastComparison != 0) {
return lastComparison;
}
@@ -859,7 +815,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSoftware()).compareTo(other.isSetSoftware());
+ lastComparison = java.lang.Boolean.compare(isSetSoftware(), other.isSetSoftware());
if (lastComparison != 0) {
return lastComparison;
}
@@ -872,21 +828,22 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ImageVersionDetails(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ImageVersionDetails(");
boolean first = true;
sb.append("versionId:");
@@ -953,7 +910,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -963,13 +920,13 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
}
}
- private static class ImageVersionDetailsStandardSchemeFactory implements SchemeFactory {
+ private static class ImageVersionDetailsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ImageVersionDetailsStandardScheme getScheme() {
return new ImageVersionDetailsStandardScheme();
}
}
- private static class ImageVersionDetailsStandardScheme extends StandardScheme<ImageVersionDetails> {
+ private static class ImageVersionDetailsStandardScheme extends org.apache.thrift.scheme.StandardScheme<ImageVersionDetails> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ImageVersionDetails struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1049,8 +1006,8 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list50 = iprot.readListBegin();
- struct.software = new ArrayList<String>(_list50.size);
- String _elem51;
+ struct.software = new java.util.ArrayList<java.lang.String>(_list50.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem51;
for (int _i52 = 0; _i52 < _list50.size; ++_i52)
{
_elem51 = iprot.readString();
@@ -1110,7 +1067,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
oprot.writeFieldBegin(SOFTWARE_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.software.size()));
- for (String _iter53 : struct.software)
+ for (java.lang.String _iter53 : struct.software)
{
oprot.writeString(_iter53);
}
@@ -1124,18 +1081,18 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
}
- private static class ImageVersionDetailsTupleSchemeFactory implements SchemeFactory {
+ private static class ImageVersionDetailsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ImageVersionDetailsTupleScheme getScheme() {
return new ImageVersionDetailsTupleScheme();
}
}
- private static class ImageVersionDetailsTupleScheme extends TupleScheme<ImageVersionDetails> {
+ private static class ImageVersionDetailsTupleScheme extends org.apache.thrift.scheme.TupleScheme<ImageVersionDetails> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ImageVersionDetails 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.isSetVersionId()) {
optionals.set(0);
}
@@ -1191,7 +1148,7 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
if (struct.isSetSoftware()) {
{
oprot.writeI32(struct.software.size());
- for (String _iter54 : struct.software)
+ for (java.lang.String _iter54 : struct.software)
{
oprot.writeString(_iter54);
}
@@ -1201,8 +1158,8 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ImageVersionDetails struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(9);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(9);
if (incoming.get(0)) {
struct.versionId = iprot.readString();
struct.setVersionIdIsSet(true);
@@ -1237,9 +1194,9 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
}
if (incoming.get(8)) {
{
- 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);
- String _elem56;
+ org.apache.thrift.protocol.TList _list55 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.software = new java.util.ArrayList<java.lang.String>(_list55.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem56;
for (int _i57 = 0; _i57 < _list55.size; ++_i57)
{
_elem56 = iprot.readString();
@@ -1251,5 +1208,8 @@ public class ImageVersionDetails implements org.apache.thrift.TBase<ImageVersion
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionWrite.java b/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionWrite.java
index 70a41fd..1870045 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionWrite.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ImageVersionWrite.java
@@ -1,50 +1,20 @@
/**
- * 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 ImageVersionWrite implements org.apache.thrift.TBase<ImageVersionWrite, ImageVersionWrite._Fields>, java.io.Serializable, Cloneable, Comparable<ImageVersionWrite> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ImageVersionWrite");
private static final org.apache.thrift.protocol.TField IS_RESTRICTED_FIELD_DESC = new org.apache.thrift.protocol.TField("isRestricted", org.apache.thrift.protocol.TType.BOOL, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ImageVersionWriteStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ImageVersionWriteTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ImageVersionWriteStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ImageVersionWriteTupleSchemeFactory();
public boolean isRestricted; // required
@@ -52,10 +22,10 @@ public class ImageVersionWrite implements org.apache.thrift.TBase<ImageVersionWr
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
IS_RESTRICTED((short)2, "isRestricted");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -63,6 +33,7 @@ public class ImageVersionWrite implements org.apache.thrift.TBase<ImageVersionWr
/**
* 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 2: // IS_RESTRICTED
@@ -78,21 +49,22 @@ public class ImageVersionWrite implements org.apache.thrift.TBase<ImageVersionWr
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -101,7 +73,7 @@ public class ImageVersionWrite implements org.apache.thrift.TBase<ImageVersionWr
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -109,12 +81,12 @@ public class ImageVersionWrite implements org.apache.thrift.TBase<ImageVersionWr
// isset id assignments
private static final int __ISRESTRICTED_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.IS_RESTRICTED, new org.apache.thrift.meta_data.FieldMetaData("isRestricted", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ImageVersionWrite.class, metaDataMap);
}
@@ -158,57 +130,56 @@ public class ImageVersionWrite implements org.apache.thrift.TBase<ImageVersionWr
}
public void unsetIsRestricted() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
}
/** Returns true if field isRestricted is set (has been assigned a value) and false otherwise */
public boolean isSetIsRestricted() {
- return EncodingUtils.testBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
}
public void setIsRestrictedIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case IS_RESTRICTED:
if (value == null) {
unsetIsRestricted();
} else {
- setIsRestricted((Boolean)value);
+ setIsRestricted((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case IS_RESTRICTED:
return isIsRestricted();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case IS_RESTRICTED:
return isSetIsRestricted();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof ImageVersionWrite)
return this.equals((ImageVersionWrite)that);
return false;
@@ -217,6 +188,8 @@ public class ImageVersionWrite implements org.apache.thrift.TBase<ImageVersionWr
public boolean equals(ImageVersionWrite that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_isRestricted = true;
boolean that_present_isRestricted = true;
@@ -232,14 +205,11 @@ public class ImageVersionWrite implements org.apache.thrift.TBase<ImageVersionWr
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_isRestricted = true;
- list.add(present_isRestricted);
- if (present_isRestricted)
- list.add(isRestricted);
+ hashCode = hashCode * 8191 + ((isRestricted) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -250,7 +220,7 @@ public class ImageVersionWrite implements org.apache.thrift.TBase<ImageVersionWr
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetIsRestricted()).compareTo(other.isSetIsRestricted());
+ lastComparison = java.lang.Boolean.compare(isSetIsRestricted(), other.isSetIsRestricted());
if (lastComparison != 0) {
return lastComparison;
}
@@ -263,21 +233,22 @@ public class ImageVersionWrite implements org.apache.thrift.TBase<ImageVersionWr
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ImageVersionWrite(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ImageVersionWrite(");
boolean first = true;
sb.append("isRestricted:");
@@ -300,7 +271,7 @@ public class ImageVersionWrite implements org.apache.thrift.TBase<ImageVersionWr
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -310,13 +281,13 @@ public class ImageVersionWrite implements org.apache.thrift.TBase<ImageVersionWr
}
}
- private static class ImageVersionWriteStandardSchemeFactory implements SchemeFactory {
+ private static class ImageVersionWriteStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ImageVersionWriteStandardScheme getScheme() {
return new ImageVersionWriteStandardScheme();
}
}
- private static class ImageVersionWriteStandardScheme extends StandardScheme<ImageVersionWrite> {
+ private static class ImageVersionWriteStandardScheme extends org.apache.thrift.scheme.StandardScheme<ImageVersionWrite> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ImageVersionWrite struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -360,18 +331,18 @@ public class ImageVersionWrite implements org.apache.thrift.TBase<ImageVersionWr
}
- private static class ImageVersionWriteTupleSchemeFactory implements SchemeFactory {
+ private static class ImageVersionWriteTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ImageVersionWriteTupleScheme getScheme() {
return new ImageVersionWriteTupleScheme();
}
}
- private static class ImageVersionWriteTupleScheme extends TupleScheme<ImageVersionWrite> {
+ private static class ImageVersionWriteTupleScheme extends org.apache.thrift.scheme.TupleScheme<ImageVersionWrite> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ImageVersionWrite 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.isSetIsRestricted()) {
optionals.set(0);
}
@@ -383,8 +354,8 @@ public class ImageVersionWrite implements org.apache.thrift.TBase<ImageVersionWr
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ImageVersionWrite struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.isRestricted = iprot.readBool();
struct.setIsRestrictedIsSet(true);
@@ -392,5 +363,8 @@ public class ImageVersionWrite implements org.apache.thrift.TBase<ImageVersionWr
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/InvocationError.java b/src/main/java/org/openslx/bwlp/thrift/iface/InvocationError.java
index 5f2b9a9..93d1477 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/InvocationError.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/InvocationError.java
@@ -1,5 +1,5 @@
/**
- * 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
@@ -7,10 +7,7 @@
package org.openslx.bwlp.thrift.iface;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public enum InvocationError implements org.apache.thrift.TEnum {
MISSING_DATA(0),
INVALID_DATA(1),
@@ -37,6 +34,7 @@ public enum InvocationError implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static InvocationError findByValue(int value) {
switch (value) {
case 0:
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LdapFilter.java b/src/main/java/org/openslx/bwlp/thrift/iface/LdapFilter.java
index ba80e7b..3666868 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/LdapFilter.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/LdapFilter.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 = "2018-11-23")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilter._Fields>, java.io.Serializable, Cloneable, Comparable<LdapFilter> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LdapFilter");
@@ -43,16 +16,13 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
private static final org.apache.thrift.protocol.TField FILTER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("filterId", org.apache.thrift.protocol.TType.I32, (short)3);
private static final org.apache.thrift.protocol.TField TITLE_FIELD_DESC = new org.apache.thrift.protocol.TField("title", org.apache.thrift.protocol.TType.STRING, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new LdapFilterStandardSchemeFactory());
- schemes.put(TupleScheme.class, new LdapFilterTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LdapFilterStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LdapFilterTupleSchemeFactory();
- public String attribute; // required
- public String value; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String attribute; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String value; // required
public int filterId; // optional
- public String title; // optional
+ public @org.apache.thrift.annotation.Nullable java.lang.String title; // 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 {
@@ -61,10 +31,10 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
FILTER_ID((short)3, "filterId"),
TITLE((short)4, "title");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -72,6 +42,7 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
/**
* 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: // ATTRIBUTE
@@ -93,21 +64,22 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -116,7 +88,7 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -125,9 +97,9 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
private static final int __FILTERID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.FILTER_ID,_Fields.TITLE};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.ATTRIBUTE, new org.apache.thrift.meta_data.FieldMetaData("attribute", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -136,7 +108,7 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.TITLE, new org.apache.thrift.meta_data.FieldMetaData("title", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LdapFilter.class, metaDataMap);
}
@@ -144,8 +116,8 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
}
public LdapFilter(
- String attribute,
- String value)
+ java.lang.String attribute,
+ java.lang.String value)
{
this();
this.attribute = attribute;
@@ -182,11 +154,12 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
this.title = null;
}
- public String getAttribute() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getAttribute() {
return this.attribute;
}
- public LdapFilter setAttribute(String attribute) {
+ public LdapFilter setAttribute(@org.apache.thrift.annotation.Nullable java.lang.String attribute) {
this.attribute = attribute;
return this;
}
@@ -206,11 +179,12 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
}
}
- public String getValue() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getValue() {
return this.value;
}
- public LdapFilter setValue(String value) {
+ public LdapFilter setValue(@org.apache.thrift.annotation.Nullable java.lang.String value) {
this.value = value;
return this;
}
@@ -241,23 +215,24 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
}
public void unsetFilterId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILTERID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __FILTERID_ISSET_ID);
}
/** Returns true if field filterId is set (has been assigned a value) and false otherwise */
public boolean isSetFilterId() {
- return EncodingUtils.testBit(__isset_bitfield, __FILTERID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FILTERID_ISSET_ID);
}
public void setFilterIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILTERID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FILTERID_ISSET_ID, value);
}
- public String getTitle() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getTitle() {
return this.title;
}
- public LdapFilter setTitle(String title) {
+ public LdapFilter setTitle(@org.apache.thrift.annotation.Nullable java.lang.String title) {
this.title = title;
return this;
}
@@ -277,13 +252,13 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ATTRIBUTE:
if (value == null) {
unsetAttribute();
} else {
- setAttribute((String)value);
+ setAttribute((java.lang.String)value);
}
break;
@@ -291,7 +266,7 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
if (value == null) {
unsetValue();
} else {
- setValue((String)value);
+ setValue((java.lang.String)value);
}
break;
@@ -299,7 +274,7 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
if (value == null) {
unsetFilterId();
} else {
- setFilterId((Integer)value);
+ setFilterId((java.lang.Integer)value);
}
break;
@@ -307,14 +282,15 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
if (value == null) {
unsetTitle();
} else {
- setTitle((String)value);
+ setTitle((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ATTRIBUTE:
return getAttribute();
@@ -329,13 +305,13 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
return getTitle();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -348,13 +324,11 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
case TITLE:
return isSetTitle();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof LdapFilter)
return this.equals((LdapFilter)that);
return false;
@@ -363,6 +337,8 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
public boolean equals(LdapFilter that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_attribute = true && this.isSetAttribute();
boolean that_present_attribute = true && that.isSetAttribute();
@@ -405,29 +381,25 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_attribute = true && (isSetAttribute());
- list.add(present_attribute);
- if (present_attribute)
- list.add(attribute);
+ hashCode = hashCode * 8191 + ((isSetAttribute()) ? 131071 : 524287);
+ if (isSetAttribute())
+ hashCode = hashCode * 8191 + attribute.hashCode();
- boolean present_value = true && (isSetValue());
- list.add(present_value);
- if (present_value)
- list.add(value);
+ hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287);
+ if (isSetValue())
+ hashCode = hashCode * 8191 + value.hashCode();
- boolean present_filterId = true && (isSetFilterId());
- list.add(present_filterId);
- if (present_filterId)
- list.add(filterId);
+ hashCode = hashCode * 8191 + ((isSetFilterId()) ? 131071 : 524287);
+ if (isSetFilterId())
+ hashCode = hashCode * 8191 + filterId;
- boolean present_title = true && (isSetTitle());
- list.add(present_title);
- if (present_title)
- list.add(title);
+ hashCode = hashCode * 8191 + ((isSetTitle()) ? 131071 : 524287);
+ if (isSetTitle())
+ hashCode = hashCode * 8191 + title.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -438,7 +410,7 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAttribute()).compareTo(other.isSetAttribute());
+ lastComparison = java.lang.Boolean.compare(isSetAttribute(), other.isSetAttribute());
if (lastComparison != 0) {
return lastComparison;
}
@@ -448,7 +420,7 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
+ lastComparison = java.lang.Boolean.compare(isSetValue(), other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
@@ -458,7 +430,7 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFilterId()).compareTo(other.isSetFilterId());
+ lastComparison = java.lang.Boolean.compare(isSetFilterId(), other.isSetFilterId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -468,7 +440,7 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTitle()).compareTo(other.isSetTitle());
+ lastComparison = java.lang.Boolean.compare(isSetTitle(), other.isSetTitle());
if (lastComparison != 0) {
return lastComparison;
}
@@ -481,21 +453,22 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("LdapFilter(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("LdapFilter(");
boolean first = true;
sb.append("attribute:");
@@ -546,7 +519,7 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -556,13 +529,13 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
}
}
- private static class LdapFilterStandardSchemeFactory implements SchemeFactory {
+ private static class LdapFilterStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LdapFilterStandardScheme getScheme() {
return new LdapFilterStandardScheme();
}
}
- private static class LdapFilterStandardScheme extends StandardScheme<LdapFilter> {
+ private static class LdapFilterStandardScheme extends org.apache.thrift.scheme.StandardScheme<LdapFilter> {
public void read(org.apache.thrift.protocol.TProtocol iprot, LdapFilter struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -649,18 +622,18 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
}
- private static class LdapFilterTupleSchemeFactory implements SchemeFactory {
+ private static class LdapFilterTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LdapFilterTupleScheme getScheme() {
return new LdapFilterTupleScheme();
}
}
- private static class LdapFilterTupleScheme extends TupleScheme<LdapFilter> {
+ private static class LdapFilterTupleScheme extends org.apache.thrift.scheme.TupleScheme<LdapFilter> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, LdapFilter 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.isSetAttribute()) {
optionals.set(0);
}
@@ -690,8 +663,8 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LdapFilter struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.attribute = iprot.readString();
struct.setAttributeIsSet(true);
@@ -711,5 +684,8 @@ public class LdapFilter implements org.apache.thrift.TBase<LdapFilter, LdapFilte
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LecturePermissions.java b/src/main/java/org/openslx/bwlp/thrift/iface/LecturePermissions.java
index a3b8d8a..2149f30 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/LecturePermissions.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/LecturePermissions.java
@@ -1,51 +1,21 @@
/**
- * 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 LecturePermissions implements org.apache.thrift.TBase<LecturePermissions, LecturePermissions._Fields>, java.io.Serializable, Cloneable, Comparable<LecturePermissions> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LecturePermissions");
private static final org.apache.thrift.protocol.TField EDIT_FIELD_DESC = new org.apache.thrift.protocol.TField("edit", org.apache.thrift.protocol.TType.BOOL, (short)1);
private static final org.apache.thrift.protocol.TField ADMIN_FIELD_DESC = new org.apache.thrift.protocol.TField("admin", org.apache.thrift.protocol.TType.BOOL, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new LecturePermissionsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new LecturePermissionsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LecturePermissionsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LecturePermissionsTupleSchemeFactory();
public boolean edit; // required
public boolean admin; // required
@@ -55,10 +25,10 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
EDIT((short)1, "edit"),
ADMIN((short)2, "admin");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -66,6 +36,7 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
/**
* 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: // EDIT
@@ -83,21 +54,22 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -106,7 +78,7 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -115,14 +87,14 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
private static final int __EDIT_ISSET_ID = 0;
private static final int __ADMIN_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.EDIT, new org.apache.thrift.meta_data.FieldMetaData("edit", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.ADMIN, new org.apache.thrift.meta_data.FieldMetaData("admin", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LecturePermissions.class, metaDataMap);
}
@@ -172,16 +144,16 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
}
public void unsetEdit() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EDIT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EDIT_ISSET_ID);
}
/** Returns true if field edit is set (has been assigned a value) and false otherwise */
public boolean isSetEdit() {
- return EncodingUtils.testBit(__isset_bitfield, __EDIT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EDIT_ISSET_ID);
}
public void setEditIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EDIT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EDIT_ISSET_ID, value);
}
public boolean isAdmin() {
@@ -195,25 +167,25 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
}
public void unsetAdmin() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ADMIN_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ADMIN_ISSET_ID);
}
/** Returns true if field admin is set (has been assigned a value) and false otherwise */
public boolean isSetAdmin() {
- return EncodingUtils.testBit(__isset_bitfield, __ADMIN_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ADMIN_ISSET_ID);
}
public void setAdminIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ADMIN_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ADMIN_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case EDIT:
if (value == null) {
unsetEdit();
} else {
- setEdit((Boolean)value);
+ setEdit((java.lang.Boolean)value);
}
break;
@@ -221,14 +193,15 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
if (value == null) {
unsetAdmin();
} else {
- setAdmin((Boolean)value);
+ setAdmin((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EDIT:
return isEdit();
@@ -237,13 +210,13 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
return isAdmin();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -252,13 +225,11 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
case ADMIN:
return isSetAdmin();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof LecturePermissions)
return this.equals((LecturePermissions)that);
return false;
@@ -267,6 +238,8 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
public boolean equals(LecturePermissions that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_edit = true;
boolean that_present_edit = true;
@@ -291,19 +264,13 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_edit = true;
- list.add(present_edit);
- if (present_edit)
- list.add(edit);
+ hashCode = hashCode * 8191 + ((edit) ? 131071 : 524287);
- boolean present_admin = true;
- list.add(present_admin);
- if (present_admin)
- list.add(admin);
+ hashCode = hashCode * 8191 + ((admin) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -314,7 +281,7 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetEdit()).compareTo(other.isSetEdit());
+ lastComparison = java.lang.Boolean.compare(isSetEdit(), other.isSetEdit());
if (lastComparison != 0) {
return lastComparison;
}
@@ -324,7 +291,7 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAdmin()).compareTo(other.isSetAdmin());
+ lastComparison = java.lang.Boolean.compare(isSetAdmin(), other.isSetAdmin());
if (lastComparison != 0) {
return lastComparison;
}
@@ -337,21 +304,22 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("LecturePermissions(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("LecturePermissions(");
boolean first = true;
sb.append("edit:");
@@ -378,7 +346,7 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -388,13 +356,13 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
}
}
- private static class LecturePermissionsStandardSchemeFactory implements SchemeFactory {
+ private static class LecturePermissionsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LecturePermissionsStandardScheme getScheme() {
return new LecturePermissionsStandardScheme();
}
}
- private static class LecturePermissionsStandardScheme extends StandardScheme<LecturePermissions> {
+ private static class LecturePermissionsStandardScheme extends org.apache.thrift.scheme.StandardScheme<LecturePermissions> {
public void read(org.apache.thrift.protocol.TProtocol iprot, LecturePermissions struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -449,18 +417,18 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
}
- private static class LecturePermissionsTupleSchemeFactory implements SchemeFactory {
+ private static class LecturePermissionsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LecturePermissionsTupleScheme getScheme() {
return new LecturePermissionsTupleScheme();
}
}
- private static class LecturePermissionsTupleScheme extends TupleScheme<LecturePermissions> {
+ private static class LecturePermissionsTupleScheme extends org.apache.thrift.scheme.TupleScheme<LecturePermissions> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, LecturePermissions 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.isSetEdit()) {
optionals.set(0);
}
@@ -478,8 +446,8 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LecturePermissions struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.edit = iprot.readBool();
struct.setEditIsSet(true);
@@ -491,5 +459,8 @@ public class LecturePermissions implements org.apache.thrift.TBase<LecturePermis
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java b/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java
index be1aa0c..b23cde8 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/LectureRead.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 = "2019-02-25")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public class LectureRead implements org.apache.thrift.TBase<LectureRead, LectureRead._Fields>, java.io.Serializable, Cloneable, Comparable<LectureRead> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LectureRead");
@@ -72,17 +45,14 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
private static final org.apache.thrift.protocol.TField PRESET_LDAP_FILTERS_FIELD_DESC = new org.apache.thrift.protocol.TField("presetLdapFilters", org.apache.thrift.protocol.TType.LIST, (short)33);
private static final org.apache.thrift.protocol.TField PRESET_NETWORK_EXCEPTION_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("presetNetworkExceptionIds", org.apache.thrift.protocol.TType.LIST, (short)34);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new LectureReadStandardSchemeFactory());
- schemes.put(TupleScheme.class, new LectureReadTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LectureReadStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LectureReadTupleSchemeFactory();
- public String lectureId; // required
- public String lectureName; // required
- public String description; // required
- public String imageVersionId; // required
- public String imageBaseId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String lectureId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String lectureName; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String description; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageVersionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageBaseId; // required
public boolean autoUpdate; // required
public boolean isEnabled; // required
public long startTime; // required
@@ -91,26 +61,26 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
public int useCount; // required
public long createTime; // required
public long updateTime; // required
- public String ownerId; // required
- public String updaterId; // required
- public String runscript; // required
- public List<String> nics; // required
- public List<String> allowedUsers; // required
- public List<NetRule> networkExceptions; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String ownerId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String updaterId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String runscript; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> nics; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> allowedUsers; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<NetRule> networkExceptions; // required
public boolean isExam; // required
public boolean hasInternetAccess; // required
- public LecturePermissions defaultPermissions; // required
- public LecturePermissions userPermissions; // optional
- public List<Integer> locationIds; // required
+ public @org.apache.thrift.annotation.Nullable LecturePermissions defaultPermissions; // required
+ public @org.apache.thrift.annotation.Nullable LecturePermissions userPermissions; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> locationIds; // required
public boolean limitToLocations; // required
public boolean limitToAllowedUsers; // required
public boolean hasUsbAccess; // required
- public List<NetShare> networkShares; // optional
- public List<LdapFilter> ldapFilters; // optional
- public List<Integer> presetScriptIds; // optional
- public List<Integer> presetNetworkShares; // optional
- public List<Integer> presetLdapFilters; // optional
- public List<Integer> presetNetworkExceptionIds; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<NetShare> networkShares; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<LdapFilter> ldapFilters; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> presetScriptIds; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> presetNetworkShares; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> presetLdapFilters; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> presetNetworkExceptionIds; // 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 {
@@ -148,10 +118,10 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
PRESET_LDAP_FILTERS((short)33, "presetLdapFilters"),
PRESET_NETWORK_EXCEPTION_IDS((short)34, "presetNetworkExceptionIds");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -159,6 +129,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
/**
* 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: // LECTURE_ID
@@ -238,21 +209,22 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -261,7 +233,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -282,9 +254,9 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
private static final int __HASUSBACCESS_ISSET_ID = 12;
private short __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.USER_PERMISSIONS,_Fields.NETWORK_SHARES,_Fields.LDAP_FILTERS,_Fields.PRESET_SCRIPT_IDS,_Fields.PRESET_NETWORK_SHARES,_Fields.PRESET_LDAP_FILTERS,_Fields.PRESET_NETWORK_EXCEPTION_IDS};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
tmpMap.put(_Fields.LECTURE_NAME, new org.apache.thrift.meta_data.FieldMetaData("lectureName", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -361,7 +333,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
tmpMap.put(_Fields.PRESET_NETWORK_EXCEPTION_IDS, new org.apache.thrift.meta_data.FieldMetaData("presetNetworkExceptionIds", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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.I32))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LectureRead.class, metaDataMap);
}
@@ -369,11 +341,11 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
public LectureRead(
- String lectureId,
- String lectureName,
- String description,
- String imageVersionId,
- String imageBaseId,
+ java.lang.String lectureId,
+ java.lang.String lectureName,
+ java.lang.String description,
+ java.lang.String imageVersionId,
+ java.lang.String imageBaseId,
boolean autoUpdate,
boolean isEnabled,
long startTime,
@@ -382,16 +354,16 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
int useCount,
long createTime,
long updateTime,
- String ownerId,
- String updaterId,
- String runscript,
- List<String> nics,
- List<String> allowedUsers,
- List<NetRule> networkExceptions,
+ java.lang.String ownerId,
+ java.lang.String updaterId,
+ java.lang.String runscript,
+ java.util.List<java.lang.String> nics,
+ java.util.List<java.lang.String> allowedUsers,
+ java.util.List<NetRule> networkExceptions,
boolean isExam,
boolean hasInternetAccess,
LecturePermissions defaultPermissions,
- List<Integer> locationIds,
+ java.util.List<java.lang.Integer> locationIds,
boolean limitToLocations,
boolean limitToAllowedUsers,
boolean hasUsbAccess)
@@ -476,15 +448,15 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
this.runscript = other.runscript;
}
if (other.isSetNics()) {
- List<String> __this__nics = new ArrayList<String>(other.nics);
+ java.util.List<java.lang.String> __this__nics = new java.util.ArrayList<java.lang.String>(other.nics);
this.nics = __this__nics;
}
if (other.isSetAllowedUsers()) {
- List<String> __this__allowedUsers = new ArrayList<String>(other.allowedUsers);
+ java.util.List<java.lang.String> __this__allowedUsers = new java.util.ArrayList<java.lang.String>(other.allowedUsers);
this.allowedUsers = __this__allowedUsers;
}
if (other.isSetNetworkExceptions()) {
- List<NetRule> __this__networkExceptions = new ArrayList<NetRule>(other.networkExceptions.size());
+ java.util.List<NetRule> __this__networkExceptions = new java.util.ArrayList<NetRule>(other.networkExceptions.size());
for (NetRule other_element : other.networkExceptions) {
__this__networkExceptions.add(new NetRule(other_element));
}
@@ -499,40 +471,40 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
this.userPermissions = new LecturePermissions(other.userPermissions);
}
if (other.isSetLocationIds()) {
- List<Integer> __this__locationIds = new ArrayList<Integer>(other.locationIds);
+ java.util.List<java.lang.Integer> __this__locationIds = new java.util.ArrayList<java.lang.Integer>(other.locationIds);
this.locationIds = __this__locationIds;
}
this.limitToLocations = other.limitToLocations;
this.limitToAllowedUsers = other.limitToAllowedUsers;
this.hasUsbAccess = other.hasUsbAccess;
if (other.isSetNetworkShares()) {
- List<NetShare> __this__networkShares = new ArrayList<NetShare>(other.networkShares.size());
+ java.util.List<NetShare> __this__networkShares = new java.util.ArrayList<NetShare>(other.networkShares.size());
for (NetShare other_element : other.networkShares) {
__this__networkShares.add(new NetShare(other_element));
}
this.networkShares = __this__networkShares;
}
if (other.isSetLdapFilters()) {
- List<LdapFilter> __this__ldapFilters = new ArrayList<LdapFilter>(other.ldapFilters.size());
+ java.util.List<LdapFilter> __this__ldapFilters = new java.util.ArrayList<LdapFilter>(other.ldapFilters.size());
for (LdapFilter other_element : other.ldapFilters) {
__this__ldapFilters.add(new LdapFilter(other_element));
}
this.ldapFilters = __this__ldapFilters;
}
if (other.isSetPresetScriptIds()) {
- List<Integer> __this__presetScriptIds = new ArrayList<Integer>(other.presetScriptIds);
+ java.util.List<java.lang.Integer> __this__presetScriptIds = new java.util.ArrayList<java.lang.Integer>(other.presetScriptIds);
this.presetScriptIds = __this__presetScriptIds;
}
if (other.isSetPresetNetworkShares()) {
- List<Integer> __this__presetNetworkShares = new ArrayList<Integer>(other.presetNetworkShares);
+ java.util.List<java.lang.Integer> __this__presetNetworkShares = new java.util.ArrayList<java.lang.Integer>(other.presetNetworkShares);
this.presetNetworkShares = __this__presetNetworkShares;
}
if (other.isSetPresetLdapFilters()) {
- List<Integer> __this__presetLdapFilters = new ArrayList<Integer>(other.presetLdapFilters);
+ java.util.List<java.lang.Integer> __this__presetLdapFilters = new java.util.ArrayList<java.lang.Integer>(other.presetLdapFilters);
this.presetLdapFilters = __this__presetLdapFilters;
}
if (other.isSetPresetNetworkExceptionIds()) {
- List<Integer> __this__presetNetworkExceptionIds = new ArrayList<Integer>(other.presetNetworkExceptionIds);
+ java.util.List<java.lang.Integer> __this__presetNetworkExceptionIds = new java.util.ArrayList<java.lang.Integer>(other.presetNetworkExceptionIds);
this.presetNetworkExceptionIds = __this__presetNetworkExceptionIds;
}
}
@@ -591,11 +563,12 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
this.presetNetworkExceptionIds = null;
}
- public String getLectureId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getLectureId() {
return this.lectureId;
}
- public LectureRead setLectureId(String lectureId) {
+ public LectureRead setLectureId(@org.apache.thrift.annotation.Nullable java.lang.String lectureId) {
this.lectureId = lectureId;
return this;
}
@@ -615,11 +588,12 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
}
- public String getLectureName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getLectureName() {
return this.lectureName;
}
- public LectureRead setLectureName(String lectureName) {
+ public LectureRead setLectureName(@org.apache.thrift.annotation.Nullable java.lang.String lectureName) {
this.lectureName = lectureName;
return this;
}
@@ -639,11 +613,12 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
}
- public String getDescription() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getDescription() {
return this.description;
}
- public LectureRead setDescription(String description) {
+ public LectureRead setDescription(@org.apache.thrift.annotation.Nullable java.lang.String description) {
this.description = description;
return this;
}
@@ -663,11 +638,12 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
}
- public String getImageVersionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageVersionId() {
return this.imageVersionId;
}
- public LectureRead setImageVersionId(String imageVersionId) {
+ public LectureRead setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.String imageVersionId) {
this.imageVersionId = imageVersionId;
return this;
}
@@ -687,11 +663,12 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
}
- public String getImageBaseId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageBaseId() {
return this.imageBaseId;
}
- public LectureRead setImageBaseId(String imageBaseId) {
+ public LectureRead setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.String imageBaseId) {
this.imageBaseId = imageBaseId;
return this;
}
@@ -722,16 +699,16 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
public void unsetAutoUpdate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AUTOUPDATE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __AUTOUPDATE_ISSET_ID);
}
/** Returns true if field autoUpdate is set (has been assigned a value) and false otherwise */
public boolean isSetAutoUpdate() {
- return EncodingUtils.testBit(__isset_bitfield, __AUTOUPDATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __AUTOUPDATE_ISSET_ID);
}
public void setAutoUpdateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AUTOUPDATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __AUTOUPDATE_ISSET_ID, value);
}
public boolean isIsEnabled() {
@@ -745,16 +722,16 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
public void unsetIsEnabled() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISENABLED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISENABLED_ISSET_ID);
}
/** Returns true if field isEnabled is set (has been assigned a value) and false otherwise */
public boolean isSetIsEnabled() {
- return EncodingUtils.testBit(__isset_bitfield, __ISENABLED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISENABLED_ISSET_ID);
}
public void setIsEnabledIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISENABLED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISENABLED_ISSET_ID, value);
}
public long getStartTime() {
@@ -768,16 +745,16 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
public void unsetStartTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID);
}
/** Returns true if field startTime is set (has been assigned a value) and false otherwise */
public boolean isSetStartTime() {
- return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);
}
public void setStartTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value);
}
public long getEndTime() {
@@ -791,16 +768,16 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
public void unsetEndTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID);
}
/** Returns true if field endTime is set (has been assigned a value) and false otherwise */
public boolean isSetEndTime() {
- return EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID);
}
public void setEndTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value);
}
public long getLastUsed() {
@@ -814,16 +791,16 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
public void unsetLastUsed() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTUSED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LASTUSED_ISSET_ID);
}
/** Returns true if field lastUsed is set (has been assigned a value) and false otherwise */
public boolean isSetLastUsed() {
- return EncodingUtils.testBit(__isset_bitfield, __LASTUSED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LASTUSED_ISSET_ID);
}
public void setLastUsedIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTUSED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LASTUSED_ISSET_ID, value);
}
public int getUseCount() {
@@ -837,16 +814,16 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
public void unsetUseCount() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USECOUNT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __USECOUNT_ISSET_ID);
}
/** Returns true if field useCount is set (has been assigned a value) and false otherwise */
public boolean isSetUseCount() {
- return EncodingUtils.testBit(__isset_bitfield, __USECOUNT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __USECOUNT_ISSET_ID);
}
public void setUseCountIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USECOUNT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __USECOUNT_ISSET_ID, value);
}
public long getCreateTime() {
@@ -860,16 +837,16 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
public void unsetCreateTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
}
public void setCreateTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
}
public long getUpdateTime() {
@@ -883,23 +860,24 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
public void unsetUpdateTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __UPDATETIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.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);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __UPDATETIME_ISSET_ID);
}
public void setUpdateTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __UPDATETIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __UPDATETIME_ISSET_ID, value);
}
- public String getOwnerId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getOwnerId() {
return this.ownerId;
}
- public LectureRead setOwnerId(String ownerId) {
+ public LectureRead setOwnerId(@org.apache.thrift.annotation.Nullable java.lang.String ownerId) {
this.ownerId = ownerId;
return this;
}
@@ -919,11 +897,12 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
}
- public String getUpdaterId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUpdaterId() {
return this.updaterId;
}
- public LectureRead setUpdaterId(String updaterId) {
+ public LectureRead setUpdaterId(@org.apache.thrift.annotation.Nullable java.lang.String updaterId) {
this.updaterId = updaterId;
return this;
}
@@ -943,11 +922,12 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
}
- public String getRunscript() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getRunscript() {
return this.runscript;
}
- public LectureRead setRunscript(String runscript) {
+ public LectureRead setRunscript(@org.apache.thrift.annotation.Nullable java.lang.String runscript) {
this.runscript = runscript;
return this;
}
@@ -971,22 +951,24 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return (this.nics == null) ? 0 : this.nics.size();
}
- public java.util.Iterator<String> getNicsIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> getNicsIterator() {
return (this.nics == null) ? null : this.nics.iterator();
}
- public void addToNics(String elem) {
+ public void addToNics(java.lang.String elem) {
if (this.nics == null) {
- this.nics = new ArrayList<String>();
+ this.nics = new java.util.ArrayList<java.lang.String>();
}
this.nics.add(elem);
}
- public List<String> getNics() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getNics() {
return this.nics;
}
- public LectureRead setNics(List<String> nics) {
+ public LectureRead setNics(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> nics) {
this.nics = nics;
return this;
}
@@ -1010,22 +992,24 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return (this.allowedUsers == null) ? 0 : this.allowedUsers.size();
}
- public java.util.Iterator<String> getAllowedUsersIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> getAllowedUsersIterator() {
return (this.allowedUsers == null) ? null : this.allowedUsers.iterator();
}
- public void addToAllowedUsers(String elem) {
+ public void addToAllowedUsers(java.lang.String elem) {
if (this.allowedUsers == null) {
- this.allowedUsers = new ArrayList<String>();
+ this.allowedUsers = new java.util.ArrayList<java.lang.String>();
}
this.allowedUsers.add(elem);
}
- public List<String> getAllowedUsers() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getAllowedUsers() {
return this.allowedUsers;
}
- public LectureRead setAllowedUsers(List<String> allowedUsers) {
+ public LectureRead setAllowedUsers(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> allowedUsers) {
this.allowedUsers = allowedUsers;
return this;
}
@@ -1049,22 +1033,24 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return (this.networkExceptions == null) ? 0 : this.networkExceptions.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<NetRule> getNetworkExceptionsIterator() {
return (this.networkExceptions == null) ? null : this.networkExceptions.iterator();
}
public void addToNetworkExceptions(NetRule elem) {
if (this.networkExceptions == null) {
- this.networkExceptions = new ArrayList<NetRule>();
+ this.networkExceptions = new java.util.ArrayList<NetRule>();
}
this.networkExceptions.add(elem);
}
- public List<NetRule> getNetworkExceptions() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<NetRule> getNetworkExceptions() {
return this.networkExceptions;
}
- public LectureRead setNetworkExceptions(List<NetRule> networkExceptions) {
+ public LectureRead setNetworkExceptions(@org.apache.thrift.annotation.Nullable java.util.List<NetRule> networkExceptions) {
this.networkExceptions = networkExceptions;
return this;
}
@@ -1095,16 +1081,16 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
public void unsetIsExam() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISEXAM_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISEXAM_ISSET_ID);
}
/** Returns true if field isExam is set (has been assigned a value) and false otherwise */
public boolean isSetIsExam() {
- return EncodingUtils.testBit(__isset_bitfield, __ISEXAM_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISEXAM_ISSET_ID);
}
public void setIsExamIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISEXAM_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISEXAM_ISSET_ID, value);
}
public boolean isHasInternetAccess() {
@@ -1118,23 +1104,24 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
public void unsetHasInternetAccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
}
/** Returns true if field hasInternetAccess is set (has been assigned a value) and false otherwise */
public boolean isSetHasInternetAccess() {
- return EncodingUtils.testBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
}
public void setHasInternetAccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID, value);
}
+ @org.apache.thrift.annotation.Nullable
public LecturePermissions getDefaultPermissions() {
return this.defaultPermissions;
}
- public LectureRead setDefaultPermissions(LecturePermissions defaultPermissions) {
+ public LectureRead setDefaultPermissions(@org.apache.thrift.annotation.Nullable LecturePermissions defaultPermissions) {
this.defaultPermissions = defaultPermissions;
return this;
}
@@ -1154,11 +1141,12 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
}
+ @org.apache.thrift.annotation.Nullable
public LecturePermissions getUserPermissions() {
return this.userPermissions;
}
- public LectureRead setUserPermissions(LecturePermissions userPermissions) {
+ public LectureRead setUserPermissions(@org.apache.thrift.annotation.Nullable LecturePermissions userPermissions) {
this.userPermissions = userPermissions;
return this;
}
@@ -1182,22 +1170,24 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return (this.locationIds == null) ? 0 : this.locationIds.size();
}
- public java.util.Iterator<Integer> getLocationIdsIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.Integer> getLocationIdsIterator() {
return (this.locationIds == null) ? null : this.locationIds.iterator();
}
public void addToLocationIds(int elem) {
if (this.locationIds == null) {
- this.locationIds = new ArrayList<Integer>();
+ this.locationIds = new java.util.ArrayList<java.lang.Integer>();
}
this.locationIds.add(elem);
}
- public List<Integer> getLocationIds() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.Integer> getLocationIds() {
return this.locationIds;
}
- public LectureRead setLocationIds(List<Integer> locationIds) {
+ public LectureRead setLocationIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> locationIds) {
this.locationIds = locationIds;
return this;
}
@@ -1228,16 +1218,16 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
public void unsetLimitToLocations() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LIMITTOLOCATIONS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LIMITTOLOCATIONS_ISSET_ID);
}
/** Returns true if field limitToLocations is set (has been assigned a value) and false otherwise */
public boolean isSetLimitToLocations() {
- return EncodingUtils.testBit(__isset_bitfield, __LIMITTOLOCATIONS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LIMITTOLOCATIONS_ISSET_ID);
}
public void setLimitToLocationsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIMITTOLOCATIONS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LIMITTOLOCATIONS_ISSET_ID, value);
}
public boolean isLimitToAllowedUsers() {
@@ -1251,16 +1241,16 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
public void unsetLimitToAllowedUsers() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LIMITTOALLOWEDUSERS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LIMITTOALLOWEDUSERS_ISSET_ID);
}
/** Returns true if field limitToAllowedUsers is set (has been assigned a value) and false otherwise */
public boolean isSetLimitToAllowedUsers() {
- return EncodingUtils.testBit(__isset_bitfield, __LIMITTOALLOWEDUSERS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LIMITTOALLOWEDUSERS_ISSET_ID);
}
public void setLimitToAllowedUsersIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIMITTOALLOWEDUSERS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LIMITTOALLOWEDUSERS_ISSET_ID, value);
}
public boolean isHasUsbAccess() {
@@ -1274,38 +1264,40 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
public void unsetHasUsbAccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID);
}
/** Returns true if field hasUsbAccess is set (has been assigned a value) and false otherwise */
public boolean isSetHasUsbAccess() {
- return EncodingUtils.testBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID);
}
public void setHasUsbAccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID, value);
}
public int getNetworkSharesSize() {
return (this.networkShares == null) ? 0 : this.networkShares.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<NetShare> getNetworkSharesIterator() {
return (this.networkShares == null) ? null : this.networkShares.iterator();
}
public void addToNetworkShares(NetShare elem) {
if (this.networkShares == null) {
- this.networkShares = new ArrayList<NetShare>();
+ this.networkShares = new java.util.ArrayList<NetShare>();
}
this.networkShares.add(elem);
}
- public List<NetShare> getNetworkShares() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<NetShare> getNetworkShares() {
return this.networkShares;
}
- public LectureRead setNetworkShares(List<NetShare> networkShares) {
+ public LectureRead setNetworkShares(@org.apache.thrift.annotation.Nullable java.util.List<NetShare> networkShares) {
this.networkShares = networkShares;
return this;
}
@@ -1329,22 +1321,24 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return (this.ldapFilters == null) ? 0 : this.ldapFilters.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<LdapFilter> getLdapFiltersIterator() {
return (this.ldapFilters == null) ? null : this.ldapFilters.iterator();
}
public void addToLdapFilters(LdapFilter elem) {
if (this.ldapFilters == null) {
- this.ldapFilters = new ArrayList<LdapFilter>();
+ this.ldapFilters = new java.util.ArrayList<LdapFilter>();
}
this.ldapFilters.add(elem);
}
- public List<LdapFilter> getLdapFilters() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<LdapFilter> getLdapFilters() {
return this.ldapFilters;
}
- public LectureRead setLdapFilters(List<LdapFilter> ldapFilters) {
+ public LectureRead setLdapFilters(@org.apache.thrift.annotation.Nullable java.util.List<LdapFilter> ldapFilters) {
this.ldapFilters = ldapFilters;
return this;
}
@@ -1368,22 +1362,24 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return (this.presetScriptIds == null) ? 0 : this.presetScriptIds.size();
}
- public java.util.Iterator<Integer> getPresetScriptIdsIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.Integer> getPresetScriptIdsIterator() {
return (this.presetScriptIds == null) ? null : this.presetScriptIds.iterator();
}
public void addToPresetScriptIds(int elem) {
if (this.presetScriptIds == null) {
- this.presetScriptIds = new ArrayList<Integer>();
+ this.presetScriptIds = new java.util.ArrayList<java.lang.Integer>();
}
this.presetScriptIds.add(elem);
}
- public List<Integer> getPresetScriptIds() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.Integer> getPresetScriptIds() {
return this.presetScriptIds;
}
- public LectureRead setPresetScriptIds(List<Integer> presetScriptIds) {
+ public LectureRead setPresetScriptIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> presetScriptIds) {
this.presetScriptIds = presetScriptIds;
return this;
}
@@ -1407,22 +1403,24 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return (this.presetNetworkShares == null) ? 0 : this.presetNetworkShares.size();
}
- public java.util.Iterator<Integer> getPresetNetworkSharesIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.Integer> getPresetNetworkSharesIterator() {
return (this.presetNetworkShares == null) ? null : this.presetNetworkShares.iterator();
}
public void addToPresetNetworkShares(int elem) {
if (this.presetNetworkShares == null) {
- this.presetNetworkShares = new ArrayList<Integer>();
+ this.presetNetworkShares = new java.util.ArrayList<java.lang.Integer>();
}
this.presetNetworkShares.add(elem);
}
- public List<Integer> getPresetNetworkShares() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.Integer> getPresetNetworkShares() {
return this.presetNetworkShares;
}
- public LectureRead setPresetNetworkShares(List<Integer> presetNetworkShares) {
+ public LectureRead setPresetNetworkShares(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> presetNetworkShares) {
this.presetNetworkShares = presetNetworkShares;
return this;
}
@@ -1446,22 +1444,24 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return (this.presetLdapFilters == null) ? 0 : this.presetLdapFilters.size();
}
- public java.util.Iterator<Integer> getPresetLdapFiltersIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.Integer> getPresetLdapFiltersIterator() {
return (this.presetLdapFilters == null) ? null : this.presetLdapFilters.iterator();
}
public void addToPresetLdapFilters(int elem) {
if (this.presetLdapFilters == null) {
- this.presetLdapFilters = new ArrayList<Integer>();
+ this.presetLdapFilters = new java.util.ArrayList<java.lang.Integer>();
}
this.presetLdapFilters.add(elem);
}
- public List<Integer> getPresetLdapFilters() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.Integer> getPresetLdapFilters() {
return this.presetLdapFilters;
}
- public LectureRead setPresetLdapFilters(List<Integer> presetLdapFilters) {
+ public LectureRead setPresetLdapFilters(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> presetLdapFilters) {
this.presetLdapFilters = presetLdapFilters;
return this;
}
@@ -1485,22 +1485,24 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return (this.presetNetworkExceptionIds == null) ? 0 : this.presetNetworkExceptionIds.size();
}
- public java.util.Iterator<Integer> getPresetNetworkExceptionIdsIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.Integer> getPresetNetworkExceptionIdsIterator() {
return (this.presetNetworkExceptionIds == null) ? null : this.presetNetworkExceptionIds.iterator();
}
public void addToPresetNetworkExceptionIds(int elem) {
if (this.presetNetworkExceptionIds == null) {
- this.presetNetworkExceptionIds = new ArrayList<Integer>();
+ this.presetNetworkExceptionIds = new java.util.ArrayList<java.lang.Integer>();
}
this.presetNetworkExceptionIds.add(elem);
}
- public List<Integer> getPresetNetworkExceptionIds() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.Integer> getPresetNetworkExceptionIds() {
return this.presetNetworkExceptionIds;
}
- public LectureRead setPresetNetworkExceptionIds(List<Integer> presetNetworkExceptionIds) {
+ public LectureRead setPresetNetworkExceptionIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> presetNetworkExceptionIds) {
this.presetNetworkExceptionIds = presetNetworkExceptionIds;
return this;
}
@@ -1520,13 +1522,13 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case LECTURE_ID:
if (value == null) {
unsetLectureId();
} else {
- setLectureId((String)value);
+ setLectureId((java.lang.String)value);
}
break;
@@ -1534,7 +1536,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetLectureName();
} else {
- setLectureName((String)value);
+ setLectureName((java.lang.String)value);
}
break;
@@ -1542,7 +1544,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetDescription();
} else {
- setDescription((String)value);
+ setDescription((java.lang.String)value);
}
break;
@@ -1550,7 +1552,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetImageVersionId();
} else {
- setImageVersionId((String)value);
+ setImageVersionId((java.lang.String)value);
}
break;
@@ -1558,7 +1560,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetImageBaseId();
} else {
- setImageBaseId((String)value);
+ setImageBaseId((java.lang.String)value);
}
break;
@@ -1566,7 +1568,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetAutoUpdate();
} else {
- setAutoUpdate((Boolean)value);
+ setAutoUpdate((java.lang.Boolean)value);
}
break;
@@ -1574,7 +1576,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetIsEnabled();
} else {
- setIsEnabled((Boolean)value);
+ setIsEnabled((java.lang.Boolean)value);
}
break;
@@ -1582,7 +1584,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetStartTime();
} else {
- setStartTime((Long)value);
+ setStartTime((java.lang.Long)value);
}
break;
@@ -1590,7 +1592,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetEndTime();
} else {
- setEndTime((Long)value);
+ setEndTime((java.lang.Long)value);
}
break;
@@ -1598,7 +1600,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetLastUsed();
} else {
- setLastUsed((Long)value);
+ setLastUsed((java.lang.Long)value);
}
break;
@@ -1606,7 +1608,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetUseCount();
} else {
- setUseCount((Integer)value);
+ setUseCount((java.lang.Integer)value);
}
break;
@@ -1614,7 +1616,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetCreateTime();
} else {
- setCreateTime((Long)value);
+ setCreateTime((java.lang.Long)value);
}
break;
@@ -1622,7 +1624,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetUpdateTime();
} else {
- setUpdateTime((Long)value);
+ setUpdateTime((java.lang.Long)value);
}
break;
@@ -1630,7 +1632,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetOwnerId();
} else {
- setOwnerId((String)value);
+ setOwnerId((java.lang.String)value);
}
break;
@@ -1638,7 +1640,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetUpdaterId();
} else {
- setUpdaterId((String)value);
+ setUpdaterId((java.lang.String)value);
}
break;
@@ -1646,7 +1648,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetRunscript();
} else {
- setRunscript((String)value);
+ setRunscript((java.lang.String)value);
}
break;
@@ -1654,7 +1656,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetNics();
} else {
- setNics((List<String>)value);
+ setNics((java.util.List<java.lang.String>)value);
}
break;
@@ -1662,7 +1664,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetAllowedUsers();
} else {
- setAllowedUsers((List<String>)value);
+ setAllowedUsers((java.util.List<java.lang.String>)value);
}
break;
@@ -1670,7 +1672,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetNetworkExceptions();
} else {
- setNetworkExceptions((List<NetRule>)value);
+ setNetworkExceptions((java.util.List<NetRule>)value);
}
break;
@@ -1678,7 +1680,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetIsExam();
} else {
- setIsExam((Boolean)value);
+ setIsExam((java.lang.Boolean)value);
}
break;
@@ -1686,7 +1688,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetHasInternetAccess();
} else {
- setHasInternetAccess((Boolean)value);
+ setHasInternetAccess((java.lang.Boolean)value);
}
break;
@@ -1710,7 +1712,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetLocationIds();
} else {
- setLocationIds((List<Integer>)value);
+ setLocationIds((java.util.List<java.lang.Integer>)value);
}
break;
@@ -1718,7 +1720,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetLimitToLocations();
} else {
- setLimitToLocations((Boolean)value);
+ setLimitToLocations((java.lang.Boolean)value);
}
break;
@@ -1726,7 +1728,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetLimitToAllowedUsers();
} else {
- setLimitToAllowedUsers((Boolean)value);
+ setLimitToAllowedUsers((java.lang.Boolean)value);
}
break;
@@ -1734,7 +1736,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetHasUsbAccess();
} else {
- setHasUsbAccess((Boolean)value);
+ setHasUsbAccess((java.lang.Boolean)value);
}
break;
@@ -1742,7 +1744,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetNetworkShares();
} else {
- setNetworkShares((List<NetShare>)value);
+ setNetworkShares((java.util.List<NetShare>)value);
}
break;
@@ -1750,7 +1752,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetLdapFilters();
} else {
- setLdapFilters((List<LdapFilter>)value);
+ setLdapFilters((java.util.List<LdapFilter>)value);
}
break;
@@ -1758,7 +1760,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetPresetScriptIds();
} else {
- setPresetScriptIds((List<Integer>)value);
+ setPresetScriptIds((java.util.List<java.lang.Integer>)value);
}
break;
@@ -1766,7 +1768,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetPresetNetworkShares();
} else {
- setPresetNetworkShares((List<Integer>)value);
+ setPresetNetworkShares((java.util.List<java.lang.Integer>)value);
}
break;
@@ -1774,7 +1776,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetPresetLdapFilters();
} else {
- setPresetLdapFilters((List<Integer>)value);
+ setPresetLdapFilters((java.util.List<java.lang.Integer>)value);
}
break;
@@ -1782,14 +1784,15 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (value == null) {
unsetPresetNetworkExceptionIds();
} else {
- setPresetNetworkExceptionIds((List<Integer>)value);
+ setPresetNetworkExceptionIds((java.util.List<java.lang.Integer>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case LECTURE_ID:
return getLectureId();
@@ -1891,13 +1894,13 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return getPresetNetworkExceptionIds();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -1968,13 +1971,11 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
case PRESET_NETWORK_EXCEPTION_IDS:
return isSetPresetNetworkExceptionIds();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof LectureRead)
return this.equals((LectureRead)that);
return false;
@@ -1983,6 +1984,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
public boolean equals(LectureRead that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_lectureId = true && this.isSetLectureId();
boolean that_present_lectureId = true && that.isSetLectureId();
@@ -2286,174 +2289,115 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_lectureId = true && (isSetLectureId());
- list.add(present_lectureId);
- if (present_lectureId)
- list.add(lectureId);
-
- boolean present_lectureName = true && (isSetLectureName());
- list.add(present_lectureName);
- if (present_lectureName)
- list.add(lectureName);
-
- boolean present_description = true && (isSetDescription());
- list.add(present_description);
- if (present_description)
- list.add(description);
-
- boolean present_imageVersionId = true && (isSetImageVersionId());
- list.add(present_imageVersionId);
- if (present_imageVersionId)
- list.add(imageVersionId);
-
- boolean present_imageBaseId = true && (isSetImageBaseId());
- list.add(present_imageBaseId);
- if (present_imageBaseId)
- list.add(imageBaseId);
-
- boolean present_autoUpdate = true;
- list.add(present_autoUpdate);
- if (present_autoUpdate)
- list.add(autoUpdate);
-
- boolean present_isEnabled = true;
- list.add(present_isEnabled);
- if (present_isEnabled)
- list.add(isEnabled);
-
- boolean present_startTime = true;
- list.add(present_startTime);
- if (present_startTime)
- list.add(startTime);
-
- boolean present_endTime = true;
- list.add(present_endTime);
- if (present_endTime)
- list.add(endTime);
-
- boolean present_lastUsed = true;
- list.add(present_lastUsed);
- if (present_lastUsed)
- list.add(lastUsed);
-
- boolean present_useCount = true;
- list.add(present_useCount);
- if (present_useCount)
- list.add(useCount);
-
- 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_runscript = true && (isSetRunscript());
- list.add(present_runscript);
- if (present_runscript)
- list.add(runscript);
-
- boolean present_nics = true && (isSetNics());
- list.add(present_nics);
- if (present_nics)
- list.add(nics);
-
- boolean present_allowedUsers = true && (isSetAllowedUsers());
- list.add(present_allowedUsers);
- if (present_allowedUsers)
- list.add(allowedUsers);
-
- boolean present_networkExceptions = true && (isSetNetworkExceptions());
- list.add(present_networkExceptions);
- if (present_networkExceptions)
- list.add(networkExceptions);
-
- boolean present_isExam = true;
- list.add(present_isExam);
- if (present_isExam)
- list.add(isExam);
-
- boolean present_hasInternetAccess = true;
- list.add(present_hasInternetAccess);
- if (present_hasInternetAccess)
- list.add(hasInternetAccess);
-
- 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);
-
- boolean present_locationIds = true && (isSetLocationIds());
- list.add(present_locationIds);
- if (present_locationIds)
- list.add(locationIds);
-
- boolean present_limitToLocations = true;
- list.add(present_limitToLocations);
- if (present_limitToLocations)
- list.add(limitToLocations);
-
- boolean present_limitToAllowedUsers = true;
- list.add(present_limitToAllowedUsers);
- if (present_limitToAllowedUsers)
- list.add(limitToAllowedUsers);
-
- boolean present_hasUsbAccess = true;
- list.add(present_hasUsbAccess);
- if (present_hasUsbAccess)
- list.add(hasUsbAccess);
-
- boolean present_networkShares = true && (isSetNetworkShares());
- list.add(present_networkShares);
- if (present_networkShares)
- list.add(networkShares);
-
- boolean present_ldapFilters = true && (isSetLdapFilters());
- list.add(present_ldapFilters);
- if (present_ldapFilters)
- list.add(ldapFilters);
-
- boolean present_presetScriptIds = true && (isSetPresetScriptIds());
- list.add(present_presetScriptIds);
- if (present_presetScriptIds)
- list.add(presetScriptIds);
-
- boolean present_presetNetworkShares = true && (isSetPresetNetworkShares());
- list.add(present_presetNetworkShares);
- if (present_presetNetworkShares)
- list.add(presetNetworkShares);
-
- boolean present_presetLdapFilters = true && (isSetPresetLdapFilters());
- list.add(present_presetLdapFilters);
- if (present_presetLdapFilters)
- list.add(presetLdapFilters);
-
- boolean present_presetNetworkExceptionIds = true && (isSetPresetNetworkExceptionIds());
- list.add(present_presetNetworkExceptionIds);
- if (present_presetNetworkExceptionIds)
- list.add(presetNetworkExceptionIds);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetLectureId()) ? 131071 : 524287);
+ if (isSetLectureId())
+ hashCode = hashCode * 8191 + lectureId.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetLectureName()) ? 131071 : 524287);
+ if (isSetLectureName())
+ hashCode = hashCode * 8191 + lectureName.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetDescription()) ? 131071 : 524287);
+ if (isSetDescription())
+ hashCode = hashCode * 8191 + description.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287);
+ if (isSetImageVersionId())
+ hashCode = hashCode * 8191 + imageVersionId.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287);
+ if (isSetImageBaseId())
+ hashCode = hashCode * 8191 + imageBaseId.hashCode();
+
+ hashCode = hashCode * 8191 + ((autoUpdate) ? 131071 : 524287);
+
+ hashCode = hashCode * 8191 + ((isEnabled) ? 131071 : 524287);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startTime);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(endTime);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(lastUsed);
+
+ hashCode = hashCode * 8191 + useCount;
+
+ 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 + ((isSetRunscript()) ? 131071 : 524287);
+ if (isSetRunscript())
+ hashCode = hashCode * 8191 + runscript.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetNics()) ? 131071 : 524287);
+ if (isSetNics())
+ hashCode = hashCode * 8191 + nics.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetAllowedUsers()) ? 131071 : 524287);
+ if (isSetAllowedUsers())
+ hashCode = hashCode * 8191 + allowedUsers.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetNetworkExceptions()) ? 131071 : 524287);
+ if (isSetNetworkExceptions())
+ hashCode = hashCode * 8191 + networkExceptions.hashCode();
+
+ hashCode = hashCode * 8191 + ((isExam) ? 131071 : 524287);
+
+ hashCode = hashCode * 8191 + ((hasInternetAccess) ? 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();
+
+ hashCode = hashCode * 8191 + ((isSetLocationIds()) ? 131071 : 524287);
+ if (isSetLocationIds())
+ hashCode = hashCode * 8191 + locationIds.hashCode();
+
+ hashCode = hashCode * 8191 + ((limitToLocations) ? 131071 : 524287);
+
+ hashCode = hashCode * 8191 + ((limitToAllowedUsers) ? 131071 : 524287);
+
+ hashCode = hashCode * 8191 + ((hasUsbAccess) ? 131071 : 524287);
+
+ hashCode = hashCode * 8191 + ((isSetNetworkShares()) ? 131071 : 524287);
+ if (isSetNetworkShares())
+ hashCode = hashCode * 8191 + networkShares.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetLdapFilters()) ? 131071 : 524287);
+ if (isSetLdapFilters())
+ hashCode = hashCode * 8191 + ldapFilters.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetPresetScriptIds()) ? 131071 : 524287);
+ if (isSetPresetScriptIds())
+ hashCode = hashCode * 8191 + presetScriptIds.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetPresetNetworkShares()) ? 131071 : 524287);
+ if (isSetPresetNetworkShares())
+ hashCode = hashCode * 8191 + presetNetworkShares.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetPresetLdapFilters()) ? 131071 : 524287);
+ if (isSetPresetLdapFilters())
+ hashCode = hashCode * 8191 + presetLdapFilters.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetPresetNetworkExceptionIds()) ? 131071 : 524287);
+ if (isSetPresetNetworkExceptionIds())
+ hashCode = hashCode * 8191 + presetNetworkExceptionIds.hashCode();
+
+ return hashCode;
}
@Override
@@ -2464,7 +2408,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId());
+ lastComparison = java.lang.Boolean.compare(isSetLectureId(), other.isSetLectureId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2474,7 +2418,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLectureName()).compareTo(other.isSetLectureName());
+ lastComparison = java.lang.Boolean.compare(isSetLectureName(), other.isSetLectureName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2484,7 +2428,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ lastComparison = java.lang.Boolean.compare(isSetDescription(), other.isSetDescription());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2494,7 +2438,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ lastComparison = java.lang.Boolean.compare(isSetImageVersionId(), other.isSetImageVersionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2504,7 +2448,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ lastComparison = java.lang.Boolean.compare(isSetImageBaseId(), other.isSetImageBaseId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2514,7 +2458,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAutoUpdate()).compareTo(other.isSetAutoUpdate());
+ lastComparison = java.lang.Boolean.compare(isSetAutoUpdate(), other.isSetAutoUpdate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2524,7 +2468,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsEnabled()).compareTo(other.isSetIsEnabled());
+ lastComparison = java.lang.Boolean.compare(isSetIsEnabled(), other.isSetIsEnabled());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2534,7 +2478,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetStartTime()).compareTo(other.isSetStartTime());
+ lastComparison = java.lang.Boolean.compare(isSetStartTime(), other.isSetStartTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2544,7 +2488,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetEndTime()).compareTo(other.isSetEndTime());
+ lastComparison = java.lang.Boolean.compare(isSetEndTime(), other.isSetEndTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2554,7 +2498,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLastUsed()).compareTo(other.isSetLastUsed());
+ lastComparison = java.lang.Boolean.compare(isSetLastUsed(), other.isSetLastUsed());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2564,7 +2508,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUseCount()).compareTo(other.isSetUseCount());
+ lastComparison = java.lang.Boolean.compare(isSetUseCount(), other.isSetUseCount());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2574,7 +2518,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime());
+ lastComparison = java.lang.Boolean.compare(isSetCreateTime(), other.isSetCreateTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2584,7 +2528,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUpdateTime()).compareTo(other.isSetUpdateTime());
+ lastComparison = java.lang.Boolean.compare(isSetUpdateTime(), other.isSetUpdateTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2594,7 +2538,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ lastComparison = java.lang.Boolean.compare(isSetOwnerId(), other.isSetOwnerId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2604,7 +2548,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUpdaterId()).compareTo(other.isSetUpdaterId());
+ lastComparison = java.lang.Boolean.compare(isSetUpdaterId(), other.isSetUpdaterId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2614,7 +2558,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetRunscript()).compareTo(other.isSetRunscript());
+ lastComparison = java.lang.Boolean.compare(isSetRunscript(), other.isSetRunscript());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2624,7 +2568,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNics()).compareTo(other.isSetNics());
+ lastComparison = java.lang.Boolean.compare(isSetNics(), other.isSetNics());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2634,7 +2578,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAllowedUsers()).compareTo(other.isSetAllowedUsers());
+ lastComparison = java.lang.Boolean.compare(isSetAllowedUsers(), other.isSetAllowedUsers());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2644,7 +2588,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNetworkExceptions()).compareTo(other.isSetNetworkExceptions());
+ lastComparison = java.lang.Boolean.compare(isSetNetworkExceptions(), other.isSetNetworkExceptions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2654,7 +2598,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsExam()).compareTo(other.isSetIsExam());
+ lastComparison = java.lang.Boolean.compare(isSetIsExam(), other.isSetIsExam());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2664,7 +2608,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetHasInternetAccess()).compareTo(other.isSetHasInternetAccess());
+ lastComparison = java.lang.Boolean.compare(isSetHasInternetAccess(), other.isSetHasInternetAccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2674,7 +2618,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDefaultPermissions()).compareTo(other.isSetDefaultPermissions());
+ lastComparison = java.lang.Boolean.compare(isSetDefaultPermissions(), other.isSetDefaultPermissions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2684,7 +2628,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUserPermissions()).compareTo(other.isSetUserPermissions());
+ lastComparison = java.lang.Boolean.compare(isSetUserPermissions(), other.isSetUserPermissions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2694,7 +2638,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLocationIds()).compareTo(other.isSetLocationIds());
+ lastComparison = java.lang.Boolean.compare(isSetLocationIds(), other.isSetLocationIds());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2704,7 +2648,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLimitToLocations()).compareTo(other.isSetLimitToLocations());
+ lastComparison = java.lang.Boolean.compare(isSetLimitToLocations(), other.isSetLimitToLocations());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2714,7 +2658,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLimitToAllowedUsers()).compareTo(other.isSetLimitToAllowedUsers());
+ lastComparison = java.lang.Boolean.compare(isSetLimitToAllowedUsers(), other.isSetLimitToAllowedUsers());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2724,7 +2668,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetHasUsbAccess()).compareTo(other.isSetHasUsbAccess());
+ lastComparison = java.lang.Boolean.compare(isSetHasUsbAccess(), other.isSetHasUsbAccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2734,7 +2678,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNetworkShares()).compareTo(other.isSetNetworkShares());
+ lastComparison = java.lang.Boolean.compare(isSetNetworkShares(), other.isSetNetworkShares());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2744,7 +2688,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLdapFilters()).compareTo(other.isSetLdapFilters());
+ lastComparison = java.lang.Boolean.compare(isSetLdapFilters(), other.isSetLdapFilters());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2754,7 +2698,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPresetScriptIds()).compareTo(other.isSetPresetScriptIds());
+ lastComparison = java.lang.Boolean.compare(isSetPresetScriptIds(), other.isSetPresetScriptIds());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2764,7 +2708,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPresetNetworkShares()).compareTo(other.isSetPresetNetworkShares());
+ lastComparison = java.lang.Boolean.compare(isSetPresetNetworkShares(), other.isSetPresetNetworkShares());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2774,7 +2718,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPresetLdapFilters()).compareTo(other.isSetPresetLdapFilters());
+ lastComparison = java.lang.Boolean.compare(isSetPresetLdapFilters(), other.isSetPresetLdapFilters());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2784,7 +2728,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPresetNetworkExceptionIds()).compareTo(other.isSetPresetNetworkExceptionIds());
+ lastComparison = java.lang.Boolean.compare(isSetPresetNetworkExceptionIds(), other.isSetPresetNetworkExceptionIds());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2797,21 +2741,22 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("LectureRead(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("LectureRead(");
boolean first = true;
sb.append("lectureId:");
@@ -3062,7 +3007,7 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -3072,13 +3017,13 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
}
- private static class LectureReadStandardSchemeFactory implements SchemeFactory {
+ private static class LectureReadStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LectureReadStandardScheme getScheme() {
return new LectureReadStandardScheme();
}
}
- private static class LectureReadStandardScheme extends StandardScheme<LectureRead> {
+ private static class LectureReadStandardScheme extends org.apache.thrift.scheme.StandardScheme<LectureRead> {
public void read(org.apache.thrift.protocol.TProtocol iprot, LectureRead struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -3221,13 +3166,13 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
case 14: // NICS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list202 = iprot.readListBegin();
- struct.nics = new ArrayList<String>(_list202.size);
- String _elem203;
- for (int _i204 = 0; _i204 < _list202.size; ++_i204)
+ org.apache.thrift.protocol.TList _list210 = iprot.readListBegin();
+ struct.nics = new java.util.ArrayList<java.lang.String>(_list210.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem211;
+ for (int _i212 = 0; _i212 < _list210.size; ++_i212)
{
- _elem203 = iprot.readString();
- struct.nics.add(_elem203);
+ _elem211 = iprot.readString();
+ struct.nics.add(_elem211);
}
iprot.readListEnd();
}
@@ -3239,13 +3184,13 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
case 15: // ALLOWED_USERS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list205 = iprot.readListBegin();
- struct.allowedUsers = new ArrayList<String>(_list205.size);
- String _elem206;
- for (int _i207 = 0; _i207 < _list205.size; ++_i207)
+ org.apache.thrift.protocol.TList _list213 = iprot.readListBegin();
+ struct.allowedUsers = new java.util.ArrayList<java.lang.String>(_list213.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem214;
+ for (int _i215 = 0; _i215 < _list213.size; ++_i215)
{
- _elem206 = iprot.readString();
- struct.allowedUsers.add(_elem206);
+ _elem214 = iprot.readString();
+ struct.allowedUsers.add(_elem214);
}
iprot.readListEnd();
}
@@ -3257,14 +3202,14 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
case 16: // NETWORK_EXCEPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list208 = iprot.readListBegin();
- struct.networkExceptions = new ArrayList<NetRule>(_list208.size);
- NetRule _elem209;
- for (int _i210 = 0; _i210 < _list208.size; ++_i210)
+ org.apache.thrift.protocol.TList _list216 = iprot.readListBegin();
+ struct.networkExceptions = new java.util.ArrayList<NetRule>(_list216.size);
+ @org.apache.thrift.annotation.Nullable NetRule _elem217;
+ for (int _i218 = 0; _i218 < _list216.size; ++_i218)
{
- _elem209 = new NetRule();
- _elem209.read(iprot);
- struct.networkExceptions.add(_elem209);
+ _elem217 = new NetRule();
+ _elem217.read(iprot);
+ struct.networkExceptions.add(_elem217);
}
iprot.readListEnd();
}
@@ -3310,13 +3255,13 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
case 25: // LOCATION_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list211 = iprot.readListBegin();
- struct.locationIds = new ArrayList<Integer>(_list211.size);
- int _elem212;
- for (int _i213 = 0; _i213 < _list211.size; ++_i213)
+ org.apache.thrift.protocol.TList _list219 = iprot.readListBegin();
+ struct.locationIds = new java.util.ArrayList<java.lang.Integer>(_list219.size);
+ int _elem220;
+ for (int _i221 = 0; _i221 < _list219.size; ++_i221)
{
- _elem212 = iprot.readI32();
- struct.locationIds.add(_elem212);
+ _elem220 = iprot.readI32();
+ struct.locationIds.add(_elem220);
}
iprot.readListEnd();
}
@@ -3352,14 +3297,14 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
case 29: // NETWORK_SHARES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list214 = iprot.readListBegin();
- struct.networkShares = new ArrayList<NetShare>(_list214.size);
- NetShare _elem215;
- for (int _i216 = 0; _i216 < _list214.size; ++_i216)
+ org.apache.thrift.protocol.TList _list222 = iprot.readListBegin();
+ struct.networkShares = new java.util.ArrayList<NetShare>(_list222.size);
+ @org.apache.thrift.annotation.Nullable NetShare _elem223;
+ for (int _i224 = 0; _i224 < _list222.size; ++_i224)
{
- _elem215 = new NetShare();
- _elem215.read(iprot);
- struct.networkShares.add(_elem215);
+ _elem223 = new NetShare();
+ _elem223.read(iprot);
+ struct.networkShares.add(_elem223);
}
iprot.readListEnd();
}
@@ -3371,14 +3316,14 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
case 30: // LDAP_FILTERS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list217 = iprot.readListBegin();
- struct.ldapFilters = new ArrayList<LdapFilter>(_list217.size);
- LdapFilter _elem218;
- for (int _i219 = 0; _i219 < _list217.size; ++_i219)
+ org.apache.thrift.protocol.TList _list225 = iprot.readListBegin();
+ struct.ldapFilters = new java.util.ArrayList<LdapFilter>(_list225.size);
+ @org.apache.thrift.annotation.Nullable LdapFilter _elem226;
+ for (int _i227 = 0; _i227 < _list225.size; ++_i227)
{
- _elem218 = new LdapFilter();
- _elem218.read(iprot);
- struct.ldapFilters.add(_elem218);
+ _elem226 = new LdapFilter();
+ _elem226.read(iprot);
+ struct.ldapFilters.add(_elem226);
}
iprot.readListEnd();
}
@@ -3390,13 +3335,13 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
case 31: // PRESET_SCRIPT_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list220 = iprot.readListBegin();
- struct.presetScriptIds = new ArrayList<Integer>(_list220.size);
- int _elem221;
- for (int _i222 = 0; _i222 < _list220.size; ++_i222)
+ org.apache.thrift.protocol.TList _list228 = iprot.readListBegin();
+ struct.presetScriptIds = new java.util.ArrayList<java.lang.Integer>(_list228.size);
+ int _elem229;
+ for (int _i230 = 0; _i230 < _list228.size; ++_i230)
{
- _elem221 = iprot.readI32();
- struct.presetScriptIds.add(_elem221);
+ _elem229 = iprot.readI32();
+ struct.presetScriptIds.add(_elem229);
}
iprot.readListEnd();
}
@@ -3408,13 +3353,13 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
case 32: // PRESET_NETWORK_SHARES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list223 = iprot.readListBegin();
- struct.presetNetworkShares = new ArrayList<Integer>(_list223.size);
- int _elem224;
- for (int _i225 = 0; _i225 < _list223.size; ++_i225)
+ org.apache.thrift.protocol.TList _list231 = iprot.readListBegin();
+ struct.presetNetworkShares = new java.util.ArrayList<java.lang.Integer>(_list231.size);
+ int _elem232;
+ for (int _i233 = 0; _i233 < _list231.size; ++_i233)
{
- _elem224 = iprot.readI32();
- struct.presetNetworkShares.add(_elem224);
+ _elem232 = iprot.readI32();
+ struct.presetNetworkShares.add(_elem232);
}
iprot.readListEnd();
}
@@ -3426,13 +3371,13 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
case 33: // PRESET_LDAP_FILTERS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list226 = iprot.readListBegin();
- struct.presetLdapFilters = new ArrayList<Integer>(_list226.size);
- int _elem227;
- for (int _i228 = 0; _i228 < _list226.size; ++_i228)
+ org.apache.thrift.protocol.TList _list234 = iprot.readListBegin();
+ struct.presetLdapFilters = new java.util.ArrayList<java.lang.Integer>(_list234.size);
+ int _elem235;
+ for (int _i236 = 0; _i236 < _list234.size; ++_i236)
{
- _elem227 = iprot.readI32();
- struct.presetLdapFilters.add(_elem227);
+ _elem235 = iprot.readI32();
+ struct.presetLdapFilters.add(_elem235);
}
iprot.readListEnd();
}
@@ -3444,13 +3389,13 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
case 34: // PRESET_NETWORK_EXCEPTION_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list229 = iprot.readListBegin();
- struct.presetNetworkExceptionIds = new ArrayList<Integer>(_list229.size);
- int _elem230;
- for (int _i231 = 0; _i231 < _list229.size; ++_i231)
+ org.apache.thrift.protocol.TList _list237 = iprot.readListBegin();
+ struct.presetNetworkExceptionIds = new java.util.ArrayList<java.lang.Integer>(_list237.size);
+ int _elem238;
+ for (int _i239 = 0; _i239 < _list237.size; ++_i239)
{
- _elem230 = iprot.readI32();
- struct.presetNetworkExceptionIds.add(_elem230);
+ _elem238 = iprot.readI32();
+ struct.presetNetworkExceptionIds.add(_elem238);
}
iprot.readListEnd();
}
@@ -3526,9 +3471,9 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
oprot.writeFieldBegin(NICS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.nics.size()));
- for (String _iter232 : struct.nics)
+ for (java.lang.String _iter240 : struct.nics)
{
- oprot.writeString(_iter232);
+ oprot.writeString(_iter240);
}
oprot.writeListEnd();
}
@@ -3538,9 +3483,9 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
oprot.writeFieldBegin(ALLOWED_USERS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.allowedUsers.size()));
- for (String _iter233 : struct.allowedUsers)
+ for (java.lang.String _iter241 : struct.allowedUsers)
{
- oprot.writeString(_iter233);
+ oprot.writeString(_iter241);
}
oprot.writeListEnd();
}
@@ -3550,9 +3495,9 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
oprot.writeFieldBegin(NETWORK_EXCEPTIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.networkExceptions.size()));
- for (NetRule _iter234 : struct.networkExceptions)
+ for (NetRule _iter242 : struct.networkExceptions)
{
- _iter234.write(oprot);
+ _iter242.write(oprot);
}
oprot.writeListEnd();
}
@@ -3596,9 +3541,9 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
oprot.writeFieldBegin(LOCATION_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.locationIds.size()));
- for (int _iter235 : struct.locationIds)
+ for (int _iter243 : struct.locationIds)
{
- oprot.writeI32(_iter235);
+ oprot.writeI32(_iter243);
}
oprot.writeListEnd();
}
@@ -3618,9 +3563,9 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
oprot.writeFieldBegin(NETWORK_SHARES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.networkShares.size()));
- for (NetShare _iter236 : struct.networkShares)
+ for (NetShare _iter244 : struct.networkShares)
{
- _iter236.write(oprot);
+ _iter244.write(oprot);
}
oprot.writeListEnd();
}
@@ -3632,9 +3577,9 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
oprot.writeFieldBegin(LDAP_FILTERS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.ldapFilters.size()));
- for (LdapFilter _iter237 : struct.ldapFilters)
+ for (LdapFilter _iter245 : struct.ldapFilters)
{
- _iter237.write(oprot);
+ _iter245.write(oprot);
}
oprot.writeListEnd();
}
@@ -3646,9 +3591,9 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
oprot.writeFieldBegin(PRESET_SCRIPT_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.presetScriptIds.size()));
- for (int _iter238 : struct.presetScriptIds)
+ for (int _iter246 : struct.presetScriptIds)
{
- oprot.writeI32(_iter238);
+ oprot.writeI32(_iter246);
}
oprot.writeListEnd();
}
@@ -3660,9 +3605,9 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
oprot.writeFieldBegin(PRESET_NETWORK_SHARES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.presetNetworkShares.size()));
- for (int _iter239 : struct.presetNetworkShares)
+ for (int _iter247 : struct.presetNetworkShares)
{
- oprot.writeI32(_iter239);
+ oprot.writeI32(_iter247);
}
oprot.writeListEnd();
}
@@ -3674,9 +3619,9 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
oprot.writeFieldBegin(PRESET_LDAP_FILTERS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.presetLdapFilters.size()));
- for (int _iter240 : struct.presetLdapFilters)
+ for (int _iter248 : struct.presetLdapFilters)
{
- oprot.writeI32(_iter240);
+ oprot.writeI32(_iter248);
}
oprot.writeListEnd();
}
@@ -3688,9 +3633,9 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
oprot.writeFieldBegin(PRESET_NETWORK_EXCEPTION_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.presetNetworkExceptionIds.size()));
- for (int _iter241 : struct.presetNetworkExceptionIds)
+ for (int _iter249 : struct.presetNetworkExceptionIds)
{
- oprot.writeI32(_iter241);
+ oprot.writeI32(_iter249);
}
oprot.writeListEnd();
}
@@ -3703,18 +3648,18 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
- private static class LectureReadTupleSchemeFactory implements SchemeFactory {
+ private static class LectureReadTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LectureReadTupleScheme getScheme() {
return new LectureReadTupleScheme();
}
}
- private static class LectureReadTupleScheme extends TupleScheme<LectureRead> {
+ private static class LectureReadTupleScheme extends org.apache.thrift.scheme.TupleScheme<LectureRead> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, LectureRead 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.isSetLectureId()) {
optionals.set(0);
}
@@ -3866,27 +3811,27 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (struct.isSetNics()) {
{
oprot.writeI32(struct.nics.size());
- for (String _iter242 : struct.nics)
+ for (java.lang.String _iter250 : struct.nics)
{
- oprot.writeString(_iter242);
+ oprot.writeString(_iter250);
}
}
}
if (struct.isSetAllowedUsers()) {
{
oprot.writeI32(struct.allowedUsers.size());
- for (String _iter243 : struct.allowedUsers)
+ for (java.lang.String _iter251 : struct.allowedUsers)
{
- oprot.writeString(_iter243);
+ oprot.writeString(_iter251);
}
}
}
if (struct.isSetNetworkExceptions()) {
{
oprot.writeI32(struct.networkExceptions.size());
- for (NetRule _iter244 : struct.networkExceptions)
+ for (NetRule _iter252 : struct.networkExceptions)
{
- _iter244.write(oprot);
+ _iter252.write(oprot);
}
}
}
@@ -3905,9 +3850,9 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (struct.isSetLocationIds()) {
{
oprot.writeI32(struct.locationIds.size());
- for (int _iter245 : struct.locationIds)
+ for (int _iter253 : struct.locationIds)
{
- oprot.writeI32(_iter245);
+ oprot.writeI32(_iter253);
}
}
}
@@ -3923,54 +3868,54 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
if (struct.isSetNetworkShares()) {
{
oprot.writeI32(struct.networkShares.size());
- for (NetShare _iter246 : struct.networkShares)
+ for (NetShare _iter254 : struct.networkShares)
{
- _iter246.write(oprot);
+ _iter254.write(oprot);
}
}
}
if (struct.isSetLdapFilters()) {
{
oprot.writeI32(struct.ldapFilters.size());
- for (LdapFilter _iter247 : struct.ldapFilters)
+ for (LdapFilter _iter255 : struct.ldapFilters)
{
- _iter247.write(oprot);
+ _iter255.write(oprot);
}
}
}
if (struct.isSetPresetScriptIds()) {
{
oprot.writeI32(struct.presetScriptIds.size());
- for (int _iter248 : struct.presetScriptIds)
+ for (int _iter256 : struct.presetScriptIds)
{
- oprot.writeI32(_iter248);
+ oprot.writeI32(_iter256);
}
}
}
if (struct.isSetPresetNetworkShares()) {
{
oprot.writeI32(struct.presetNetworkShares.size());
- for (int _iter249 : struct.presetNetworkShares)
+ for (int _iter257 : struct.presetNetworkShares)
{
- oprot.writeI32(_iter249);
+ oprot.writeI32(_iter257);
}
}
}
if (struct.isSetPresetLdapFilters()) {
{
oprot.writeI32(struct.presetLdapFilters.size());
- for (int _iter250 : struct.presetLdapFilters)
+ for (int _iter258 : struct.presetLdapFilters)
{
- oprot.writeI32(_iter250);
+ oprot.writeI32(_iter258);
}
}
}
if (struct.isSetPresetNetworkExceptionIds()) {
{
oprot.writeI32(struct.presetNetworkExceptionIds.size());
- for (int _iter251 : struct.presetNetworkExceptionIds)
+ for (int _iter259 : struct.presetNetworkExceptionIds)
{
- oprot.writeI32(_iter251);
+ oprot.writeI32(_iter259);
}
}
}
@@ -3978,8 +3923,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LectureRead struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(33);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(33);
if (incoming.get(0)) {
struct.lectureId = iprot.readString();
struct.setLectureIdIsSet(true);
@@ -4046,40 +3991,40 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
if (incoming.get(16)) {
{
- org.apache.thrift.protocol.TList _list252 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.nics = new ArrayList<String>(_list252.size);
- String _elem253;
- for (int _i254 = 0; _i254 < _list252.size; ++_i254)
+ org.apache.thrift.protocol.TList _list260 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.nics = new java.util.ArrayList<java.lang.String>(_list260.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem261;
+ for (int _i262 = 0; _i262 < _list260.size; ++_i262)
{
- _elem253 = iprot.readString();
- struct.nics.add(_elem253);
+ _elem261 = iprot.readString();
+ struct.nics.add(_elem261);
}
}
struct.setNicsIsSet(true);
}
if (incoming.get(17)) {
{
- org.apache.thrift.protocol.TList _list255 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.allowedUsers = new ArrayList<String>(_list255.size);
- String _elem256;
- for (int _i257 = 0; _i257 < _list255.size; ++_i257)
+ org.apache.thrift.protocol.TList _list263 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.allowedUsers = new java.util.ArrayList<java.lang.String>(_list263.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem264;
+ for (int _i265 = 0; _i265 < _list263.size; ++_i265)
{
- _elem256 = iprot.readString();
- struct.allowedUsers.add(_elem256);
+ _elem264 = iprot.readString();
+ struct.allowedUsers.add(_elem264);
}
}
struct.setAllowedUsersIsSet(true);
}
if (incoming.get(18)) {
{
- org.apache.thrift.protocol.TList _list258 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.networkExceptions = new ArrayList<NetRule>(_list258.size);
- NetRule _elem259;
- for (int _i260 = 0; _i260 < _list258.size; ++_i260)
+ org.apache.thrift.protocol.TList _list266 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.networkExceptions = new java.util.ArrayList<NetRule>(_list266.size);
+ @org.apache.thrift.annotation.Nullable NetRule _elem267;
+ for (int _i268 = 0; _i268 < _list266.size; ++_i268)
{
- _elem259 = new NetRule();
- _elem259.read(iprot);
- struct.networkExceptions.add(_elem259);
+ _elem267 = new NetRule();
+ _elem267.read(iprot);
+ struct.networkExceptions.add(_elem267);
}
}
struct.setNetworkExceptionsIsSet(true);
@@ -4104,13 +4049,13 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
if (incoming.get(23)) {
{
- org.apache.thrift.protocol.TList _list261 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.locationIds = new ArrayList<Integer>(_list261.size);
- int _elem262;
- for (int _i263 = 0; _i263 < _list261.size; ++_i263)
+ org.apache.thrift.protocol.TList _list269 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
+ struct.locationIds = new java.util.ArrayList<java.lang.Integer>(_list269.size);
+ int _elem270;
+ for (int _i271 = 0; _i271 < _list269.size; ++_i271)
{
- _elem262 = iprot.readI32();
- struct.locationIds.add(_elem262);
+ _elem270 = iprot.readI32();
+ struct.locationIds.add(_elem270);
}
}
struct.setLocationIdsIsSet(true);
@@ -4129,80 +4074,80 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
if (incoming.get(27)) {
{
- org.apache.thrift.protocol.TList _list264 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.networkShares = new ArrayList<NetShare>(_list264.size);
- NetShare _elem265;
- for (int _i266 = 0; _i266 < _list264.size; ++_i266)
+ org.apache.thrift.protocol.TList _list272 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.networkShares = new java.util.ArrayList<NetShare>(_list272.size);
+ @org.apache.thrift.annotation.Nullable NetShare _elem273;
+ for (int _i274 = 0; _i274 < _list272.size; ++_i274)
{
- _elem265 = new NetShare();
- _elem265.read(iprot);
- struct.networkShares.add(_elem265);
+ _elem273 = new NetShare();
+ _elem273.read(iprot);
+ struct.networkShares.add(_elem273);
}
}
struct.setNetworkSharesIsSet(true);
}
if (incoming.get(28)) {
{
- org.apache.thrift.protocol.TList _list267 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.ldapFilters = new ArrayList<LdapFilter>(_list267.size);
- LdapFilter _elem268;
- for (int _i269 = 0; _i269 < _list267.size; ++_i269)
+ org.apache.thrift.protocol.TList _list275 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.ldapFilters = new java.util.ArrayList<LdapFilter>(_list275.size);
+ @org.apache.thrift.annotation.Nullable LdapFilter _elem276;
+ for (int _i277 = 0; _i277 < _list275.size; ++_i277)
{
- _elem268 = new LdapFilter();
- _elem268.read(iprot);
- struct.ldapFilters.add(_elem268);
+ _elem276 = new LdapFilter();
+ _elem276.read(iprot);
+ struct.ldapFilters.add(_elem276);
}
}
struct.setLdapFiltersIsSet(true);
}
if (incoming.get(29)) {
{
- org.apache.thrift.protocol.TList _list270 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.presetScriptIds = new ArrayList<Integer>(_list270.size);
- int _elem271;
- for (int _i272 = 0; _i272 < _list270.size; ++_i272)
+ org.apache.thrift.protocol.TList _list278 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
+ struct.presetScriptIds = new java.util.ArrayList<java.lang.Integer>(_list278.size);
+ int _elem279;
+ for (int _i280 = 0; _i280 < _list278.size; ++_i280)
{
- _elem271 = iprot.readI32();
- struct.presetScriptIds.add(_elem271);
+ _elem279 = iprot.readI32();
+ struct.presetScriptIds.add(_elem279);
}
}
struct.setPresetScriptIdsIsSet(true);
}
if (incoming.get(30)) {
{
- org.apache.thrift.protocol.TList _list273 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.presetNetworkShares = new ArrayList<Integer>(_list273.size);
- int _elem274;
- for (int _i275 = 0; _i275 < _list273.size; ++_i275)
+ org.apache.thrift.protocol.TList _list281 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
+ struct.presetNetworkShares = new java.util.ArrayList<java.lang.Integer>(_list281.size);
+ int _elem282;
+ for (int _i283 = 0; _i283 < _list281.size; ++_i283)
{
- _elem274 = iprot.readI32();
- struct.presetNetworkShares.add(_elem274);
+ _elem282 = iprot.readI32();
+ struct.presetNetworkShares.add(_elem282);
}
}
struct.setPresetNetworkSharesIsSet(true);
}
if (incoming.get(31)) {
{
- org.apache.thrift.protocol.TList _list276 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.presetLdapFilters = new ArrayList<Integer>(_list276.size);
- int _elem277;
- for (int _i278 = 0; _i278 < _list276.size; ++_i278)
+ org.apache.thrift.protocol.TList _list284 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
+ struct.presetLdapFilters = new java.util.ArrayList<java.lang.Integer>(_list284.size);
+ int _elem285;
+ for (int _i286 = 0; _i286 < _list284.size; ++_i286)
{
- _elem277 = iprot.readI32();
- struct.presetLdapFilters.add(_elem277);
+ _elem285 = iprot.readI32();
+ struct.presetLdapFilters.add(_elem285);
}
}
struct.setPresetLdapFiltersIsSet(true);
}
if (incoming.get(32)) {
{
- org.apache.thrift.protocol.TList _list279 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.presetNetworkExceptionIds = new ArrayList<Integer>(_list279.size);
- int _elem280;
- for (int _i281 = 0; _i281 < _list279.size; ++_i281)
+ org.apache.thrift.protocol.TList _list287 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
+ struct.presetNetworkExceptionIds = new java.util.ArrayList<java.lang.Integer>(_list287.size);
+ int _elem288;
+ for (int _i289 = 0; _i289 < _list287.size; ++_i289)
{
- _elem280 = iprot.readI32();
- struct.presetNetworkExceptionIds.add(_elem280);
+ _elem288 = iprot.readI32();
+ struct.presetNetworkExceptionIds.add(_elem288);
}
}
struct.setPresetNetworkExceptionIdsIsSet(true);
@@ -4210,5 +4155,8 @@ public class LectureRead implements org.apache.thrift.TBase<LectureRead, Lecture
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LectureSummary.java b/src/main/java/org/openslx/bwlp/thrift/iface/LectureSummary.java
index d63885e..18e2016 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/LectureSummary.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/LectureSummary.java
@@ -1,45 +1,19 @@
/**
- * 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-03-02")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, LectureSummary._Fields>, java.io.Serializable, Cloneable, Comparable<LectureSummary> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LectureSummary");
private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField LECTURE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureName", org.apache.thrift.protocol.TType.STRING, (short)2);
+ 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)18);
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)3);
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)4);
private static final org.apache.thrift.protocol.TField IS_ENABLED_FIELD_DESC = new org.apache.thrift.protocol.TField("isEnabled", org.apache.thrift.protocol.TType.BOOL, (short)5);
@@ -56,27 +30,25 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
private static final org.apache.thrift.protocol.TField IS_IMAGE_VERSION_USABLE_FIELD_DESC = new org.apache.thrift.protocol.TField("isImageVersionUsable", org.apache.thrift.protocol.TType.BOOL, (short)16);
private static final org.apache.thrift.protocol.TField HAS_USB_ACCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("hasUsbAccess", org.apache.thrift.protocol.TType.BOOL, (short)17);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new LectureSummaryStandardSchemeFactory());
- schemes.put(TupleScheme.class, new LectureSummaryTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LectureSummaryStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LectureSummaryTupleSchemeFactory();
- public String lectureId; // required
- public String lectureName; // required
- public String imageVersionId; // required
- public String imageBaseId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String lectureId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String lectureName; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String description; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageVersionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageBaseId; // required
public boolean isEnabled; // required
public long startTime; // required
public long endTime; // required
public long lastUsed; // required
public int useCount; // 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
public boolean isExam; // required
public boolean hasInternetAccess; // required
- public LecturePermissions defaultPermissions; // required
- public LecturePermissions userPermissions; // optional
+ public @org.apache.thrift.annotation.Nullable LecturePermissions defaultPermissions; // required
+ public @org.apache.thrift.annotation.Nullable LecturePermissions userPermissions; // optional
public boolean isImageVersionUsable; // required
public boolean hasUsbAccess; // required
@@ -84,6 +56,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
LECTURE_ID((short)1, "lectureId"),
LECTURE_NAME((short)2, "lectureName"),
+ DESCRIPTION((short)18, "description"),
IMAGE_VERSION_ID((short)3, "imageVersionId"),
IMAGE_BASE_ID((short)4, "imageBaseId"),
IS_ENABLED((short)5, "isEnabled"),
@@ -100,10 +73,10 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
IS_IMAGE_VERSION_USABLE((short)16, "isImageVersionUsable"),
HAS_USB_ACCESS((short)17, "hasUsbAccess");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -111,12 +84,15 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
/**
* 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: // LECTURE_ID
return LECTURE_ID;
case 2: // LECTURE_NAME
return LECTURE_NAME;
+ case 18: // DESCRIPTION
+ return DESCRIPTION;
case 3: // IMAGE_VERSION_ID
return IMAGE_VERSION_ID;
case 4: // IMAGE_BASE_ID
@@ -158,21 +134,22 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -181,7 +158,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -198,13 +175,15 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
private static final int __HASUSBACCESS_ISSET_ID = 8;
private short __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.USER_PERMISSIONS};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
tmpMap.put(_Fields.LECTURE_NAME, new org.apache.thrift.meta_data.FieldMetaData("lectureName", 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.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_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -235,7 +214,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.HAS_USB_ACCESS, new org.apache.thrift.meta_data.FieldMetaData("hasUsbAccess", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LectureSummary.class, metaDataMap);
}
@@ -243,17 +222,18 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
}
public LectureSummary(
- String lectureId,
- String lectureName,
- String imageVersionId,
- String imageBaseId,
+ java.lang.String lectureId,
+ java.lang.String lectureName,
+ java.lang.String description,
+ java.lang.String imageVersionId,
+ java.lang.String imageBaseId,
boolean isEnabled,
long startTime,
long endTime,
long lastUsed,
int useCount,
- String ownerId,
- String updaterId,
+ java.lang.String ownerId,
+ java.lang.String updaterId,
boolean isExam,
boolean hasInternetAccess,
LecturePermissions defaultPermissions,
@@ -263,6 +243,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
this();
this.lectureId = lectureId;
this.lectureName = lectureName;
+ this.description = description;
this.imageVersionId = imageVersionId;
this.imageBaseId = imageBaseId;
this.isEnabled = isEnabled;
@@ -299,6 +280,9 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
if (other.isSetLectureName()) {
this.lectureName = other.lectureName;
}
+ if (other.isSetDescription()) {
+ this.description = other.description;
+ }
if (other.isSetImageVersionId()) {
this.imageVersionId = other.imageVersionId;
}
@@ -336,6 +320,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
public void clear() {
this.lectureId = null;
this.lectureName = null;
+ this.description = null;
this.imageVersionId = null;
this.imageBaseId = null;
setIsEnabledIsSet(false);
@@ -362,11 +347,12 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
this.hasUsbAccess = false;
}
- public String getLectureId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getLectureId() {
return this.lectureId;
}
- public LectureSummary setLectureId(String lectureId) {
+ public LectureSummary setLectureId(@org.apache.thrift.annotation.Nullable java.lang.String lectureId) {
this.lectureId = lectureId;
return this;
}
@@ -386,11 +372,12 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
}
}
- public String getLectureName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getLectureName() {
return this.lectureName;
}
- public LectureSummary setLectureName(String lectureName) {
+ public LectureSummary setLectureName(@org.apache.thrift.annotation.Nullable java.lang.String lectureName) {
this.lectureName = lectureName;
return this;
}
@@ -410,11 +397,37 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
}
}
- public String getImageVersionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getDescription() {
+ return this.description;
+ }
+
+ public LectureSummary 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;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageVersionId() {
return this.imageVersionId;
}
- public LectureSummary setImageVersionId(String imageVersionId) {
+ public LectureSummary setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.String imageVersionId) {
this.imageVersionId = imageVersionId;
return this;
}
@@ -434,11 +447,12 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
}
}
- public String getImageBaseId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageBaseId() {
return this.imageBaseId;
}
- public LectureSummary setImageBaseId(String imageBaseId) {
+ public LectureSummary setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.String imageBaseId) {
this.imageBaseId = imageBaseId;
return this;
}
@@ -469,16 +483,16 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
}
public void unsetIsEnabled() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISENABLED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISENABLED_ISSET_ID);
}
/** Returns true if field isEnabled is set (has been assigned a value) and false otherwise */
public boolean isSetIsEnabled() {
- return EncodingUtils.testBit(__isset_bitfield, __ISENABLED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISENABLED_ISSET_ID);
}
public void setIsEnabledIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISENABLED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISENABLED_ISSET_ID, value);
}
public long getStartTime() {
@@ -492,16 +506,16 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
}
public void unsetStartTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID);
}
/** Returns true if field startTime is set (has been assigned a value) and false otherwise */
public boolean isSetStartTime() {
- return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);
}
public void setStartTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value);
}
public long getEndTime() {
@@ -515,16 +529,16 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
}
public void unsetEndTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID);
}
/** Returns true if field endTime is set (has been assigned a value) and false otherwise */
public boolean isSetEndTime() {
- return EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID);
}
public void setEndTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value);
}
public long getLastUsed() {
@@ -538,16 +552,16 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
}
public void unsetLastUsed() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LASTUSED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LASTUSED_ISSET_ID);
}
/** Returns true if field lastUsed is set (has been assigned a value) and false otherwise */
public boolean isSetLastUsed() {
- return EncodingUtils.testBit(__isset_bitfield, __LASTUSED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LASTUSED_ISSET_ID);
}
public void setLastUsedIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LASTUSED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LASTUSED_ISSET_ID, value);
}
public int getUseCount() {
@@ -561,23 +575,24 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
}
public void unsetUseCount() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __USECOUNT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __USECOUNT_ISSET_ID);
}
/** Returns true if field useCount is set (has been assigned a value) and false otherwise */
public boolean isSetUseCount() {
- return EncodingUtils.testBit(__isset_bitfield, __USECOUNT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __USECOUNT_ISSET_ID);
}
public void setUseCountIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __USECOUNT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __USECOUNT_ISSET_ID, value);
}
- public String getOwnerId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getOwnerId() {
return this.ownerId;
}
- public LectureSummary setOwnerId(String ownerId) {
+ public LectureSummary setOwnerId(@org.apache.thrift.annotation.Nullable java.lang.String ownerId) {
this.ownerId = ownerId;
return this;
}
@@ -597,11 +612,12 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
}
}
- public String getUpdaterId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUpdaterId() {
return this.updaterId;
}
- public LectureSummary setUpdaterId(String updaterId) {
+ public LectureSummary setUpdaterId(@org.apache.thrift.annotation.Nullable java.lang.String updaterId) {
this.updaterId = updaterId;
return this;
}
@@ -632,16 +648,16 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
}
public void unsetIsExam() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISEXAM_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISEXAM_ISSET_ID);
}
/** Returns true if field isExam is set (has been assigned a value) and false otherwise */
public boolean isSetIsExam() {
- return EncodingUtils.testBit(__isset_bitfield, __ISEXAM_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISEXAM_ISSET_ID);
}
public void setIsExamIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISEXAM_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISEXAM_ISSET_ID, value);
}
public boolean isHasInternetAccess() {
@@ -655,23 +671,24 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
}
public void unsetHasInternetAccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
}
/** Returns true if field hasInternetAccess is set (has been assigned a value) and false otherwise */
public boolean isSetHasInternetAccess() {
- return EncodingUtils.testBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
}
public void setHasInternetAccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID, value);
}
+ @org.apache.thrift.annotation.Nullable
public LecturePermissions getDefaultPermissions() {
return this.defaultPermissions;
}
- public LectureSummary setDefaultPermissions(LecturePermissions defaultPermissions) {
+ public LectureSummary setDefaultPermissions(@org.apache.thrift.annotation.Nullable LecturePermissions defaultPermissions) {
this.defaultPermissions = defaultPermissions;
return this;
}
@@ -691,11 +708,12 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
}
}
+ @org.apache.thrift.annotation.Nullable
public LecturePermissions getUserPermissions() {
return this.userPermissions;
}
- public LectureSummary setUserPermissions(LecturePermissions userPermissions) {
+ public LectureSummary setUserPermissions(@org.apache.thrift.annotation.Nullable LecturePermissions userPermissions) {
this.userPermissions = userPermissions;
return this;
}
@@ -726,16 +744,16 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
}
public void unsetIsImageVersionUsable() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISIMAGEVERSIONUSABLE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISIMAGEVERSIONUSABLE_ISSET_ID);
}
/** Returns true if field isImageVersionUsable is set (has been assigned a value) and false otherwise */
public boolean isSetIsImageVersionUsable() {
- return EncodingUtils.testBit(__isset_bitfield, __ISIMAGEVERSIONUSABLE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISIMAGEVERSIONUSABLE_ISSET_ID);
}
public void setIsImageVersionUsableIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISIMAGEVERSIONUSABLE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISIMAGEVERSIONUSABLE_ISSET_ID, value);
}
public boolean isHasUsbAccess() {
@@ -749,25 +767,25 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
}
public void unsetHasUsbAccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID);
}
/** Returns true if field hasUsbAccess is set (has been assigned a value) and false otherwise */
public boolean isSetHasUsbAccess() {
- return EncodingUtils.testBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID);
}
public void setHasUsbAccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case LECTURE_ID:
if (value == null) {
unsetLectureId();
} else {
- setLectureId((String)value);
+ setLectureId((java.lang.String)value);
}
break;
@@ -775,7 +793,15 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
if (value == null) {
unsetLectureName();
} else {
- setLectureName((String)value);
+ setLectureName((java.lang.String)value);
+ }
+ break;
+
+ case DESCRIPTION:
+ if (value == null) {
+ unsetDescription();
+ } else {
+ setDescription((java.lang.String)value);
}
break;
@@ -783,7 +809,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
if (value == null) {
unsetImageVersionId();
} else {
- setImageVersionId((String)value);
+ setImageVersionId((java.lang.String)value);
}
break;
@@ -791,7 +817,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
if (value == null) {
unsetImageBaseId();
} else {
- setImageBaseId((String)value);
+ setImageBaseId((java.lang.String)value);
}
break;
@@ -799,7 +825,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
if (value == null) {
unsetIsEnabled();
} else {
- setIsEnabled((Boolean)value);
+ setIsEnabled((java.lang.Boolean)value);
}
break;
@@ -807,7 +833,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
if (value == null) {
unsetStartTime();
} else {
- setStartTime((Long)value);
+ setStartTime((java.lang.Long)value);
}
break;
@@ -815,7 +841,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
if (value == null) {
unsetEndTime();
} else {
- setEndTime((Long)value);
+ setEndTime((java.lang.Long)value);
}
break;
@@ -823,7 +849,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
if (value == null) {
unsetLastUsed();
} else {
- setLastUsed((Long)value);
+ setLastUsed((java.lang.Long)value);
}
break;
@@ -831,7 +857,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
if (value == null) {
unsetUseCount();
} else {
- setUseCount((Integer)value);
+ setUseCount((java.lang.Integer)value);
}
break;
@@ -839,7 +865,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
if (value == null) {
unsetOwnerId();
} else {
- setOwnerId((String)value);
+ setOwnerId((java.lang.String)value);
}
break;
@@ -847,7 +873,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
if (value == null) {
unsetUpdaterId();
} else {
- setUpdaterId((String)value);
+ setUpdaterId((java.lang.String)value);
}
break;
@@ -855,7 +881,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
if (value == null) {
unsetIsExam();
} else {
- setIsExam((Boolean)value);
+ setIsExam((java.lang.Boolean)value);
}
break;
@@ -863,7 +889,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
if (value == null) {
unsetHasInternetAccess();
} else {
- setHasInternetAccess((Boolean)value);
+ setHasInternetAccess((java.lang.Boolean)value);
}
break;
@@ -887,7 +913,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
if (value == null) {
unsetIsImageVersionUsable();
} else {
- setIsImageVersionUsable((Boolean)value);
+ setIsImageVersionUsable((java.lang.Boolean)value);
}
break;
@@ -895,14 +921,15 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
if (value == null) {
unsetHasUsbAccess();
} else {
- setHasUsbAccess((Boolean)value);
+ setHasUsbAccess((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case LECTURE_ID:
return getLectureId();
@@ -910,6 +937,9 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
case LECTURE_NAME:
return getLectureName();
+ case DESCRIPTION:
+ return getDescription();
+
case IMAGE_VERSION_ID:
return getImageVersionId();
@@ -956,13 +986,13 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return isHasUsbAccess();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -970,6 +1000,8 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return isSetLectureId();
case LECTURE_NAME:
return isSetLectureName();
+ case DESCRIPTION:
+ return isSetDescription();
case IMAGE_VERSION_ID:
return isSetImageVersionId();
case IMAGE_BASE_ID:
@@ -1001,13 +1033,11 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
case HAS_USB_ACCESS:
return isSetHasUsbAccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof LectureSummary)
return this.equals((LectureSummary)that);
return false;
@@ -1016,6 +1046,8 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
public boolean equals(LectureSummary that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_lectureId = true && this.isSetLectureId();
boolean that_present_lectureId = true && that.isSetLectureId();
@@ -1035,6 +1067,15 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
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_imageVersionId = true && this.isSetImageVersionId();
boolean that_present_imageVersionId = true && that.isSetImageVersionId();
if (this_present_imageVersionId || that_present_imageVersionId) {
@@ -1175,94 +1216,63 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_lectureId = true && (isSetLectureId());
- list.add(present_lectureId);
- if (present_lectureId)
- list.add(lectureId);
-
- boolean present_lectureName = true && (isSetLectureName());
- list.add(present_lectureName);
- if (present_lectureName)
- list.add(lectureName);
-
- boolean present_imageVersionId = true && (isSetImageVersionId());
- list.add(present_imageVersionId);
- if (present_imageVersionId)
- list.add(imageVersionId);
-
- boolean present_imageBaseId = true && (isSetImageBaseId());
- list.add(present_imageBaseId);
- if (present_imageBaseId)
- list.add(imageBaseId);
-
- boolean present_isEnabled = true;
- list.add(present_isEnabled);
- if (present_isEnabled)
- list.add(isEnabled);
-
- boolean present_startTime = true;
- list.add(present_startTime);
- if (present_startTime)
- list.add(startTime);
-
- boolean present_endTime = true;
- list.add(present_endTime);
- if (present_endTime)
- list.add(endTime);
-
- boolean present_lastUsed = true;
- list.add(present_lastUsed);
- if (present_lastUsed)
- list.add(lastUsed);
-
- boolean present_useCount = true;
- list.add(present_useCount);
- if (present_useCount)
- list.add(useCount);
-
- 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_isExam = true;
- list.add(present_isExam);
- if (present_isExam)
- list.add(isExam);
-
- boolean present_hasInternetAccess = true;
- list.add(present_hasInternetAccess);
- if (present_hasInternetAccess)
- list.add(hasInternetAccess);
-
- 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);
-
- boolean present_isImageVersionUsable = true;
- list.add(present_isImageVersionUsable);
- if (present_isImageVersionUsable)
- list.add(isImageVersionUsable);
-
- boolean present_hasUsbAccess = true;
- list.add(present_hasUsbAccess);
- if (present_hasUsbAccess)
- list.add(hasUsbAccess);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetLectureId()) ? 131071 : 524287);
+ if (isSetLectureId())
+ hashCode = hashCode * 8191 + lectureId.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetLectureName()) ? 131071 : 524287);
+ if (isSetLectureName())
+ hashCode = hashCode * 8191 + lectureName.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetDescription()) ? 131071 : 524287);
+ if (isSetDescription())
+ hashCode = hashCode * 8191 + description.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287);
+ if (isSetImageVersionId())
+ hashCode = hashCode * 8191 + imageVersionId.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287);
+ if (isSetImageBaseId())
+ hashCode = hashCode * 8191 + imageBaseId.hashCode();
+
+ hashCode = hashCode * 8191 + ((isEnabled) ? 131071 : 524287);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startTime);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(endTime);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(lastUsed);
+
+ hashCode = hashCode * 8191 + useCount;
+
+ 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 + ((isExam) ? 131071 : 524287);
+
+ hashCode = hashCode * 8191 + ((hasInternetAccess) ? 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();
+
+ hashCode = hashCode * 8191 + ((isImageVersionUsable) ? 131071 : 524287);
+
+ hashCode = hashCode * 8191 + ((hasUsbAccess) ? 131071 : 524287);
+
+ return hashCode;
}
@Override
@@ -1273,7 +1283,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId());
+ lastComparison = java.lang.Boolean.compare(isSetLectureId(), other.isSetLectureId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1283,7 +1293,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLectureName()).compareTo(other.isSetLectureName());
+ lastComparison = java.lang.Boolean.compare(isSetLectureName(), other.isSetLectureName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1293,7 +1303,17 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ 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(isSetImageVersionId(), other.isSetImageVersionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1303,7 +1323,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ lastComparison = java.lang.Boolean.compare(isSetImageBaseId(), other.isSetImageBaseId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1313,7 +1333,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsEnabled()).compareTo(other.isSetIsEnabled());
+ lastComparison = java.lang.Boolean.compare(isSetIsEnabled(), other.isSetIsEnabled());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1323,7 +1343,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetStartTime()).compareTo(other.isSetStartTime());
+ lastComparison = java.lang.Boolean.compare(isSetStartTime(), other.isSetStartTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1333,7 +1353,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetEndTime()).compareTo(other.isSetEndTime());
+ lastComparison = java.lang.Boolean.compare(isSetEndTime(), other.isSetEndTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1343,7 +1363,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLastUsed()).compareTo(other.isSetLastUsed());
+ lastComparison = java.lang.Boolean.compare(isSetLastUsed(), other.isSetLastUsed());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1353,7 +1373,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUseCount()).compareTo(other.isSetUseCount());
+ lastComparison = java.lang.Boolean.compare(isSetUseCount(), other.isSetUseCount());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1363,7 +1383,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOwnerId()).compareTo(other.isSetOwnerId());
+ lastComparison = java.lang.Boolean.compare(isSetOwnerId(), other.isSetOwnerId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1373,7 +1393,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUpdaterId()).compareTo(other.isSetUpdaterId());
+ lastComparison = java.lang.Boolean.compare(isSetUpdaterId(), other.isSetUpdaterId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1383,7 +1403,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsExam()).compareTo(other.isSetIsExam());
+ lastComparison = java.lang.Boolean.compare(isSetIsExam(), other.isSetIsExam());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1393,7 +1413,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetHasInternetAccess()).compareTo(other.isSetHasInternetAccess());
+ lastComparison = java.lang.Boolean.compare(isSetHasInternetAccess(), other.isSetHasInternetAccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1403,7 +1423,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDefaultPermissions()).compareTo(other.isSetDefaultPermissions());
+ lastComparison = java.lang.Boolean.compare(isSetDefaultPermissions(), other.isSetDefaultPermissions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1413,7 +1433,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUserPermissions()).compareTo(other.isSetUserPermissions());
+ lastComparison = java.lang.Boolean.compare(isSetUserPermissions(), other.isSetUserPermissions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1423,7 +1443,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsImageVersionUsable()).compareTo(other.isSetIsImageVersionUsable());
+ lastComparison = java.lang.Boolean.compare(isSetIsImageVersionUsable(), other.isSetIsImageVersionUsable());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1433,7 +1453,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetHasUsbAccess()).compareTo(other.isSetHasUsbAccess());
+ lastComparison = java.lang.Boolean.compare(isSetHasUsbAccess(), other.isSetHasUsbAccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1446,21 +1466,22 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("LectureSummary(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("LectureSummary(");
boolean first = true;
sb.append("lectureId:");
@@ -1479,6 +1500,14 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
}
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("imageVersionId:");
if (this.imageVersionId == null) {
sb.append("null");
@@ -1587,7 +1616,7 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -1597,13 +1626,13 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
}
}
- private static class LectureSummaryStandardSchemeFactory implements SchemeFactory {
+ private static class LectureSummaryStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LectureSummaryStandardScheme getScheme() {
return new LectureSummaryStandardScheme();
}
}
- private static class LectureSummaryStandardScheme extends StandardScheme<LectureSummary> {
+ private static class LectureSummaryStandardScheme extends org.apache.thrift.scheme.StandardScheme<LectureSummary> {
public void read(org.apache.thrift.protocol.TProtocol iprot, LectureSummary struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -1631,6 +1660,14 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 18: // 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 3: // IMAGE_VERSION_ID
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.imageVersionId = iprot.readString();
@@ -1837,82 +1874,93 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
oprot.writeFieldBegin(HAS_USB_ACCESS_FIELD_DESC);
oprot.writeBool(struct.hasUsbAccess);
oprot.writeFieldEnd();
+ if (struct.description != null) {
+ oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
+ oprot.writeString(struct.description);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
- private static class LectureSummaryTupleSchemeFactory implements SchemeFactory {
+ private static class LectureSummaryTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LectureSummaryTupleScheme getScheme() {
return new LectureSummaryTupleScheme();
}
}
- private static class LectureSummaryTupleScheme extends TupleScheme<LectureSummary> {
+ private static class LectureSummaryTupleScheme extends org.apache.thrift.scheme.TupleScheme<LectureSummary> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, LectureSummary 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.isSetLectureId()) {
optionals.set(0);
}
if (struct.isSetLectureName()) {
optionals.set(1);
}
- if (struct.isSetImageVersionId()) {
+ if (struct.isSetDescription()) {
optionals.set(2);
}
- if (struct.isSetImageBaseId()) {
+ if (struct.isSetImageVersionId()) {
optionals.set(3);
}
- if (struct.isSetIsEnabled()) {
+ if (struct.isSetImageBaseId()) {
optionals.set(4);
}
- if (struct.isSetStartTime()) {
+ if (struct.isSetIsEnabled()) {
optionals.set(5);
}
- if (struct.isSetEndTime()) {
+ if (struct.isSetStartTime()) {
optionals.set(6);
}
- if (struct.isSetLastUsed()) {
+ if (struct.isSetEndTime()) {
optionals.set(7);
}
- if (struct.isSetUseCount()) {
+ if (struct.isSetLastUsed()) {
optionals.set(8);
}
- if (struct.isSetOwnerId()) {
+ if (struct.isSetUseCount()) {
optionals.set(9);
}
- if (struct.isSetUpdaterId()) {
+ if (struct.isSetOwnerId()) {
optionals.set(10);
}
- if (struct.isSetIsExam()) {
+ if (struct.isSetUpdaterId()) {
optionals.set(11);
}
- if (struct.isSetHasInternetAccess()) {
+ if (struct.isSetIsExam()) {
optionals.set(12);
}
- if (struct.isSetDefaultPermissions()) {
+ if (struct.isSetHasInternetAccess()) {
optionals.set(13);
}
- if (struct.isSetUserPermissions()) {
+ if (struct.isSetDefaultPermissions()) {
optionals.set(14);
}
- if (struct.isSetIsImageVersionUsable()) {
+ if (struct.isSetUserPermissions()) {
optionals.set(15);
}
- if (struct.isSetHasUsbAccess()) {
+ if (struct.isSetIsImageVersionUsable()) {
optionals.set(16);
}
- oprot.writeBitSet(optionals, 17);
+ if (struct.isSetHasUsbAccess()) {
+ optionals.set(17);
+ }
+ oprot.writeBitSet(optionals, 18);
if (struct.isSetLectureId()) {
oprot.writeString(struct.lectureId);
}
if (struct.isSetLectureName()) {
oprot.writeString(struct.lectureName);
}
+ if (struct.isSetDescription()) {
+ oprot.writeString(struct.description);
+ }
if (struct.isSetImageVersionId()) {
oprot.writeString(struct.imageVersionId);
}
@@ -1962,8 +2010,8 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LectureSummary struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(17);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(18);
if (incoming.get(0)) {
struct.lectureId = iprot.readString();
struct.setLectureIdIsSet(true);
@@ -1973,69 +2021,76 @@ public class LectureSummary implements org.apache.thrift.TBase<LectureSummary, L
struct.setLectureNameIsSet(true);
}
if (incoming.get(2)) {
+ struct.description = iprot.readString();
+ struct.setDescriptionIsSet(true);
+ }
+ if (incoming.get(3)) {
struct.imageVersionId = iprot.readString();
struct.setImageVersionIdIsSet(true);
}
- if (incoming.get(3)) {
+ if (incoming.get(4)) {
struct.imageBaseId = iprot.readString();
struct.setImageBaseIdIsSet(true);
}
- if (incoming.get(4)) {
+ if (incoming.get(5)) {
struct.isEnabled = iprot.readBool();
struct.setIsEnabledIsSet(true);
}
- if (incoming.get(5)) {
+ if (incoming.get(6)) {
struct.startTime = iprot.readI64();
struct.setStartTimeIsSet(true);
}
- if (incoming.get(6)) {
+ if (incoming.get(7)) {
struct.endTime = iprot.readI64();
struct.setEndTimeIsSet(true);
}
- if (incoming.get(7)) {
+ if (incoming.get(8)) {
struct.lastUsed = iprot.readI64();
struct.setLastUsedIsSet(true);
}
- if (incoming.get(8)) {
+ if (incoming.get(9)) {
struct.useCount = iprot.readI32();
struct.setUseCountIsSet(true);
}
- if (incoming.get(9)) {
+ if (incoming.get(10)) {
struct.ownerId = iprot.readString();
struct.setOwnerIdIsSet(true);
}
- if (incoming.get(10)) {
+ if (incoming.get(11)) {
struct.updaterId = iprot.readString();
struct.setUpdaterIdIsSet(true);
}
- if (incoming.get(11)) {
+ if (incoming.get(12)) {
struct.isExam = iprot.readBool();
struct.setIsExamIsSet(true);
}
- if (incoming.get(12)) {
+ if (incoming.get(13)) {
struct.hasInternetAccess = iprot.readBool();
struct.setHasInternetAccessIsSet(true);
}
- if (incoming.get(13)) {
+ if (incoming.get(14)) {
struct.defaultPermissions = new LecturePermissions();
struct.defaultPermissions.read(iprot);
struct.setDefaultPermissionsIsSet(true);
}
- if (incoming.get(14)) {
+ if (incoming.get(15)) {
struct.userPermissions = new LecturePermissions();
struct.userPermissions.read(iprot);
struct.setUserPermissionsIsSet(true);
}
- if (incoming.get(15)) {
+ if (incoming.get(16)) {
struct.isImageVersionUsable = iprot.readBool();
struct.setIsImageVersionUsableIsSet(true);
}
- if (incoming.get(16)) {
+ if (incoming.get(17)) {
struct.hasUsbAccess = iprot.readBool();
struct.setHasUsbAccessIsSet(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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java b/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java
index 921ea64..aee2ee8 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/LectureWrite.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 = "2019-02-25")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, LectureWrite._Fields>, java.io.Serializable, Cloneable, Comparable<LectureWrite> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("LectureWrite");
@@ -62,35 +35,32 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
private static final org.apache.thrift.protocol.TField PRESET_SCRIPT_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("presetScriptIds", org.apache.thrift.protocol.TType.LIST, (short)23);
private static final org.apache.thrift.protocol.TField PRESET_NETWORK_EXCEPTION_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("presetNetworkExceptionIds", org.apache.thrift.protocol.TType.LIST, (short)24);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new LectureWriteStandardSchemeFactory());
- schemes.put(TupleScheme.class, new LectureWriteTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LectureWriteStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LectureWriteTupleSchemeFactory();
- public String lectureName; // required
- public String description; // required
- public String imageVersionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String lectureName; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String description; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageVersionId; // required
public boolean autoUpdate; // required
public boolean isEnabled; // required
public long startTime; // required
public long endTime; // required
- public String runscript; // required
- public List<String> nics; // required
- public List<NetRule> networkExceptions; // optional
+ public @org.apache.thrift.annotation.Nullable java.lang.String runscript; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> nics; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<NetRule> networkExceptions; // optional
public boolean isExam; // required
public boolean hasInternetAccess; // required
- public LecturePermissions defaultPermissions; // required
- public List<String> addAllowedUsers; // optional
- public List<String> remAllowedUsers; // optional
- public List<Integer> locationIds; // required
+ public @org.apache.thrift.annotation.Nullable LecturePermissions defaultPermissions; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> addAllowedUsers; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> remAllowedUsers; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> locationIds; // required
public boolean limitToLocations; // required
public boolean limitToAllowedUsers; // required
public boolean hasUsbAccess; // required
- public List<NetShare> networkShares; // optional
- public List<LdapFilter> ldapFilters; // optional
- public List<Integer> presetScriptIds; // optional
- public List<Integer> presetNetworkExceptionIds; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<NetShare> networkShares; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<LdapFilter> ldapFilters; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> presetScriptIds; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> presetNetworkExceptionIds; // 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 {
@@ -118,10 +88,10 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
PRESET_SCRIPT_IDS((short)23, "presetScriptIds"),
PRESET_NETWORK_EXCEPTION_IDS((short)24, "presetNetworkExceptionIds");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -129,6 +99,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
/**
* 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: // LECTURE_NAME
@@ -188,21 +159,22 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -211,7 +183,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -228,9 +200,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
private static final int __HASUSBACCESS_ISSET_ID = 8;
private short __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.NETWORK_EXCEPTIONS,_Fields.ADD_ALLOWED_USERS,_Fields.REM_ALLOWED_USERS,_Fields.NETWORK_SHARES,_Fields.LDAP_FILTERS,_Fields.PRESET_SCRIPT_IDS,_Fields.PRESET_NETWORK_EXCEPTION_IDS};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.LECTURE_NAME, new org.apache.thrift.meta_data.FieldMetaData("lectureName", 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,
@@ -286,7 +258,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
tmpMap.put(_Fields.PRESET_NETWORK_EXCEPTION_IDS, new org.apache.thrift.meta_data.FieldMetaData("presetNetworkExceptionIds", org.apache.thrift.TFieldRequirementType.OPTIONAL,
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.I32))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(LectureWrite.class, metaDataMap);
}
@@ -294,19 +266,19 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
public LectureWrite(
- String lectureName,
- String description,
- String imageVersionId,
+ java.lang.String lectureName,
+ java.lang.String description,
+ java.lang.String imageVersionId,
boolean autoUpdate,
boolean isEnabled,
long startTime,
long endTime,
- String runscript,
- List<String> nics,
+ java.lang.String runscript,
+ java.util.List<java.lang.String> nics,
boolean isExam,
boolean hasInternetAccess,
LecturePermissions defaultPermissions,
- List<Integer> locationIds,
+ java.util.List<java.lang.Integer> locationIds,
boolean limitToLocations,
boolean limitToAllowedUsers,
boolean hasUsbAccess)
@@ -361,11 +333,11 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
this.runscript = other.runscript;
}
if (other.isSetNics()) {
- List<String> __this__nics = new ArrayList<String>(other.nics);
+ java.util.List<java.lang.String> __this__nics = new java.util.ArrayList<java.lang.String>(other.nics);
this.nics = __this__nics;
}
if (other.isSetNetworkExceptions()) {
- List<NetRule> __this__networkExceptions = new ArrayList<NetRule>(other.networkExceptions.size());
+ java.util.List<NetRule> __this__networkExceptions = new java.util.ArrayList<NetRule>(other.networkExceptions.size());
for (NetRule other_element : other.networkExceptions) {
__this__networkExceptions.add(new NetRule(other_element));
}
@@ -377,40 +349,40 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
this.defaultPermissions = new LecturePermissions(other.defaultPermissions);
}
if (other.isSetAddAllowedUsers()) {
- List<String> __this__addAllowedUsers = new ArrayList<String>(other.addAllowedUsers);
+ java.util.List<java.lang.String> __this__addAllowedUsers = new java.util.ArrayList<java.lang.String>(other.addAllowedUsers);
this.addAllowedUsers = __this__addAllowedUsers;
}
if (other.isSetRemAllowedUsers()) {
- List<String> __this__remAllowedUsers = new ArrayList<String>(other.remAllowedUsers);
+ java.util.List<java.lang.String> __this__remAllowedUsers = new java.util.ArrayList<java.lang.String>(other.remAllowedUsers);
this.remAllowedUsers = __this__remAllowedUsers;
}
if (other.isSetLocationIds()) {
- List<Integer> __this__locationIds = new ArrayList<Integer>(other.locationIds);
+ java.util.List<java.lang.Integer> __this__locationIds = new java.util.ArrayList<java.lang.Integer>(other.locationIds);
this.locationIds = __this__locationIds;
}
this.limitToLocations = other.limitToLocations;
this.limitToAllowedUsers = other.limitToAllowedUsers;
this.hasUsbAccess = other.hasUsbAccess;
if (other.isSetNetworkShares()) {
- List<NetShare> __this__networkShares = new ArrayList<NetShare>(other.networkShares.size());
+ java.util.List<NetShare> __this__networkShares = new java.util.ArrayList<NetShare>(other.networkShares.size());
for (NetShare other_element : other.networkShares) {
__this__networkShares.add(new NetShare(other_element));
}
this.networkShares = __this__networkShares;
}
if (other.isSetLdapFilters()) {
- List<LdapFilter> __this__ldapFilters = new ArrayList<LdapFilter>(other.ldapFilters.size());
+ java.util.List<LdapFilter> __this__ldapFilters = new java.util.ArrayList<LdapFilter>(other.ldapFilters.size());
for (LdapFilter other_element : other.ldapFilters) {
__this__ldapFilters.add(new LdapFilter(other_element));
}
this.ldapFilters = __this__ldapFilters;
}
if (other.isSetPresetScriptIds()) {
- List<Integer> __this__presetScriptIds = new ArrayList<Integer>(other.presetScriptIds);
+ java.util.List<java.lang.Integer> __this__presetScriptIds = new java.util.ArrayList<java.lang.Integer>(other.presetScriptIds);
this.presetScriptIds = __this__presetScriptIds;
}
if (other.isSetPresetNetworkExceptionIds()) {
- List<Integer> __this__presetNetworkExceptionIds = new ArrayList<Integer>(other.presetNetworkExceptionIds);
+ java.util.List<java.lang.Integer> __this__presetNetworkExceptionIds = new java.util.ArrayList<java.lang.Integer>(other.presetNetworkExceptionIds);
this.presetNetworkExceptionIds = __this__presetNetworkExceptionIds;
}
}
@@ -455,11 +427,12 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
this.presetNetworkExceptionIds = null;
}
- public String getLectureName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getLectureName() {
return this.lectureName;
}
- public LectureWrite setLectureName(String lectureName) {
+ public LectureWrite setLectureName(@org.apache.thrift.annotation.Nullable java.lang.String lectureName) {
this.lectureName = lectureName;
return this;
}
@@ -479,11 +452,12 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
}
- public String getDescription() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getDescription() {
return this.description;
}
- public LectureWrite setDescription(String description) {
+ public LectureWrite setDescription(@org.apache.thrift.annotation.Nullable java.lang.String description) {
this.description = description;
return this;
}
@@ -503,11 +477,12 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
}
- public String getImageVersionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageVersionId() {
return this.imageVersionId;
}
- public LectureWrite setImageVersionId(String imageVersionId) {
+ public LectureWrite setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.String imageVersionId) {
this.imageVersionId = imageVersionId;
return this;
}
@@ -538,16 +513,16 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
public void unsetAutoUpdate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AUTOUPDATE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __AUTOUPDATE_ISSET_ID);
}
/** Returns true if field autoUpdate is set (has been assigned a value) and false otherwise */
public boolean isSetAutoUpdate() {
- return EncodingUtils.testBit(__isset_bitfield, __AUTOUPDATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __AUTOUPDATE_ISSET_ID);
}
public void setAutoUpdateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AUTOUPDATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __AUTOUPDATE_ISSET_ID, value);
}
public boolean isIsEnabled() {
@@ -561,16 +536,16 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
public void unsetIsEnabled() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISENABLED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISENABLED_ISSET_ID);
}
/** Returns true if field isEnabled is set (has been assigned a value) and false otherwise */
public boolean isSetIsEnabled() {
- return EncodingUtils.testBit(__isset_bitfield, __ISENABLED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISENABLED_ISSET_ID);
}
public void setIsEnabledIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISENABLED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISENABLED_ISSET_ID, value);
}
public long getStartTime() {
@@ -584,16 +559,16 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
public void unsetStartTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTTIME_ISSET_ID);
}
/** Returns true if field startTime is set (has been assigned a value) and false otherwise */
public boolean isSetStartTime() {
- return EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTTIME_ISSET_ID);
}
public void setStartTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTTIME_ISSET_ID, value);
}
public long getEndTime() {
@@ -607,23 +582,24 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
public void unsetEndTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENDTIME_ISSET_ID);
}
/** Returns true if field endTime is set (has been assigned a value) and false otherwise */
public boolean isSetEndTime() {
- return EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENDTIME_ISSET_ID);
}
public void setEndTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENDTIME_ISSET_ID, value);
}
- public String getRunscript() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getRunscript() {
return this.runscript;
}
- public LectureWrite setRunscript(String runscript) {
+ public LectureWrite setRunscript(@org.apache.thrift.annotation.Nullable java.lang.String runscript) {
this.runscript = runscript;
return this;
}
@@ -647,22 +623,24 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return (this.nics == null) ? 0 : this.nics.size();
}
- public java.util.Iterator<String> getNicsIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> getNicsIterator() {
return (this.nics == null) ? null : this.nics.iterator();
}
- public void addToNics(String elem) {
+ public void addToNics(java.lang.String elem) {
if (this.nics == null) {
- this.nics = new ArrayList<String>();
+ this.nics = new java.util.ArrayList<java.lang.String>();
}
this.nics.add(elem);
}
- public List<String> getNics() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getNics() {
return this.nics;
}
- public LectureWrite setNics(List<String> nics) {
+ public LectureWrite setNics(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> nics) {
this.nics = nics;
return this;
}
@@ -686,22 +664,24 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return (this.networkExceptions == null) ? 0 : this.networkExceptions.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<NetRule> getNetworkExceptionsIterator() {
return (this.networkExceptions == null) ? null : this.networkExceptions.iterator();
}
public void addToNetworkExceptions(NetRule elem) {
if (this.networkExceptions == null) {
- this.networkExceptions = new ArrayList<NetRule>();
+ this.networkExceptions = new java.util.ArrayList<NetRule>();
}
this.networkExceptions.add(elem);
}
- public List<NetRule> getNetworkExceptions() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<NetRule> getNetworkExceptions() {
return this.networkExceptions;
}
- public LectureWrite setNetworkExceptions(List<NetRule> networkExceptions) {
+ public LectureWrite setNetworkExceptions(@org.apache.thrift.annotation.Nullable java.util.List<NetRule> networkExceptions) {
this.networkExceptions = networkExceptions;
return this;
}
@@ -732,16 +712,16 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
public void unsetIsExam() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISEXAM_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISEXAM_ISSET_ID);
}
/** Returns true if field isExam is set (has been assigned a value) and false otherwise */
public boolean isSetIsExam() {
- return EncodingUtils.testBit(__isset_bitfield, __ISEXAM_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISEXAM_ISSET_ID);
}
public void setIsExamIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISEXAM_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISEXAM_ISSET_ID, value);
}
public boolean isHasInternetAccess() {
@@ -755,23 +735,24 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
public void unsetHasInternetAccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
}
/** Returns true if field hasInternetAccess is set (has been assigned a value) and false otherwise */
public boolean isSetHasInternetAccess() {
- return EncodingUtils.testBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID);
}
public void setHasInternetAccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __HASINTERNETACCESS_ISSET_ID, value);
}
+ @org.apache.thrift.annotation.Nullable
public LecturePermissions getDefaultPermissions() {
return this.defaultPermissions;
}
- public LectureWrite setDefaultPermissions(LecturePermissions defaultPermissions) {
+ public LectureWrite setDefaultPermissions(@org.apache.thrift.annotation.Nullable LecturePermissions defaultPermissions) {
this.defaultPermissions = defaultPermissions;
return this;
}
@@ -795,22 +776,24 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return (this.addAllowedUsers == null) ? 0 : this.addAllowedUsers.size();
}
- public java.util.Iterator<String> getAddAllowedUsersIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> getAddAllowedUsersIterator() {
return (this.addAllowedUsers == null) ? null : this.addAllowedUsers.iterator();
}
- public void addToAddAllowedUsers(String elem) {
+ public void addToAddAllowedUsers(java.lang.String elem) {
if (this.addAllowedUsers == null) {
- this.addAllowedUsers = new ArrayList<String>();
+ this.addAllowedUsers = new java.util.ArrayList<java.lang.String>();
}
this.addAllowedUsers.add(elem);
}
- public List<String> getAddAllowedUsers() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getAddAllowedUsers() {
return this.addAllowedUsers;
}
- public LectureWrite setAddAllowedUsers(List<String> addAllowedUsers) {
+ public LectureWrite setAddAllowedUsers(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> addAllowedUsers) {
this.addAllowedUsers = addAllowedUsers;
return this;
}
@@ -834,22 +817,24 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return (this.remAllowedUsers == null) ? 0 : this.remAllowedUsers.size();
}
- public java.util.Iterator<String> getRemAllowedUsersIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> getRemAllowedUsersIterator() {
return (this.remAllowedUsers == null) ? null : this.remAllowedUsers.iterator();
}
- public void addToRemAllowedUsers(String elem) {
+ public void addToRemAllowedUsers(java.lang.String elem) {
if (this.remAllowedUsers == null) {
- this.remAllowedUsers = new ArrayList<String>();
+ this.remAllowedUsers = new java.util.ArrayList<java.lang.String>();
}
this.remAllowedUsers.add(elem);
}
- public List<String> getRemAllowedUsers() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getRemAllowedUsers() {
return this.remAllowedUsers;
}
- public LectureWrite setRemAllowedUsers(List<String> remAllowedUsers) {
+ public LectureWrite setRemAllowedUsers(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> remAllowedUsers) {
this.remAllowedUsers = remAllowedUsers;
return this;
}
@@ -873,22 +858,24 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return (this.locationIds == null) ? 0 : this.locationIds.size();
}
- public java.util.Iterator<Integer> getLocationIdsIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.Integer> getLocationIdsIterator() {
return (this.locationIds == null) ? null : this.locationIds.iterator();
}
public void addToLocationIds(int elem) {
if (this.locationIds == null) {
- this.locationIds = new ArrayList<Integer>();
+ this.locationIds = new java.util.ArrayList<java.lang.Integer>();
}
this.locationIds.add(elem);
}
- public List<Integer> getLocationIds() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.Integer> getLocationIds() {
return this.locationIds;
}
- public LectureWrite setLocationIds(List<Integer> locationIds) {
+ public LectureWrite setLocationIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> locationIds) {
this.locationIds = locationIds;
return this;
}
@@ -919,16 +906,16 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
public void unsetLimitToLocations() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LIMITTOLOCATIONS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LIMITTOLOCATIONS_ISSET_ID);
}
/** Returns true if field limitToLocations is set (has been assigned a value) and false otherwise */
public boolean isSetLimitToLocations() {
- return EncodingUtils.testBit(__isset_bitfield, __LIMITTOLOCATIONS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LIMITTOLOCATIONS_ISSET_ID);
}
public void setLimitToLocationsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIMITTOLOCATIONS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LIMITTOLOCATIONS_ISSET_ID, value);
}
public boolean isLimitToAllowedUsers() {
@@ -942,16 +929,16 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
public void unsetLimitToAllowedUsers() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LIMITTOALLOWEDUSERS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LIMITTOALLOWEDUSERS_ISSET_ID);
}
/** Returns true if field limitToAllowedUsers is set (has been assigned a value) and false otherwise */
public boolean isSetLimitToAllowedUsers() {
- return EncodingUtils.testBit(__isset_bitfield, __LIMITTOALLOWEDUSERS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LIMITTOALLOWEDUSERS_ISSET_ID);
}
public void setLimitToAllowedUsersIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIMITTOALLOWEDUSERS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LIMITTOALLOWEDUSERS_ISSET_ID, value);
}
public boolean isHasUsbAccess() {
@@ -965,38 +952,40 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
public void unsetHasUsbAccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID);
}
/** Returns true if field hasUsbAccess is set (has been assigned a value) and false otherwise */
public boolean isSetHasUsbAccess() {
- return EncodingUtils.testBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID);
}
public void setHasUsbAccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __HASUSBACCESS_ISSET_ID, value);
}
public int getNetworkSharesSize() {
return (this.networkShares == null) ? 0 : this.networkShares.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<NetShare> getNetworkSharesIterator() {
return (this.networkShares == null) ? null : this.networkShares.iterator();
}
public void addToNetworkShares(NetShare elem) {
if (this.networkShares == null) {
- this.networkShares = new ArrayList<NetShare>();
+ this.networkShares = new java.util.ArrayList<NetShare>();
}
this.networkShares.add(elem);
}
- public List<NetShare> getNetworkShares() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<NetShare> getNetworkShares() {
return this.networkShares;
}
- public LectureWrite setNetworkShares(List<NetShare> networkShares) {
+ public LectureWrite setNetworkShares(@org.apache.thrift.annotation.Nullable java.util.List<NetShare> networkShares) {
this.networkShares = networkShares;
return this;
}
@@ -1020,22 +1009,24 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return (this.ldapFilters == null) ? 0 : this.ldapFilters.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<LdapFilter> getLdapFiltersIterator() {
return (this.ldapFilters == null) ? null : this.ldapFilters.iterator();
}
public void addToLdapFilters(LdapFilter elem) {
if (this.ldapFilters == null) {
- this.ldapFilters = new ArrayList<LdapFilter>();
+ this.ldapFilters = new java.util.ArrayList<LdapFilter>();
}
this.ldapFilters.add(elem);
}
- public List<LdapFilter> getLdapFilters() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<LdapFilter> getLdapFilters() {
return this.ldapFilters;
}
- public LectureWrite setLdapFilters(List<LdapFilter> ldapFilters) {
+ public LectureWrite setLdapFilters(@org.apache.thrift.annotation.Nullable java.util.List<LdapFilter> ldapFilters) {
this.ldapFilters = ldapFilters;
return this;
}
@@ -1059,22 +1050,24 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return (this.presetScriptIds == null) ? 0 : this.presetScriptIds.size();
}
- public java.util.Iterator<Integer> getPresetScriptIdsIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.Integer> getPresetScriptIdsIterator() {
return (this.presetScriptIds == null) ? null : this.presetScriptIds.iterator();
}
public void addToPresetScriptIds(int elem) {
if (this.presetScriptIds == null) {
- this.presetScriptIds = new ArrayList<Integer>();
+ this.presetScriptIds = new java.util.ArrayList<java.lang.Integer>();
}
this.presetScriptIds.add(elem);
}
- public List<Integer> getPresetScriptIds() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.Integer> getPresetScriptIds() {
return this.presetScriptIds;
}
- public LectureWrite setPresetScriptIds(List<Integer> presetScriptIds) {
+ public LectureWrite setPresetScriptIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> presetScriptIds) {
this.presetScriptIds = presetScriptIds;
return this;
}
@@ -1098,22 +1091,24 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return (this.presetNetworkExceptionIds == null) ? 0 : this.presetNetworkExceptionIds.size();
}
- public java.util.Iterator<Integer> getPresetNetworkExceptionIdsIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.Integer> getPresetNetworkExceptionIdsIterator() {
return (this.presetNetworkExceptionIds == null) ? null : this.presetNetworkExceptionIds.iterator();
}
public void addToPresetNetworkExceptionIds(int elem) {
if (this.presetNetworkExceptionIds == null) {
- this.presetNetworkExceptionIds = new ArrayList<Integer>();
+ this.presetNetworkExceptionIds = new java.util.ArrayList<java.lang.Integer>();
}
this.presetNetworkExceptionIds.add(elem);
}
- public List<Integer> getPresetNetworkExceptionIds() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.Integer> getPresetNetworkExceptionIds() {
return this.presetNetworkExceptionIds;
}
- public LectureWrite setPresetNetworkExceptionIds(List<Integer> presetNetworkExceptionIds) {
+ public LectureWrite setPresetNetworkExceptionIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> presetNetworkExceptionIds) {
this.presetNetworkExceptionIds = presetNetworkExceptionIds;
return this;
}
@@ -1133,13 +1128,13 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case LECTURE_NAME:
if (value == null) {
unsetLectureName();
} else {
- setLectureName((String)value);
+ setLectureName((java.lang.String)value);
}
break;
@@ -1147,7 +1142,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetDescription();
} else {
- setDescription((String)value);
+ setDescription((java.lang.String)value);
}
break;
@@ -1155,7 +1150,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetImageVersionId();
} else {
- setImageVersionId((String)value);
+ setImageVersionId((java.lang.String)value);
}
break;
@@ -1163,7 +1158,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetAutoUpdate();
} else {
- setAutoUpdate((Boolean)value);
+ setAutoUpdate((java.lang.Boolean)value);
}
break;
@@ -1171,7 +1166,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetIsEnabled();
} else {
- setIsEnabled((Boolean)value);
+ setIsEnabled((java.lang.Boolean)value);
}
break;
@@ -1179,7 +1174,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetStartTime();
} else {
- setStartTime((Long)value);
+ setStartTime((java.lang.Long)value);
}
break;
@@ -1187,7 +1182,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetEndTime();
} else {
- setEndTime((Long)value);
+ setEndTime((java.lang.Long)value);
}
break;
@@ -1195,7 +1190,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetRunscript();
} else {
- setRunscript((String)value);
+ setRunscript((java.lang.String)value);
}
break;
@@ -1203,7 +1198,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetNics();
} else {
- setNics((List<String>)value);
+ setNics((java.util.List<java.lang.String>)value);
}
break;
@@ -1211,7 +1206,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetNetworkExceptions();
} else {
- setNetworkExceptions((List<NetRule>)value);
+ setNetworkExceptions((java.util.List<NetRule>)value);
}
break;
@@ -1219,7 +1214,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetIsExam();
} else {
- setIsExam((Boolean)value);
+ setIsExam((java.lang.Boolean)value);
}
break;
@@ -1227,7 +1222,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetHasInternetAccess();
} else {
- setHasInternetAccess((Boolean)value);
+ setHasInternetAccess((java.lang.Boolean)value);
}
break;
@@ -1243,7 +1238,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetAddAllowedUsers();
} else {
- setAddAllowedUsers((List<String>)value);
+ setAddAllowedUsers((java.util.List<java.lang.String>)value);
}
break;
@@ -1251,7 +1246,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetRemAllowedUsers();
} else {
- setRemAllowedUsers((List<String>)value);
+ setRemAllowedUsers((java.util.List<java.lang.String>)value);
}
break;
@@ -1259,7 +1254,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetLocationIds();
} else {
- setLocationIds((List<Integer>)value);
+ setLocationIds((java.util.List<java.lang.Integer>)value);
}
break;
@@ -1267,7 +1262,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetLimitToLocations();
} else {
- setLimitToLocations((Boolean)value);
+ setLimitToLocations((java.lang.Boolean)value);
}
break;
@@ -1275,7 +1270,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetLimitToAllowedUsers();
} else {
- setLimitToAllowedUsers((Boolean)value);
+ setLimitToAllowedUsers((java.lang.Boolean)value);
}
break;
@@ -1283,7 +1278,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetHasUsbAccess();
} else {
- setHasUsbAccess((Boolean)value);
+ setHasUsbAccess((java.lang.Boolean)value);
}
break;
@@ -1291,7 +1286,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetNetworkShares();
} else {
- setNetworkShares((List<NetShare>)value);
+ setNetworkShares((java.util.List<NetShare>)value);
}
break;
@@ -1299,7 +1294,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetLdapFilters();
} else {
- setLdapFilters((List<LdapFilter>)value);
+ setLdapFilters((java.util.List<LdapFilter>)value);
}
break;
@@ -1307,7 +1302,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetPresetScriptIds();
} else {
- setPresetScriptIds((List<Integer>)value);
+ setPresetScriptIds((java.util.List<java.lang.Integer>)value);
}
break;
@@ -1315,14 +1310,15 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (value == null) {
unsetPresetNetworkExceptionIds();
} else {
- setPresetNetworkExceptionIds((List<Integer>)value);
+ setPresetNetworkExceptionIds((java.util.List<java.lang.Integer>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case LECTURE_NAME:
return getLectureName();
@@ -1394,13 +1390,13 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return getPresetNetworkExceptionIds();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -1451,13 +1447,11 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
case PRESET_NETWORK_EXCEPTION_IDS:
return isSetPresetNetworkExceptionIds();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof LectureWrite)
return this.equals((LectureWrite)that);
return false;
@@ -1466,6 +1460,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
public boolean equals(LectureWrite that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_lectureName = true && this.isSetLectureName();
boolean that_present_lectureName = true && that.isSetLectureName();
@@ -1679,124 +1675,83 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_lectureName = true && (isSetLectureName());
- list.add(present_lectureName);
- if (present_lectureName)
- list.add(lectureName);
-
- boolean present_description = true && (isSetDescription());
- list.add(present_description);
- if (present_description)
- list.add(description);
-
- boolean present_imageVersionId = true && (isSetImageVersionId());
- list.add(present_imageVersionId);
- if (present_imageVersionId)
- list.add(imageVersionId);
-
- boolean present_autoUpdate = true;
- list.add(present_autoUpdate);
- if (present_autoUpdate)
- list.add(autoUpdate);
-
- boolean present_isEnabled = true;
- list.add(present_isEnabled);
- if (present_isEnabled)
- list.add(isEnabled);
-
- boolean present_startTime = true;
- list.add(present_startTime);
- if (present_startTime)
- list.add(startTime);
-
- boolean present_endTime = true;
- list.add(present_endTime);
- if (present_endTime)
- list.add(endTime);
-
- boolean present_runscript = true && (isSetRunscript());
- list.add(present_runscript);
- if (present_runscript)
- list.add(runscript);
-
- boolean present_nics = true && (isSetNics());
- list.add(present_nics);
- if (present_nics)
- list.add(nics);
-
- boolean present_networkExceptions = true && (isSetNetworkExceptions());
- list.add(present_networkExceptions);
- if (present_networkExceptions)
- list.add(networkExceptions);
-
- boolean present_isExam = true;
- list.add(present_isExam);
- if (present_isExam)
- list.add(isExam);
-
- boolean present_hasInternetAccess = true;
- list.add(present_hasInternetAccess);
- if (present_hasInternetAccess)
- list.add(hasInternetAccess);
-
- boolean present_defaultPermissions = true && (isSetDefaultPermissions());
- list.add(present_defaultPermissions);
- if (present_defaultPermissions)
- list.add(defaultPermissions);
-
- boolean present_addAllowedUsers = true && (isSetAddAllowedUsers());
- list.add(present_addAllowedUsers);
- if (present_addAllowedUsers)
- list.add(addAllowedUsers);
-
- boolean present_remAllowedUsers = true && (isSetRemAllowedUsers());
- list.add(present_remAllowedUsers);
- if (present_remAllowedUsers)
- list.add(remAllowedUsers);
-
- boolean present_locationIds = true && (isSetLocationIds());
- list.add(present_locationIds);
- if (present_locationIds)
- list.add(locationIds);
-
- boolean present_limitToLocations = true;
- list.add(present_limitToLocations);
- if (present_limitToLocations)
- list.add(limitToLocations);
-
- boolean present_limitToAllowedUsers = true;
- list.add(present_limitToAllowedUsers);
- if (present_limitToAllowedUsers)
- list.add(limitToAllowedUsers);
-
- boolean present_hasUsbAccess = true;
- list.add(present_hasUsbAccess);
- if (present_hasUsbAccess)
- list.add(hasUsbAccess);
-
- boolean present_networkShares = true && (isSetNetworkShares());
- list.add(present_networkShares);
- if (present_networkShares)
- list.add(networkShares);
-
- boolean present_ldapFilters = true && (isSetLdapFilters());
- list.add(present_ldapFilters);
- if (present_ldapFilters)
- list.add(ldapFilters);
-
- boolean present_presetScriptIds = true && (isSetPresetScriptIds());
- list.add(present_presetScriptIds);
- if (present_presetScriptIds)
- list.add(presetScriptIds);
-
- boolean present_presetNetworkExceptionIds = true && (isSetPresetNetworkExceptionIds());
- list.add(present_presetNetworkExceptionIds);
- if (present_presetNetworkExceptionIds)
- list.add(presetNetworkExceptionIds);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetLectureName()) ? 131071 : 524287);
+ if (isSetLectureName())
+ hashCode = hashCode * 8191 + lectureName.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetDescription()) ? 131071 : 524287);
+ if (isSetDescription())
+ hashCode = hashCode * 8191 + description.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287);
+ if (isSetImageVersionId())
+ hashCode = hashCode * 8191 + imageVersionId.hashCode();
+
+ hashCode = hashCode * 8191 + ((autoUpdate) ? 131071 : 524287);
+
+ hashCode = hashCode * 8191 + ((isEnabled) ? 131071 : 524287);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startTime);
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(endTime);
+
+ hashCode = hashCode * 8191 + ((isSetRunscript()) ? 131071 : 524287);
+ if (isSetRunscript())
+ hashCode = hashCode * 8191 + runscript.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetNics()) ? 131071 : 524287);
+ if (isSetNics())
+ hashCode = hashCode * 8191 + nics.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetNetworkExceptions()) ? 131071 : 524287);
+ if (isSetNetworkExceptions())
+ hashCode = hashCode * 8191 + networkExceptions.hashCode();
+
+ hashCode = hashCode * 8191 + ((isExam) ? 131071 : 524287);
+
+ hashCode = hashCode * 8191 + ((hasInternetAccess) ? 131071 : 524287);
+
+ hashCode = hashCode * 8191 + ((isSetDefaultPermissions()) ? 131071 : 524287);
+ if (isSetDefaultPermissions())
+ hashCode = hashCode * 8191 + defaultPermissions.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetAddAllowedUsers()) ? 131071 : 524287);
+ if (isSetAddAllowedUsers())
+ hashCode = hashCode * 8191 + addAllowedUsers.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetRemAllowedUsers()) ? 131071 : 524287);
+ if (isSetRemAllowedUsers())
+ hashCode = hashCode * 8191 + remAllowedUsers.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetLocationIds()) ? 131071 : 524287);
+ if (isSetLocationIds())
+ hashCode = hashCode * 8191 + locationIds.hashCode();
+
+ hashCode = hashCode * 8191 + ((limitToLocations) ? 131071 : 524287);
+
+ hashCode = hashCode * 8191 + ((limitToAllowedUsers) ? 131071 : 524287);
+
+ hashCode = hashCode * 8191 + ((hasUsbAccess) ? 131071 : 524287);
+
+ hashCode = hashCode * 8191 + ((isSetNetworkShares()) ? 131071 : 524287);
+ if (isSetNetworkShares())
+ hashCode = hashCode * 8191 + networkShares.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetLdapFilters()) ? 131071 : 524287);
+ if (isSetLdapFilters())
+ hashCode = hashCode * 8191 + ldapFilters.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetPresetScriptIds()) ? 131071 : 524287);
+ if (isSetPresetScriptIds())
+ hashCode = hashCode * 8191 + presetScriptIds.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetPresetNetworkExceptionIds()) ? 131071 : 524287);
+ if (isSetPresetNetworkExceptionIds())
+ hashCode = hashCode * 8191 + presetNetworkExceptionIds.hashCode();
+
+ return hashCode;
}
@Override
@@ -1807,7 +1762,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetLectureName()).compareTo(other.isSetLectureName());
+ lastComparison = java.lang.Boolean.compare(isSetLectureName(), other.isSetLectureName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1817,7 +1772,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDescription()).compareTo(other.isSetDescription());
+ lastComparison = java.lang.Boolean.compare(isSetDescription(), other.isSetDescription());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1827,7 +1782,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ lastComparison = java.lang.Boolean.compare(isSetImageVersionId(), other.isSetImageVersionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1837,7 +1792,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAutoUpdate()).compareTo(other.isSetAutoUpdate());
+ lastComparison = java.lang.Boolean.compare(isSetAutoUpdate(), other.isSetAutoUpdate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1847,7 +1802,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsEnabled()).compareTo(other.isSetIsEnabled());
+ lastComparison = java.lang.Boolean.compare(isSetIsEnabled(), other.isSetIsEnabled());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1857,7 +1812,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetStartTime()).compareTo(other.isSetStartTime());
+ lastComparison = java.lang.Boolean.compare(isSetStartTime(), other.isSetStartTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1867,7 +1822,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetEndTime()).compareTo(other.isSetEndTime());
+ lastComparison = java.lang.Boolean.compare(isSetEndTime(), other.isSetEndTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1877,7 +1832,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetRunscript()).compareTo(other.isSetRunscript());
+ lastComparison = java.lang.Boolean.compare(isSetRunscript(), other.isSetRunscript());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1887,7 +1842,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNics()).compareTo(other.isSetNics());
+ lastComparison = java.lang.Boolean.compare(isSetNics(), other.isSetNics());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1897,7 +1852,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNetworkExceptions()).compareTo(other.isSetNetworkExceptions());
+ lastComparison = java.lang.Boolean.compare(isSetNetworkExceptions(), other.isSetNetworkExceptions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1907,7 +1862,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsExam()).compareTo(other.isSetIsExam());
+ lastComparison = java.lang.Boolean.compare(isSetIsExam(), other.isSetIsExam());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1917,7 +1872,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetHasInternetAccess()).compareTo(other.isSetHasInternetAccess());
+ lastComparison = java.lang.Boolean.compare(isSetHasInternetAccess(), other.isSetHasInternetAccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1927,7 +1882,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDefaultPermissions()).compareTo(other.isSetDefaultPermissions());
+ lastComparison = java.lang.Boolean.compare(isSetDefaultPermissions(), other.isSetDefaultPermissions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1937,7 +1892,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAddAllowedUsers()).compareTo(other.isSetAddAllowedUsers());
+ lastComparison = java.lang.Boolean.compare(isSetAddAllowedUsers(), other.isSetAddAllowedUsers());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1947,7 +1902,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetRemAllowedUsers()).compareTo(other.isSetRemAllowedUsers());
+ lastComparison = java.lang.Boolean.compare(isSetRemAllowedUsers(), other.isSetRemAllowedUsers());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1957,7 +1912,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLocationIds()).compareTo(other.isSetLocationIds());
+ lastComparison = java.lang.Boolean.compare(isSetLocationIds(), other.isSetLocationIds());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1967,7 +1922,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLimitToLocations()).compareTo(other.isSetLimitToLocations());
+ lastComparison = java.lang.Boolean.compare(isSetLimitToLocations(), other.isSetLimitToLocations());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1977,7 +1932,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLimitToAllowedUsers()).compareTo(other.isSetLimitToAllowedUsers());
+ lastComparison = java.lang.Boolean.compare(isSetLimitToAllowedUsers(), other.isSetLimitToAllowedUsers());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1987,7 +1942,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetHasUsbAccess()).compareTo(other.isSetHasUsbAccess());
+ lastComparison = java.lang.Boolean.compare(isSetHasUsbAccess(), other.isSetHasUsbAccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1997,7 +1952,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNetworkShares()).compareTo(other.isSetNetworkShares());
+ lastComparison = java.lang.Boolean.compare(isSetNetworkShares(), other.isSetNetworkShares());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2007,7 +1962,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLdapFilters()).compareTo(other.isSetLdapFilters());
+ lastComparison = java.lang.Boolean.compare(isSetLdapFilters(), other.isSetLdapFilters());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2017,7 +1972,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPresetScriptIds()).compareTo(other.isSetPresetScriptIds());
+ lastComparison = java.lang.Boolean.compare(isSetPresetScriptIds(), other.isSetPresetScriptIds());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2027,7 +1982,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPresetNetworkExceptionIds()).compareTo(other.isSetPresetNetworkExceptionIds());
+ lastComparison = java.lang.Boolean.compare(isSetPresetNetworkExceptionIds(), other.isSetPresetNetworkExceptionIds());
if (lastComparison != 0) {
return lastComparison;
}
@@ -2040,21 +1995,22 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("LectureWrite(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("LectureWrite(");
boolean first = true;
sb.append("lectureName:");
@@ -2238,7 +2194,7 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -2248,13 +2204,13 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
}
- private static class LectureWriteStandardSchemeFactory implements SchemeFactory {
+ private static class LectureWriteStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LectureWriteStandardScheme getScheme() {
return new LectureWriteStandardScheme();
}
}
- private static class LectureWriteStandardScheme extends StandardScheme<LectureWrite> {
+ private static class LectureWriteStandardScheme extends org.apache.thrift.scheme.StandardScheme<LectureWrite> {
public void read(org.apache.thrift.protocol.TProtocol iprot, LectureWrite struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -2333,13 +2289,13 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
case 10: // NICS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list130 = iprot.readListBegin();
- struct.nics = new ArrayList<String>(_list130.size);
- String _elem131;
- for (int _i132 = 0; _i132 < _list130.size; ++_i132)
+ org.apache.thrift.protocol.TList _list138 = iprot.readListBegin();
+ struct.nics = new java.util.ArrayList<java.lang.String>(_list138.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem139;
+ for (int _i140 = 0; _i140 < _list138.size; ++_i140)
{
- _elem131 = iprot.readString();
- struct.nics.add(_elem131);
+ _elem139 = iprot.readString();
+ struct.nics.add(_elem139);
}
iprot.readListEnd();
}
@@ -2351,14 +2307,14 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
case 12: // NETWORK_EXCEPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list133 = iprot.readListBegin();
- struct.networkExceptions = new ArrayList<NetRule>(_list133.size);
- NetRule _elem134;
- for (int _i135 = 0; _i135 < _list133.size; ++_i135)
+ org.apache.thrift.protocol.TList _list141 = iprot.readListBegin();
+ struct.networkExceptions = new java.util.ArrayList<NetRule>(_list141.size);
+ @org.apache.thrift.annotation.Nullable NetRule _elem142;
+ for (int _i143 = 0; _i143 < _list141.size; ++_i143)
{
- _elem134 = new NetRule();
- _elem134.read(iprot);
- struct.networkExceptions.add(_elem134);
+ _elem142 = new NetRule();
+ _elem142.read(iprot);
+ struct.networkExceptions.add(_elem142);
}
iprot.readListEnd();
}
@@ -2395,13 +2351,13 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
case 11: // ADD_ALLOWED_USERS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list136 = iprot.readListBegin();
- struct.addAllowedUsers = new ArrayList<String>(_list136.size);
- String _elem137;
- for (int _i138 = 0; _i138 < _list136.size; ++_i138)
+ org.apache.thrift.protocol.TList _list144 = iprot.readListBegin();
+ struct.addAllowedUsers = new java.util.ArrayList<java.lang.String>(_list144.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem145;
+ for (int _i146 = 0; _i146 < _list144.size; ++_i146)
{
- _elem137 = iprot.readString();
- struct.addAllowedUsers.add(_elem137);
+ _elem145 = iprot.readString();
+ struct.addAllowedUsers.add(_elem145);
}
iprot.readListEnd();
}
@@ -2413,13 +2369,13 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
case 16: // REM_ALLOWED_USERS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list139 = iprot.readListBegin();
- struct.remAllowedUsers = new ArrayList<String>(_list139.size);
- String _elem140;
- for (int _i141 = 0; _i141 < _list139.size; ++_i141)
+ org.apache.thrift.protocol.TList _list147 = iprot.readListBegin();
+ struct.remAllowedUsers = new java.util.ArrayList<java.lang.String>(_list147.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem148;
+ for (int _i149 = 0; _i149 < _list147.size; ++_i149)
{
- _elem140 = iprot.readString();
- struct.remAllowedUsers.add(_elem140);
+ _elem148 = iprot.readString();
+ struct.remAllowedUsers.add(_elem148);
}
iprot.readListEnd();
}
@@ -2431,13 +2387,13 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
case 17: // LOCATION_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list142 = iprot.readListBegin();
- struct.locationIds = new ArrayList<Integer>(_list142.size);
- int _elem143;
- for (int _i144 = 0; _i144 < _list142.size; ++_i144)
+ org.apache.thrift.protocol.TList _list150 = iprot.readListBegin();
+ struct.locationIds = new java.util.ArrayList<java.lang.Integer>(_list150.size);
+ int _elem151;
+ for (int _i152 = 0; _i152 < _list150.size; ++_i152)
{
- _elem143 = iprot.readI32();
- struct.locationIds.add(_elem143);
+ _elem151 = iprot.readI32();
+ struct.locationIds.add(_elem151);
}
iprot.readListEnd();
}
@@ -2473,14 +2429,14 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
case 21: // NETWORK_SHARES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list145 = iprot.readListBegin();
- struct.networkShares = new ArrayList<NetShare>(_list145.size);
- NetShare _elem146;
- for (int _i147 = 0; _i147 < _list145.size; ++_i147)
+ org.apache.thrift.protocol.TList _list153 = iprot.readListBegin();
+ struct.networkShares = new java.util.ArrayList<NetShare>(_list153.size);
+ @org.apache.thrift.annotation.Nullable NetShare _elem154;
+ for (int _i155 = 0; _i155 < _list153.size; ++_i155)
{
- _elem146 = new NetShare();
- _elem146.read(iprot);
- struct.networkShares.add(_elem146);
+ _elem154 = new NetShare();
+ _elem154.read(iprot);
+ struct.networkShares.add(_elem154);
}
iprot.readListEnd();
}
@@ -2492,14 +2448,14 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
case 22: // LDAP_FILTERS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list148 = iprot.readListBegin();
- struct.ldapFilters = new ArrayList<LdapFilter>(_list148.size);
- LdapFilter _elem149;
- for (int _i150 = 0; _i150 < _list148.size; ++_i150)
+ org.apache.thrift.protocol.TList _list156 = iprot.readListBegin();
+ struct.ldapFilters = new java.util.ArrayList<LdapFilter>(_list156.size);
+ @org.apache.thrift.annotation.Nullable LdapFilter _elem157;
+ for (int _i158 = 0; _i158 < _list156.size; ++_i158)
{
- _elem149 = new LdapFilter();
- _elem149.read(iprot);
- struct.ldapFilters.add(_elem149);
+ _elem157 = new LdapFilter();
+ _elem157.read(iprot);
+ struct.ldapFilters.add(_elem157);
}
iprot.readListEnd();
}
@@ -2511,13 +2467,13 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
case 23: // PRESET_SCRIPT_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list151 = iprot.readListBegin();
- struct.presetScriptIds = new ArrayList<Integer>(_list151.size);
- int _elem152;
- for (int _i153 = 0; _i153 < _list151.size; ++_i153)
+ org.apache.thrift.protocol.TList _list159 = iprot.readListBegin();
+ struct.presetScriptIds = new java.util.ArrayList<java.lang.Integer>(_list159.size);
+ int _elem160;
+ for (int _i161 = 0; _i161 < _list159.size; ++_i161)
{
- _elem152 = iprot.readI32();
- struct.presetScriptIds.add(_elem152);
+ _elem160 = iprot.readI32();
+ struct.presetScriptIds.add(_elem160);
}
iprot.readListEnd();
}
@@ -2529,13 +2485,13 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
case 24: // PRESET_NETWORK_EXCEPTION_IDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list154 = iprot.readListBegin();
- struct.presetNetworkExceptionIds = new ArrayList<Integer>(_list154.size);
- int _elem155;
- for (int _i156 = 0; _i156 < _list154.size; ++_i156)
+ org.apache.thrift.protocol.TList _list162 = iprot.readListBegin();
+ struct.presetNetworkExceptionIds = new java.util.ArrayList<java.lang.Integer>(_list162.size);
+ int _elem163;
+ for (int _i164 = 0; _i164 < _list162.size; ++_i164)
{
- _elem155 = iprot.readI32();
- struct.presetNetworkExceptionIds.add(_elem155);
+ _elem163 = iprot.readI32();
+ struct.presetNetworkExceptionIds.add(_elem163);
}
iprot.readListEnd();
}
@@ -2595,9 +2551,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
oprot.writeFieldBegin(NICS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.nics.size()));
- for (String _iter157 : struct.nics)
+ for (java.lang.String _iter165 : struct.nics)
{
- oprot.writeString(_iter157);
+ oprot.writeString(_iter165);
}
oprot.writeListEnd();
}
@@ -2608,9 +2564,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
oprot.writeFieldBegin(ADD_ALLOWED_USERS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.addAllowedUsers.size()));
- for (String _iter158 : struct.addAllowedUsers)
+ for (java.lang.String _iter166 : struct.addAllowedUsers)
{
- oprot.writeString(_iter158);
+ oprot.writeString(_iter166);
}
oprot.writeListEnd();
}
@@ -2622,9 +2578,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
oprot.writeFieldBegin(NETWORK_EXCEPTIONS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.networkExceptions.size()));
- for (NetRule _iter159 : struct.networkExceptions)
+ for (NetRule _iter167 : struct.networkExceptions)
{
- _iter159.write(oprot);
+ _iter167.write(oprot);
}
oprot.writeListEnd();
}
@@ -2647,9 +2603,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
oprot.writeFieldBegin(REM_ALLOWED_USERS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.remAllowedUsers.size()));
- for (String _iter160 : struct.remAllowedUsers)
+ for (java.lang.String _iter168 : struct.remAllowedUsers)
{
- oprot.writeString(_iter160);
+ oprot.writeString(_iter168);
}
oprot.writeListEnd();
}
@@ -2660,9 +2616,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
oprot.writeFieldBegin(LOCATION_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.locationIds.size()));
- for (int _iter161 : struct.locationIds)
+ for (int _iter169 : struct.locationIds)
{
- oprot.writeI32(_iter161);
+ oprot.writeI32(_iter169);
}
oprot.writeListEnd();
}
@@ -2682,9 +2638,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
oprot.writeFieldBegin(NETWORK_SHARES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.networkShares.size()));
- for (NetShare _iter162 : struct.networkShares)
+ for (NetShare _iter170 : struct.networkShares)
{
- _iter162.write(oprot);
+ _iter170.write(oprot);
}
oprot.writeListEnd();
}
@@ -2696,9 +2652,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
oprot.writeFieldBegin(LDAP_FILTERS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.ldapFilters.size()));
- for (LdapFilter _iter163 : struct.ldapFilters)
+ for (LdapFilter _iter171 : struct.ldapFilters)
{
- _iter163.write(oprot);
+ _iter171.write(oprot);
}
oprot.writeListEnd();
}
@@ -2710,9 +2666,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
oprot.writeFieldBegin(PRESET_SCRIPT_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.presetScriptIds.size()));
- for (int _iter164 : struct.presetScriptIds)
+ for (int _iter172 : struct.presetScriptIds)
{
- oprot.writeI32(_iter164);
+ oprot.writeI32(_iter172);
}
oprot.writeListEnd();
}
@@ -2724,9 +2680,9 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
oprot.writeFieldBegin(PRESET_NETWORK_EXCEPTION_IDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.presetNetworkExceptionIds.size()));
- for (int _iter165 : struct.presetNetworkExceptionIds)
+ for (int _iter173 : struct.presetNetworkExceptionIds)
{
- oprot.writeI32(_iter165);
+ oprot.writeI32(_iter173);
}
oprot.writeListEnd();
}
@@ -2739,18 +2695,18 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
- private static class LectureWriteTupleSchemeFactory implements SchemeFactory {
+ private static class LectureWriteTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LectureWriteTupleScheme getScheme() {
return new LectureWriteTupleScheme();
}
}
- private static class LectureWriteTupleScheme extends TupleScheme<LectureWrite> {
+ private static class LectureWriteTupleScheme extends org.apache.thrift.scheme.TupleScheme<LectureWrite> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, LectureWrite 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.isSetLectureName()) {
optionals.set(0);
}
@@ -2848,18 +2804,18 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (struct.isSetNics()) {
{
oprot.writeI32(struct.nics.size());
- for (String _iter166 : struct.nics)
+ for (java.lang.String _iter174 : struct.nics)
{
- oprot.writeString(_iter166);
+ oprot.writeString(_iter174);
}
}
}
if (struct.isSetNetworkExceptions()) {
{
oprot.writeI32(struct.networkExceptions.size());
- for (NetRule _iter167 : struct.networkExceptions)
+ for (NetRule _iter175 : struct.networkExceptions)
{
- _iter167.write(oprot);
+ _iter175.write(oprot);
}
}
}
@@ -2875,27 +2831,27 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (struct.isSetAddAllowedUsers()) {
{
oprot.writeI32(struct.addAllowedUsers.size());
- for (String _iter168 : struct.addAllowedUsers)
+ for (java.lang.String _iter176 : struct.addAllowedUsers)
{
- oprot.writeString(_iter168);
+ oprot.writeString(_iter176);
}
}
}
if (struct.isSetRemAllowedUsers()) {
{
oprot.writeI32(struct.remAllowedUsers.size());
- for (String _iter169 : struct.remAllowedUsers)
+ for (java.lang.String _iter177 : struct.remAllowedUsers)
{
- oprot.writeString(_iter169);
+ oprot.writeString(_iter177);
}
}
}
if (struct.isSetLocationIds()) {
{
oprot.writeI32(struct.locationIds.size());
- for (int _iter170 : struct.locationIds)
+ for (int _iter178 : struct.locationIds)
{
- oprot.writeI32(_iter170);
+ oprot.writeI32(_iter178);
}
}
}
@@ -2911,36 +2867,36 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
if (struct.isSetNetworkShares()) {
{
oprot.writeI32(struct.networkShares.size());
- for (NetShare _iter171 : struct.networkShares)
+ for (NetShare _iter179 : struct.networkShares)
{
- _iter171.write(oprot);
+ _iter179.write(oprot);
}
}
}
if (struct.isSetLdapFilters()) {
{
oprot.writeI32(struct.ldapFilters.size());
- for (LdapFilter _iter172 : struct.ldapFilters)
+ for (LdapFilter _iter180 : struct.ldapFilters)
{
- _iter172.write(oprot);
+ _iter180.write(oprot);
}
}
}
if (struct.isSetPresetScriptIds()) {
{
oprot.writeI32(struct.presetScriptIds.size());
- for (int _iter173 : struct.presetScriptIds)
+ for (int _iter181 : struct.presetScriptIds)
{
- oprot.writeI32(_iter173);
+ oprot.writeI32(_iter181);
}
}
}
if (struct.isSetPresetNetworkExceptionIds()) {
{
oprot.writeI32(struct.presetNetworkExceptionIds.size());
- for (int _iter174 : struct.presetNetworkExceptionIds)
+ for (int _iter182 : struct.presetNetworkExceptionIds)
{
- oprot.writeI32(_iter174);
+ oprot.writeI32(_iter182);
}
}
}
@@ -2948,8 +2904,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, LectureWrite struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(23);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(23);
if (incoming.get(0)) {
struct.lectureName = iprot.readString();
struct.setLectureNameIsSet(true);
@@ -2984,27 +2940,27 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
if (incoming.get(8)) {
{
- org.apache.thrift.protocol.TList _list175 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.nics = new ArrayList<String>(_list175.size);
- String _elem176;
- for (int _i177 = 0; _i177 < _list175.size; ++_i177)
+ org.apache.thrift.protocol.TList _list183 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.nics = new java.util.ArrayList<java.lang.String>(_list183.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem184;
+ for (int _i185 = 0; _i185 < _list183.size; ++_i185)
{
- _elem176 = iprot.readString();
- struct.nics.add(_elem176);
+ _elem184 = iprot.readString();
+ struct.nics.add(_elem184);
}
}
struct.setNicsIsSet(true);
}
if (incoming.get(9)) {
{
- org.apache.thrift.protocol.TList _list178 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.networkExceptions = new ArrayList<NetRule>(_list178.size);
- NetRule _elem179;
- for (int _i180 = 0; _i180 < _list178.size; ++_i180)
+ org.apache.thrift.protocol.TList _list186 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.networkExceptions = new java.util.ArrayList<NetRule>(_list186.size);
+ @org.apache.thrift.annotation.Nullable NetRule _elem187;
+ for (int _i188 = 0; _i188 < _list186.size; ++_i188)
{
- _elem179 = new NetRule();
- _elem179.read(iprot);
- struct.networkExceptions.add(_elem179);
+ _elem187 = new NetRule();
+ _elem187.read(iprot);
+ struct.networkExceptions.add(_elem187);
}
}
struct.setNetworkExceptionsIsSet(true);
@@ -3024,39 +2980,39 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
if (incoming.get(13)) {
{
- org.apache.thrift.protocol.TList _list181 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.addAllowedUsers = new ArrayList<String>(_list181.size);
- String _elem182;
- for (int _i183 = 0; _i183 < _list181.size; ++_i183)
+ org.apache.thrift.protocol.TList _list189 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.addAllowedUsers = new java.util.ArrayList<java.lang.String>(_list189.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem190;
+ for (int _i191 = 0; _i191 < _list189.size; ++_i191)
{
- _elem182 = iprot.readString();
- struct.addAllowedUsers.add(_elem182);
+ _elem190 = iprot.readString();
+ struct.addAllowedUsers.add(_elem190);
}
}
struct.setAddAllowedUsersIsSet(true);
}
if (incoming.get(14)) {
{
- org.apache.thrift.protocol.TList _list184 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.remAllowedUsers = new ArrayList<String>(_list184.size);
- String _elem185;
- for (int _i186 = 0; _i186 < _list184.size; ++_i186)
+ org.apache.thrift.protocol.TList _list192 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.remAllowedUsers = new java.util.ArrayList<java.lang.String>(_list192.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem193;
+ for (int _i194 = 0; _i194 < _list192.size; ++_i194)
{
- _elem185 = iprot.readString();
- struct.remAllowedUsers.add(_elem185);
+ _elem193 = iprot.readString();
+ struct.remAllowedUsers.add(_elem193);
}
}
struct.setRemAllowedUsersIsSet(true);
}
if (incoming.get(15)) {
{
- org.apache.thrift.protocol.TList _list187 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.locationIds = new ArrayList<Integer>(_list187.size);
- int _elem188;
- for (int _i189 = 0; _i189 < _list187.size; ++_i189)
+ org.apache.thrift.protocol.TList _list195 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
+ struct.locationIds = new java.util.ArrayList<java.lang.Integer>(_list195.size);
+ int _elem196;
+ for (int _i197 = 0; _i197 < _list195.size; ++_i197)
{
- _elem188 = iprot.readI32();
- struct.locationIds.add(_elem188);
+ _elem196 = iprot.readI32();
+ struct.locationIds.add(_elem196);
}
}
struct.setLocationIdsIsSet(true);
@@ -3075,54 +3031,54 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
if (incoming.get(19)) {
{
- org.apache.thrift.protocol.TList _list190 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.networkShares = new ArrayList<NetShare>(_list190.size);
- NetShare _elem191;
- for (int _i192 = 0; _i192 < _list190.size; ++_i192)
+ org.apache.thrift.protocol.TList _list198 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.networkShares = new java.util.ArrayList<NetShare>(_list198.size);
+ @org.apache.thrift.annotation.Nullable NetShare _elem199;
+ for (int _i200 = 0; _i200 < _list198.size; ++_i200)
{
- _elem191 = new NetShare();
- _elem191.read(iprot);
- struct.networkShares.add(_elem191);
+ _elem199 = new NetShare();
+ _elem199.read(iprot);
+ struct.networkShares.add(_elem199);
}
}
struct.setNetworkSharesIsSet(true);
}
if (incoming.get(20)) {
{
- org.apache.thrift.protocol.TList _list193 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.ldapFilters = new ArrayList<LdapFilter>(_list193.size);
- LdapFilter _elem194;
- for (int _i195 = 0; _i195 < _list193.size; ++_i195)
+ org.apache.thrift.protocol.TList _list201 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.ldapFilters = new java.util.ArrayList<LdapFilter>(_list201.size);
+ @org.apache.thrift.annotation.Nullable LdapFilter _elem202;
+ for (int _i203 = 0; _i203 < _list201.size; ++_i203)
{
- _elem194 = new LdapFilter();
- _elem194.read(iprot);
- struct.ldapFilters.add(_elem194);
+ _elem202 = new LdapFilter();
+ _elem202.read(iprot);
+ struct.ldapFilters.add(_elem202);
}
}
struct.setLdapFiltersIsSet(true);
}
if (incoming.get(21)) {
{
- org.apache.thrift.protocol.TList _list196 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.presetScriptIds = new ArrayList<Integer>(_list196.size);
- int _elem197;
- for (int _i198 = 0; _i198 < _list196.size; ++_i198)
+ org.apache.thrift.protocol.TList _list204 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
+ struct.presetScriptIds = new java.util.ArrayList<java.lang.Integer>(_list204.size);
+ int _elem205;
+ for (int _i206 = 0; _i206 < _list204.size; ++_i206)
{
- _elem197 = iprot.readI32();
- struct.presetScriptIds.add(_elem197);
+ _elem205 = iprot.readI32();
+ struct.presetScriptIds.add(_elem205);
}
}
struct.setPresetScriptIdsIsSet(true);
}
if (incoming.get(22)) {
{
- org.apache.thrift.protocol.TList _list199 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.presetNetworkExceptionIds = new ArrayList<Integer>(_list199.size);
- int _elem200;
- for (int _i201 = 0; _i201 < _list199.size; ++_i201)
+ org.apache.thrift.protocol.TList _list207 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
+ struct.presetNetworkExceptionIds = new java.util.ArrayList<java.lang.Integer>(_list207.size);
+ int _elem208;
+ for (int _i209 = 0; _i209 < _list207.size; ++_i209)
{
- _elem200 = iprot.readI32();
- struct.presetNetworkExceptionIds.add(_elem200);
+ _elem208 = iprot.readI32();
+ struct.presetNetworkExceptionIds.add(_elem208);
}
}
struct.setPresetNetworkExceptionIdsIsSet(true);
@@ -3130,5 +3086,8 @@ public class LectureWrite implements org.apache.thrift.TBase<LectureWrite, Lectu
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/Location.java b/src/main/java/org/openslx/bwlp/thrift/iface/Location.java
index 005389b..1cf1117 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/Location.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/Location.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-18")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public class Location implements org.apache.thrift.TBase<Location, Location._Fields>, java.io.Serializable, Cloneable, Comparable<Location> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Location");
@@ -42,14 +15,11 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
private static final org.apache.thrift.protocol.TField LOCATION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("locationName", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField PARENT_LOCATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("parentLocationId", org.apache.thrift.protocol.TType.I32, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new LocationStandardSchemeFactory());
- schemes.put(TupleScheme.class, new LocationTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new LocationStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new LocationTupleSchemeFactory();
public int locationId; // required
- public String locationName; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String locationName; // required
public int parentLocationId; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -58,10 +28,10 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
LOCATION_NAME((short)2, "locationName"),
PARENT_LOCATION_ID((short)3, "parentLocationId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -69,6 +39,7 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
/**
* 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: // LOCATION_ID
@@ -88,21 +59,22 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -111,7 +83,7 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -120,16 +92,16 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
private static final int __LOCATIONID_ISSET_ID = 0;
private static final int __PARENTLOCATIONID_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.LOCATION_ID, new org.apache.thrift.meta_data.FieldMetaData("locationId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.LOCATION_NAME, new org.apache.thrift.meta_data.FieldMetaData("locationName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PARENT_LOCATION_ID, new org.apache.thrift.meta_data.FieldMetaData("parentLocationId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Location.class, metaDataMap);
}
@@ -138,7 +110,7 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
public Location(
int locationId,
- String locationName,
+ java.lang.String locationName,
int parentLocationId)
{
this();
@@ -185,23 +157,24 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
}
public void unsetLocationId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LOCATIONID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __LOCATIONID_ISSET_ID);
}
/** Returns true if field locationId is set (has been assigned a value) and false otherwise */
public boolean isSetLocationId() {
- return EncodingUtils.testBit(__isset_bitfield, __LOCATIONID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __LOCATIONID_ISSET_ID);
}
public void setLocationIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LOCATIONID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __LOCATIONID_ISSET_ID, value);
}
- public String getLocationName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getLocationName() {
return this.locationName;
}
- public Location setLocationName(String locationName) {
+ public Location setLocationName(@org.apache.thrift.annotation.Nullable java.lang.String locationName) {
this.locationName = locationName;
return this;
}
@@ -232,25 +205,25 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
}
public void unsetParentLocationId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PARENTLOCATIONID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PARENTLOCATIONID_ISSET_ID);
}
/** Returns true if field parentLocationId is set (has been assigned a value) and false otherwise */
public boolean isSetParentLocationId() {
- return EncodingUtils.testBit(__isset_bitfield, __PARENTLOCATIONID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARENTLOCATIONID_ISSET_ID);
}
public void setParentLocationIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PARENTLOCATIONID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PARENTLOCATIONID_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case LOCATION_ID:
if (value == null) {
unsetLocationId();
} else {
- setLocationId((Integer)value);
+ setLocationId((java.lang.Integer)value);
}
break;
@@ -258,7 +231,7 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
if (value == null) {
unsetLocationName();
} else {
- setLocationName((String)value);
+ setLocationName((java.lang.String)value);
}
break;
@@ -266,14 +239,15 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
if (value == null) {
unsetParentLocationId();
} else {
- setParentLocationId((Integer)value);
+ setParentLocationId((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case LOCATION_ID:
return getLocationId();
@@ -285,13 +259,13 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
return getParentLocationId();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -302,13 +276,11 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
case PARENT_LOCATION_ID:
return isSetParentLocationId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof Location)
return this.equals((Location)that);
return false;
@@ -317,6 +289,8 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
public boolean equals(Location that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_locationId = true;
boolean that_present_locationId = true;
@@ -350,24 +324,17 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_locationId = true;
- list.add(present_locationId);
- if (present_locationId)
- list.add(locationId);
+ hashCode = hashCode * 8191 + locationId;
- boolean present_locationName = true && (isSetLocationName());
- list.add(present_locationName);
- if (present_locationName)
- list.add(locationName);
+ hashCode = hashCode * 8191 + ((isSetLocationName()) ? 131071 : 524287);
+ if (isSetLocationName())
+ hashCode = hashCode * 8191 + locationName.hashCode();
- boolean present_parentLocationId = true;
- list.add(present_parentLocationId);
- if (present_parentLocationId)
- list.add(parentLocationId);
+ hashCode = hashCode * 8191 + parentLocationId;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -378,7 +345,7 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetLocationId()).compareTo(other.isSetLocationId());
+ lastComparison = java.lang.Boolean.compare(isSetLocationId(), other.isSetLocationId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -388,7 +355,7 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLocationName()).compareTo(other.isSetLocationName());
+ lastComparison = java.lang.Boolean.compare(isSetLocationName(), other.isSetLocationName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -398,7 +365,7 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetParentLocationId()).compareTo(other.isSetParentLocationId());
+ lastComparison = java.lang.Boolean.compare(isSetParentLocationId(), other.isSetParentLocationId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -411,21 +378,22 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("Location(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("Location(");
boolean first = true;
sb.append("locationId:");
@@ -460,7 +428,7 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -470,13 +438,13 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
}
}
- private static class LocationStandardSchemeFactory implements SchemeFactory {
+ private static class LocationStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LocationStandardScheme getScheme() {
return new LocationStandardScheme();
}
}
- private static class LocationStandardScheme extends StandardScheme<Location> {
+ private static class LocationStandardScheme extends org.apache.thrift.scheme.StandardScheme<Location> {
public void read(org.apache.thrift.protocol.TProtocol iprot, Location struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -544,18 +512,18 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
}
- private static class LocationTupleSchemeFactory implements SchemeFactory {
+ private static class LocationTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public LocationTupleScheme getScheme() {
return new LocationTupleScheme();
}
}
- private static class LocationTupleScheme extends TupleScheme<Location> {
+ private static class LocationTupleScheme extends org.apache.thrift.scheme.TupleScheme<Location> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Location 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.isSetLocationId()) {
optionals.set(0);
}
@@ -579,8 +547,8 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Location struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.locationId = iprot.readI32();
struct.setLocationIdIsSet(true);
@@ -596,5 +564,8 @@ public class Location implements org.apache.thrift.TBase<Location, Location._Fie
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java b/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java
index 4733419..e5cb8a5 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/MasterServer.java
@@ -1,152 +1,131 @@
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.17.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 = "2017-09-06")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2023-02-23")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public class MasterServer {
public interface Iface {
public boolean ping() throws org.apache.thrift.TException;
- public SessionData authenticate(String login, String password) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
+ public SessionData authenticate(java.lang.String login, java.lang.String password) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
- public ClientSessionData localAccountLogin(String login, String password) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
+ public ClientSessionData localAccountLogin(java.lang.String login, java.lang.String password) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
- public void setUsedSatellite(String sessionId, String satelliteName) throws org.apache.thrift.TException;
+ public void setUsedSatellite(java.lang.String sessionId, java.lang.String satelliteName) throws org.apache.thrift.TException;
- public List<UserInfo> findUser(String sessionId, String organizationId, String searchTerm) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
+ public java.util.List<UserInfo> findUser(java.lang.String sessionId, java.lang.String organizationId, java.lang.String searchTerm) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
- public List<ImageSummaryRead> getPublicImages(String sessionId, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
+ public java.util.List<ImageSummaryRead> getPublicImages(java.lang.String sessionId, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
- public ImageDetailsRead getImageDetails(String sessionId, String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
+ public ImageDetailsRead getImageDetails(java.lang.String sessionId, java.lang.String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
- public UserInfo getUser(String userToken, String userId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
+ public UserInfo getUser(java.lang.String userToken, java.lang.String userId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
- public void invalidateSession(String sessionId) throws TInvalidTokenException, org.apache.thrift.TException;
+ public void invalidateSession(java.lang.String sessionId) throws TInvalidTokenException, org.apache.thrift.TException;
- public UserInfo getUserFromToken(String token) throws TInvalidTokenException, org.apache.thrift.TException;
+ public ClientSessionData getSessionFromAccessCode(java.lang.String accessCode) throws TNotFoundException, TAuthorizationException, org.apache.thrift.TException;
- public boolean isServerAuthenticated(String serverSessionId) throws org.apache.thrift.TException;
+ public UserInfo getUserFromToken(java.lang.String token) throws TInvalidTokenException, org.apache.thrift.TException;
- public ByteBuffer startServerAuthentication(int satelliteId) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
+ public boolean isServerAuthenticated(java.lang.String serverSessionId) throws org.apache.thrift.TException;
- public ServerSessionData serverAuthenticate(int satelliteId, ByteBuffer challengeResponse) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
+ public java.nio.ByteBuffer startServerAuthentication(int satelliteId) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
- public ImagePublishData getImageData(String serverSessionId, String imageVersionId) throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException;
+ public ServerSessionData serverAuthenticate(int satelliteId, java.nio.ByteBuffer challengeResponse) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
- public TransferInformation submitImage(String userToken, ImagePublishData imageDescription, List<ByteBuffer> blockHashes) throws TAuthorizationException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException;
+ public ImagePublishData getImageData(java.lang.String serverSessionId, java.lang.String imageVersionId) throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException;
- public int registerSatellite(String userToken, String displayName, List<String> addresses, String modulus, String exponent, ByteBuffer certsha256) throws TInvocationException, org.apache.thrift.TException;
+ public TransferInformation submitImage(java.lang.String userToken, ImagePublishData imageDescription, java.util.List<java.nio.ByteBuffer> blockHashes) throws TAuthorizationException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException;
- public boolean updateSatellite(String serverSessionId, String displayName, List<String> addresses) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
+ public int registerSatellite(java.lang.String userToken, java.lang.String displayName, java.util.List<java.lang.String> addresses, java.lang.String modulus, java.lang.String exponent, java.nio.ByteBuffer certsha256) throws TInvocationException, org.apache.thrift.TException;
- public TransferInformation downloadImage(String sessionId, String imageVersionId) throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException;
+ public boolean updateSatellite(java.lang.String serverSessionId, java.lang.String displayName, java.util.List<java.lang.String> addresses) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
- public List<Organization> getOrganizations() throws TInvocationException, org.apache.thrift.TException;
+ public TransferInformation downloadImage(java.lang.String sessionId, java.lang.String imageVersionId) throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException;
- public List<OperatingSystem> getOperatingSystems() throws TInvocationException, org.apache.thrift.TException;
+ public java.util.List<Organization> getOrganizations() throws TInvocationException, org.apache.thrift.TException;
- public List<Virtualizer> getVirtualizers() throws TInvocationException, org.apache.thrift.TException;
+ public java.util.List<OperatingSystem> getOperatingSystems() throws TInvocationException, org.apache.thrift.TException;
- public List<MasterTag> getTags(long startDate) throws TInvocationException, org.apache.thrift.TException;
+ public java.util.List<Virtualizer> getVirtualizers() throws TInvocationException, org.apache.thrift.TException;
- public List<MasterSoftware> getSoftware(long startDate) throws TInvocationException, org.apache.thrift.TException;
+ public java.util.List<MasterTag> getTags(long startDate) throws TInvocationException, org.apache.thrift.TException;
- public TransferStatus queryUploadStatus(String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException;
+ public java.util.List<MasterSoftware> getSoftware(long startDate) throws TInvocationException, org.apache.thrift.TException;
+
+ public TransferStatus queryUploadStatus(java.lang.String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException;
}
public interface AsyncIface {
- public void ping(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void ping(org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
+
+ public void authenticate(java.lang.String login, java.lang.String password, org.apache.thrift.async.AsyncMethodCallback<SessionData> resultHandler) throws org.apache.thrift.TException;
- public void authenticate(String login, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void localAccountLogin(java.lang.String login, java.lang.String password, org.apache.thrift.async.AsyncMethodCallback<ClientSessionData> resultHandler) throws org.apache.thrift.TException;
- public void localAccountLogin(String login, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void setUsedSatellite(java.lang.String sessionId, java.lang.String satelliteName, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void setUsedSatellite(String sessionId, String satelliteName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void findUser(java.lang.String sessionId, java.lang.String organizationId, java.lang.String searchTerm, org.apache.thrift.async.AsyncMethodCallback<java.util.List<UserInfo>> resultHandler) throws org.apache.thrift.TException;
- public void findUser(String sessionId, String organizationId, String searchTerm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getPublicImages(java.lang.String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ImageSummaryRead>> resultHandler) throws org.apache.thrift.TException;
- public void getPublicImages(String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getImageDetails(java.lang.String sessionId, java.lang.String imageBaseId, org.apache.thrift.async.AsyncMethodCallback<ImageDetailsRead> resultHandler) throws org.apache.thrift.TException;
- public void getImageDetails(String sessionId, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getUser(java.lang.String userToken, java.lang.String userId, org.apache.thrift.async.AsyncMethodCallback<UserInfo> resultHandler) throws org.apache.thrift.TException;
- public void getUser(String userToken, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void invalidateSession(java.lang.String sessionId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void invalidateSession(String sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getSessionFromAccessCode(java.lang.String accessCode, org.apache.thrift.async.AsyncMethodCallback<ClientSessionData> resultHandler) throws org.apache.thrift.TException;
- public void getUserFromToken(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getUserFromToken(java.lang.String token, org.apache.thrift.async.AsyncMethodCallback<UserInfo> resultHandler) throws org.apache.thrift.TException;
- public void isServerAuthenticated(String serverSessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void isServerAuthenticated(java.lang.String serverSessionId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void startServerAuthentication(int satelliteId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void startServerAuthentication(int satelliteId, org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> resultHandler) throws org.apache.thrift.TException;
- public void serverAuthenticate(int satelliteId, ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void serverAuthenticate(int satelliteId, java.nio.ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback<ServerSessionData> resultHandler) throws org.apache.thrift.TException;
- public void getImageData(String serverSessionId, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getImageData(java.lang.String serverSessionId, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<ImagePublishData> resultHandler) throws org.apache.thrift.TException;
- public void submitImage(String userToken, ImagePublishData imageDescription, List<ByteBuffer> blockHashes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void submitImage(java.lang.String userToken, ImagePublishData imageDescription, java.util.List<java.nio.ByteBuffer> blockHashes, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws org.apache.thrift.TException;
- public void registerSatellite(String userToken, String displayName, List<String> addresses, String modulus, String exponent, ByteBuffer certsha256, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void registerSatellite(java.lang.String userToken, java.lang.String displayName, java.util.List<java.lang.String> addresses, java.lang.String modulus, java.lang.String exponent, java.nio.ByteBuffer certsha256, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler) throws org.apache.thrift.TException;
- public void updateSatellite(String serverSessionId, String displayName, List<String> addresses, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void updateSatellite(java.lang.String serverSessionId, java.lang.String displayName, java.util.List<java.lang.String> addresses, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
- public void downloadImage(String sessionId, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void downloadImage(java.lang.String sessionId, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws org.apache.thrift.TException;
- public void getOrganizations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getOrganizations(org.apache.thrift.async.AsyncMethodCallback<java.util.List<Organization>> resultHandler) throws org.apache.thrift.TException;
- public void getOperatingSystems(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getOperatingSystems(org.apache.thrift.async.AsyncMethodCallback<java.util.List<OperatingSystem>> resultHandler) throws org.apache.thrift.TException;
- public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback<java.util.List<Virtualizer>> resultHandler) throws org.apache.thrift.TException;
- public void getTags(long startDate, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getTags(long startDate, org.apache.thrift.async.AsyncMethodCallback<java.util.List<MasterTag>> resultHandler) throws org.apache.thrift.TException;
- public void getSoftware(long startDate, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getSoftware(long startDate, org.apache.thrift.async.AsyncMethodCallback<java.util.List<MasterSoftware>> resultHandler) throws org.apache.thrift.TException;
- public void queryUploadStatus(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void queryUploadStatus(java.lang.String uploadToken, org.apache.thrift.async.AsyncMethodCallback<TransferStatus> resultHandler) throws org.apache.thrift.TException;
}
public static class Client extends org.apache.thrift.TServiceClient implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
+ @Override
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
return new Client(prot);
}
+ @Override
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
@@ -161,6 +140,7 @@ public class MasterServer {
super(iprot, oprot);
}
+ @Override
public boolean ping() throws org.apache.thrift.TException
{
send_ping();
@@ -183,13 +163,14 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "ping failed: unknown result");
}
- public SessionData authenticate(String login, String password) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public SessionData authenticate(java.lang.String login, java.lang.String password) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
send_authenticate(login, password);
return recv_authenticate();
}
- public void send_authenticate(String login, String password) throws org.apache.thrift.TException
+ public void send_authenticate(java.lang.String login, java.lang.String password) throws org.apache.thrift.TException
{
authenticate_args args = new authenticate_args();
args.setLogin(login);
@@ -213,13 +194,14 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "authenticate failed: unknown result");
}
- public ClientSessionData localAccountLogin(String login, String password) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public ClientSessionData localAccountLogin(java.lang.String login, java.lang.String password) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
send_localAccountLogin(login, password);
return recv_localAccountLogin();
}
- public void send_localAccountLogin(String login, String password) throws org.apache.thrift.TException
+ public void send_localAccountLogin(java.lang.String login, java.lang.String password) throws org.apache.thrift.TException
{
localAccountLogin_args args = new localAccountLogin_args();
args.setLogin(login);
@@ -243,13 +225,14 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "localAccountLogin failed: unknown result");
}
- public void setUsedSatellite(String sessionId, String satelliteName) throws org.apache.thrift.TException
+ @Override
+ public void setUsedSatellite(java.lang.String sessionId, java.lang.String satelliteName) throws org.apache.thrift.TException
{
send_setUsedSatellite(sessionId, satelliteName);
recv_setUsedSatellite();
}
- public void send_setUsedSatellite(String sessionId, String satelliteName) throws org.apache.thrift.TException
+ public void send_setUsedSatellite(java.lang.String sessionId, java.lang.String satelliteName) throws org.apache.thrift.TException
{
setUsedSatellite_args args = new setUsedSatellite_args();
args.setSessionId(sessionId);
@@ -264,13 +247,14 @@ public class MasterServer {
return;
}
- public List<UserInfo> findUser(String sessionId, String organizationId, String searchTerm) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public java.util.List<UserInfo> findUser(java.lang.String sessionId, java.lang.String organizationId, java.lang.String searchTerm) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
send_findUser(sessionId, organizationId, searchTerm);
return recv_findUser();
}
- public void send_findUser(String sessionId, String organizationId, String searchTerm) throws org.apache.thrift.TException
+ public void send_findUser(java.lang.String sessionId, java.lang.String organizationId, java.lang.String searchTerm) throws org.apache.thrift.TException
{
findUser_args args = new findUser_args();
args.setSessionId(sessionId);
@@ -279,7 +263,7 @@ public class MasterServer {
sendBase("findUser", args);
}
- public List<UserInfo> recv_findUser() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ public java.util.List<UserInfo> recv_findUser() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
findUser_result result = new findUser_result();
receiveBase(result, "findUser");
@@ -295,13 +279,14 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "findUser failed: unknown result");
}
- public List<ImageSummaryRead> getPublicImages(String sessionId, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public java.util.List<ImageSummaryRead> getPublicImages(java.lang.String sessionId, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
send_getPublicImages(sessionId, page);
return recv_getPublicImages();
}
- public void send_getPublicImages(String sessionId, int page) throws org.apache.thrift.TException
+ public void send_getPublicImages(java.lang.String sessionId, int page) throws org.apache.thrift.TException
{
getPublicImages_args args = new getPublicImages_args();
args.setSessionId(sessionId);
@@ -309,7 +294,7 @@ public class MasterServer {
sendBase("getPublicImages", args);
}
- public List<ImageSummaryRead> recv_getPublicImages() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ public java.util.List<ImageSummaryRead> recv_getPublicImages() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
getPublicImages_result result = new getPublicImages_result();
receiveBase(result, "getPublicImages");
@@ -325,13 +310,14 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPublicImages failed: unknown result");
}
- public ImageDetailsRead getImageDetails(String sessionId, String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public ImageDetailsRead getImageDetails(java.lang.String sessionId, java.lang.String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
send_getImageDetails(sessionId, imageBaseId);
return recv_getImageDetails();
}
- public void send_getImageDetails(String sessionId, String imageBaseId) throws org.apache.thrift.TException
+ public void send_getImageDetails(java.lang.String sessionId, java.lang.String imageBaseId) throws org.apache.thrift.TException
{
getImageDetails_args args = new getImageDetails_args();
args.setSessionId(sessionId);
@@ -358,13 +344,14 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageDetails failed: unknown result");
}
- public UserInfo getUser(String userToken, String userId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public UserInfo getUser(java.lang.String userToken, java.lang.String userId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
send_getUser(userToken, userId);
return recv_getUser();
}
- public void send_getUser(String userToken, String userId) throws org.apache.thrift.TException
+ public void send_getUser(java.lang.String userToken, java.lang.String userId) throws org.apache.thrift.TException
{
getUser_args args = new getUser_args();
args.setUserToken(userToken);
@@ -391,13 +378,14 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUser failed: unknown result");
}
- public void invalidateSession(String sessionId) throws TInvalidTokenException, org.apache.thrift.TException
+ @Override
+ public void invalidateSession(java.lang.String sessionId) throws TInvalidTokenException, org.apache.thrift.TException
{
send_invalidateSession(sessionId);
recv_invalidateSession();
}
- public void send_invalidateSession(String sessionId) throws org.apache.thrift.TException
+ public void send_invalidateSession(java.lang.String sessionId) throws org.apache.thrift.TException
{
invalidateSession_args args = new invalidateSession_args();
args.setSessionId(sessionId);
@@ -414,13 +402,44 @@ public class MasterServer {
return;
}
- public UserInfo getUserFromToken(String token) throws TInvalidTokenException, org.apache.thrift.TException
+ @Override
+ public ClientSessionData getSessionFromAccessCode(java.lang.String accessCode) throws TNotFoundException, TAuthorizationException, org.apache.thrift.TException
+ {
+ send_getSessionFromAccessCode(accessCode);
+ return recv_getSessionFromAccessCode();
+ }
+
+ public void send_getSessionFromAccessCode(java.lang.String accessCode) throws org.apache.thrift.TException
+ {
+ getSessionFromAccessCode_args args = new getSessionFromAccessCode_args();
+ args.setAccessCode(accessCode);
+ sendBase("getSessionFromAccessCode", args);
+ }
+
+ public ClientSessionData recv_getSessionFromAccessCode() throws TNotFoundException, TAuthorizationException, org.apache.thrift.TException
+ {
+ getSessionFromAccessCode_result result = new getSessionFromAccessCode_result();
+ receiveBase(result, "getSessionFromAccessCode");
+ if (result.isSetSuccess()) {
+ return result.success;
+ }
+ if (result.notFound != null) {
+ throw result.notFound;
+ }
+ if (result.auth != null) {
+ throw result.auth;
+ }
+ throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSessionFromAccessCode failed: unknown result");
+ }
+
+ @Override
+ public UserInfo getUserFromToken(java.lang.String token) throws TInvalidTokenException, org.apache.thrift.TException
{
send_getUserFromToken(token);
return recv_getUserFromToken();
}
- public void send_getUserFromToken(String token) throws org.apache.thrift.TException
+ public void send_getUserFromToken(java.lang.String token) throws org.apache.thrift.TException
{
getUserFromToken_args args = new getUserFromToken_args();
args.setToken(token);
@@ -440,13 +459,14 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserFromToken failed: unknown result");
}
- public boolean isServerAuthenticated(String serverSessionId) throws org.apache.thrift.TException
+ @Override
+ public boolean isServerAuthenticated(java.lang.String serverSessionId) throws org.apache.thrift.TException
{
send_isServerAuthenticated(serverSessionId);
return recv_isServerAuthenticated();
}
- public void send_isServerAuthenticated(String serverSessionId) throws org.apache.thrift.TException
+ public void send_isServerAuthenticated(java.lang.String serverSessionId) throws org.apache.thrift.TException
{
isServerAuthenticated_args args = new isServerAuthenticated_args();
args.setServerSessionId(serverSessionId);
@@ -463,7 +483,8 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isServerAuthenticated failed: unknown result");
}
- public ByteBuffer startServerAuthentication(int satelliteId) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public java.nio.ByteBuffer startServerAuthentication(int satelliteId) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
send_startServerAuthentication(satelliteId);
return recv_startServerAuthentication();
@@ -476,7 +497,7 @@ public class MasterServer {
sendBase("startServerAuthentication", args);
}
- public ByteBuffer recv_startServerAuthentication() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ public java.nio.ByteBuffer recv_startServerAuthentication() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
startServerAuthentication_result result = new startServerAuthentication_result();
receiveBase(result, "startServerAuthentication");
@@ -492,13 +513,14 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "startServerAuthentication failed: unknown result");
}
- public ServerSessionData serverAuthenticate(int satelliteId, ByteBuffer challengeResponse) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public ServerSessionData serverAuthenticate(int satelliteId, java.nio.ByteBuffer challengeResponse) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
send_serverAuthenticate(satelliteId, challengeResponse);
return recv_serverAuthenticate();
}
- public void send_serverAuthenticate(int satelliteId, ByteBuffer challengeResponse) throws org.apache.thrift.TException
+ public void send_serverAuthenticate(int satelliteId, java.nio.ByteBuffer challengeResponse) throws org.apache.thrift.TException
{
serverAuthenticate_args args = new serverAuthenticate_args();
args.setSatelliteId(satelliteId);
@@ -522,13 +544,14 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "serverAuthenticate failed: unknown result");
}
- public ImagePublishData getImageData(String serverSessionId, String imageVersionId) throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException
+ @Override
+ public ImagePublishData getImageData(java.lang.String serverSessionId, java.lang.String imageVersionId) throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException
{
send_getImageData(serverSessionId, imageVersionId);
return recv_getImageData();
}
- public void send_getImageData(String serverSessionId, String imageVersionId) throws org.apache.thrift.TException
+ public void send_getImageData(java.lang.String serverSessionId, java.lang.String imageVersionId) throws org.apache.thrift.TException
{
getImageData_args args = new getImageData_args();
args.setServerSessionId(serverSessionId);
@@ -555,13 +578,14 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageData failed: unknown result");
}
- public TransferInformation submitImage(String userToken, ImagePublishData imageDescription, List<ByteBuffer> blockHashes) throws TAuthorizationException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException
+ @Override
+ public TransferInformation submitImage(java.lang.String userToken, ImagePublishData imageDescription, java.util.List<java.nio.ByteBuffer> blockHashes) throws TAuthorizationException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException
{
send_submitImage(userToken, imageDescription, blockHashes);
return recv_submitImage();
}
- public void send_submitImage(String userToken, ImagePublishData imageDescription, List<ByteBuffer> blockHashes) throws org.apache.thrift.TException
+ public void send_submitImage(java.lang.String userToken, ImagePublishData imageDescription, java.util.List<java.nio.ByteBuffer> blockHashes) throws org.apache.thrift.TException
{
submitImage_args args = new submitImage_args();
args.setUserToken(userToken);
@@ -589,13 +613,14 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "submitImage failed: unknown result");
}
- public int registerSatellite(String userToken, String displayName, List<String> addresses, String modulus, String exponent, ByteBuffer certsha256) throws TInvocationException, org.apache.thrift.TException
+ @Override
+ public int registerSatellite(java.lang.String userToken, java.lang.String displayName, java.util.List<java.lang.String> addresses, java.lang.String modulus, java.lang.String exponent, java.nio.ByteBuffer certsha256) throws TInvocationException, org.apache.thrift.TException
{
send_registerSatellite(userToken, displayName, addresses, modulus, exponent, certsha256);
return recv_registerSatellite();
}
- public void send_registerSatellite(String userToken, String displayName, List<String> addresses, String modulus, String exponent, ByteBuffer certsha256) throws org.apache.thrift.TException
+ public void send_registerSatellite(java.lang.String userToken, java.lang.String displayName, java.util.List<java.lang.String> addresses, java.lang.String modulus, java.lang.String exponent, java.nio.ByteBuffer certsha256) throws org.apache.thrift.TException
{
registerSatellite_args args = new registerSatellite_args();
args.setUserToken(userToken);
@@ -620,13 +645,14 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "registerSatellite failed: unknown result");
}
- public boolean updateSatellite(String serverSessionId, String displayName, List<String> addresses) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public boolean updateSatellite(java.lang.String serverSessionId, java.lang.String displayName, java.util.List<java.lang.String> addresses) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
send_updateSatellite(serverSessionId, displayName, addresses);
return recv_updateSatellite();
}
- public void send_updateSatellite(String serverSessionId, String displayName, List<String> addresses) throws org.apache.thrift.TException
+ public void send_updateSatellite(java.lang.String serverSessionId, java.lang.String displayName, java.util.List<java.lang.String> addresses) throws org.apache.thrift.TException
{
updateSatellite_args args = new updateSatellite_args();
args.setServerSessionId(serverSessionId);
@@ -651,13 +677,14 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateSatellite failed: unknown result");
}
- public TransferInformation downloadImage(String sessionId, String imageVersionId) throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException
+ @Override
+ public TransferInformation downloadImage(java.lang.String sessionId, java.lang.String imageVersionId) throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException
{
send_downloadImage(sessionId, imageVersionId);
return recv_downloadImage();
}
- public void send_downloadImage(String sessionId, String imageVersionId) throws org.apache.thrift.TException
+ public void send_downloadImage(java.lang.String sessionId, java.lang.String imageVersionId) throws org.apache.thrift.TException
{
downloadImage_args args = new downloadImage_args();
args.setSessionId(sessionId);
@@ -684,7 +711,8 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "downloadImage failed: unknown result");
}
- public List<Organization> getOrganizations() throws TInvocationException, org.apache.thrift.TException
+ @Override
+ public java.util.List<Organization> getOrganizations() throws TInvocationException, org.apache.thrift.TException
{
send_getOrganizations();
return recv_getOrganizations();
@@ -696,7 +724,7 @@ public class MasterServer {
sendBase("getOrganizations", args);
}
- public List<Organization> recv_getOrganizations() throws TInvocationException, org.apache.thrift.TException
+ public java.util.List<Organization> recv_getOrganizations() throws TInvocationException, org.apache.thrift.TException
{
getOrganizations_result result = new getOrganizations_result();
receiveBase(result, "getOrganizations");
@@ -709,7 +737,8 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOrganizations failed: unknown result");
}
- public List<OperatingSystem> getOperatingSystems() throws TInvocationException, org.apache.thrift.TException
+ @Override
+ public java.util.List<OperatingSystem> getOperatingSystems() throws TInvocationException, org.apache.thrift.TException
{
send_getOperatingSystems();
return recv_getOperatingSystems();
@@ -721,7 +750,7 @@ public class MasterServer {
sendBase("getOperatingSystems", args);
}
- public List<OperatingSystem> recv_getOperatingSystems() throws TInvocationException, org.apache.thrift.TException
+ public java.util.List<OperatingSystem> recv_getOperatingSystems() throws TInvocationException, org.apache.thrift.TException
{
getOperatingSystems_result result = new getOperatingSystems_result();
receiveBase(result, "getOperatingSystems");
@@ -734,7 +763,8 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOperatingSystems failed: unknown result");
}
- public List<Virtualizer> getVirtualizers() throws TInvocationException, org.apache.thrift.TException
+ @Override
+ public java.util.List<Virtualizer> getVirtualizers() throws TInvocationException, org.apache.thrift.TException
{
send_getVirtualizers();
return recv_getVirtualizers();
@@ -746,7 +776,7 @@ public class MasterServer {
sendBase("getVirtualizers", args);
}
- public List<Virtualizer> recv_getVirtualizers() throws TInvocationException, org.apache.thrift.TException
+ public java.util.List<Virtualizer> recv_getVirtualizers() throws TInvocationException, org.apache.thrift.TException
{
getVirtualizers_result result = new getVirtualizers_result();
receiveBase(result, "getVirtualizers");
@@ -759,7 +789,8 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVirtualizers failed: unknown result");
}
- public List<MasterTag> getTags(long startDate) throws TInvocationException, org.apache.thrift.TException
+ @Override
+ public java.util.List<MasterTag> getTags(long startDate) throws TInvocationException, org.apache.thrift.TException
{
send_getTags(startDate);
return recv_getTags();
@@ -772,7 +803,7 @@ public class MasterServer {
sendBase("getTags", args);
}
- public List<MasterTag> recv_getTags() throws TInvocationException, org.apache.thrift.TException
+ public java.util.List<MasterTag> recv_getTags() throws TInvocationException, org.apache.thrift.TException
{
getTags_result result = new getTags_result();
receiveBase(result, "getTags");
@@ -785,7 +816,8 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getTags failed: unknown result");
}
- public List<MasterSoftware> getSoftware(long startDate) throws TInvocationException, org.apache.thrift.TException
+ @Override
+ public java.util.List<MasterSoftware> getSoftware(long startDate) throws TInvocationException, org.apache.thrift.TException
{
send_getSoftware(startDate);
return recv_getSoftware();
@@ -798,7 +830,7 @@ public class MasterServer {
sendBase("getSoftware", args);
}
- public List<MasterSoftware> recv_getSoftware() throws TInvocationException, org.apache.thrift.TException
+ public java.util.List<MasterSoftware> recv_getSoftware() throws TInvocationException, org.apache.thrift.TException
{
getSoftware_result result = new getSoftware_result();
receiveBase(result, "getSoftware");
@@ -811,13 +843,14 @@ public class MasterServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSoftware failed: unknown result");
}
- public TransferStatus queryUploadStatus(String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException
+ @Override
+ public TransferStatus queryUploadStatus(java.lang.String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException
{
send_queryUploadStatus(uploadToken);
return recv_queryUploadStatus();
}
- public void send_queryUploadStatus(String uploadToken) throws org.apache.thrift.TException
+ public void send_queryUploadStatus(java.lang.String uploadToken) throws org.apache.thrift.TException
{
queryUploadStatus_args args = new queryUploadStatus_args();
args.setUploadToken(uploadToken);
@@ -846,6 +879,7 @@ public class MasterServer {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
+ @Override
public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
@@ -855,18 +889,20 @@ public class MasterServer {
super(protocolFactory, clientManager, transport);
}
- public void ping(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void ping(org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
ping_call method_call = new ping_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class ping_call extends org.apache.thrift.async.TAsyncMethodCall {
- public ping_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class ping_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
+ public ping_call(org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("ping", org.apache.thrift.protocol.TMessageType.CALL, 0));
ping_args args = new ping_args();
@@ -874,9 +910,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
- public boolean getResult() throws org.apache.thrift.TException {
+ @Override
+ public java.lang.Boolean getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -884,22 +921,24 @@ public class MasterServer {
}
}
- public void authenticate(String login, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void authenticate(java.lang.String login, java.lang.String password, org.apache.thrift.async.AsyncMethodCallback<SessionData> resultHandler) throws org.apache.thrift.TException {
checkReady();
authenticate_call method_call = new authenticate_call(login, password, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class authenticate_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String login;
- private String password;
- public authenticate_call(String login, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class authenticate_call extends org.apache.thrift.async.TAsyncMethodCall<SessionData> {
+ private java.lang.String login;
+ private java.lang.String password;
+ public authenticate_call(java.lang.String login, java.lang.String password, org.apache.thrift.async.AsyncMethodCallback<SessionData> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.login = login;
this.password = password;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("authenticate", org.apache.thrift.protocol.TMessageType.CALL, 0));
authenticate_args args = new authenticate_args();
@@ -909,9 +948,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
+ @Override
public SessionData getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -919,22 +959,24 @@ public class MasterServer {
}
}
- public void localAccountLogin(String login, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void localAccountLogin(java.lang.String login, java.lang.String password, org.apache.thrift.async.AsyncMethodCallback<ClientSessionData> resultHandler) throws org.apache.thrift.TException {
checkReady();
localAccountLogin_call method_call = new localAccountLogin_call(login, password, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class localAccountLogin_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String login;
- private String password;
- public localAccountLogin_call(String login, String password, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class localAccountLogin_call extends org.apache.thrift.async.TAsyncMethodCall<ClientSessionData> {
+ private java.lang.String login;
+ private java.lang.String password;
+ public localAccountLogin_call(java.lang.String login, java.lang.String password, org.apache.thrift.async.AsyncMethodCallback<ClientSessionData> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.login = login;
this.password = password;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("localAccountLogin", org.apache.thrift.protocol.TMessageType.CALL, 0));
localAccountLogin_args args = new localAccountLogin_args();
@@ -944,9 +986,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
+ @Override
public ClientSessionData getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -954,22 +997,24 @@ public class MasterServer {
}
}
- public void setUsedSatellite(String sessionId, String satelliteName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void setUsedSatellite(java.lang.String sessionId, java.lang.String satelliteName, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
setUsedSatellite_call method_call = new setUsedSatellite_call(sessionId, satelliteName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class setUsedSatellite_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String sessionId;
- private String satelliteName;
- public setUsedSatellite_call(String sessionId, String satelliteName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class setUsedSatellite_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String sessionId;
+ private java.lang.String satelliteName;
+ public setUsedSatellite_call(java.lang.String sessionId, java.lang.String satelliteName, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.sessionId = sessionId;
this.satelliteName = satelliteName;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setUsedSatellite", org.apache.thrift.protocol.TMessageType.CALL, 0));
setUsedSatellite_args args = new setUsedSatellite_args();
@@ -979,34 +1024,38 @@ public class MasterServer {
prot.writeMessageEnd();
}
- public void getResult() throws org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_setUsedSatellite();
+ return null;
}
}
- public void findUser(String sessionId, String organizationId, String searchTerm, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void findUser(java.lang.String sessionId, java.lang.String organizationId, java.lang.String searchTerm, org.apache.thrift.async.AsyncMethodCallback<java.util.List<UserInfo>> resultHandler) throws org.apache.thrift.TException {
checkReady();
findUser_call method_call = new findUser_call(sessionId, organizationId, searchTerm, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class findUser_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String sessionId;
- private String organizationId;
- private String searchTerm;
- public findUser_call(String sessionId, String organizationId, String searchTerm, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class findUser_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<UserInfo>> {
+ private java.lang.String sessionId;
+ private java.lang.String organizationId;
+ private java.lang.String searchTerm;
+ public findUser_call(java.lang.String sessionId, java.lang.String organizationId, java.lang.String searchTerm, org.apache.thrift.async.AsyncMethodCallback<java.util.List<UserInfo>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.sessionId = sessionId;
this.organizationId = organizationId;
this.searchTerm = searchTerm;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("findUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
findUser_args args = new findUser_args();
@@ -1017,9 +1066,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
- public List<UserInfo> getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public java.util.List<UserInfo> getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1027,22 +1077,24 @@ public class MasterServer {
}
}
- public void getPublicImages(String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getPublicImages(java.lang.String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ImageSummaryRead>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getPublicImages_call method_call = new getPublicImages_call(sessionId, page, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getPublicImages_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String sessionId;
+ public static class getPublicImages_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<ImageSummaryRead>> {
+ private java.lang.String sessionId;
private int page;
- public getPublicImages_call(String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public getPublicImages_call(java.lang.String sessionId, int page, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ImageSummaryRead>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.sessionId = sessionId;
this.page = page;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPublicImages", org.apache.thrift.protocol.TMessageType.CALL, 0));
getPublicImages_args args = new getPublicImages_args();
@@ -1052,9 +1104,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
- public List<ImageSummaryRead> getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public java.util.List<ImageSummaryRead> getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1062,22 +1115,24 @@ public class MasterServer {
}
}
- public void getImageDetails(String sessionId, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getImageDetails(java.lang.String sessionId, java.lang.String imageBaseId, org.apache.thrift.async.AsyncMethodCallback<ImageDetailsRead> resultHandler) throws org.apache.thrift.TException {
checkReady();
getImageDetails_call method_call = new getImageDetails_call(sessionId, imageBaseId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getImageDetails_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String sessionId;
- private String imageBaseId;
- public getImageDetails_call(String sessionId, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getImageDetails_call extends org.apache.thrift.async.TAsyncMethodCall<ImageDetailsRead> {
+ private java.lang.String sessionId;
+ private java.lang.String imageBaseId;
+ public getImageDetails_call(java.lang.String sessionId, java.lang.String imageBaseId, org.apache.thrift.async.AsyncMethodCallback<ImageDetailsRead> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.sessionId = sessionId;
this.imageBaseId = imageBaseId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageDetails", org.apache.thrift.protocol.TMessageType.CALL, 0));
getImageDetails_args args = new getImageDetails_args();
@@ -1087,9 +1142,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
+ @Override
public ImageDetailsRead getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1097,22 +1153,24 @@ public class MasterServer {
}
}
- public void getUser(String userToken, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getUser(java.lang.String userToken, java.lang.String userId, org.apache.thrift.async.AsyncMethodCallback<UserInfo> resultHandler) throws org.apache.thrift.TException {
checkReady();
getUser_call method_call = new getUser_call(userToken, userId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getUser_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String userId;
- public getUser_call(String userToken, String userId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getUser_call extends org.apache.thrift.async.TAsyncMethodCall<UserInfo> {
+ private java.lang.String userToken;
+ private java.lang.String userId;
+ public getUser_call(java.lang.String userToken, java.lang.String userId, org.apache.thrift.async.AsyncMethodCallback<UserInfo> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.userId = userId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
getUser_args args = new getUser_args();
@@ -1122,9 +1180,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
+ @Override
public UserInfo getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1132,20 +1191,22 @@ public class MasterServer {
}
}
- public void invalidateSession(String sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void invalidateSession(java.lang.String sessionId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
invalidateSession_call method_call = new invalidateSession_call(sessionId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class invalidateSession_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String sessionId;
- public invalidateSession_call(String sessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class invalidateSession_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String sessionId;
+ public invalidateSession_call(java.lang.String sessionId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.sessionId = sessionId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("invalidateSession", org.apache.thrift.protocol.TMessageType.CALL, 0));
invalidateSession_args args = new invalidateSession_args();
@@ -1154,30 +1215,69 @@ public class MasterServer {
prot.writeMessageEnd();
}
- public void getResult() throws TInvalidTokenException, org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws TInvalidTokenException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_invalidateSession();
+ return null;
+ }
+ }
+
+ @Override
+ public void getSessionFromAccessCode(java.lang.String accessCode, org.apache.thrift.async.AsyncMethodCallback<ClientSessionData> resultHandler) throws org.apache.thrift.TException {
+ checkReady();
+ getSessionFromAccessCode_call method_call = new getSessionFromAccessCode_call(accessCode, resultHandler, this, ___protocolFactory, ___transport);
+ this.___currentMethod = method_call;
+ ___manager.call(method_call);
+ }
+
+ public static class getSessionFromAccessCode_call extends org.apache.thrift.async.TAsyncMethodCall<ClientSessionData> {
+ private java.lang.String accessCode;
+ public getSessionFromAccessCode_call(java.lang.String accessCode, org.apache.thrift.async.AsyncMethodCallback<ClientSessionData> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ super(client, protocolFactory, transport, resultHandler, false);
+ this.accessCode = accessCode;
+ }
+
+ @Override
+ public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
+ prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSessionFromAccessCode", org.apache.thrift.protocol.TMessageType.CALL, 0));
+ getSessionFromAccessCode_args args = new getSessionFromAccessCode_args();
+ args.setAccessCode(accessCode);
+ args.write(prot);
+ prot.writeMessageEnd();
+ }
+
+ @Override
+ public ClientSessionData getResult() throws TNotFoundException, TAuthorizationException, org.apache.thrift.TException {
+ if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
+ throw new java.lang.IllegalStateException("Method call not finished!");
+ }
+ org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
+ org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
+ return (new Client(prot)).recv_getSessionFromAccessCode();
}
}
- public void getUserFromToken(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getUserFromToken(java.lang.String token, org.apache.thrift.async.AsyncMethodCallback<UserInfo> resultHandler) throws org.apache.thrift.TException {
checkReady();
getUserFromToken_call method_call = new getUserFromToken_call(token, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getUserFromToken_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String token;
- public getUserFromToken_call(String token, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getUserFromToken_call extends org.apache.thrift.async.TAsyncMethodCall<UserInfo> {
+ private java.lang.String token;
+ public getUserFromToken_call(java.lang.String token, org.apache.thrift.async.AsyncMethodCallback<UserInfo> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.token = token;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserFromToken", org.apache.thrift.protocol.TMessageType.CALL, 0));
getUserFromToken_args args = new getUserFromToken_args();
@@ -1186,9 +1286,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
+ @Override
public UserInfo getResult() throws TInvalidTokenException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1196,20 +1297,22 @@ public class MasterServer {
}
}
- public void isServerAuthenticated(String serverSessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void isServerAuthenticated(java.lang.String serverSessionId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
isServerAuthenticated_call method_call = new isServerAuthenticated_call(serverSessionId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class isServerAuthenticated_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String serverSessionId;
- public isServerAuthenticated_call(String serverSessionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class isServerAuthenticated_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
+ private java.lang.String serverSessionId;
+ public isServerAuthenticated_call(java.lang.String serverSessionId, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.serverSessionId = serverSessionId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isServerAuthenticated", org.apache.thrift.protocol.TMessageType.CALL, 0));
isServerAuthenticated_args args = new isServerAuthenticated_args();
@@ -1218,9 +1321,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
- public boolean getResult() throws org.apache.thrift.TException {
+ @Override
+ public java.lang.Boolean getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1228,20 +1332,22 @@ public class MasterServer {
}
}
- public void startServerAuthentication(int satelliteId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void startServerAuthentication(int satelliteId, org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> resultHandler) throws org.apache.thrift.TException {
checkReady();
startServerAuthentication_call method_call = new startServerAuthentication_call(satelliteId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class startServerAuthentication_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class startServerAuthentication_call extends org.apache.thrift.async.TAsyncMethodCall<java.nio.ByteBuffer> {
private int satelliteId;
- public startServerAuthentication_call(int satelliteId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public startServerAuthentication_call(int satelliteId, org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.satelliteId = satelliteId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("startServerAuthentication", org.apache.thrift.protocol.TMessageType.CALL, 0));
startServerAuthentication_args args = new startServerAuthentication_args();
@@ -1250,9 +1356,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
- public ByteBuffer getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public java.nio.ByteBuffer getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1260,22 +1367,24 @@ public class MasterServer {
}
}
- public void serverAuthenticate(int satelliteId, ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void serverAuthenticate(int satelliteId, java.nio.ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback<ServerSessionData> resultHandler) throws org.apache.thrift.TException {
checkReady();
serverAuthenticate_call method_call = new serverAuthenticate_call(satelliteId, challengeResponse, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class serverAuthenticate_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class serverAuthenticate_call extends org.apache.thrift.async.TAsyncMethodCall<ServerSessionData> {
private int satelliteId;
- private ByteBuffer challengeResponse;
- public serverAuthenticate_call(int satelliteId, ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ private java.nio.ByteBuffer challengeResponse;
+ public serverAuthenticate_call(int satelliteId, java.nio.ByteBuffer challengeResponse, org.apache.thrift.async.AsyncMethodCallback<ServerSessionData> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.satelliteId = satelliteId;
this.challengeResponse = challengeResponse;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("serverAuthenticate", org.apache.thrift.protocol.TMessageType.CALL, 0));
serverAuthenticate_args args = new serverAuthenticate_args();
@@ -1285,9 +1394,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
+ @Override
public ServerSessionData getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1295,22 +1405,24 @@ public class MasterServer {
}
}
- public void getImageData(String serverSessionId, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getImageData(java.lang.String serverSessionId, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<ImagePublishData> resultHandler) throws org.apache.thrift.TException {
checkReady();
getImageData_call method_call = new getImageData_call(serverSessionId, imageVersionId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getImageData_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String serverSessionId;
- private String imageVersionId;
- public getImageData_call(String serverSessionId, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getImageData_call extends org.apache.thrift.async.TAsyncMethodCall<ImagePublishData> {
+ private java.lang.String serverSessionId;
+ private java.lang.String imageVersionId;
+ public getImageData_call(java.lang.String serverSessionId, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<ImagePublishData> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.serverSessionId = serverSessionId;
this.imageVersionId = imageVersionId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageData", org.apache.thrift.protocol.TMessageType.CALL, 0));
getImageData_args args = new getImageData_args();
@@ -1320,9 +1432,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
+ @Override
public ImagePublishData getResult() throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1330,24 +1443,26 @@ public class MasterServer {
}
}
- public void submitImage(String userToken, ImagePublishData imageDescription, List<ByteBuffer> blockHashes, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void submitImage(java.lang.String userToken, ImagePublishData imageDescription, java.util.List<java.nio.ByteBuffer> blockHashes, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws org.apache.thrift.TException {
checkReady();
submitImage_call method_call = new submitImage_call(userToken, imageDescription, blockHashes, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class submitImage_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
+ public static class submitImage_call extends org.apache.thrift.async.TAsyncMethodCall<TransferInformation> {
+ private java.lang.String userToken;
private ImagePublishData imageDescription;
- private List<ByteBuffer> blockHashes;
- public submitImage_call(String userToken, ImagePublishData imageDescription, List<ByteBuffer> blockHashes, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ private java.util.List<java.nio.ByteBuffer> blockHashes;
+ public submitImage_call(java.lang.String userToken, ImagePublishData imageDescription, java.util.List<java.nio.ByteBuffer> blockHashes, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.imageDescription = imageDescription;
this.blockHashes = blockHashes;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("submitImage", org.apache.thrift.protocol.TMessageType.CALL, 0));
submitImage_args args = new submitImage_args();
@@ -1358,9 +1473,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
+ @Override
public TransferInformation getResult() throws TAuthorizationException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1368,21 +1484,22 @@ public class MasterServer {
}
}
- public void registerSatellite(String userToken, String displayName, List<String> addresses, String modulus, String exponent, ByteBuffer certsha256, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void registerSatellite(java.lang.String userToken, java.lang.String displayName, java.util.List<java.lang.String> addresses, java.lang.String modulus, java.lang.String exponent, java.nio.ByteBuffer certsha256, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler) throws org.apache.thrift.TException {
checkReady();
registerSatellite_call method_call = new registerSatellite_call(userToken, displayName, addresses, modulus, exponent, certsha256, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class registerSatellite_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String displayName;
- private List<String> addresses;
- private String modulus;
- private String exponent;
- private ByteBuffer certsha256;
- public registerSatellite_call(String userToken, String displayName, List<String> addresses, String modulus, String exponent, ByteBuffer certsha256, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class registerSatellite_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Integer> {
+ private java.lang.String userToken;
+ private java.lang.String displayName;
+ private java.util.List<java.lang.String> addresses;
+ private java.lang.String modulus;
+ private java.lang.String exponent;
+ private java.nio.ByteBuffer certsha256;
+ public registerSatellite_call(java.lang.String userToken, java.lang.String displayName, java.util.List<java.lang.String> addresses, java.lang.String modulus, java.lang.String exponent, java.nio.ByteBuffer certsha256, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.displayName = displayName;
@@ -1392,6 +1509,7 @@ public class MasterServer {
this.certsha256 = certsha256;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("registerSatellite", org.apache.thrift.protocol.TMessageType.CALL, 0));
registerSatellite_args args = new registerSatellite_args();
@@ -1405,9 +1523,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
- public int getResult() throws TInvocationException, org.apache.thrift.TException {
+ @Override
+ public java.lang.Integer getResult() throws TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1415,24 +1534,26 @@ public class MasterServer {
}
}
- public void updateSatellite(String serverSessionId, String displayName, List<String> addresses, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void updateSatellite(java.lang.String serverSessionId, java.lang.String displayName, java.util.List<java.lang.String> addresses, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
checkReady();
updateSatellite_call method_call = new updateSatellite_call(serverSessionId, displayName, addresses, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class updateSatellite_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String serverSessionId;
- private String displayName;
- private List<String> addresses;
- public updateSatellite_call(String serverSessionId, String displayName, List<String> addresses, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class updateSatellite_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
+ private java.lang.String serverSessionId;
+ private java.lang.String displayName;
+ private java.util.List<java.lang.String> addresses;
+ public updateSatellite_call(java.lang.String serverSessionId, java.lang.String displayName, java.util.List<java.lang.String> addresses, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.serverSessionId = serverSessionId;
this.displayName = displayName;
this.addresses = addresses;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSatellite", org.apache.thrift.protocol.TMessageType.CALL, 0));
updateSatellite_args args = new updateSatellite_args();
@@ -1443,9 +1564,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
- public boolean getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public java.lang.Boolean getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1453,22 +1575,24 @@ public class MasterServer {
}
}
- public void downloadImage(String sessionId, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void downloadImage(java.lang.String sessionId, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws org.apache.thrift.TException {
checkReady();
downloadImage_call method_call = new downloadImage_call(sessionId, imageVersionId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class downloadImage_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String sessionId;
- private String imageVersionId;
- public downloadImage_call(String sessionId, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class downloadImage_call extends org.apache.thrift.async.TAsyncMethodCall<TransferInformation> {
+ private java.lang.String sessionId;
+ private java.lang.String imageVersionId;
+ public downloadImage_call(java.lang.String sessionId, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.sessionId = sessionId;
this.imageVersionId = imageVersionId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("downloadImage", org.apache.thrift.protocol.TMessageType.CALL, 0));
downloadImage_args args = new downloadImage_args();
@@ -1478,9 +1602,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
+ @Override
public TransferInformation getResult() throws TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1488,18 +1613,20 @@ public class MasterServer {
}
}
- public void getOrganizations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getOrganizations(org.apache.thrift.async.AsyncMethodCallback<java.util.List<Organization>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getOrganizations_call method_call = new getOrganizations_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getOrganizations_call extends org.apache.thrift.async.TAsyncMethodCall {
- public getOrganizations_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getOrganizations_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<Organization>> {
+ public getOrganizations_call(org.apache.thrift.async.AsyncMethodCallback<java.util.List<Organization>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getOrganizations", org.apache.thrift.protocol.TMessageType.CALL, 0));
getOrganizations_args args = new getOrganizations_args();
@@ -1507,9 +1634,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
- public List<Organization> getResult() throws TInvocationException, org.apache.thrift.TException {
+ @Override
+ public java.util.List<Organization> getResult() throws TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1517,18 +1645,20 @@ public class MasterServer {
}
}
- public void getOperatingSystems(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getOperatingSystems(org.apache.thrift.async.AsyncMethodCallback<java.util.List<OperatingSystem>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getOperatingSystems_call method_call = new getOperatingSystems_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getOperatingSystems_call extends org.apache.thrift.async.TAsyncMethodCall {
- public getOperatingSystems_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getOperatingSystems_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<OperatingSystem>> {
+ public getOperatingSystems_call(org.apache.thrift.async.AsyncMethodCallback<java.util.List<OperatingSystem>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getOperatingSystems", org.apache.thrift.protocol.TMessageType.CALL, 0));
getOperatingSystems_args args = new getOperatingSystems_args();
@@ -1536,9 +1666,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
- public List<OperatingSystem> getResult() throws TInvocationException, org.apache.thrift.TException {
+ @Override
+ public java.util.List<OperatingSystem> getResult() throws TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1546,18 +1677,20 @@ public class MasterServer {
}
}
- public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback<java.util.List<Virtualizer>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getVirtualizers_call method_call = new getVirtualizers_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getVirtualizers_call extends org.apache.thrift.async.TAsyncMethodCall {
- public getVirtualizers_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getVirtualizers_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<Virtualizer>> {
+ public getVirtualizers_call(org.apache.thrift.async.AsyncMethodCallback<java.util.List<Virtualizer>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getVirtualizers", org.apache.thrift.protocol.TMessageType.CALL, 0));
getVirtualizers_args args = new getVirtualizers_args();
@@ -1565,9 +1698,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
- public List<Virtualizer> getResult() throws TInvocationException, org.apache.thrift.TException {
+ @Override
+ public java.util.List<Virtualizer> getResult() throws TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1575,20 +1709,22 @@ public class MasterServer {
}
}
- public void getTags(long startDate, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getTags(long startDate, org.apache.thrift.async.AsyncMethodCallback<java.util.List<MasterTag>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getTags_call method_call = new getTags_call(startDate, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getTags_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class getTags_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<MasterTag>> {
private long startDate;
- public getTags_call(long startDate, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public getTags_call(long startDate, org.apache.thrift.async.AsyncMethodCallback<java.util.List<MasterTag>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.startDate = startDate;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getTags", org.apache.thrift.protocol.TMessageType.CALL, 0));
getTags_args args = new getTags_args();
@@ -1597,9 +1733,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
- public List<MasterTag> getResult() throws TInvocationException, org.apache.thrift.TException {
+ @Override
+ public java.util.List<MasterTag> getResult() throws TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1607,20 +1744,22 @@ public class MasterServer {
}
}
- public void getSoftware(long startDate, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getSoftware(long startDate, org.apache.thrift.async.AsyncMethodCallback<java.util.List<MasterSoftware>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getSoftware_call method_call = new getSoftware_call(startDate, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getSoftware_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class getSoftware_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<MasterSoftware>> {
private long startDate;
- public getSoftware_call(long startDate, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public getSoftware_call(long startDate, org.apache.thrift.async.AsyncMethodCallback<java.util.List<MasterSoftware>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.startDate = startDate;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSoftware", org.apache.thrift.protocol.TMessageType.CALL, 0));
getSoftware_args args = new getSoftware_args();
@@ -1629,9 +1768,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
- public List<MasterSoftware> getResult() throws TInvocationException, org.apache.thrift.TException {
+ @Override
+ public java.util.List<MasterSoftware> getResult() throws TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1639,20 +1779,22 @@ public class MasterServer {
}
}
- public void queryUploadStatus(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void queryUploadStatus(java.lang.String uploadToken, org.apache.thrift.async.AsyncMethodCallback<TransferStatus> resultHandler) throws org.apache.thrift.TException {
checkReady();
queryUploadStatus_call method_call = new queryUploadStatus_call(uploadToken, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class queryUploadStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String uploadToken;
- public queryUploadStatus_call(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class queryUploadStatus_call extends org.apache.thrift.async.TAsyncMethodCall<TransferStatus> {
+ private java.lang.String uploadToken;
+ public queryUploadStatus_call(java.lang.String uploadToken, org.apache.thrift.async.AsyncMethodCallback<TransferStatus> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.uploadToken = uploadToken;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("queryUploadStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
queryUploadStatus_args args = new queryUploadStatus_args();
@@ -1661,9 +1803,10 @@ public class MasterServer {
prot.writeMessageEnd();
}
+ @Override
public TransferStatus getResult() throws TInvalidTokenException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1674,16 +1817,16 @@ public class MasterServer {
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
- private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+ super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
- protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ protected Processor(I iface, java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
- private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ private static <I extends Iface> java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("ping", new ping());
processMap.put("authenticate", new authenticate());
processMap.put("localAccountLogin", new localAccountLogin());
@@ -1693,6 +1836,7 @@ public class MasterServer {
processMap.put("getImageDetails", new getImageDetails());
processMap.put("getUser", new getUser());
processMap.put("invalidateSession", new invalidateSession());
+ processMap.put("getSessionFromAccessCode", new getSessionFromAccessCode());
processMap.put("getUserFromToken", new getUserFromToken());
processMap.put("isServerAuthenticated", new isServerAuthenticated());
processMap.put("startServerAuthentication", new startServerAuthentication());
@@ -1716,14 +1860,22 @@ public class MasterServer {
super("ping");
}
+ @Override
public ping_args getEmptyArgsInstance() {
return new ping_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public ping_result getResult(I iface, ping_args args) throws org.apache.thrift.TException {
ping_result result = new ping_result();
result.success = iface.ping();
@@ -1737,14 +1889,22 @@ public class MasterServer {
super("authenticate");
}
+ @Override
public authenticate_args getEmptyArgsInstance() {
return new authenticate_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public authenticate_result getResult(I iface, authenticate_args args) throws org.apache.thrift.TException {
authenticate_result result = new authenticate_result();
try {
@@ -1763,14 +1923,22 @@ public class MasterServer {
super("localAccountLogin");
}
+ @Override
public localAccountLogin_args getEmptyArgsInstance() {
return new localAccountLogin_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public localAccountLogin_result getResult(I iface, localAccountLogin_args args) throws org.apache.thrift.TException {
localAccountLogin_result result = new localAccountLogin_result();
try {
@@ -1789,14 +1957,22 @@ public class MasterServer {
super("setUsedSatellite");
}
+ @Override
public setUsedSatellite_args getEmptyArgsInstance() {
return new setUsedSatellite_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public setUsedSatellite_result getResult(I iface, setUsedSatellite_args args) throws org.apache.thrift.TException {
setUsedSatellite_result result = new setUsedSatellite_result();
iface.setUsedSatellite(args.sessionId, args.satelliteName);
@@ -1809,14 +1985,22 @@ public class MasterServer {
super("findUser");
}
+ @Override
public findUser_args getEmptyArgsInstance() {
return new findUser_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public findUser_result getResult(I iface, findUser_args args) throws org.apache.thrift.TException {
findUser_result result = new findUser_result();
try {
@@ -1835,14 +2019,22 @@ public class MasterServer {
super("getPublicImages");
}
+ @Override
public getPublicImages_args getEmptyArgsInstance() {
return new getPublicImages_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getPublicImages_result getResult(I iface, getPublicImages_args args) throws org.apache.thrift.TException {
getPublicImages_result result = new getPublicImages_result();
try {
@@ -1861,14 +2053,22 @@ public class MasterServer {
super("getImageDetails");
}
+ @Override
public getImageDetails_args getEmptyArgsInstance() {
return new getImageDetails_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getImageDetails_result getResult(I iface, getImageDetails_args args) throws org.apache.thrift.TException {
getImageDetails_result result = new getImageDetails_result();
try {
@@ -1889,14 +2089,22 @@ public class MasterServer {
super("getUser");
}
+ @Override
public getUser_args getEmptyArgsInstance() {
return new getUser_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getUser_result getResult(I iface, getUser_args args) throws org.apache.thrift.TException {
getUser_result result = new getUser_result();
try {
@@ -1917,14 +2125,22 @@ public class MasterServer {
super("invalidateSession");
}
+ @Override
public invalidateSession_args getEmptyArgsInstance() {
return new invalidateSession_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public invalidateSession_result getResult(I iface, invalidateSession_args args) throws org.apache.thrift.TException {
invalidateSession_result result = new invalidateSession_result();
try {
@@ -1936,19 +2152,61 @@ public class MasterServer {
}
}
+ public static class getSessionFromAccessCode<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSessionFromAccessCode_args> {
+ public getSessionFromAccessCode() {
+ super("getSessionFromAccessCode");
+ }
+
+ @Override
+ public getSessionFromAccessCode_args getEmptyArgsInstance() {
+ return new getSessionFromAccessCode_args();
+ }
+
+ @Override
+ protected boolean isOneway() {
+ return false;
+ }
+
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
+ public getSessionFromAccessCode_result getResult(I iface, getSessionFromAccessCode_args args) throws org.apache.thrift.TException {
+ getSessionFromAccessCode_result result = new getSessionFromAccessCode_result();
+ try {
+ result.success = iface.getSessionFromAccessCode(args.accessCode);
+ } catch (TNotFoundException notFound) {
+ result.notFound = notFound;
+ } catch (TAuthorizationException auth) {
+ result.auth = auth;
+ }
+ return result;
+ }
+ }
+
public static class getUserFromToken<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getUserFromToken_args> {
public getUserFromToken() {
super("getUserFromToken");
}
+ @Override
public getUserFromToken_args getEmptyArgsInstance() {
return new getUserFromToken_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getUserFromToken_result getResult(I iface, getUserFromToken_args args) throws org.apache.thrift.TException {
getUserFromToken_result result = new getUserFromToken_result();
try {
@@ -1965,14 +2223,22 @@ public class MasterServer {
super("isServerAuthenticated");
}
+ @Override
public isServerAuthenticated_args getEmptyArgsInstance() {
return new isServerAuthenticated_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public isServerAuthenticated_result getResult(I iface, isServerAuthenticated_args args) throws org.apache.thrift.TException {
isServerAuthenticated_result result = new isServerAuthenticated_result();
result.success = iface.isServerAuthenticated(args.serverSessionId);
@@ -1986,14 +2252,22 @@ public class MasterServer {
super("startServerAuthentication");
}
+ @Override
public startServerAuthentication_args getEmptyArgsInstance() {
return new startServerAuthentication_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public startServerAuthentication_result getResult(I iface, startServerAuthentication_args args) throws org.apache.thrift.TException {
startServerAuthentication_result result = new startServerAuthentication_result();
try {
@@ -2012,14 +2286,22 @@ public class MasterServer {
super("serverAuthenticate");
}
+ @Override
public serverAuthenticate_args getEmptyArgsInstance() {
return new serverAuthenticate_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public serverAuthenticate_result getResult(I iface, serverAuthenticate_args args) throws org.apache.thrift.TException {
serverAuthenticate_result result = new serverAuthenticate_result();
try {
@@ -2038,14 +2320,22 @@ public class MasterServer {
super("getImageData");
}
+ @Override
public getImageData_args getEmptyArgsInstance() {
return new getImageData_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getImageData_result getResult(I iface, getImageData_args args) throws org.apache.thrift.TException {
getImageData_result result = new getImageData_result();
try {
@@ -2066,14 +2356,22 @@ public class MasterServer {
super("submitImage");
}
+ @Override
public submitImage_args getEmptyArgsInstance() {
return new submitImage_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public submitImage_result getResult(I iface, submitImage_args args) throws org.apache.thrift.TException {
submitImage_result result = new submitImage_result();
try {
@@ -2094,14 +2392,22 @@ public class MasterServer {
super("registerSatellite");
}
+ @Override
public registerSatellite_args getEmptyArgsInstance() {
return new registerSatellite_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public registerSatellite_result getResult(I iface, registerSatellite_args args) throws org.apache.thrift.TException {
registerSatellite_result result = new registerSatellite_result();
try {
@@ -2119,14 +2425,22 @@ public class MasterServer {
super("updateSatellite");
}
+ @Override
public updateSatellite_args getEmptyArgsInstance() {
return new updateSatellite_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public updateSatellite_result getResult(I iface, updateSatellite_args args) throws org.apache.thrift.TException {
updateSatellite_result result = new updateSatellite_result();
try {
@@ -2146,14 +2460,22 @@ public class MasterServer {
super("downloadImage");
}
+ @Override
public downloadImage_args getEmptyArgsInstance() {
return new downloadImage_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public downloadImage_result getResult(I iface, downloadImage_args args) throws org.apache.thrift.TException {
downloadImage_result result = new downloadImage_result();
try {
@@ -2174,14 +2496,22 @@ public class MasterServer {
super("getOrganizations");
}
+ @Override
public getOrganizations_args getEmptyArgsInstance() {
return new getOrganizations_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getOrganizations_result getResult(I iface, getOrganizations_args args) throws org.apache.thrift.TException {
getOrganizations_result result = new getOrganizations_result();
try {
@@ -2198,14 +2528,22 @@ public class MasterServer {
super("getOperatingSystems");
}
+ @Override
public getOperatingSystems_args getEmptyArgsInstance() {
return new getOperatingSystems_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getOperatingSystems_result getResult(I iface, getOperatingSystems_args args) throws org.apache.thrift.TException {
getOperatingSystems_result result = new getOperatingSystems_result();
try {
@@ -2222,14 +2560,22 @@ public class MasterServer {
super("getVirtualizers");
}
+ @Override
public getVirtualizers_args getEmptyArgsInstance() {
return new getVirtualizers_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getVirtualizers_result getResult(I iface, getVirtualizers_args args) throws org.apache.thrift.TException {
getVirtualizers_result result = new getVirtualizers_result();
try {
@@ -2246,14 +2592,22 @@ public class MasterServer {
super("getTags");
}
+ @Override
public getTags_args getEmptyArgsInstance() {
return new getTags_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getTags_result getResult(I iface, getTags_args args) throws org.apache.thrift.TException {
getTags_result result = new getTags_result();
try {
@@ -2270,14 +2624,22 @@ public class MasterServer {
super("getSoftware");
}
+ @Override
public getSoftware_args getEmptyArgsInstance() {
return new getSoftware_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getSoftware_result getResult(I iface, getSoftware_args args) throws org.apache.thrift.TException {
getSoftware_result result = new getSoftware_result();
try {
@@ -2294,14 +2656,22 @@ public class MasterServer {
super("queryUploadStatus");
}
+ @Override
public queryUploadStatus_args getEmptyArgsInstance() {
return new queryUploadStatus_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public queryUploadStatus_result getResult(I iface, queryUploadStatus_args args) throws org.apache.thrift.TException {
queryUploadStatus_result result = new queryUploadStatus_result();
try {
@@ -2316,16 +2686,16 @@ public class MasterServer {
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
- private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+ super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
}
- protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ protected AsyncProcessor(I iface, java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
super(iface, getProcessMap(processMap));
}
- private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("ping", new ping());
processMap.put("authenticate", new authenticate());
processMap.put("localAccountLogin", new localAccountLogin());
@@ -2335,6 +2705,7 @@ public class MasterServer {
processMap.put("getImageDetails", new getImageDetails());
processMap.put("getUser", new getUser());
processMap.put("invalidateSession", new invalidateSession());
+ processMap.put("getSessionFromAccessCode", new getSessionFromAccessCode());
processMap.put("getUserFromToken", new getUserFromToken());
processMap.put("isServerAuthenticated", new isServerAuthenticated());
processMap.put("startServerAuthentication", new startServerAuthentication());
@@ -2353,54 +2724,70 @@ public class MasterServer {
return processMap;
}
- public static class ping<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, ping_args, Boolean> {
+ public static class ping<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, ping_args, java.lang.Boolean> {
public ping() {
super("ping");
}
+ @Override
public ping_args getEmptyArgsInstance() {
return new ping_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
+ @Override
+ public void onComplete(java.lang.Boolean o) {
ping_result result = new ping_result();
result.success = o;
result.setSuccessIsSet(true);
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
ping_result result = new ping_result();
- {
+ if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, ping_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ @Override
+ public void start(I iface, ping_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.ping(resultHandler);
}
}
@@ -2410,59 +2797,72 @@ public class MasterServer {
super("authenticate");
}
+ @Override
public authenticate_args getEmptyArgsInstance() {
return new authenticate_args();
}
- public AsyncMethodCallback<SessionData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<SessionData> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<SessionData>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<SessionData>() {
+ @Override
public void onComplete(SessionData o) {
authenticate_result result = new authenticate_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
authenticate_result result = new authenticate_result();
if (e instanceof TAuthorizationException) {
- result.failure = (TAuthorizationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.error = (TInvocationException) e;
- result.setErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.failure = (TAuthorizationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.error = (TInvocationException) e;
+ result.setErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, authenticate_args args, org.apache.thrift.async.AsyncMethodCallback<SessionData> resultHandler) throws TException {
+ @Override
+ public void start(I iface, authenticate_args args, org.apache.thrift.async.AsyncMethodCallback<SessionData> resultHandler) throws org.apache.thrift.TException {
iface.authenticate(args.login, args.password,resultHandler);
}
}
@@ -2472,59 +2872,72 @@ public class MasterServer {
super("localAccountLogin");
}
+ @Override
public localAccountLogin_args getEmptyArgsInstance() {
return new localAccountLogin_args();
}
- public AsyncMethodCallback<ClientSessionData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<ClientSessionData> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<ClientSessionData>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<ClientSessionData>() {
+ @Override
public void onComplete(ClientSessionData o) {
localAccountLogin_result result = new localAccountLogin_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
localAccountLogin_result result = new localAccountLogin_result();
if (e instanceof TAuthorizationException) {
- result.failure = (TAuthorizationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.error = (TInvocationException) e;
- result.setErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.failure = (TAuthorizationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.error = (TInvocationException) e;
+ result.setErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, localAccountLogin_args args, org.apache.thrift.async.AsyncMethodCallback<ClientSessionData> resultHandler) throws TException {
+ @Override
+ public void start(I iface, localAccountLogin_args args, org.apache.thrift.async.AsyncMethodCallback<ClientSessionData> resultHandler) throws org.apache.thrift.TException {
iface.localAccountLogin(args.login, args.password,resultHandler);
}
}
@@ -2534,171 +2947,213 @@ public class MasterServer {
super("setUsedSatellite");
}
+ @Override
public setUsedSatellite_args getEmptyArgsInstance() {
return new setUsedSatellite_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
setUsedSatellite_result result = new setUsedSatellite_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
setUsedSatellite_result result = new setUsedSatellite_result();
- {
+ if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, setUsedSatellite_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, setUsedSatellite_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.setUsedSatellite(args.sessionId, args.satelliteName,resultHandler);
}
}
- public static class findUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, findUser_args, List<UserInfo>> {
+ public static class findUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, findUser_args, java.util.List<UserInfo>> {
public findUser() {
super("findUser");
}
+ @Override
public findUser_args getEmptyArgsInstance() {
return new findUser_args();
}
- public AsyncMethodCallback<List<UserInfo>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.util.List<UserInfo>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<UserInfo>>() {
- public void onComplete(List<UserInfo> o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<UserInfo>>() {
+ @Override
+ public void onComplete(java.util.List<UserInfo> o) {
findUser_result result = new findUser_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
findUser_result result = new findUser_result();
if (e instanceof TAuthorizationException) {
- result.failure = (TAuthorizationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.error = (TInvocationException) e;
- result.setErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.failure = (TAuthorizationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.error = (TInvocationException) e;
+ result.setErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, findUser_args args, org.apache.thrift.async.AsyncMethodCallback<List<UserInfo>> resultHandler) throws TException {
+ @Override
+ public void start(I iface, findUser_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<UserInfo>> resultHandler) throws org.apache.thrift.TException {
iface.findUser(args.sessionId, args.organizationId, args.searchTerm,resultHandler);
}
}
- public static class getPublicImages<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPublicImages_args, List<ImageSummaryRead>> {
+ public static class getPublicImages<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getPublicImages_args, java.util.List<ImageSummaryRead>> {
public getPublicImages() {
super("getPublicImages");
}
+ @Override
public getPublicImages_args getEmptyArgsInstance() {
return new getPublicImages_args();
}
- public AsyncMethodCallback<List<ImageSummaryRead>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.util.List<ImageSummaryRead>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<ImageSummaryRead>>() {
- public void onComplete(List<ImageSummaryRead> o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<ImageSummaryRead>>() {
+ @Override
+ public void onComplete(java.util.List<ImageSummaryRead> o) {
getPublicImages_result result = new getPublicImages_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getPublicImages_result result = new getPublicImages_result();
if (e instanceof TAuthorizationException) {
- result.failure = (TAuthorizationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.error = (TInvocationException) e;
- result.setErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.failure = (TAuthorizationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.error = (TInvocationException) e;
+ result.setErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getPublicImages_args args, org.apache.thrift.async.AsyncMethodCallback<List<ImageSummaryRead>> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getPublicImages_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ImageSummaryRead>> resultHandler) throws org.apache.thrift.TException {
iface.getPublicImages(args.sessionId, args.page,resultHandler);
}
}
@@ -2708,64 +3163,76 @@ public class MasterServer {
super("getImageDetails");
}
+ @Override
public getImageDetails_args getEmptyArgsInstance() {
return new getImageDetails_args();
}
- public AsyncMethodCallback<ImageDetailsRead> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<ImageDetailsRead> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<ImageDetailsRead>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<ImageDetailsRead>() {
+ @Override
public void onComplete(ImageDetailsRead o) {
getImageDetails_result result = new getImageDetails_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getImageDetails_result result = new getImageDetails_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getImageDetails_args args, org.apache.thrift.async.AsyncMethodCallback<ImageDetailsRead> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getImageDetails_args args, org.apache.thrift.async.AsyncMethodCallback<ImageDetailsRead> resultHandler) throws org.apache.thrift.TException {
iface.getImageDetails(args.sessionId, args.imageBaseId,resultHandler);
}
}
@@ -2775,64 +3242,76 @@ public class MasterServer {
super("getUser");
}
+ @Override
public getUser_args getEmptyArgsInstance() {
return new getUser_args();
}
- public AsyncMethodCallback<UserInfo> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<UserInfo> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<UserInfo>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<UserInfo>() {
+ @Override
public void onComplete(UserInfo o) {
getUser_result result = new getUser_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getUser_result result = new getUser_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getUser_args args, org.apache.thrift.async.AsyncMethodCallback<UserInfo> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getUser_args args, org.apache.thrift.async.AsyncMethodCallback<UserInfo> resultHandler) throws org.apache.thrift.TException {
iface.getUser(args.userToken, args.userId,resultHandler);
}
}
@@ -2842,224 +3321,356 @@ public class MasterServer {
super("invalidateSession");
}
+ @Override
public invalidateSession_args getEmptyArgsInstance() {
return new invalidateSession_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
invalidateSession_result result = new invalidateSession_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
invalidateSession_result result = new invalidateSession_result();
if (e instanceof TInvalidTokenException) {
- result.ex = (TInvalidTokenException) e;
- result.setExIsSet(true);
- msg = result;
- }
- else
- {
+ result.ex = (TInvalidTokenException) e;
+ result.setExIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, invalidateSession_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, invalidateSession_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.invalidateSession(args.sessionId,resultHandler);
}
}
+ public static class getSessionFromAccessCode<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getSessionFromAccessCode_args, ClientSessionData> {
+ public getSessionFromAccessCode() {
+ super("getSessionFromAccessCode");
+ }
+
+ @Override
+ public getSessionFromAccessCode_args getEmptyArgsInstance() {
+ return new getSessionFromAccessCode_args();
+ }
+
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<ClientSessionData> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+ final org.apache.thrift.AsyncProcessFunction fcall = this;
+ return new org.apache.thrift.async.AsyncMethodCallback<ClientSessionData>() {
+ @Override
+ public void onComplete(ClientSessionData o) {
+ getSessionFromAccessCode_result result = new getSessionFromAccessCode_result();
+ result.success = o;
+ try {
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
+ }
+ }
+ @Override
+ public void onError(java.lang.Exception e) {
+ byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
+ org.apache.thrift.TSerializable msg;
+ getSessionFromAccessCode_result result = new getSessionFromAccessCode_result();
+ if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TAuthorizationException) {
+ result.auth = (TAuthorizationException) e;
+ result.setAuthIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ }
+ try {
+ fcall.sendResponse(fb,msg,msgType,seqid);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
+ }
+ }
+ };
+ }
+
+ @Override
+ protected boolean isOneway() {
+ return false;
+ }
+
+ @Override
+ public void start(I iface, getSessionFromAccessCode_args args, org.apache.thrift.async.AsyncMethodCallback<ClientSessionData> resultHandler) throws org.apache.thrift.TException {
+ iface.getSessionFromAccessCode(args.accessCode,resultHandler);
+ }
+ }
+
public static class getUserFromToken<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserFromToken_args, UserInfo> {
public getUserFromToken() {
super("getUserFromToken");
}
+ @Override
public getUserFromToken_args getEmptyArgsInstance() {
return new getUserFromToken_args();
}
- public AsyncMethodCallback<UserInfo> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<UserInfo> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<UserInfo>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<UserInfo>() {
+ @Override
public void onComplete(UserInfo o) {
getUserFromToken_result result = new getUserFromToken_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getUserFromToken_result result = new getUserFromToken_result();
if (e instanceof TInvalidTokenException) {
- result.failure = (TInvalidTokenException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else
- {
+ result.failure = (TInvalidTokenException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getUserFromToken_args args, org.apache.thrift.async.AsyncMethodCallback<UserInfo> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getUserFromToken_args args, org.apache.thrift.async.AsyncMethodCallback<UserInfo> resultHandler) throws org.apache.thrift.TException {
iface.getUserFromToken(args.token,resultHandler);
}
}
- public static class isServerAuthenticated<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isServerAuthenticated_args, Boolean> {
+ public static class isServerAuthenticated<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isServerAuthenticated_args, java.lang.Boolean> {
public isServerAuthenticated() {
super("isServerAuthenticated");
}
+ @Override
public isServerAuthenticated_args getEmptyArgsInstance() {
return new isServerAuthenticated_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
+ @Override
+ public void onComplete(java.lang.Boolean o) {
isServerAuthenticated_result result = new isServerAuthenticated_result();
result.success = o;
result.setSuccessIsSet(true);
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
isServerAuthenticated_result result = new isServerAuthenticated_result();
- {
+ if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, isServerAuthenticated_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ @Override
+ public void start(I iface, isServerAuthenticated_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.isServerAuthenticated(args.serverSessionId,resultHandler);
}
}
- public static class startServerAuthentication<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, startServerAuthentication_args, ByteBuffer> {
+ public static class startServerAuthentication<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, startServerAuthentication_args, java.nio.ByteBuffer> {
public startServerAuthentication() {
super("startServerAuthentication");
}
+ @Override
public startServerAuthentication_args getEmptyArgsInstance() {
return new startServerAuthentication_args();
}
- public AsyncMethodCallback<ByteBuffer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<ByteBuffer>() {
- public void onComplete(ByteBuffer o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer>() {
+ @Override
+ public void onComplete(java.nio.ByteBuffer o) {
startServerAuthentication_result result = new startServerAuthentication_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
startServerAuthentication_result result = new startServerAuthentication_result();
if (e instanceof TAuthorizationException) {
- result.failure = (TAuthorizationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.error = (TInvocationException) e;
- result.setErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.failure = (TAuthorizationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.error = (TInvocationException) e;
+ result.setErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, startServerAuthentication_args args, org.apache.thrift.async.AsyncMethodCallback<ByteBuffer> resultHandler) throws TException {
+ @Override
+ public void start(I iface, startServerAuthentication_args args, org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> resultHandler) throws org.apache.thrift.TException {
iface.startServerAuthentication(args.satelliteId,resultHandler);
}
}
@@ -3069,59 +3680,72 @@ public class MasterServer {
super("serverAuthenticate");
}
+ @Override
public serverAuthenticate_args getEmptyArgsInstance() {
return new serverAuthenticate_args();
}
- public AsyncMethodCallback<ServerSessionData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<ServerSessionData> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<ServerSessionData>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<ServerSessionData>() {
+ @Override
public void onComplete(ServerSessionData o) {
serverAuthenticate_result result = new serverAuthenticate_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
serverAuthenticate_result result = new serverAuthenticate_result();
if (e instanceof TAuthorizationException) {
- result.failure = (TAuthorizationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.errr = (TInvocationException) e;
- result.setErrrIsSet(true);
- msg = result;
- }
- else
- {
+ result.failure = (TAuthorizationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.errr = (TInvocationException) e;
+ result.setErrrIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, serverAuthenticate_args args, org.apache.thrift.async.AsyncMethodCallback<ServerSessionData> resultHandler) throws TException {
+ @Override
+ public void start(I iface, serverAuthenticate_args args, org.apache.thrift.async.AsyncMethodCallback<ServerSessionData> resultHandler) throws org.apache.thrift.TException {
iface.serverAuthenticate(args.satelliteId, args.challengeResponse,resultHandler);
}
}
@@ -3131,64 +3755,76 @@ public class MasterServer {
super("getImageData");
}
+ @Override
public getImageData_args getEmptyArgsInstance() {
return new getImageData_args();
}
- public AsyncMethodCallback<ImagePublishData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<ImagePublishData> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<ImagePublishData>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<ImagePublishData>() {
+ @Override
public void onComplete(ImagePublishData o) {
getImageData_result result = new getImageData_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getImageData_result result = new getImageData_result();
if (e instanceof TAuthorizationException) {
- result.failure = (TAuthorizationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.failure2 = (TInvocationException) e;
- result.setFailure2IsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.f3 = (TNotFoundException) e;
- result.setF3IsSet(true);
- msg = result;
- }
- else
- {
+ result.failure = (TAuthorizationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.failure2 = (TInvocationException) e;
+ result.setFailure2IsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.f3 = (TNotFoundException) e;
+ result.setF3IsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getImageData_args args, org.apache.thrift.async.AsyncMethodCallback<ImagePublishData> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getImageData_args args, org.apache.thrift.async.AsyncMethodCallback<ImagePublishData> resultHandler) throws org.apache.thrift.TException {
iface.getImageData(args.serverSessionId, args.imageVersionId,resultHandler);
}
}
@@ -3198,185 +3834,224 @@ public class MasterServer {
super("submitImage");
}
+ @Override
public submitImage_args getEmptyArgsInstance() {
return new submitImage_args();
}
- public AsyncMethodCallback<TransferInformation> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<TransferInformation> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<TransferInformation>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<TransferInformation>() {
+ @Override
public void onComplete(TransferInformation o) {
submitImage_result result = new submitImage_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
submitImage_result result = new submitImage_result();
if (e instanceof TAuthorizationException) {
- result.failure = (TAuthorizationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.failure2 = (TInvocationException) e;
- result.setFailure2IsSet(true);
- msg = result;
- }
- else if (e instanceof TTransferRejectedException) {
- result.failure3 = (TTransferRejectedException) e;
- result.setFailure3IsSet(true);
- msg = result;
- }
- else
- {
+ result.failure = (TAuthorizationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.failure2 = (TInvocationException) e;
+ result.setFailure2IsSet(true);
+ msg = result;
+ } else if (e instanceof TTransferRejectedException) {
+ result.failure3 = (TTransferRejectedException) e;
+ result.setFailure3IsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, submitImage_args args, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws TException {
+ @Override
+ public void start(I iface, submitImage_args args, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws org.apache.thrift.TException {
iface.submitImage(args.userToken, args.imageDescription, args.blockHashes,resultHandler);
}
}
- public static class registerSatellite<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerSatellite_args, Integer> {
+ public static class registerSatellite<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerSatellite_args, java.lang.Integer> {
public registerSatellite() {
super("registerSatellite");
}
+ @Override
public registerSatellite_args getEmptyArgsInstance() {
return new registerSatellite_args();
}
- public AsyncMethodCallback<Integer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Integer>() {
- public void onComplete(Integer o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer>() {
+ @Override
+ public void onComplete(java.lang.Integer o) {
registerSatellite_result result = new registerSatellite_result();
result.success = o;
result.setSuccessIsSet(true);
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
registerSatellite_result result = new registerSatellite_result();
if (e instanceof TInvocationException) {
- result.error = (TInvocationException) e;
- result.setErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.error = (TInvocationException) e;
+ result.setErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, registerSatellite_args args, org.apache.thrift.async.AsyncMethodCallback<Integer> resultHandler) throws TException {
+ @Override
+ public void start(I iface, registerSatellite_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Integer> resultHandler) throws org.apache.thrift.TException {
iface.registerSatellite(args.userToken, args.displayName, args.addresses, args.modulus, args.exponent, args.certsha256,resultHandler);
}
}
- public static class updateSatellite<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateSatellite_args, Boolean> {
+ public static class updateSatellite<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, updateSatellite_args, java.lang.Boolean> {
public updateSatellite() {
super("updateSatellite");
}
+ @Override
public updateSatellite_args getEmptyArgsInstance() {
return new updateSatellite_args();
}
- public AsyncMethodCallback<Boolean> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Boolean>() {
- public void onComplete(Boolean o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() {
+ @Override
+ public void onComplete(java.lang.Boolean o) {
updateSatellite_result result = new updateSatellite_result();
result.success = o;
result.setSuccessIsSet(true);
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
updateSatellite_result result = new updateSatellite_result();
if (e instanceof TAuthorizationException) {
- result.failure = (TAuthorizationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.error = (TInvocationException) e;
- result.setErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.failure = (TAuthorizationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.error = (TInvocationException) e;
+ result.setErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, updateSatellite_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws TException {
+ @Override
+ public void start(I iface, updateSatellite_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
iface.updateSatellite(args.serverSessionId, args.displayName, args.addresses,resultHandler);
}
}
@@ -3386,349 +4061,431 @@ public class MasterServer {
super("downloadImage");
}
+ @Override
public downloadImage_args getEmptyArgsInstance() {
return new downloadImage_args();
}
- public AsyncMethodCallback<TransferInformation> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<TransferInformation> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<TransferInformation>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<TransferInformation>() {
+ @Override
public void onComplete(TransferInformation o) {
downloadImage_result result = new downloadImage_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
downloadImage_result result = new downloadImage_result();
if (e instanceof TAuthorizationException) {
- result.failure = (TAuthorizationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.failure2 = (TInvocationException) e;
- result.setFailure2IsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.f3 = (TNotFoundException) e;
- result.setF3IsSet(true);
- msg = result;
- }
- else
- {
+ result.failure = (TAuthorizationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.failure2 = (TInvocationException) e;
+ result.setFailure2IsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.f3 = (TNotFoundException) e;
+ result.setF3IsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, downloadImage_args args, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws TException {
+ @Override
+ public void start(I iface, downloadImage_args args, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws org.apache.thrift.TException {
iface.downloadImage(args.sessionId, args.imageVersionId,resultHandler);
}
}
- public static class getOrganizations<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getOrganizations_args, List<Organization>> {
+ public static class getOrganizations<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getOrganizations_args, java.util.List<Organization>> {
public getOrganizations() {
super("getOrganizations");
}
+ @Override
public getOrganizations_args getEmptyArgsInstance() {
return new getOrganizations_args();
}
- public AsyncMethodCallback<List<Organization>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.util.List<Organization>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<Organization>>() {
- public void onComplete(List<Organization> o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<Organization>>() {
+ @Override
+ public void onComplete(java.util.List<Organization> o) {
getOrganizations_result result = new getOrganizations_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getOrganizations_result result = new getOrganizations_result();
if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getOrganizations_args args, org.apache.thrift.async.AsyncMethodCallback<List<Organization>> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getOrganizations_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<Organization>> resultHandler) throws org.apache.thrift.TException {
iface.getOrganizations(resultHandler);
}
}
- public static class getOperatingSystems<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getOperatingSystems_args, List<OperatingSystem>> {
+ public static class getOperatingSystems<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getOperatingSystems_args, java.util.List<OperatingSystem>> {
public getOperatingSystems() {
super("getOperatingSystems");
}
+ @Override
public getOperatingSystems_args getEmptyArgsInstance() {
return new getOperatingSystems_args();
}
- public AsyncMethodCallback<List<OperatingSystem>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.util.List<OperatingSystem>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<OperatingSystem>>() {
- public void onComplete(List<OperatingSystem> o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<OperatingSystem>>() {
+ @Override
+ public void onComplete(java.util.List<OperatingSystem> o) {
getOperatingSystems_result result = new getOperatingSystems_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getOperatingSystems_result result = new getOperatingSystems_result();
if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getOperatingSystems_args args, org.apache.thrift.async.AsyncMethodCallback<List<OperatingSystem>> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getOperatingSystems_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<OperatingSystem>> resultHandler) throws org.apache.thrift.TException {
iface.getOperatingSystems(resultHandler);
}
}
- public static class getVirtualizers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getVirtualizers_args, List<Virtualizer>> {
+ public static class getVirtualizers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getVirtualizers_args, java.util.List<Virtualizer>> {
public getVirtualizers() {
super("getVirtualizers");
}
+ @Override
public getVirtualizers_args getEmptyArgsInstance() {
return new getVirtualizers_args();
}
- public AsyncMethodCallback<List<Virtualizer>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.util.List<Virtualizer>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<Virtualizer>>() {
- public void onComplete(List<Virtualizer> o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<Virtualizer>>() {
+ @Override
+ public void onComplete(java.util.List<Virtualizer> o) {
getVirtualizers_result result = new getVirtualizers_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getVirtualizers_result result = new getVirtualizers_result();
if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getVirtualizers_args args, org.apache.thrift.async.AsyncMethodCallback<List<Virtualizer>> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getVirtualizers_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<Virtualizer>> resultHandler) throws org.apache.thrift.TException {
iface.getVirtualizers(resultHandler);
}
}
- public static class getTags<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getTags_args, List<MasterTag>> {
+ public static class getTags<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getTags_args, java.util.List<MasterTag>> {
public getTags() {
super("getTags");
}
+ @Override
public getTags_args getEmptyArgsInstance() {
return new getTags_args();
}
- public AsyncMethodCallback<List<MasterTag>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.util.List<MasterTag>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<MasterTag>>() {
- public void onComplete(List<MasterTag> o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<MasterTag>>() {
+ @Override
+ public void onComplete(java.util.List<MasterTag> o) {
getTags_result result = new getTags_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getTags_result result = new getTags_result();
if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getTags_args args, org.apache.thrift.async.AsyncMethodCallback<List<MasterTag>> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getTags_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<MasterTag>> resultHandler) throws org.apache.thrift.TException {
iface.getTags(args.startDate,resultHandler);
}
}
- public static class getSoftware<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getSoftware_args, List<MasterSoftware>> {
+ public static class getSoftware<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getSoftware_args, java.util.List<MasterSoftware>> {
public getSoftware() {
super("getSoftware");
}
+ @Override
public getSoftware_args getEmptyArgsInstance() {
return new getSoftware_args();
}
- public AsyncMethodCallback<List<MasterSoftware>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.util.List<MasterSoftware>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<MasterSoftware>>() {
- public void onComplete(List<MasterSoftware> o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<MasterSoftware>>() {
+ @Override
+ public void onComplete(java.util.List<MasterSoftware> o) {
getSoftware_result result = new getSoftware_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getSoftware_result result = new getSoftware_result();
if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getSoftware_args args, org.apache.thrift.async.AsyncMethodCallback<List<MasterSoftware>> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getSoftware_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<MasterSoftware>> resultHandler) throws org.apache.thrift.TException {
iface.getSoftware(args.startDate,resultHandler);
}
}
@@ -3738,79 +4495,91 @@ public class MasterServer {
super("queryUploadStatus");
}
+ @Override
public queryUploadStatus_args getEmptyArgsInstance() {
return new queryUploadStatus_args();
}
- public AsyncMethodCallback<TransferStatus> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<TransferStatus> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<TransferStatus>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<TransferStatus>() {
+ @Override
public void onComplete(TransferStatus o) {
queryUploadStatus_result result = new queryUploadStatus_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
queryUploadStatus_result result = new queryUploadStatus_result();
if (e instanceof TInvalidTokenException) {
- result.ex1 = (TInvalidTokenException) e;
- result.setEx1IsSet(true);
- msg = result;
- }
- else
- {
+ result.ex1 = (TInvalidTokenException) e;
+ result.setEx1IsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, queryUploadStatus_args args, org.apache.thrift.async.AsyncMethodCallback<TransferStatus> resultHandler) throws TException {
+ @Override
+ public void start(I iface, queryUploadStatus_args args, org.apache.thrift.async.AsyncMethodCallback<TransferStatus> resultHandler) throws org.apache.thrift.TException {
iface.queryUploadStatus(args.uploadToken,resultHandler);
}
}
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class ping_args implements org.apache.thrift.TBase<ping_args, ping_args._Fields>, java.io.Serializable, Cloneable, Comparable<ping_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping_args");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ping_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ping_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ping_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ping_argsTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -3818,6 +4587,7 @@ public class MasterServer {
/**
* 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) {
default:
@@ -3831,37 +4601,40 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_args.class, metaDataMap);
}
@@ -3874,6 +4647,7 @@ public class MasterServer {
public ping_args(ping_args other) {
}
+ @Override
public ping_args deepCopy() {
return new ping_args(this);
}
@@ -3882,32 +4656,34 @@ public class MasterServer {
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof ping_args)
return this.equals((ping_args)that);
return false;
@@ -3916,15 +4692,17 @@ public class MasterServer {
public boolean equals(ping_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -3938,21 +4716,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ping_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ping_args(");
boolean first = true;
sb.append(")");
@@ -3972,7 +4754,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -3980,14 +4762,16 @@ public class MasterServer {
}
}
- private static class ping_argsStandardSchemeFactory implements SchemeFactory {
+ private static class ping_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public ping_argsStandardScheme getScheme() {
return new ping_argsStandardScheme();
}
}
- private static class ping_argsStandardScheme extends StandardScheme<ping_args> {
+ private static class ping_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<ping_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, ping_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -4009,6 +4793,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, ping_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -4019,37 +4804,39 @@ public class MasterServer {
}
- private static class ping_argsTupleSchemeFactory implements SchemeFactory {
+ private static class ping_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public ping_argsTupleScheme getScheme() {
return new ping_argsTupleScheme();
}
}
- private static class ping_argsTupleScheme extends TupleScheme<ping_args> {
+ private static class ping_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<ping_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ping_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class ping_result implements org.apache.thrift.TBase<ping_result, ping_result._Fields>, java.io.Serializable, Cloneable, Comparable<ping_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ping_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ping_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ping_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ping_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ping_resultTupleSchemeFactory();
public boolean success; // required
@@ -4057,10 +4844,10 @@ public class MasterServer {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -4068,6 +4855,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -4083,30 +4871,33 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -4114,12 +4905,12 @@ public class MasterServer {
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ping_result.class, metaDataMap);
}
@@ -4142,6 +4933,7 @@ public class MasterServer {
this.success = other.success;
}
+ @Override
public ping_result deepCopy() {
return new ping_result(this);
}
@@ -4163,57 +4955,59 @@ public class MasterServer {
}
public void unsetSuccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
- return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((Boolean)value);
+ setSuccess((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof ping_result)
return this.equals((ping_result)that);
return false;
@@ -4222,6 +5016,8 @@ public class MasterServer {
public boolean equals(ping_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true;
boolean that_present_success = true;
@@ -4237,14 +5033,11 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true;
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -4255,7 +5048,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -4268,21 +5061,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ping_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ping_result(");
boolean first = true;
sb.append("success:");
@@ -4305,7 +5101,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -4315,14 +5111,16 @@ public class MasterServer {
}
}
- private static class ping_resultStandardSchemeFactory implements SchemeFactory {
+ private static class ping_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public ping_resultStandardScheme getScheme() {
return new ping_resultStandardScheme();
}
}
- private static class ping_resultStandardScheme extends StandardScheme<ping_result> {
+ private static class ping_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<ping_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, ping_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -4352,6 +5150,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, ping_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -4367,18 +5166,19 @@ public class MasterServer {
}
- private static class ping_resultTupleSchemeFactory implements SchemeFactory {
+ private static class ping_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public ping_resultTupleScheme getScheme() {
return new ping_resultTupleScheme();
}
}
- private static class ping_resultTupleScheme extends TupleScheme<ping_result> {
+ private static class ping_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<ping_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ping_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -4390,8 +5190,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ping_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
@@ -4399,32 +5199,33 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class authenticate_args implements org.apache.thrift.TBase<authenticate_args, authenticate_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticate_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("authenticate_args");
private static final org.apache.thrift.protocol.TField LOGIN_FIELD_DESC = new org.apache.thrift.protocol.TField("login", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new authenticate_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new authenticate_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new authenticate_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new authenticate_argsTupleSchemeFactory();
- public String login; // required
- public String password; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String login; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String password; // 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 {
LOGIN((short)1, "login"),
PASSWORD((short)2, "password");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -4432,6 +5233,7 @@ public class MasterServer {
/**
* 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: // LOGIN
@@ -4449,43 +5251,46 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.LOGIN, new org.apache.thrift.meta_data.FieldMetaData("login", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(authenticate_args.class, metaDataMap);
}
@@ -4493,8 +5298,8 @@ public class MasterServer {
}
public authenticate_args(
- String login,
- String password)
+ java.lang.String login,
+ java.lang.String password)
{
this();
this.login = login;
@@ -4513,6 +5318,7 @@ public class MasterServer {
}
}
+ @Override
public authenticate_args deepCopy() {
return new authenticate_args(this);
}
@@ -4523,11 +5329,12 @@ public class MasterServer {
this.password = null;
}
- public String getLogin() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getLogin() {
return this.login;
}
- public authenticate_args setLogin(String login) {
+ public authenticate_args setLogin(@org.apache.thrift.annotation.Nullable java.lang.String login) {
this.login = login;
return this;
}
@@ -4547,11 +5354,12 @@ public class MasterServer {
}
}
- public String getPassword() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getPassword() {
return this.password;
}
- public authenticate_args setPassword(String password) {
+ public authenticate_args setPassword(@org.apache.thrift.annotation.Nullable java.lang.String password) {
this.password = password;
return this;
}
@@ -4571,13 +5379,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case LOGIN:
if (value == null) {
unsetLogin();
} else {
- setLogin((String)value);
+ setLogin((java.lang.String)value);
}
break;
@@ -4585,14 +5394,16 @@ public class MasterServer {
if (value == null) {
unsetPassword();
} else {
- setPassword((String)value);
+ setPassword((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case LOGIN:
return getLogin();
@@ -4601,13 +5412,14 @@ public class MasterServer {
return getPassword();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -4616,13 +5428,11 @@ public class MasterServer {
case PASSWORD:
return isSetPassword();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof authenticate_args)
return this.equals((authenticate_args)that);
return false;
@@ -4631,6 +5441,8 @@ public class MasterServer {
public boolean equals(authenticate_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_login = true && this.isSetLogin();
boolean that_present_login = true && that.isSetLogin();
@@ -4655,19 +5467,17 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_login = true && (isSetLogin());
- list.add(present_login);
- if (present_login)
- list.add(login);
+ hashCode = hashCode * 8191 + ((isSetLogin()) ? 131071 : 524287);
+ if (isSetLogin())
+ hashCode = hashCode * 8191 + login.hashCode();
- boolean present_password = true && (isSetPassword());
- list.add(present_password);
- if (present_password)
- list.add(password);
+ hashCode = hashCode * 8191 + ((isSetPassword()) ? 131071 : 524287);
+ if (isSetPassword())
+ hashCode = hashCode * 8191 + password.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -4678,7 +5488,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetLogin()).compareTo(other.isSetLogin());
+ lastComparison = java.lang.Boolean.compare(isSetLogin(), other.isSetLogin());
if (lastComparison != 0) {
return lastComparison;
}
@@ -4688,7 +5498,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword());
+ lastComparison = java.lang.Boolean.compare(isSetPassword(), other.isSetPassword());
if (lastComparison != 0) {
return lastComparison;
}
@@ -4701,21 +5511,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("authenticate_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("authenticate_args(");
boolean first = true;
sb.append("login:");
@@ -4750,7 +5564,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -4758,14 +5572,16 @@ public class MasterServer {
}
}
- private static class authenticate_argsStandardSchemeFactory implements SchemeFactory {
+ private static class authenticate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public authenticate_argsStandardScheme getScheme() {
return new authenticate_argsStandardScheme();
}
}
- private static class authenticate_argsStandardScheme extends StandardScheme<authenticate_args> {
+ private static class authenticate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<authenticate_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, authenticate_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -4803,6 +5619,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, authenticate_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -4823,18 +5640,19 @@ public class MasterServer {
}
- private static class authenticate_argsTupleSchemeFactory implements SchemeFactory {
+ private static class authenticate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public authenticate_argsTupleScheme getScheme() {
return new authenticate_argsTupleScheme();
}
}
- private static class authenticate_argsTupleScheme extends TupleScheme<authenticate_args> {
+ private static class authenticate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<authenticate_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, authenticate_args 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.isSetLogin()) {
optionals.set(0);
}
@@ -4852,8 +5670,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, authenticate_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.login = iprot.readString();
struct.setLoginIsSet(true);
@@ -4865,8 +5683,12 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class authenticate_result implements org.apache.thrift.TBase<authenticate_result, authenticate_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticate_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("authenticate_result");
@@ -4874,15 +5696,12 @@ public class MasterServer {
private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new authenticate_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new authenticate_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new authenticate_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new authenticate_resultTupleSchemeFactory();
- public SessionData success; // required
- public TAuthorizationException failure; // required
- public TInvocationException error; // required
+ public @org.apache.thrift.annotation.Nullable SessionData success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException error; // 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 {
@@ -4890,10 +5709,10 @@ public class MasterServer {
FAILURE((short)1, "failure"),
ERROR((short)2, "error");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -4901,6 +5720,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -4920,45 +5740,48 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SessionData.class)));
tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(authenticate_result.class, metaDataMap);
}
@@ -4991,6 +5814,7 @@ public class MasterServer {
}
}
+ @Override
public authenticate_result deepCopy() {
return new authenticate_result(this);
}
@@ -5002,11 +5826,12 @@ public class MasterServer {
this.error = null;
}
+ @org.apache.thrift.annotation.Nullable
public SessionData getSuccess() {
return this.success;
}
- public authenticate_result setSuccess(SessionData success) {
+ public authenticate_result setSuccess(@org.apache.thrift.annotation.Nullable SessionData success) {
this.success = success;
return this;
}
@@ -5026,11 +5851,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getFailure() {
return this.failure;
}
- public authenticate_result setFailure(TAuthorizationException failure) {
+ public authenticate_result setFailure(@org.apache.thrift.annotation.Nullable TAuthorizationException failure) {
this.failure = failure;
return this;
}
@@ -5050,11 +5876,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getError() {
return this.error;
}
- public authenticate_result setError(TInvocationException error) {
+ public authenticate_result setError(@org.apache.thrift.annotation.Nullable TInvocationException error) {
this.error = error;
return this;
}
@@ -5074,7 +5901,8 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -5103,7 +5931,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -5115,13 +5945,14 @@ public class MasterServer {
return getError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -5132,13 +5963,11 @@ public class MasterServer {
case ERROR:
return isSetError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof authenticate_result)
return this.equals((authenticate_result)that);
return false;
@@ -5147,6 +5976,8 @@ public class MasterServer {
public boolean equals(authenticate_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -5180,24 +6011,21 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_failure = true && (isSetFailure());
- list.add(present_failure);
- if (present_failure)
- list.add(failure);
+ hashCode = hashCode * 8191 + ((isSetFailure()) ? 131071 : 524287);
+ if (isSetFailure())
+ hashCode = hashCode * 8191 + failure.hashCode();
- boolean present_error = true && (isSetError());
- list.add(present_error);
- if (present_error)
- list.add(error);
+ hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287);
+ if (isSetError())
+ hashCode = hashCode * 8191 + error.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -5208,7 +6036,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -5218,7 +6046,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
+ lastComparison = java.lang.Boolean.compare(isSetFailure(), other.isSetFailure());
if (lastComparison != 0) {
return lastComparison;
}
@@ -5228,7 +6056,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetError()).compareTo(other.isSetError());
+ lastComparison = java.lang.Boolean.compare(isSetError(), other.isSetError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -5241,21 +6069,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("authenticate_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("authenticate_result(");
boolean first = true;
sb.append("success:");
@@ -5301,7 +6132,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -5309,14 +6140,16 @@ public class MasterServer {
}
}
- private static class authenticate_resultStandardSchemeFactory implements SchemeFactory {
+ private static class authenticate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public authenticate_resultStandardScheme getScheme() {
return new authenticate_resultStandardScheme();
}
}
- private static class authenticate_resultStandardScheme extends StandardScheme<authenticate_result> {
+ private static class authenticate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<authenticate_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, authenticate_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -5365,6 +6198,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, authenticate_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -5390,18 +6224,19 @@ public class MasterServer {
}
- private static class authenticate_resultTupleSchemeFactory implements SchemeFactory {
+ private static class authenticate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public authenticate_resultTupleScheme getScheme() {
return new authenticate_resultTupleScheme();
}
}
- private static class authenticate_resultTupleScheme extends TupleScheme<authenticate_result> {
+ private static class authenticate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<authenticate_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, authenticate_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -5425,8 +6260,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, authenticate_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = new SessionData();
struct.success.read(iprot);
@@ -5445,32 +6280,33 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class localAccountLogin_args implements org.apache.thrift.TBase<localAccountLogin_args, localAccountLogin_args._Fields>, java.io.Serializable, Cloneable, Comparable<localAccountLogin_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("localAccountLogin_args");
private static final org.apache.thrift.protocol.TField LOGIN_FIELD_DESC = new org.apache.thrift.protocol.TField("login", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new localAccountLogin_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new localAccountLogin_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new localAccountLogin_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new localAccountLogin_argsTupleSchemeFactory();
- public String login; // required
- public String password; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String login; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String password; // 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 {
LOGIN((short)1, "login"),
PASSWORD((short)2, "password");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -5478,6 +6314,7 @@ public class MasterServer {
/**
* 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: // LOGIN
@@ -5495,43 +6332,46 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.LOGIN, new org.apache.thrift.meta_data.FieldMetaData("login", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PASSWORD, new org.apache.thrift.meta_data.FieldMetaData("password", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(localAccountLogin_args.class, metaDataMap);
}
@@ -5539,8 +6379,8 @@ public class MasterServer {
}
public localAccountLogin_args(
- String login,
- String password)
+ java.lang.String login,
+ java.lang.String password)
{
this();
this.login = login;
@@ -5559,6 +6399,7 @@ public class MasterServer {
}
}
+ @Override
public localAccountLogin_args deepCopy() {
return new localAccountLogin_args(this);
}
@@ -5569,11 +6410,12 @@ public class MasterServer {
this.password = null;
}
- public String getLogin() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getLogin() {
return this.login;
}
- public localAccountLogin_args setLogin(String login) {
+ public localAccountLogin_args setLogin(@org.apache.thrift.annotation.Nullable java.lang.String login) {
this.login = login;
return this;
}
@@ -5593,11 +6435,12 @@ public class MasterServer {
}
}
- public String getPassword() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getPassword() {
return this.password;
}
- public localAccountLogin_args setPassword(String password) {
+ public localAccountLogin_args setPassword(@org.apache.thrift.annotation.Nullable java.lang.String password) {
this.password = password;
return this;
}
@@ -5617,13 +6460,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case LOGIN:
if (value == null) {
unsetLogin();
} else {
- setLogin((String)value);
+ setLogin((java.lang.String)value);
}
break;
@@ -5631,14 +6475,16 @@ public class MasterServer {
if (value == null) {
unsetPassword();
} else {
- setPassword((String)value);
+ setPassword((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case LOGIN:
return getLogin();
@@ -5647,13 +6493,14 @@ public class MasterServer {
return getPassword();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -5662,13 +6509,11 @@ public class MasterServer {
case PASSWORD:
return isSetPassword();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof localAccountLogin_args)
return this.equals((localAccountLogin_args)that);
return false;
@@ -5677,6 +6522,8 @@ public class MasterServer {
public boolean equals(localAccountLogin_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_login = true && this.isSetLogin();
boolean that_present_login = true && that.isSetLogin();
@@ -5701,19 +6548,17 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_login = true && (isSetLogin());
- list.add(present_login);
- if (present_login)
- list.add(login);
+ hashCode = hashCode * 8191 + ((isSetLogin()) ? 131071 : 524287);
+ if (isSetLogin())
+ hashCode = hashCode * 8191 + login.hashCode();
- boolean present_password = true && (isSetPassword());
- list.add(present_password);
- if (present_password)
- list.add(password);
+ hashCode = hashCode * 8191 + ((isSetPassword()) ? 131071 : 524287);
+ if (isSetPassword())
+ hashCode = hashCode * 8191 + password.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -5724,7 +6569,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetLogin()).compareTo(other.isSetLogin());
+ lastComparison = java.lang.Boolean.compare(isSetLogin(), other.isSetLogin());
if (lastComparison != 0) {
return lastComparison;
}
@@ -5734,7 +6579,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword());
+ lastComparison = java.lang.Boolean.compare(isSetPassword(), other.isSetPassword());
if (lastComparison != 0) {
return lastComparison;
}
@@ -5747,21 +6592,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("localAccountLogin_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("localAccountLogin_args(");
boolean first = true;
sb.append("login:");
@@ -5796,7 +6645,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -5804,14 +6653,16 @@ public class MasterServer {
}
}
- private static class localAccountLogin_argsStandardSchemeFactory implements SchemeFactory {
+ private static class localAccountLogin_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public localAccountLogin_argsStandardScheme getScheme() {
return new localAccountLogin_argsStandardScheme();
}
}
- private static class localAccountLogin_argsStandardScheme extends StandardScheme<localAccountLogin_args> {
+ private static class localAccountLogin_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<localAccountLogin_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, localAccountLogin_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -5849,6 +6700,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, localAccountLogin_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -5869,18 +6721,19 @@ public class MasterServer {
}
- private static class localAccountLogin_argsTupleSchemeFactory implements SchemeFactory {
+ private static class localAccountLogin_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public localAccountLogin_argsTupleScheme getScheme() {
return new localAccountLogin_argsTupleScheme();
}
}
- private static class localAccountLogin_argsTupleScheme extends TupleScheme<localAccountLogin_args> {
+ private static class localAccountLogin_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<localAccountLogin_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, localAccountLogin_args 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.isSetLogin()) {
optionals.set(0);
}
@@ -5898,8 +6751,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, localAccountLogin_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.login = iprot.readString();
struct.setLoginIsSet(true);
@@ -5911,8 +6764,12 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class localAccountLogin_result implements org.apache.thrift.TBase<localAccountLogin_result, localAccountLogin_result._Fields>, java.io.Serializable, Cloneable, Comparable<localAccountLogin_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("localAccountLogin_result");
@@ -5920,15 +6777,12 @@ public class MasterServer {
private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new localAccountLogin_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new localAccountLogin_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new localAccountLogin_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new localAccountLogin_resultTupleSchemeFactory();
- public ClientSessionData success; // required
- public TAuthorizationException failure; // required
- public TInvocationException error; // required
+ public @org.apache.thrift.annotation.Nullable ClientSessionData success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException error; // 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 {
@@ -5936,10 +6790,10 @@ public class MasterServer {
FAILURE((short)1, "failure"),
ERROR((short)2, "error");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -5947,6 +6801,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -5966,45 +6821,48 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ClientSessionData.class)));
tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(localAccountLogin_result.class, metaDataMap);
}
@@ -6037,6 +6895,7 @@ public class MasterServer {
}
}
+ @Override
public localAccountLogin_result deepCopy() {
return new localAccountLogin_result(this);
}
@@ -6048,11 +6907,12 @@ public class MasterServer {
this.error = null;
}
+ @org.apache.thrift.annotation.Nullable
public ClientSessionData getSuccess() {
return this.success;
}
- public localAccountLogin_result setSuccess(ClientSessionData success) {
+ public localAccountLogin_result setSuccess(@org.apache.thrift.annotation.Nullable ClientSessionData success) {
this.success = success;
return this;
}
@@ -6072,11 +6932,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getFailure() {
return this.failure;
}
- public localAccountLogin_result setFailure(TAuthorizationException failure) {
+ public localAccountLogin_result setFailure(@org.apache.thrift.annotation.Nullable TAuthorizationException failure) {
this.failure = failure;
return this;
}
@@ -6096,11 +6957,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getError() {
return this.error;
}
- public localAccountLogin_result setError(TInvocationException error) {
+ public localAccountLogin_result setError(@org.apache.thrift.annotation.Nullable TInvocationException error) {
this.error = error;
return this;
}
@@ -6120,7 +6982,8 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -6149,7 +7012,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -6161,13 +7026,14 @@ public class MasterServer {
return getError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -6178,13 +7044,11 @@ public class MasterServer {
case ERROR:
return isSetError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof localAccountLogin_result)
return this.equals((localAccountLogin_result)that);
return false;
@@ -6193,6 +7057,8 @@ public class MasterServer {
public boolean equals(localAccountLogin_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -6226,24 +7092,21 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_failure = true && (isSetFailure());
- list.add(present_failure);
- if (present_failure)
- list.add(failure);
+ hashCode = hashCode * 8191 + ((isSetFailure()) ? 131071 : 524287);
+ if (isSetFailure())
+ hashCode = hashCode * 8191 + failure.hashCode();
- boolean present_error = true && (isSetError());
- list.add(present_error);
- if (present_error)
- list.add(error);
+ hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287);
+ if (isSetError())
+ hashCode = hashCode * 8191 + error.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -6254,7 +7117,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -6264,7 +7127,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
+ lastComparison = java.lang.Boolean.compare(isSetFailure(), other.isSetFailure());
if (lastComparison != 0) {
return lastComparison;
}
@@ -6274,7 +7137,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetError()).compareTo(other.isSetError());
+ lastComparison = java.lang.Boolean.compare(isSetError(), other.isSetError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -6287,21 +7150,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("localAccountLogin_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("localAccountLogin_result(");
boolean first = true;
sb.append("success:");
@@ -6347,7 +7213,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -6355,14 +7221,16 @@ public class MasterServer {
}
}
- private static class localAccountLogin_resultStandardSchemeFactory implements SchemeFactory {
+ private static class localAccountLogin_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public localAccountLogin_resultStandardScheme getScheme() {
return new localAccountLogin_resultStandardScheme();
}
}
- private static class localAccountLogin_resultStandardScheme extends StandardScheme<localAccountLogin_result> {
+ private static class localAccountLogin_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<localAccountLogin_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, localAccountLogin_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -6411,6 +7279,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, localAccountLogin_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -6436,18 +7305,19 @@ public class MasterServer {
}
- private static class localAccountLogin_resultTupleSchemeFactory implements SchemeFactory {
+ private static class localAccountLogin_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public localAccountLogin_resultTupleScheme getScheme() {
return new localAccountLogin_resultTupleScheme();
}
}
- private static class localAccountLogin_resultTupleScheme extends TupleScheme<localAccountLogin_result> {
+ private static class localAccountLogin_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<localAccountLogin_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, localAccountLogin_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -6471,8 +7341,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, localAccountLogin_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = new ClientSessionData();
struct.success.read(iprot);
@@ -6491,32 +7361,33 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class setUsedSatellite_args implements org.apache.thrift.TBase<setUsedSatellite_args, setUsedSatellite_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUsedSatellite_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUsedSatellite_args");
private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField SATELLITE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("satelliteName", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setUsedSatellite_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setUsedSatellite_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setUsedSatellite_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setUsedSatellite_argsTupleSchemeFactory();
- public String sessionId; // required
- public String satelliteName; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String sessionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String satelliteName; // 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 {
SESSION_ID((short)1, "sessionId"),
SATELLITE_NAME((short)2, "satelliteName");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -6524,6 +7395,7 @@ public class MasterServer {
/**
* 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: // SESSION_ID
@@ -6541,43 +7413,46 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.SATELLITE_NAME, new org.apache.thrift.meta_data.FieldMetaData("satelliteName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUsedSatellite_args.class, metaDataMap);
}
@@ -6585,8 +7460,8 @@ public class MasterServer {
}
public setUsedSatellite_args(
- String sessionId,
- String satelliteName)
+ java.lang.String sessionId,
+ java.lang.String satelliteName)
{
this();
this.sessionId = sessionId;
@@ -6605,6 +7480,7 @@ public class MasterServer {
}
}
+ @Override
public setUsedSatellite_args deepCopy() {
return new setUsedSatellite_args(this);
}
@@ -6615,11 +7491,12 @@ public class MasterServer {
this.satelliteName = null;
}
- public String getSessionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getSessionId() {
return this.sessionId;
}
- public setUsedSatellite_args setSessionId(String sessionId) {
+ public setUsedSatellite_args setSessionId(@org.apache.thrift.annotation.Nullable java.lang.String sessionId) {
this.sessionId = sessionId;
return this;
}
@@ -6639,11 +7516,12 @@ public class MasterServer {
}
}
- public String getSatelliteName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getSatelliteName() {
return this.satelliteName;
}
- public setUsedSatellite_args setSatelliteName(String satelliteName) {
+ public setUsedSatellite_args setSatelliteName(@org.apache.thrift.annotation.Nullable java.lang.String satelliteName) {
this.satelliteName = satelliteName;
return this;
}
@@ -6663,13 +7541,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SESSION_ID:
if (value == null) {
unsetSessionId();
} else {
- setSessionId((String)value);
+ setSessionId((java.lang.String)value);
}
break;
@@ -6677,14 +7556,16 @@ public class MasterServer {
if (value == null) {
unsetSatelliteName();
} else {
- setSatelliteName((String)value);
+ setSatelliteName((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_ID:
return getSessionId();
@@ -6693,13 +7574,14 @@ public class MasterServer {
return getSatelliteName();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -6708,13 +7590,11 @@ public class MasterServer {
case SATELLITE_NAME:
return isSetSatelliteName();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof setUsedSatellite_args)
return this.equals((setUsedSatellite_args)that);
return false;
@@ -6723,6 +7603,8 @@ public class MasterServer {
public boolean equals(setUsedSatellite_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_sessionId = true && this.isSetSessionId();
boolean that_present_sessionId = true && that.isSetSessionId();
@@ -6747,19 +7629,17 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_sessionId = true && (isSetSessionId());
- list.add(present_sessionId);
- if (present_sessionId)
- list.add(sessionId);
+ hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287);
+ if (isSetSessionId())
+ hashCode = hashCode * 8191 + sessionId.hashCode();
- boolean present_satelliteName = true && (isSetSatelliteName());
- list.add(present_satelliteName);
- if (present_satelliteName)
- list.add(satelliteName);
+ hashCode = hashCode * 8191 + ((isSetSatelliteName()) ? 131071 : 524287);
+ if (isSetSatelliteName())
+ hashCode = hashCode * 8191 + satelliteName.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -6770,7 +7650,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
+ lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -6780,7 +7660,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSatelliteName()).compareTo(other.isSetSatelliteName());
+ lastComparison = java.lang.Boolean.compare(isSetSatelliteName(), other.isSetSatelliteName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -6793,21 +7673,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("setUsedSatellite_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("setUsedSatellite_args(");
boolean first = true;
sb.append("sessionId:");
@@ -6842,7 +7726,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -6850,14 +7734,16 @@ public class MasterServer {
}
}
- private static class setUsedSatellite_argsStandardSchemeFactory implements SchemeFactory {
+ private static class setUsedSatellite_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setUsedSatellite_argsStandardScheme getScheme() {
return new setUsedSatellite_argsStandardScheme();
}
}
- private static class setUsedSatellite_argsStandardScheme extends StandardScheme<setUsedSatellite_args> {
+ private static class setUsedSatellite_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<setUsedSatellite_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, setUsedSatellite_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -6895,6 +7781,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, setUsedSatellite_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -6915,18 +7802,19 @@ public class MasterServer {
}
- private static class setUsedSatellite_argsTupleSchemeFactory implements SchemeFactory {
+ private static class setUsedSatellite_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setUsedSatellite_argsTupleScheme getScheme() {
return new setUsedSatellite_argsTupleScheme();
}
}
- private static class setUsedSatellite_argsTupleScheme extends TupleScheme<setUsedSatellite_args> {
+ private static class setUsedSatellite_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<setUsedSatellite_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, setUsedSatellite_args 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.isSetSessionId()) {
optionals.set(0);
}
@@ -6944,8 +7832,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, setUsedSatellite_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.sessionId = iprot.readString();
struct.setSessionIdIsSet(true);
@@ -6957,27 +7845,28 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class setUsedSatellite_result implements org.apache.thrift.TBase<setUsedSatellite_result, setUsedSatellite_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUsedSatellite_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUsedSatellite_result");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setUsedSatellite_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setUsedSatellite_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setUsedSatellite_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setUsedSatellite_resultTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -6985,6 +7874,7 @@ public class MasterServer {
/**
* 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) {
default:
@@ -6998,37 +7888,40 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUsedSatellite_result.class, metaDataMap);
}
@@ -7041,6 +7934,7 @@ public class MasterServer {
public setUsedSatellite_result(setUsedSatellite_result other) {
}
+ @Override
public setUsedSatellite_result deepCopy() {
return new setUsedSatellite_result(this);
}
@@ -7049,32 +7943,34 @@ public class MasterServer {
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof setUsedSatellite_result)
return this.equals((setUsedSatellite_result)that);
return false;
@@ -7083,15 +7979,17 @@ public class MasterServer {
public boolean equals(setUsedSatellite_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -7105,21 +8003,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("setUsedSatellite_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("setUsedSatellite_result(");
boolean first = true;
sb.append(")");
@@ -7139,7 +8040,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -7147,14 +8048,16 @@ public class MasterServer {
}
}
- private static class setUsedSatellite_resultStandardSchemeFactory implements SchemeFactory {
+ private static class setUsedSatellite_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setUsedSatellite_resultStandardScheme getScheme() {
return new setUsedSatellite_resultStandardScheme();
}
}
- private static class setUsedSatellite_resultStandardScheme extends StandardScheme<setUsedSatellite_result> {
+ private static class setUsedSatellite_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<setUsedSatellite_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, setUsedSatellite_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -7176,6 +8079,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, setUsedSatellite_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -7186,27 +8090,32 @@ public class MasterServer {
}
- private static class setUsedSatellite_resultTupleSchemeFactory implements SchemeFactory {
+ private static class setUsedSatellite_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setUsedSatellite_resultTupleScheme getScheme() {
return new setUsedSatellite_resultTupleScheme();
}
}
- private static class setUsedSatellite_resultTupleScheme extends TupleScheme<setUsedSatellite_result> {
+ private static class setUsedSatellite_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<setUsedSatellite_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, setUsedSatellite_result struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, setUsedSatellite_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class findUser_args implements org.apache.thrift.TBase<findUser_args, findUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<findUser_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("findUser_args");
@@ -7214,15 +8123,12 @@ public class MasterServer {
private static final org.apache.thrift.protocol.TField ORGANIZATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("organizationId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField SEARCH_TERM_FIELD_DESC = new org.apache.thrift.protocol.TField("searchTerm", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new findUser_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new findUser_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new findUser_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new findUser_argsTupleSchemeFactory();
- public String sessionId; // required
- public String organizationId; // required
- public String searchTerm; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String sessionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String organizationId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String searchTerm; // 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 {
@@ -7230,10 +8136,10 @@ public class MasterServer {
ORGANIZATION_ID((short)2, "organizationId"),
SEARCH_TERM((short)3, "searchTerm");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -7241,6 +8147,7 @@ public class MasterServer {
/**
* 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: // SESSION_ID
@@ -7260,45 +8167,48 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.ORGANIZATION_ID, new org.apache.thrift.meta_data.FieldMetaData("organizationId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.SEARCH_TERM, new org.apache.thrift.meta_data.FieldMetaData("searchTerm", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(findUser_args.class, metaDataMap);
}
@@ -7306,9 +8216,9 @@ public class MasterServer {
}
public findUser_args(
- String sessionId,
- String organizationId,
- String searchTerm)
+ java.lang.String sessionId,
+ java.lang.String organizationId,
+ java.lang.String searchTerm)
{
this();
this.sessionId = sessionId;
@@ -7331,6 +8241,7 @@ public class MasterServer {
}
}
+ @Override
public findUser_args deepCopy() {
return new findUser_args(this);
}
@@ -7342,11 +8253,12 @@ public class MasterServer {
this.searchTerm = null;
}
- public String getSessionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getSessionId() {
return this.sessionId;
}
- public findUser_args setSessionId(String sessionId) {
+ public findUser_args setSessionId(@org.apache.thrift.annotation.Nullable java.lang.String sessionId) {
this.sessionId = sessionId;
return this;
}
@@ -7366,11 +8278,12 @@ public class MasterServer {
}
}
- public String getOrganizationId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getOrganizationId() {
return this.organizationId;
}
- public findUser_args setOrganizationId(String organizationId) {
+ public findUser_args setOrganizationId(@org.apache.thrift.annotation.Nullable java.lang.String organizationId) {
this.organizationId = organizationId;
return this;
}
@@ -7390,11 +8303,12 @@ public class MasterServer {
}
}
- public String getSearchTerm() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getSearchTerm() {
return this.searchTerm;
}
- public findUser_args setSearchTerm(String searchTerm) {
+ public findUser_args setSearchTerm(@org.apache.thrift.annotation.Nullable java.lang.String searchTerm) {
this.searchTerm = searchTerm;
return this;
}
@@ -7414,13 +8328,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SESSION_ID:
if (value == null) {
unsetSessionId();
} else {
- setSessionId((String)value);
+ setSessionId((java.lang.String)value);
}
break;
@@ -7428,7 +8343,7 @@ public class MasterServer {
if (value == null) {
unsetOrganizationId();
} else {
- setOrganizationId((String)value);
+ setOrganizationId((java.lang.String)value);
}
break;
@@ -7436,14 +8351,16 @@ public class MasterServer {
if (value == null) {
unsetSearchTerm();
} else {
- setSearchTerm((String)value);
+ setSearchTerm((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_ID:
return getSessionId();
@@ -7455,13 +8372,14 @@ public class MasterServer {
return getSearchTerm();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -7472,13 +8390,11 @@ public class MasterServer {
case SEARCH_TERM:
return isSetSearchTerm();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof findUser_args)
return this.equals((findUser_args)that);
return false;
@@ -7487,6 +8403,8 @@ public class MasterServer {
public boolean equals(findUser_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_sessionId = true && this.isSetSessionId();
boolean that_present_sessionId = true && that.isSetSessionId();
@@ -7520,24 +8438,21 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_sessionId = true && (isSetSessionId());
- list.add(present_sessionId);
- if (present_sessionId)
- list.add(sessionId);
+ hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287);
+ if (isSetSessionId())
+ hashCode = hashCode * 8191 + sessionId.hashCode();
- boolean present_organizationId = true && (isSetOrganizationId());
- list.add(present_organizationId);
- if (present_organizationId)
- list.add(organizationId);
+ hashCode = hashCode * 8191 + ((isSetOrganizationId()) ? 131071 : 524287);
+ if (isSetOrganizationId())
+ hashCode = hashCode * 8191 + organizationId.hashCode();
- boolean present_searchTerm = true && (isSetSearchTerm());
- list.add(present_searchTerm);
- if (present_searchTerm)
- list.add(searchTerm);
+ hashCode = hashCode * 8191 + ((isSetSearchTerm()) ? 131071 : 524287);
+ if (isSetSearchTerm())
+ hashCode = hashCode * 8191 + searchTerm.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -7548,7 +8463,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
+ lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -7558,7 +8473,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId());
+ lastComparison = java.lang.Boolean.compare(isSetOrganizationId(), other.isSetOrganizationId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -7568,7 +8483,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSearchTerm()).compareTo(other.isSetSearchTerm());
+ lastComparison = java.lang.Boolean.compare(isSetSearchTerm(), other.isSetSearchTerm());
if (lastComparison != 0) {
return lastComparison;
}
@@ -7581,21 +8496,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("findUser_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("findUser_args(");
boolean first = true;
sb.append("sessionId:");
@@ -7638,7 +8557,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -7646,14 +8565,16 @@ public class MasterServer {
}
}
- private static class findUser_argsStandardSchemeFactory implements SchemeFactory {
+ private static class findUser_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public findUser_argsStandardScheme getScheme() {
return new findUser_argsStandardScheme();
}
}
- private static class findUser_argsStandardScheme extends StandardScheme<findUser_args> {
+ private static class findUser_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<findUser_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, findUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -7699,6 +8620,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, findUser_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -7724,18 +8646,19 @@ public class MasterServer {
}
- private static class findUser_argsTupleSchemeFactory implements SchemeFactory {
+ private static class findUser_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public findUser_argsTupleScheme getScheme() {
return new findUser_argsTupleScheme();
}
}
- private static class findUser_argsTupleScheme extends TupleScheme<findUser_args> {
+ private static class findUser_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<findUser_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, findUser_args 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.isSetSessionId()) {
optionals.set(0);
}
@@ -7759,8 +8682,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, findUser_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.sessionId = iprot.readString();
struct.setSessionIdIsSet(true);
@@ -7776,8 +8699,12 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class findUser_result implements org.apache.thrift.TBase<findUser_result, findUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<findUser_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("findUser_result");
@@ -7785,15 +8712,12 @@ public class MasterServer {
private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new findUser_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new findUser_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new findUser_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new findUser_resultTupleSchemeFactory();
- public List<UserInfo> success; // required
- public TAuthorizationException failure; // required
- public TInvocationException error; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<UserInfo> success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException error; // 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 {
@@ -7801,10 +8725,10 @@ public class MasterServer {
FAILURE((short)1, "failure"),
ERROR((short)2, "error");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -7812,6 +8736,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -7831,46 +8756,49 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", 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, UserInfo.class))));
tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(findUser_result.class, metaDataMap);
}
@@ -7878,7 +8806,7 @@ public class MasterServer {
}
public findUser_result(
- List<UserInfo> success,
+ java.util.List<UserInfo> success,
TAuthorizationException failure,
TInvocationException error)
{
@@ -7893,7 +8821,7 @@ public class MasterServer {
*/
public findUser_result(findUser_result other) {
if (other.isSetSuccess()) {
- List<UserInfo> __this__success = new ArrayList<UserInfo>(other.success.size());
+ java.util.List<UserInfo> __this__success = new java.util.ArrayList<UserInfo>(other.success.size());
for (UserInfo other_element : other.success) {
__this__success.add(new UserInfo(other_element));
}
@@ -7907,6 +8835,7 @@ public class MasterServer {
}
}
+ @Override
public findUser_result deepCopy() {
return new findUser_result(this);
}
@@ -7922,22 +8851,24 @@ public class MasterServer {
return (this.success == null) ? 0 : this.success.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<UserInfo> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(UserInfo elem) {
if (this.success == null) {
- this.success = new ArrayList<UserInfo>();
+ this.success = new java.util.ArrayList<UserInfo>();
}
this.success.add(elem);
}
- public List<UserInfo> getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<UserInfo> getSuccess() {
return this.success;
}
- public findUser_result setSuccess(List<UserInfo> success) {
+ public findUser_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<UserInfo> success) {
this.success = success;
return this;
}
@@ -7957,11 +8888,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getFailure() {
return this.failure;
}
- public findUser_result setFailure(TAuthorizationException failure) {
+ public findUser_result setFailure(@org.apache.thrift.annotation.Nullable TAuthorizationException failure) {
this.failure = failure;
return this;
}
@@ -7981,11 +8913,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getError() {
return this.error;
}
- public findUser_result setError(TInvocationException error) {
+ public findUser_result setError(@org.apache.thrift.annotation.Nullable TInvocationException error) {
this.error = error;
return this;
}
@@ -8005,13 +8938,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((List<UserInfo>)value);
+ setSuccess((java.util.List<UserInfo>)value);
}
break;
@@ -8034,7 +8968,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -8046,13 +8982,14 @@ public class MasterServer {
return getError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -8063,13 +9000,11 @@ public class MasterServer {
case ERROR:
return isSetError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof findUser_result)
return this.equals((findUser_result)that);
return false;
@@ -8078,6 +9013,8 @@ public class MasterServer {
public boolean equals(findUser_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -8111,24 +9048,21 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_failure = true && (isSetFailure());
- list.add(present_failure);
- if (present_failure)
- list.add(failure);
+ hashCode = hashCode * 8191 + ((isSetFailure()) ? 131071 : 524287);
+ if (isSetFailure())
+ hashCode = hashCode * 8191 + failure.hashCode();
- boolean present_error = true && (isSetError());
- list.add(present_error);
- if (present_error)
- list.add(error);
+ hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287);
+ if (isSetError())
+ hashCode = hashCode * 8191 + error.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -8139,7 +9073,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -8149,7 +9083,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
+ lastComparison = java.lang.Boolean.compare(isSetFailure(), other.isSetFailure());
if (lastComparison != 0) {
return lastComparison;
}
@@ -8159,7 +9093,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetError()).compareTo(other.isSetError());
+ lastComparison = java.lang.Boolean.compare(isSetError(), other.isSetError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -8172,21 +9106,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("findUser_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("findUser_result(");
boolean first = true;
sb.append("success:");
@@ -8229,7 +9166,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -8237,14 +9174,16 @@ public class MasterServer {
}
}
- private static class findUser_resultStandardSchemeFactory implements SchemeFactory {
+ private static class findUser_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public findUser_resultStandardScheme getScheme() {
return new findUser_resultStandardScheme();
}
}
- private static class findUser_resultStandardScheme extends StandardScheme<findUser_result> {
+ private static class findUser_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<findUser_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, findUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -8258,14 +9197,14 @@ public class MasterServer {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list306 = iprot.readListBegin();
- struct.success = new ArrayList<UserInfo>(_list306.size);
- UserInfo _elem307;
- for (int _i308 = 0; _i308 < _list306.size; ++_i308)
+ org.apache.thrift.protocol.TList _list418 = iprot.readListBegin();
+ struct.success = new java.util.ArrayList<UserInfo>(_list418.size);
+ @org.apache.thrift.annotation.Nullable UserInfo _elem419;
+ for (int _i420 = 0; _i420 < _list418.size; ++_i420)
{
- _elem307 = new UserInfo();
- _elem307.read(iprot);
- struct.success.add(_elem307);
+ _elem419 = new UserInfo();
+ _elem419.read(iprot);
+ struct.success.add(_elem419);
}
iprot.readListEnd();
}
@@ -8303,6 +9242,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, findUser_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -8311,9 +9251,9 @@ public class MasterServer {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (UserInfo _iter309 : struct.success)
+ for (UserInfo _iter421 : struct.success)
{
- _iter309.write(oprot);
+ _iter421.write(oprot);
}
oprot.writeListEnd();
}
@@ -8335,18 +9275,19 @@ public class MasterServer {
}
- private static class findUser_resultTupleSchemeFactory implements SchemeFactory {
+ private static class findUser_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public findUser_resultTupleScheme getScheme() {
return new findUser_resultTupleScheme();
}
}
- private static class findUser_resultTupleScheme extends TupleScheme<findUser_result> {
+ private static class findUser_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<findUser_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, findUser_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -8360,9 +9301,9 @@ public class MasterServer {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (UserInfo _iter310 : struct.success)
+ for (UserInfo _iter422 : struct.success)
{
- _iter310.write(oprot);
+ _iter422.write(oprot);
}
}
}
@@ -8376,18 +9317,18 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, findUser_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list311 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<UserInfo>(_list311.size);
- UserInfo _elem312;
- for (int _i313 = 0; _i313 < _list311.size; ++_i313)
+ org.apache.thrift.protocol.TList _list423 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.success = new java.util.ArrayList<UserInfo>(_list423.size);
+ @org.apache.thrift.annotation.Nullable UserInfo _elem424;
+ for (int _i425 = 0; _i425 < _list423.size; ++_i425)
{
- _elem312 = new UserInfo();
- _elem312.read(iprot);
- struct.success.add(_elem312);
+ _elem424 = new UserInfo();
+ _elem424.read(iprot);
+ struct.success.add(_elem424);
}
}
struct.setSuccessIsSet(true);
@@ -8405,21 +9346,22 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getPublicImages_args implements org.apache.thrift.TBase<getPublicImages_args, getPublicImages_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPublicImages_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPublicImages_args");
private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField PAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("page", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getPublicImages_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getPublicImages_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getPublicImages_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getPublicImages_argsTupleSchemeFactory();
- public String sessionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String sessionId; // required
public int page; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -8427,10 +9369,10 @@ public class MasterServer {
SESSION_ID((short)1, "sessionId"),
PAGE((short)2, "page");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -8438,6 +9380,7 @@ public class MasterServer {
/**
* 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: // SESSION_ID
@@ -8455,30 +9398,33 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -8486,14 +9432,14 @@ public class MasterServer {
// isset id assignments
private static final int __PAGE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.PAGE, new org.apache.thrift.meta_data.FieldMetaData("page", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPublicImages_args.class, metaDataMap);
}
@@ -8501,7 +9447,7 @@ public class MasterServer {
}
public getPublicImages_args(
- String sessionId,
+ java.lang.String sessionId,
int page)
{
this();
@@ -8521,6 +9467,7 @@ public class MasterServer {
this.page = other.page;
}
+ @Override
public getPublicImages_args deepCopy() {
return new getPublicImages_args(this);
}
@@ -8532,11 +9479,12 @@ public class MasterServer {
this.page = 0;
}
- public String getSessionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getSessionId() {
return this.sessionId;
}
- public getPublicImages_args setSessionId(String sessionId) {
+ public getPublicImages_args setSessionId(@org.apache.thrift.annotation.Nullable java.lang.String sessionId) {
this.sessionId = sessionId;
return this;
}
@@ -8567,25 +9515,26 @@ public class MasterServer {
}
public void unsetPage() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID);
}
/** Returns true if field page is set (has been assigned a value) and false otherwise */
public boolean isSetPage() {
- return EncodingUtils.testBit(__isset_bitfield, __PAGE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PAGE_ISSET_ID);
}
public void setPageIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SESSION_ID:
if (value == null) {
unsetSessionId();
} else {
- setSessionId((String)value);
+ setSessionId((java.lang.String)value);
}
break;
@@ -8593,14 +9542,16 @@ public class MasterServer {
if (value == null) {
unsetPage();
} else {
- setPage((Integer)value);
+ setPage((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_ID:
return getSessionId();
@@ -8609,13 +9560,14 @@ public class MasterServer {
return getPage();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -8624,13 +9576,11 @@ public class MasterServer {
case PAGE:
return isSetPage();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getPublicImages_args)
return this.equals((getPublicImages_args)that);
return false;
@@ -8639,6 +9589,8 @@ public class MasterServer {
public boolean equals(getPublicImages_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_sessionId = true && this.isSetSessionId();
boolean that_present_sessionId = true && that.isSetSessionId();
@@ -8663,19 +9615,15 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_sessionId = true && (isSetSessionId());
- list.add(present_sessionId);
- if (present_sessionId)
- list.add(sessionId);
+ hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287);
+ if (isSetSessionId())
+ hashCode = hashCode * 8191 + sessionId.hashCode();
- boolean present_page = true;
- list.add(present_page);
- if (present_page)
- list.add(page);
+ hashCode = hashCode * 8191 + page;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -8686,7 +9634,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
+ lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -8696,7 +9644,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPage()).compareTo(other.isSetPage());
+ lastComparison = java.lang.Boolean.compare(isSetPage(), other.isSetPage());
if (lastComparison != 0) {
return lastComparison;
}
@@ -8709,21 +9657,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getPublicImages_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getPublicImages_args(");
boolean first = true;
sb.append("sessionId:");
@@ -8754,7 +9706,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -8764,14 +9716,16 @@ public class MasterServer {
}
}
- private static class getPublicImages_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getPublicImages_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getPublicImages_argsStandardScheme getScheme() {
return new getPublicImages_argsStandardScheme();
}
}
- private static class getPublicImages_argsStandardScheme extends StandardScheme<getPublicImages_args> {
+ private static class getPublicImages_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getPublicImages_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getPublicImages_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -8809,6 +9763,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getPublicImages_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -8827,18 +9782,19 @@ public class MasterServer {
}
- private static class getPublicImages_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getPublicImages_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getPublicImages_argsTupleScheme getScheme() {
return new getPublicImages_argsTupleScheme();
}
}
- private static class getPublicImages_argsTupleScheme extends TupleScheme<getPublicImages_args> {
+ private static class getPublicImages_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getPublicImages_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getPublicImages_args 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.isSetSessionId()) {
optionals.set(0);
}
@@ -8856,8 +9812,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getPublicImages_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.sessionId = iprot.readString();
struct.setSessionIdIsSet(true);
@@ -8869,8 +9825,12 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getPublicImages_result implements org.apache.thrift.TBase<getPublicImages_result, getPublicImages_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPublicImages_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPublicImages_result");
@@ -8878,15 +9838,12 @@ public class MasterServer {
private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getPublicImages_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getPublicImages_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getPublicImages_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getPublicImages_resultTupleSchemeFactory();
- public List<ImageSummaryRead> success; // required
- public TAuthorizationException failure; // required
- public TInvocationException error; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<ImageSummaryRead> success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException error; // 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 {
@@ -8894,10 +9851,10 @@ public class MasterServer {
FAILURE((short)1, "failure"),
ERROR((short)2, "error");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -8905,6 +9862,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -8924,46 +9882,49 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", 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, ImageSummaryRead.class))));
tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPublicImages_result.class, metaDataMap);
}
@@ -8971,7 +9932,7 @@ public class MasterServer {
}
public getPublicImages_result(
- List<ImageSummaryRead> success,
+ java.util.List<ImageSummaryRead> success,
TAuthorizationException failure,
TInvocationException error)
{
@@ -8986,7 +9947,7 @@ public class MasterServer {
*/
public getPublicImages_result(getPublicImages_result other) {
if (other.isSetSuccess()) {
- List<ImageSummaryRead> __this__success = new ArrayList<ImageSummaryRead>(other.success.size());
+ java.util.List<ImageSummaryRead> __this__success = new java.util.ArrayList<ImageSummaryRead>(other.success.size());
for (ImageSummaryRead other_element : other.success) {
__this__success.add(new ImageSummaryRead(other_element));
}
@@ -9000,6 +9961,7 @@ public class MasterServer {
}
}
+ @Override
public getPublicImages_result deepCopy() {
return new getPublicImages_result(this);
}
@@ -9015,22 +9977,24 @@ public class MasterServer {
return (this.success == null) ? 0 : this.success.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<ImageSummaryRead> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(ImageSummaryRead elem) {
if (this.success == null) {
- this.success = new ArrayList<ImageSummaryRead>();
+ this.success = new java.util.ArrayList<ImageSummaryRead>();
}
this.success.add(elem);
}
- public List<ImageSummaryRead> getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<ImageSummaryRead> getSuccess() {
return this.success;
}
- public getPublicImages_result setSuccess(List<ImageSummaryRead> success) {
+ public getPublicImages_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<ImageSummaryRead> success) {
this.success = success;
return this;
}
@@ -9050,11 +10014,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getFailure() {
return this.failure;
}
- public getPublicImages_result setFailure(TAuthorizationException failure) {
+ public getPublicImages_result setFailure(@org.apache.thrift.annotation.Nullable TAuthorizationException failure) {
this.failure = failure;
return this;
}
@@ -9074,11 +10039,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getError() {
return this.error;
}
- public getPublicImages_result setError(TInvocationException error) {
+ public getPublicImages_result setError(@org.apache.thrift.annotation.Nullable TInvocationException error) {
this.error = error;
return this;
}
@@ -9098,13 +10064,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((List<ImageSummaryRead>)value);
+ setSuccess((java.util.List<ImageSummaryRead>)value);
}
break;
@@ -9127,7 +10094,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -9139,13 +10108,14 @@ public class MasterServer {
return getError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -9156,13 +10126,11 @@ public class MasterServer {
case ERROR:
return isSetError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getPublicImages_result)
return this.equals((getPublicImages_result)that);
return false;
@@ -9171,6 +10139,8 @@ public class MasterServer {
public boolean equals(getPublicImages_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -9204,24 +10174,21 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_failure = true && (isSetFailure());
- list.add(present_failure);
- if (present_failure)
- list.add(failure);
+ hashCode = hashCode * 8191 + ((isSetFailure()) ? 131071 : 524287);
+ if (isSetFailure())
+ hashCode = hashCode * 8191 + failure.hashCode();
- boolean present_error = true && (isSetError());
- list.add(present_error);
- if (present_error)
- list.add(error);
+ hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287);
+ if (isSetError())
+ hashCode = hashCode * 8191 + error.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -9232,7 +10199,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -9242,7 +10209,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
+ lastComparison = java.lang.Boolean.compare(isSetFailure(), other.isSetFailure());
if (lastComparison != 0) {
return lastComparison;
}
@@ -9252,7 +10219,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetError()).compareTo(other.isSetError());
+ lastComparison = java.lang.Boolean.compare(isSetError(), other.isSetError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -9265,21 +10232,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getPublicImages_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getPublicImages_result(");
boolean first = true;
sb.append("success:");
@@ -9322,7 +10292,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -9330,14 +10300,16 @@ public class MasterServer {
}
}
- private static class getPublicImages_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getPublicImages_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getPublicImages_resultStandardScheme getScheme() {
return new getPublicImages_resultStandardScheme();
}
}
- private static class getPublicImages_resultStandardScheme extends StandardScheme<getPublicImages_result> {
+ private static class getPublicImages_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getPublicImages_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getPublicImages_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -9351,14 +10323,14 @@ public class MasterServer {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list314 = iprot.readListBegin();
- struct.success = new ArrayList<ImageSummaryRead>(_list314.size);
- ImageSummaryRead _elem315;
- for (int _i316 = 0; _i316 < _list314.size; ++_i316)
+ org.apache.thrift.protocol.TList _list426 = iprot.readListBegin();
+ struct.success = new java.util.ArrayList<ImageSummaryRead>(_list426.size);
+ @org.apache.thrift.annotation.Nullable ImageSummaryRead _elem427;
+ for (int _i428 = 0; _i428 < _list426.size; ++_i428)
{
- _elem315 = new ImageSummaryRead();
- _elem315.read(iprot);
- struct.success.add(_elem315);
+ _elem427 = new ImageSummaryRead();
+ _elem427.read(iprot);
+ struct.success.add(_elem427);
}
iprot.readListEnd();
}
@@ -9396,6 +10368,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getPublicImages_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -9404,9 +10377,9 @@ public class MasterServer {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (ImageSummaryRead _iter317 : struct.success)
+ for (ImageSummaryRead _iter429 : struct.success)
{
- _iter317.write(oprot);
+ _iter429.write(oprot);
}
oprot.writeListEnd();
}
@@ -9428,18 +10401,19 @@ public class MasterServer {
}
- private static class getPublicImages_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getPublicImages_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getPublicImages_resultTupleScheme getScheme() {
return new getPublicImages_resultTupleScheme();
}
}
- private static class getPublicImages_resultTupleScheme extends TupleScheme<getPublicImages_result> {
+ private static class getPublicImages_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getPublicImages_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getPublicImages_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -9453,9 +10427,9 @@ public class MasterServer {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (ImageSummaryRead _iter318 : struct.success)
+ for (ImageSummaryRead _iter430 : struct.success)
{
- _iter318.write(oprot);
+ _iter430.write(oprot);
}
}
}
@@ -9469,18 +10443,18 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getPublicImages_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list319 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<ImageSummaryRead>(_list319.size);
- ImageSummaryRead _elem320;
- for (int _i321 = 0; _i321 < _list319.size; ++_i321)
+ org.apache.thrift.protocol.TList _list431 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.success = new java.util.ArrayList<ImageSummaryRead>(_list431.size);
+ @org.apache.thrift.annotation.Nullable ImageSummaryRead _elem432;
+ for (int _i433 = 0; _i433 < _list431.size; ++_i433)
{
- _elem320 = new ImageSummaryRead();
- _elem320.read(iprot);
- struct.success.add(_elem320);
+ _elem432 = new ImageSummaryRead();
+ _elem432.read(iprot);
+ struct.success.add(_elem432);
}
}
struct.setSuccessIsSet(true);
@@ -9498,32 +10472,33 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getImageDetails_args implements org.apache.thrift.TBase<getImageDetails_args, getImageDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImageDetails_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageDetails_args");
private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
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)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageDetails_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageDetails_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImageDetails_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImageDetails_argsTupleSchemeFactory();
- public String sessionId; // required
- public String imageBaseId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String sessionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageBaseId; // 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 {
SESSION_ID((short)1, "sessionId"),
IMAGE_BASE_ID((short)2, "imageBaseId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -9531,6 +10506,7 @@ public class MasterServer {
/**
* 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: // SESSION_ID
@@ -9548,43 +10524,46 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
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")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageDetails_args.class, metaDataMap);
}
@@ -9592,8 +10571,8 @@ public class MasterServer {
}
public getImageDetails_args(
- String sessionId,
- String imageBaseId)
+ java.lang.String sessionId,
+ java.lang.String imageBaseId)
{
this();
this.sessionId = sessionId;
@@ -9612,6 +10591,7 @@ public class MasterServer {
}
}
+ @Override
public getImageDetails_args deepCopy() {
return new getImageDetails_args(this);
}
@@ -9622,11 +10602,12 @@ public class MasterServer {
this.imageBaseId = null;
}
- public String getSessionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getSessionId() {
return this.sessionId;
}
- public getImageDetails_args setSessionId(String sessionId) {
+ public getImageDetails_args setSessionId(@org.apache.thrift.annotation.Nullable java.lang.String sessionId) {
this.sessionId = sessionId;
return this;
}
@@ -9646,11 +10627,12 @@ public class MasterServer {
}
}
- public String getImageBaseId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageBaseId() {
return this.imageBaseId;
}
- public getImageDetails_args setImageBaseId(String imageBaseId) {
+ public getImageDetails_args setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.String imageBaseId) {
this.imageBaseId = imageBaseId;
return this;
}
@@ -9670,13 +10652,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SESSION_ID:
if (value == null) {
unsetSessionId();
} else {
- setSessionId((String)value);
+ setSessionId((java.lang.String)value);
}
break;
@@ -9684,14 +10667,16 @@ public class MasterServer {
if (value == null) {
unsetImageBaseId();
} else {
- setImageBaseId((String)value);
+ setImageBaseId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_ID:
return getSessionId();
@@ -9700,13 +10685,14 @@ public class MasterServer {
return getImageBaseId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -9715,13 +10701,11 @@ public class MasterServer {
case IMAGE_BASE_ID:
return isSetImageBaseId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getImageDetails_args)
return this.equals((getImageDetails_args)that);
return false;
@@ -9730,6 +10714,8 @@ public class MasterServer {
public boolean equals(getImageDetails_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_sessionId = true && this.isSetSessionId();
boolean that_present_sessionId = true && that.isSetSessionId();
@@ -9754,19 +10740,17 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_sessionId = true && (isSetSessionId());
- list.add(present_sessionId);
- if (present_sessionId)
- list.add(sessionId);
+ hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287);
+ if (isSetSessionId())
+ hashCode = hashCode * 8191 + sessionId.hashCode();
- boolean present_imageBaseId = true && (isSetImageBaseId());
- list.add(present_imageBaseId);
- if (present_imageBaseId)
- list.add(imageBaseId);
+ hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287);
+ if (isSetImageBaseId())
+ hashCode = hashCode * 8191 + imageBaseId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -9777,7 +10761,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
+ lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -9787,7 +10771,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ lastComparison = java.lang.Boolean.compare(isSetImageBaseId(), other.isSetImageBaseId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -9800,21 +10784,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImageDetails_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getImageDetails_args(");
boolean first = true;
sb.append("sessionId:");
@@ -9849,7 +10837,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -9857,14 +10845,16 @@ public class MasterServer {
}
}
- private static class getImageDetails_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getImageDetails_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageDetails_argsStandardScheme getScheme() {
return new getImageDetails_argsStandardScheme();
}
}
- private static class getImageDetails_argsStandardScheme extends StandardScheme<getImageDetails_args> {
+ private static class getImageDetails_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getImageDetails_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getImageDetails_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -9902,6 +10892,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getImageDetails_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -9922,18 +10913,19 @@ public class MasterServer {
}
- private static class getImageDetails_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getImageDetails_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageDetails_argsTupleScheme getScheme() {
return new getImageDetails_argsTupleScheme();
}
}
- private static class getImageDetails_argsTupleScheme extends TupleScheme<getImageDetails_args> {
+ private static class getImageDetails_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getImageDetails_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getImageDetails_args 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.isSetSessionId()) {
optionals.set(0);
}
@@ -9951,8 +10943,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getImageDetails_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.sessionId = iprot.readString();
struct.setSessionIdIsSet(true);
@@ -9964,8 +10956,12 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getImageDetails_result implements org.apache.thrift.TBase<getImageDetails_result, getImageDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImageDetails_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageDetails_result");
@@ -9974,16 +10970,13 @@ public class MasterServer {
private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageDetails_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageDetails_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImageDetails_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImageDetails_resultTupleSchemeFactory();
- public ImageDetailsRead success; // required
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable ImageDetailsRead success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -9992,10 +10985,10 @@ public class MasterServer {
NOT_FOUND((short)2, "notFound"),
SERVER_ERROR((short)3, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -10003,6 +10996,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -10024,47 +11018,50 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageDetailsRead.class)));
tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageDetails_result.class, metaDataMap);
}
@@ -10102,6 +11099,7 @@ public class MasterServer {
}
}
+ @Override
public getImageDetails_result deepCopy() {
return new getImageDetails_result(this);
}
@@ -10114,11 +11112,12 @@ public class MasterServer {
this.serverError = null;
}
+ @org.apache.thrift.annotation.Nullable
public ImageDetailsRead getSuccess() {
return this.success;
}
- public getImageDetails_result setSuccess(ImageDetailsRead success) {
+ public getImageDetails_result setSuccess(@org.apache.thrift.annotation.Nullable ImageDetailsRead success) {
this.success = success;
return this;
}
@@ -10138,11 +11137,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public getImageDetails_result setAuthError(TAuthorizationException authError) {
+ public getImageDetails_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -10162,11 +11162,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public getImageDetails_result setNotFound(TNotFoundException notFound) {
+ public getImageDetails_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -10186,11 +11187,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public getImageDetails_result setServerError(TInvocationException serverError) {
+ public getImageDetails_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -10210,7 +11212,8 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -10247,7 +11250,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -10262,13 +11267,14 @@ public class MasterServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -10281,13 +11287,11 @@ public class MasterServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getImageDetails_result)
return this.equals((getImageDetails_result)that);
return false;
@@ -10296,6 +11300,8 @@ public class MasterServer {
public boolean equals(getImageDetails_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -10338,29 +11344,25 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -10371,7 +11373,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -10381,7 +11383,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -10391,7 +11393,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -10401,7 +11403,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -10414,21 +11416,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImageDetails_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getImageDetails_result(");
boolean first = true;
sb.append("success:");
@@ -10482,7 +11487,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -10490,14 +11495,16 @@ public class MasterServer {
}
}
- private static class getImageDetails_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getImageDetails_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageDetails_resultStandardScheme getScheme() {
return new getImageDetails_resultStandardScheme();
}
}
- private static class getImageDetails_resultStandardScheme extends StandardScheme<getImageDetails_result> {
+ private static class getImageDetails_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getImageDetails_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getImageDetails_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -10555,6 +11562,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getImageDetails_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -10585,18 +11593,19 @@ public class MasterServer {
}
- private static class getImageDetails_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getImageDetails_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageDetails_resultTupleScheme getScheme() {
return new getImageDetails_resultTupleScheme();
}
}
- private static class getImageDetails_resultTupleScheme extends TupleScheme<getImageDetails_result> {
+ private static class getImageDetails_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getImageDetails_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getImageDetails_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -10626,8 +11635,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getImageDetails_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.success = new ImageDetailsRead();
struct.success.read(iprot);
@@ -10651,32 +11660,33 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getUser_args implements org.apache.thrift.TBase<getUser_args, getUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUser_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUser_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getUser_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getUser_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUser_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUser_argsTupleSchemeFactory();
- public String userToken; // required
- public String userId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userId; // 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 {
USER_TOKEN((short)1, "userToken"),
USER_ID((short)2, "userId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -10684,6 +11694,7 @@ public class MasterServer {
/**
* 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: // USER_TOKEN
@@ -10701,43 +11712,46 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUser_args.class, metaDataMap);
}
@@ -10745,8 +11759,8 @@ public class MasterServer {
}
public getUser_args(
- String userToken,
- String userId)
+ java.lang.String userToken,
+ java.lang.String userId)
{
this();
this.userToken = userToken;
@@ -10765,6 +11779,7 @@ public class MasterServer {
}
}
+ @Override
public getUser_args deepCopy() {
return new getUser_args(this);
}
@@ -10775,11 +11790,12 @@ public class MasterServer {
this.userId = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public getUser_args setUserToken(String userToken) {
+ public getUser_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -10799,11 +11815,12 @@ public class MasterServer {
}
}
- public String getUserId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserId() {
return this.userId;
}
- public getUser_args setUserId(String userId) {
+ public getUser_args setUserId(@org.apache.thrift.annotation.Nullable java.lang.String userId) {
this.userId = userId;
return this;
}
@@ -10823,13 +11840,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -10837,14 +11855,16 @@ public class MasterServer {
if (value == null) {
unsetUserId();
} else {
- setUserId((String)value);
+ setUserId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -10853,13 +11873,14 @@ public class MasterServer {
return getUserId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -10868,13 +11889,11 @@ public class MasterServer {
case USER_ID:
return isSetUserId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getUser_args)
return this.equals((getUser_args)that);
return false;
@@ -10883,6 +11902,8 @@ public class MasterServer {
public boolean equals(getUser_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -10907,19 +11928,17 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_userId = true && (isSetUserId());
- list.add(present_userId);
- if (present_userId)
- list.add(userId);
+ hashCode = hashCode * 8191 + ((isSetUserId()) ? 131071 : 524287);
+ if (isSetUserId())
+ hashCode = hashCode * 8191 + userId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -10930,7 +11949,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -10940,7 +11959,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUserId()).compareTo(other.isSetUserId());
+ lastComparison = java.lang.Boolean.compare(isSetUserId(), other.isSetUserId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -10953,21 +11972,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getUser_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getUser_args(");
boolean first = true;
sb.append("userToken:");
@@ -11002,7 +12025,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -11010,14 +12033,16 @@ public class MasterServer {
}
}
- private static class getUser_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getUser_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getUser_argsStandardScheme getScheme() {
return new getUser_argsStandardScheme();
}
}
- private static class getUser_argsStandardScheme extends StandardScheme<getUser_args> {
+ private static class getUser_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getUser_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getUser_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -11055,6 +12080,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getUser_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -11075,18 +12101,19 @@ public class MasterServer {
}
- private static class getUser_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getUser_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getUser_argsTupleScheme getScheme() {
return new getUser_argsTupleScheme();
}
}
- private static class getUser_argsTupleScheme extends TupleScheme<getUser_args> {
+ private static class getUser_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getUser_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUser_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -11104,8 +12131,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUser_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -11117,8 +12144,12 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getUser_result implements org.apache.thrift.TBase<getUser_result, getUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUser_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUser_result");
@@ -11127,16 +12158,13 @@ public class MasterServer {
private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getUser_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getUser_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUser_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUser_resultTupleSchemeFactory();
- public UserInfo success; // required
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable UserInfo success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -11145,10 +12173,10 @@ public class MasterServer {
NOT_FOUND((short)2, "notFound"),
SERVER_ERROR((short)3, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -11156,6 +12184,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -11177,47 +12206,50 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserInfo.class)));
tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUser_result.class, metaDataMap);
}
@@ -11255,6 +12287,7 @@ public class MasterServer {
}
}
+ @Override
public getUser_result deepCopy() {
return new getUser_result(this);
}
@@ -11267,11 +12300,12 @@ public class MasterServer {
this.serverError = null;
}
+ @org.apache.thrift.annotation.Nullable
public UserInfo getSuccess() {
return this.success;
}
- public getUser_result setSuccess(UserInfo success) {
+ public getUser_result setSuccess(@org.apache.thrift.annotation.Nullable UserInfo success) {
this.success = success;
return this;
}
@@ -11291,11 +12325,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public getUser_result setAuthError(TAuthorizationException authError) {
+ public getUser_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -11315,11 +12350,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public getUser_result setNotFound(TNotFoundException notFound) {
+ public getUser_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -11339,11 +12375,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public getUser_result setServerError(TInvocationException serverError) {
+ public getUser_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -11363,7 +12400,8 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -11400,7 +12438,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -11415,13 +12455,14 @@ public class MasterServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -11434,13 +12475,11 @@ public class MasterServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getUser_result)
return this.equals((getUser_result)that);
return false;
@@ -11449,6 +12488,8 @@ public class MasterServer {
public boolean equals(getUser_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -11491,29 +12532,25 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -11524,7 +12561,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -11534,7 +12571,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -11544,7 +12581,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -11554,7 +12591,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -11567,21 +12604,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getUser_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getUser_result(");
boolean first = true;
sb.append("success:");
@@ -11635,7 +12675,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -11643,14 +12683,16 @@ public class MasterServer {
}
}
- private static class getUser_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getUser_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getUser_resultStandardScheme getScheme() {
return new getUser_resultStandardScheme();
}
}
- private static class getUser_resultStandardScheme extends StandardScheme<getUser_result> {
+ private static class getUser_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getUser_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getUser_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -11708,6 +12750,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getUser_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -11738,18 +12781,19 @@ public class MasterServer {
}
- private static class getUser_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getUser_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getUser_resultTupleScheme getScheme() {
return new getUser_resultTupleScheme();
}
}
- private static class getUser_resultTupleScheme extends TupleScheme<getUser_result> {
+ private static class getUser_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getUser_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUser_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -11779,8 +12823,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUser_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.success = new UserInfo();
struct.success.read(iprot);
@@ -11804,29 +12848,30 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class invalidateSession_args implements org.apache.thrift.TBase<invalidateSession_args, invalidateSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<invalidateSession_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("invalidateSession_args");
private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new invalidateSession_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new invalidateSession_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new invalidateSession_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new invalidateSession_argsTupleSchemeFactory();
- public String sessionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String sessionId; // 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 {
SESSION_ID((short)1, "sessionId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -11834,6 +12879,7 @@ public class MasterServer {
/**
* 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: // SESSION_ID
@@ -11849,41 +12895,44 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(invalidateSession_args.class, metaDataMap);
}
@@ -11891,7 +12940,7 @@ public class MasterServer {
}
public invalidateSession_args(
- String sessionId)
+ java.lang.String sessionId)
{
this();
this.sessionId = sessionId;
@@ -11906,6 +12955,7 @@ public class MasterServer {
}
}
+ @Override
public invalidateSession_args deepCopy() {
return new invalidateSession_args(this);
}
@@ -11915,11 +12965,12 @@ public class MasterServer {
this.sessionId = null;
}
- public String getSessionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getSessionId() {
return this.sessionId;
}
- public invalidateSession_args setSessionId(String sessionId) {
+ public invalidateSession_args setSessionId(@org.apache.thrift.annotation.Nullable java.lang.String sessionId) {
this.sessionId = sessionId;
return this;
}
@@ -11939,45 +12990,47 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SESSION_ID:
if (value == null) {
unsetSessionId();
} else {
- setSessionId((String)value);
+ setSessionId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_ID:
return getSessionId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SESSION_ID:
return isSetSessionId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof invalidateSession_args)
return this.equals((invalidateSession_args)that);
return false;
@@ -11986,6 +13039,8 @@ public class MasterServer {
public boolean equals(invalidateSession_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_sessionId = true && this.isSetSessionId();
boolean that_present_sessionId = true && that.isSetSessionId();
@@ -12001,14 +13056,13 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_sessionId = true && (isSetSessionId());
- list.add(present_sessionId);
- if (present_sessionId)
- list.add(sessionId);
+ hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287);
+ if (isSetSessionId())
+ hashCode = hashCode * 8191 + sessionId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -12019,7 +13073,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
+ lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -12032,21 +13086,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("invalidateSession_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("invalidateSession_args(");
boolean first = true;
sb.append("sessionId:");
@@ -12073,7 +13131,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -12081,14 +13139,16 @@ public class MasterServer {
}
}
- private static class invalidateSession_argsStandardSchemeFactory implements SchemeFactory {
+ private static class invalidateSession_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public invalidateSession_argsStandardScheme getScheme() {
return new invalidateSession_argsStandardScheme();
}
}
- private static class invalidateSession_argsStandardScheme extends StandardScheme<invalidateSession_args> {
+ private static class invalidateSession_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<invalidateSession_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, invalidateSession_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -12118,6 +13178,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, invalidateSession_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -12133,18 +13194,19 @@ public class MasterServer {
}
- private static class invalidateSession_argsTupleSchemeFactory implements SchemeFactory {
+ private static class invalidateSession_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public invalidateSession_argsTupleScheme getScheme() {
return new invalidateSession_argsTupleScheme();
}
}
- private static class invalidateSession_argsTupleScheme extends TupleScheme<invalidateSession_args> {
+ private static class invalidateSession_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<invalidateSession_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, invalidateSession_args 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.isSetSessionId()) {
optionals.set(0);
}
@@ -12156,8 +13218,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, invalidateSession_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.sessionId = iprot.readString();
struct.setSessionIdIsSet(true);
@@ -12165,29 +13227,30 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class invalidateSession_result implements org.apache.thrift.TBase<invalidateSession_result, invalidateSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<invalidateSession_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("invalidateSession_result");
private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new invalidateSession_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new invalidateSession_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new invalidateSession_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new invalidateSession_resultTupleSchemeFactory();
- public TInvalidTokenException ex; // required
+ public @org.apache.thrift.annotation.Nullable TInvalidTokenException ex; // 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 {
EX((short)1, "ex");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -12195,6 +13258,7 @@ public class MasterServer {
/**
* 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: // EX
@@ -12210,41 +13274,44 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidTokenException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(invalidateSession_result.class, metaDataMap);
}
@@ -12267,6 +13334,7 @@ public class MasterServer {
}
}
+ @Override
public invalidateSession_result deepCopy() {
return new invalidateSession_result(this);
}
@@ -12276,11 +13344,12 @@ public class MasterServer {
this.ex = null;
}
+ @org.apache.thrift.annotation.Nullable
public TInvalidTokenException getEx() {
return this.ex;
}
- public invalidateSession_result setEx(TInvalidTokenException ex) {
+ public invalidateSession_result setEx(@org.apache.thrift.annotation.Nullable TInvalidTokenException ex) {
this.ex = ex;
return this;
}
@@ -12300,7 +13369,8 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case EX:
if (value == null) {
@@ -12313,32 +13383,33 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EX:
return getEx();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case EX:
return isSetEx();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof invalidateSession_result)
return this.equals((invalidateSession_result)that);
return false;
@@ -12347,6 +13418,8 @@ public class MasterServer {
public boolean equals(invalidateSession_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_ex = true && this.isSetEx();
boolean that_present_ex = true && that.isSetEx();
@@ -12362,14 +13435,13 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_ex = true && (isSetEx());
- list.add(present_ex);
- if (present_ex)
- list.add(ex);
+ hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
+ if (isSetEx())
+ hashCode = hashCode * 8191 + ex.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -12380,7 +13452,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetEx()).compareTo(other.isSetEx());
+ lastComparison = java.lang.Boolean.compare(isSetEx(), other.isSetEx());
if (lastComparison != 0) {
return lastComparison;
}
@@ -12393,21 +13465,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("invalidateSession_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("invalidateSession_result(");
boolean first = true;
sb.append("ex:");
@@ -12434,7 +13509,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -12442,14 +13517,16 @@ public class MasterServer {
}
}
- private static class invalidateSession_resultStandardSchemeFactory implements SchemeFactory {
+ private static class invalidateSession_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public invalidateSession_resultStandardScheme getScheme() {
return new invalidateSession_resultStandardScheme();
}
}
- private static class invalidateSession_resultStandardScheme extends StandardScheme<invalidateSession_result> {
+ private static class invalidateSession_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<invalidateSession_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, invalidateSession_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -12480,6 +13557,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, invalidateSession_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -12495,18 +13573,19 @@ public class MasterServer {
}
- private static class invalidateSession_resultTupleSchemeFactory implements SchemeFactory {
+ private static class invalidateSession_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public invalidateSession_resultTupleScheme getScheme() {
return new invalidateSession_resultTupleScheme();
}
}
- private static class invalidateSession_resultTupleScheme extends TupleScheme<invalidateSession_result> {
+ private static class invalidateSession_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<invalidateSession_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, invalidateSession_result 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.isSetEx()) {
optionals.set(0);
}
@@ -12518,8 +13597,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, invalidateSession_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.ex = new TInvalidTokenException();
struct.ex.read(iprot);
@@ -12528,29 +13607,1006 @@ public class MasterServer {
}
}
+ 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();
+ }
+ }
+
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+ public static class getSessionFromAccessCode_args implements org.apache.thrift.TBase<getSessionFromAccessCode_args, getSessionFromAccessCode_args._Fields>, java.io.Serializable, Cloneable, Comparable<getSessionFromAccessCode_args> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSessionFromAccessCode_args");
+
+ private static final org.apache.thrift.protocol.TField ACCESS_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("accessCode", org.apache.thrift.protocol.TType.STRING, (short)1);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getSessionFromAccessCode_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getSessionFromAccessCode_argsTupleSchemeFactory();
+
+ public @org.apache.thrift.annotation.Nullable java.lang.String accessCode; // 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 {
+ ACCESS_CODE((short)1, "accessCode");
+
+ 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: // ACCESS_CODE
+ return ACCESS_CODE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ @Override
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ @Override
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ 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.ACCESS_CODE, new org.apache.thrift.meta_data.FieldMetaData("accessCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSessionFromAccessCode_args.class, metaDataMap);
+ }
+
+ public getSessionFromAccessCode_args() {
+ }
+
+ public getSessionFromAccessCode_args(
+ java.lang.String accessCode)
+ {
+ this();
+ this.accessCode = accessCode;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getSessionFromAccessCode_args(getSessionFromAccessCode_args other) {
+ if (other.isSetAccessCode()) {
+ this.accessCode = other.accessCode;
+ }
+ }
+
+ @Override
+ public getSessionFromAccessCode_args deepCopy() {
+ return new getSessionFromAccessCode_args(this);
+ }
+
+ @Override
+ public void clear() {
+ this.accessCode = null;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getAccessCode() {
+ return this.accessCode;
+ }
+
+ public getSessionFromAccessCode_args setAccessCode(@org.apache.thrift.annotation.Nullable java.lang.String accessCode) {
+ this.accessCode = accessCode;
+ return this;
+ }
+
+ public void unsetAccessCode() {
+ this.accessCode = null;
+ }
+
+ /** Returns true if field accessCode is set (has been assigned a value) and false otherwise */
+ public boolean isSetAccessCode() {
+ return this.accessCode != null;
+ }
+
+ public void setAccessCodeIsSet(boolean value) {
+ if (!value) {
+ this.accessCode = null;
+ }
+ }
+
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
+ switch (field) {
+ case ACCESS_CODE:
+ if (value == null) {
+ unsetAccessCode();
+ } else {
+ setAccessCode((java.lang.String)value);
+ }
+ break;
+
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ case ACCESS_CODE:
+ return getAccessCode();
+
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ case ACCESS_CODE:
+ return isSetAccessCode();
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that instanceof getSessionFromAccessCode_args)
+ return this.equals((getSessionFromAccessCode_args)that);
+ return false;
+ }
+
+ public boolean equals(getSessionFromAccessCode_args that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ boolean this_present_accessCode = true && this.isSetAccessCode();
+ boolean that_present_accessCode = true && that.isSetAccessCode();
+ if (this_present_accessCode || that_present_accessCode) {
+ if (!(this_present_accessCode && that_present_accessCode))
+ return false;
+ if (!this.accessCode.equals(that.accessCode))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetAccessCode()) ? 131071 : 524287);
+ if (isSetAccessCode())
+ hashCode = hashCode * 8191 + accessCode.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(getSessionFromAccessCode_args other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = java.lang.Boolean.compare(isSetAccessCode(), other.isSetAccessCode());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAccessCode()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.accessCode, other.accessCode);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getSessionFromAccessCode_args(");
+ boolean first = true;
+
+ sb.append("accessCode:");
+ if (this.accessCode == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.accessCode);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+ try {
+ 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 getSessionFromAccessCode_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public getSessionFromAccessCode_argsStandardScheme getScheme() {
+ return new getSessionFromAccessCode_argsStandardScheme();
+ }
+ }
+
+ private static class getSessionFromAccessCode_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getSessionFromAccessCode_args> {
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getSessionFromAccessCode_args 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: // ACCESS_CODE
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.accessCode = iprot.readString();
+ struct.setAccessCodeIsSet(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();
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getSessionFromAccessCode_args struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.accessCode != null) {
+ oprot.writeFieldBegin(ACCESS_CODE_FIELD_DESC);
+ oprot.writeString(struct.accessCode);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getSessionFromAccessCode_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public getSessionFromAccessCode_argsTupleScheme getScheme() {
+ return new getSessionFromAccessCode_argsTupleScheme();
+ }
+ }
+
+ private static class getSessionFromAccessCode_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getSessionFromAccessCode_args> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getSessionFromAccessCode_args 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.isSetAccessCode()) {
+ optionals.set(0);
+ }
+ oprot.writeBitSet(optionals, 1);
+ if (struct.isSetAccessCode()) {
+ oprot.writeString(struct.accessCode);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getSessionFromAccessCode_args struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
+ if (incoming.get(0)) {
+ struct.accessCode = iprot.readString();
+ struct.setAccessCodeIsSet(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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+ public static class getSessionFromAccessCode_result implements org.apache.thrift.TBase<getSessionFromAccessCode_result, getSessionFromAccessCode_result._Fields>, java.io.Serializable, Cloneable, Comparable<getSessionFromAccessCode_result> {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSessionFromAccessCode_result");
+
+ private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
+ private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField AUTH_FIELD_DESC = new org.apache.thrift.protocol.TField("auth", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getSessionFromAccessCode_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getSessionFromAccessCode_resultTupleSchemeFactory();
+
+ public @org.apache.thrift.annotation.Nullable ClientSessionData success; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException auth; // 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 {
+ SUCCESS((short)0, "success"),
+ NOT_FOUND((short)1, "notFound"),
+ AUTH((short)2, "auth");
+
+ 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 0: // SUCCESS
+ return SUCCESS;
+ case 1: // NOT_FOUND
+ return NOT_FOUND;
+ case 2: // AUTH
+ return AUTH;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final java.lang.String _fieldName;
+
+ _Fields(short thriftId, java.lang.String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ @Override
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ @Override
+ public java.lang.String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ClientSessionData.class)));
+ tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
+ tmpMap.put(_Fields.AUTH, new org.apache.thrift.meta_data.FieldMetaData("auth", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSessionFromAccessCode_result.class, metaDataMap);
+ }
+
+ public getSessionFromAccessCode_result() {
+ }
+
+ public getSessionFromAccessCode_result(
+ ClientSessionData success,
+ TNotFoundException notFound,
+ TAuthorizationException auth)
+ {
+ this();
+ this.success = success;
+ this.notFound = notFound;
+ this.auth = auth;
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public getSessionFromAccessCode_result(getSessionFromAccessCode_result other) {
+ if (other.isSetSuccess()) {
+ this.success = new ClientSessionData(other.success);
+ }
+ if (other.isSetNotFound()) {
+ this.notFound = new TNotFoundException(other.notFound);
+ }
+ if (other.isSetAuth()) {
+ this.auth = new TAuthorizationException(other.auth);
+ }
+ }
+
+ @Override
+ public getSessionFromAccessCode_result deepCopy() {
+ return new getSessionFromAccessCode_result(this);
+ }
+
+ @Override
+ public void clear() {
+ this.success = null;
+ this.notFound = null;
+ this.auth = null;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public ClientSessionData getSuccess() {
+ return this.success;
+ }
+
+ public getSessionFromAccessCode_result setSuccess(@org.apache.thrift.annotation.Nullable ClientSessionData success) {
+ this.success = success;
+ return this;
+ }
+
+ public void unsetSuccess() {
+ this.success = null;
+ }
+
+ /** Returns true if field success is set (has been assigned a value) and false otherwise */
+ public boolean isSetSuccess() {
+ return this.success != null;
+ }
+
+ public void setSuccessIsSet(boolean value) {
+ if (!value) {
+ this.success = null;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public TNotFoundException getNotFound() {
+ return this.notFound;
+ }
+
+ public getSessionFromAccessCode_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
+ this.notFound = notFound;
+ return this;
+ }
+
+ public void unsetNotFound() {
+ this.notFound = null;
+ }
+
+ /** Returns true if field notFound is set (has been assigned a value) and false otherwise */
+ public boolean isSetNotFound() {
+ return this.notFound != null;
+ }
+
+ public void setNotFoundIsSet(boolean value) {
+ if (!value) {
+ this.notFound = null;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public TAuthorizationException getAuth() {
+ return this.auth;
+ }
+
+ public getSessionFromAccessCode_result setAuth(@org.apache.thrift.annotation.Nullable TAuthorizationException auth) {
+ this.auth = auth;
+ return this;
+ }
+
+ public void unsetAuth() {
+ this.auth = null;
+ }
+
+ /** Returns true if field auth is set (has been assigned a value) and false otherwise */
+ public boolean isSetAuth() {
+ return this.auth != null;
+ }
+
+ public void setAuthIsSet(boolean value) {
+ if (!value) {
+ this.auth = null;
+ }
+ }
+
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
+ switch (field) {
+ case SUCCESS:
+ if (value == null) {
+ unsetSuccess();
+ } else {
+ setSuccess((ClientSessionData)value);
+ }
+ break;
+
+ case NOT_FOUND:
+ if (value == null) {
+ unsetNotFound();
+ } else {
+ setNotFound((TNotFoundException)value);
+ }
+ break;
+
+ case AUTH:
+ if (value == null) {
+ unsetAuth();
+ } else {
+ setAuth((TAuthorizationException)value);
+ }
+ break;
+
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
+ switch (field) {
+ case SUCCESS:
+ return getSuccess();
+
+ case NOT_FOUND:
+ return getNotFound();
+
+ case AUTH:
+ return getAuth();
+
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new java.lang.IllegalArgumentException();
+ }
+
+ switch (field) {
+ case SUCCESS:
+ return isSetSuccess();
+ case NOT_FOUND:
+ return isSetNotFound();
+ case AUTH:
+ return isSetAuth();
+ }
+ throw new java.lang.IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(java.lang.Object that) {
+ if (that instanceof getSessionFromAccessCode_result)
+ return this.equals((getSessionFromAccessCode_result)that);
+ return false;
+ }
+
+ public boolean equals(getSessionFromAccessCode_result that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ boolean this_present_success = true && this.isSetSuccess();
+ boolean that_present_success = true && that.isSetSuccess();
+ if (this_present_success || that_present_success) {
+ if (!(this_present_success && that_present_success))
+ return false;
+ if (!this.success.equals(that.success))
+ return false;
+ }
+
+ boolean this_present_notFound = true && this.isSetNotFound();
+ boolean that_present_notFound = true && that.isSetNotFound();
+ if (this_present_notFound || that_present_notFound) {
+ if (!(this_present_notFound && that_present_notFound))
+ return false;
+ if (!this.notFound.equals(that.notFound))
+ return false;
+ }
+
+ boolean this_present_auth = true && this.isSetAuth();
+ boolean that_present_auth = true && that.isSetAuth();
+ if (this_present_auth || that_present_auth) {
+ if (!(this_present_auth && that_present_auth))
+ return false;
+ if (!this.auth.equals(that.auth))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetAuth()) ? 131071 : 524287);
+ if (isSetAuth())
+ hashCode = hashCode * 8191 + auth.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(getSessionFromAccessCode_result other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSuccess()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, other.success);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetNotFound()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.notFound, other.notFound);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetAuth(), other.isSetAuth());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAuth()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.auth, other.auth);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ 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("getSessionFromAccessCode_result(");
+ boolean first = true;
+
+ sb.append("success:");
+ if (this.success == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.success);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("notFound:");
+ if (this.notFound == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.notFound);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("auth:");
+ if (this.auth == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.auth);
+ }
+ 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 (success != null) {
+ success.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 {
+ 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 getSessionFromAccessCode_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public getSessionFromAccessCode_resultStandardScheme getScheme() {
+ return new getSessionFromAccessCode_resultStandardScheme();
+ }
+ }
+
+ private static class getSessionFromAccessCode_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getSessionFromAccessCode_result> {
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol iprot, getSessionFromAccessCode_result 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 0: // SUCCESS
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.success = new ClientSessionData();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 1: // NOT_FOUND
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // AUTH
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+ struct.auth = new TAuthorizationException();
+ struct.auth.read(iprot);
+ struct.setAuthIsSet(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();
+ }
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol oprot, getSessionFromAccessCode_result struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.success != null) {
+ oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
+ struct.success.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.notFound != null) {
+ oprot.writeFieldBegin(NOT_FOUND_FIELD_DESC);
+ struct.notFound.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ if (struct.auth != null) {
+ oprot.writeFieldBegin(AUTH_FIELD_DESC);
+ struct.auth.write(oprot);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class getSessionFromAccessCode_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
+ public getSessionFromAccessCode_resultTupleScheme getScheme() {
+ return new getSessionFromAccessCode_resultTupleScheme();
+ }
+ }
+
+ private static class getSessionFromAccessCode_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getSessionFromAccessCode_result> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, getSessionFromAccessCode_result 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.isSetSuccess()) {
+ optionals.set(0);
+ }
+ if (struct.isSetNotFound()) {
+ optionals.set(1);
+ }
+ if (struct.isSetAuth()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetSuccess()) {
+ struct.success.write(oprot);
+ }
+ if (struct.isSetNotFound()) {
+ struct.notFound.write(oprot);
+ }
+ if (struct.isSetAuth()) {
+ struct.auth.write(oprot);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, getSessionFromAccessCode_result struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.success = new ClientSessionData();
+ struct.success.read(iprot);
+ struct.setSuccessIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.notFound = new TNotFoundException();
+ struct.notFound.read(iprot);
+ struct.setNotFoundIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.auth = new TAuthorizationException();
+ struct.auth.read(iprot);
+ struct.setAuthIsSet(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();
+ }
+ }
+
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getUserFromToken_args implements org.apache.thrift.TBase<getUserFromToken_args, getUserFromToken_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserFromToken_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserFromToken_args");
private static final org.apache.thrift.protocol.TField TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("token", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getUserFromToken_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getUserFromToken_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUserFromToken_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUserFromToken_argsTupleSchemeFactory();
- public String token; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String token; // 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 {
TOKEN((short)1, "token");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -12558,6 +14614,7 @@ public class MasterServer {
/**
* 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: // TOKEN
@@ -12573,41 +14630,44 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserFromToken_args.class, metaDataMap);
}
@@ -12615,7 +14675,7 @@ public class MasterServer {
}
public getUserFromToken_args(
- String token)
+ java.lang.String token)
{
this();
this.token = token;
@@ -12630,6 +14690,7 @@ public class MasterServer {
}
}
+ @Override
public getUserFromToken_args deepCopy() {
return new getUserFromToken_args(this);
}
@@ -12639,11 +14700,12 @@ public class MasterServer {
this.token = null;
}
- public String getToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getToken() {
return this.token;
}
- public getUserFromToken_args setToken(String token) {
+ public getUserFromToken_args setToken(@org.apache.thrift.annotation.Nullable java.lang.String token) {
this.token = token;
return this;
}
@@ -12663,45 +14725,47 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TOKEN:
if (value == null) {
unsetToken();
} else {
- setToken((String)value);
+ setToken((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TOKEN:
return getToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case TOKEN:
return isSetToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getUserFromToken_args)
return this.equals((getUserFromToken_args)that);
return false;
@@ -12710,6 +14774,8 @@ public class MasterServer {
public boolean equals(getUserFromToken_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_token = true && this.isSetToken();
boolean that_present_token = true && that.isSetToken();
@@ -12725,14 +14791,13 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_token = true && (isSetToken());
- list.add(present_token);
- if (present_token)
- list.add(token);
+ hashCode = hashCode * 8191 + ((isSetToken()) ? 131071 : 524287);
+ if (isSetToken())
+ hashCode = hashCode * 8191 + token.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -12743,7 +14808,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
+ lastComparison = java.lang.Boolean.compare(isSetToken(), other.isSetToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -12756,21 +14821,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getUserFromToken_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getUserFromToken_args(");
boolean first = true;
sb.append("token:");
@@ -12797,7 +14866,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -12805,14 +14874,16 @@ public class MasterServer {
}
}
- private static class getUserFromToken_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getUserFromToken_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getUserFromToken_argsStandardScheme getScheme() {
return new getUserFromToken_argsStandardScheme();
}
}
- private static class getUserFromToken_argsStandardScheme extends StandardScheme<getUserFromToken_args> {
+ private static class getUserFromToken_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getUserFromToken_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getUserFromToken_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -12842,6 +14913,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getUserFromToken_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -12857,18 +14929,19 @@ public class MasterServer {
}
- private static class getUserFromToken_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getUserFromToken_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getUserFromToken_argsTupleScheme getScheme() {
return new getUserFromToken_argsTupleScheme();
}
}
- private static class getUserFromToken_argsTupleScheme extends TupleScheme<getUserFromToken_args> {
+ private static class getUserFromToken_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getUserFromToken_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_args 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.isSetToken()) {
optionals.set(0);
}
@@ -12880,8 +14953,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.token = iprot.readString();
struct.setTokenIsSet(true);
@@ -12889,32 +14962,33 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getUserFromToken_result implements org.apache.thrift.TBase<getUserFromToken_result, getUserFromToken_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserFromToken_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserFromToken_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getUserFromToken_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getUserFromToken_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUserFromToken_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUserFromToken_resultTupleSchemeFactory();
- public UserInfo success; // required
- public TInvalidTokenException failure; // required
+ public @org.apache.thrift.annotation.Nullable UserInfo success; // required
+ public @org.apache.thrift.annotation.Nullable TInvalidTokenException failure; // 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 {
SUCCESS((short)0, "success"),
FAILURE((short)1, "failure");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -12922,6 +14996,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -12939,43 +15014,46 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserInfo.class)));
tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidTokenException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserFromToken_result.class, metaDataMap);
}
@@ -13003,6 +15081,7 @@ public class MasterServer {
}
}
+ @Override
public getUserFromToken_result deepCopy() {
return new getUserFromToken_result(this);
}
@@ -13013,11 +15092,12 @@ public class MasterServer {
this.failure = null;
}
+ @org.apache.thrift.annotation.Nullable
public UserInfo getSuccess() {
return this.success;
}
- public getUserFromToken_result setSuccess(UserInfo success) {
+ public getUserFromToken_result setSuccess(@org.apache.thrift.annotation.Nullable UserInfo success) {
this.success = success;
return this;
}
@@ -13037,11 +15117,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvalidTokenException getFailure() {
return this.failure;
}
- public getUserFromToken_result setFailure(TInvalidTokenException failure) {
+ public getUserFromToken_result setFailure(@org.apache.thrift.annotation.Nullable TInvalidTokenException failure) {
this.failure = failure;
return this;
}
@@ -13061,7 +15142,8 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -13082,7 +15164,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -13091,13 +15175,14 @@ public class MasterServer {
return getFailure();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -13106,13 +15191,11 @@ public class MasterServer {
case FAILURE:
return isSetFailure();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getUserFromToken_result)
return this.equals((getUserFromToken_result)that);
return false;
@@ -13121,6 +15204,8 @@ public class MasterServer {
public boolean equals(getUserFromToken_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -13145,19 +15230,17 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_failure = true && (isSetFailure());
- list.add(present_failure);
- if (present_failure)
- list.add(failure);
+ hashCode = hashCode * 8191 + ((isSetFailure()) ? 131071 : 524287);
+ if (isSetFailure())
+ hashCode = hashCode * 8191 + failure.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -13168,7 +15251,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -13178,7 +15261,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
+ lastComparison = java.lang.Boolean.compare(isSetFailure(), other.isSetFailure());
if (lastComparison != 0) {
return lastComparison;
}
@@ -13191,21 +15274,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getUserFromToken_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getUserFromToken_result(");
boolean first = true;
sb.append("success:");
@@ -13243,7 +15329,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -13251,14 +15337,16 @@ public class MasterServer {
}
}
- private static class getUserFromToken_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getUserFromToken_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getUserFromToken_resultStandardScheme getScheme() {
return new getUserFromToken_resultStandardScheme();
}
}
- private static class getUserFromToken_resultStandardScheme extends StandardScheme<getUserFromToken_result> {
+ private static class getUserFromToken_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getUserFromToken_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getUserFromToken_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -13298,6 +15386,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getUserFromToken_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -13318,18 +15407,19 @@ public class MasterServer {
}
- private static class getUserFromToken_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getUserFromToken_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getUserFromToken_resultTupleScheme getScheme() {
return new getUserFromToken_resultTupleScheme();
}
}
- private static class getUserFromToken_resultTupleScheme extends TupleScheme<getUserFromToken_result> {
+ private static class getUserFromToken_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getUserFromToken_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -13347,8 +15437,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUserFromToken_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new UserInfo();
struct.success.read(iprot);
@@ -13362,29 +15452,30 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class isServerAuthenticated_args implements org.apache.thrift.TBase<isServerAuthenticated_args, isServerAuthenticated_args._Fields>, java.io.Serializable, Cloneable, Comparable<isServerAuthenticated_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isServerAuthenticated_args");
private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new isServerAuthenticated_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new isServerAuthenticated_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new isServerAuthenticated_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isServerAuthenticated_argsTupleSchemeFactory();
- public String serverSessionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String serverSessionId; // 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 {
SERVER_SESSION_ID((short)1, "serverSessionId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -13392,6 +15483,7 @@ public class MasterServer {
/**
* 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: // SERVER_SESSION_ID
@@ -13407,41 +15499,44 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SERVER_SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("serverSessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isServerAuthenticated_args.class, metaDataMap);
}
@@ -13449,7 +15544,7 @@ public class MasterServer {
}
public isServerAuthenticated_args(
- String serverSessionId)
+ java.lang.String serverSessionId)
{
this();
this.serverSessionId = serverSessionId;
@@ -13464,6 +15559,7 @@ public class MasterServer {
}
}
+ @Override
public isServerAuthenticated_args deepCopy() {
return new isServerAuthenticated_args(this);
}
@@ -13473,11 +15569,12 @@ public class MasterServer {
this.serverSessionId = null;
}
- public String getServerSessionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getServerSessionId() {
return this.serverSessionId;
}
- public isServerAuthenticated_args setServerSessionId(String serverSessionId) {
+ public isServerAuthenticated_args setServerSessionId(@org.apache.thrift.annotation.Nullable java.lang.String serverSessionId) {
this.serverSessionId = serverSessionId;
return this;
}
@@ -13497,45 +15594,47 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SERVER_SESSION_ID:
if (value == null) {
unsetServerSessionId();
} else {
- setServerSessionId((String)value);
+ setServerSessionId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SERVER_SESSION_ID:
return getServerSessionId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SERVER_SESSION_ID:
return isSetServerSessionId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof isServerAuthenticated_args)
return this.equals((isServerAuthenticated_args)that);
return false;
@@ -13544,6 +15643,8 @@ public class MasterServer {
public boolean equals(isServerAuthenticated_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_serverSessionId = true && this.isSetServerSessionId();
boolean that_present_serverSessionId = true && that.isSetServerSessionId();
@@ -13559,14 +15660,13 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_serverSessionId = true && (isSetServerSessionId());
- list.add(present_serverSessionId);
- if (present_serverSessionId)
- list.add(serverSessionId);
+ hashCode = hashCode * 8191 + ((isSetServerSessionId()) ? 131071 : 524287);
+ if (isSetServerSessionId())
+ hashCode = hashCode * 8191 + serverSessionId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -13577,7 +15677,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(other.isSetServerSessionId());
+ lastComparison = java.lang.Boolean.compare(isSetServerSessionId(), other.isSetServerSessionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -13590,21 +15690,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("isServerAuthenticated_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("isServerAuthenticated_args(");
boolean first = true;
sb.append("serverSessionId:");
@@ -13631,7 +15735,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -13639,14 +15743,16 @@ public class MasterServer {
}
}
- private static class isServerAuthenticated_argsStandardSchemeFactory implements SchemeFactory {
+ private static class isServerAuthenticated_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public isServerAuthenticated_argsStandardScheme getScheme() {
return new isServerAuthenticated_argsStandardScheme();
}
}
- private static class isServerAuthenticated_argsStandardScheme extends StandardScheme<isServerAuthenticated_args> {
+ private static class isServerAuthenticated_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<isServerAuthenticated_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, isServerAuthenticated_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -13676,6 +15782,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, isServerAuthenticated_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -13691,18 +15798,19 @@ public class MasterServer {
}
- private static class isServerAuthenticated_argsTupleSchemeFactory implements SchemeFactory {
+ private static class isServerAuthenticated_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public isServerAuthenticated_argsTupleScheme getScheme() {
return new isServerAuthenticated_argsTupleScheme();
}
}
- private static class isServerAuthenticated_argsTupleScheme extends TupleScheme<isServerAuthenticated_args> {
+ private static class isServerAuthenticated_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<isServerAuthenticated_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, isServerAuthenticated_args 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.isSetServerSessionId()) {
optionals.set(0);
}
@@ -13714,8 +15822,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, isServerAuthenticated_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.serverSessionId = iprot.readString();
struct.setServerSessionIdIsSet(true);
@@ -13723,18 +15831,19 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class isServerAuthenticated_result implements org.apache.thrift.TBase<isServerAuthenticated_result, isServerAuthenticated_result._Fields>, java.io.Serializable, Cloneable, Comparable<isServerAuthenticated_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isServerAuthenticated_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new isServerAuthenticated_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new isServerAuthenticated_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new isServerAuthenticated_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isServerAuthenticated_resultTupleSchemeFactory();
public boolean success; // required
@@ -13742,10 +15851,10 @@ public class MasterServer {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -13753,6 +15862,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -13768,30 +15878,33 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -13799,12 +15912,12 @@ public class MasterServer {
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isServerAuthenticated_result.class, metaDataMap);
}
@@ -13827,6 +15940,7 @@ public class MasterServer {
this.success = other.success;
}
+ @Override
public isServerAuthenticated_result deepCopy() {
return new isServerAuthenticated_result(this);
}
@@ -13848,57 +15962,59 @@ public class MasterServer {
}
public void unsetSuccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
- return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((Boolean)value);
+ setSuccess((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof isServerAuthenticated_result)
return this.equals((isServerAuthenticated_result)that);
return false;
@@ -13907,6 +16023,8 @@ public class MasterServer {
public boolean equals(isServerAuthenticated_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true;
boolean that_present_success = true;
@@ -13922,14 +16040,11 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true;
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -13940,7 +16055,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -13953,21 +16068,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("isServerAuthenticated_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("isServerAuthenticated_result(");
boolean first = true;
sb.append("success:");
@@ -13990,7 +16108,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -14000,14 +16118,16 @@ public class MasterServer {
}
}
- private static class isServerAuthenticated_resultStandardSchemeFactory implements SchemeFactory {
+ private static class isServerAuthenticated_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public isServerAuthenticated_resultStandardScheme getScheme() {
return new isServerAuthenticated_resultStandardScheme();
}
}
- private static class isServerAuthenticated_resultStandardScheme extends StandardScheme<isServerAuthenticated_result> {
+ private static class isServerAuthenticated_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<isServerAuthenticated_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, isServerAuthenticated_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -14037,6 +16157,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, isServerAuthenticated_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -14052,18 +16173,19 @@ public class MasterServer {
}
- private static class isServerAuthenticated_resultTupleSchemeFactory implements SchemeFactory {
+ private static class isServerAuthenticated_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public isServerAuthenticated_resultTupleScheme getScheme() {
return new isServerAuthenticated_resultTupleScheme();
}
}
- private static class isServerAuthenticated_resultTupleScheme extends TupleScheme<isServerAuthenticated_result> {
+ private static class isServerAuthenticated_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<isServerAuthenticated_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, isServerAuthenticated_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -14075,8 +16197,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, isServerAuthenticated_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
@@ -14084,18 +16206,19 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class startServerAuthentication_args implements org.apache.thrift.TBase<startServerAuthentication_args, startServerAuthentication_args._Fields>, java.io.Serializable, Cloneable, Comparable<startServerAuthentication_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startServerAuthentication_args");
private static final org.apache.thrift.protocol.TField SATELLITE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("satelliteId", org.apache.thrift.protocol.TType.I32, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new startServerAuthentication_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new startServerAuthentication_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new startServerAuthentication_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new startServerAuthentication_argsTupleSchemeFactory();
public int satelliteId; // required
@@ -14103,10 +16226,10 @@ public class MasterServer {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SATELLITE_ID((short)1, "satelliteId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -14114,6 +16237,7 @@ public class MasterServer {
/**
* 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: // SATELLITE_ID
@@ -14129,30 +16253,33 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -14160,12 +16287,12 @@ public class MasterServer {
// isset id assignments
private static final int __SATELLITEID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SATELLITE_ID, new org.apache.thrift.meta_data.FieldMetaData("satelliteId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startServerAuthentication_args.class, metaDataMap);
}
@@ -14188,6 +16315,7 @@ public class MasterServer {
this.satelliteId = other.satelliteId;
}
+ @Override
public startServerAuthentication_args deepCopy() {
return new startServerAuthentication_args(this);
}
@@ -14209,57 +16337,59 @@ public class MasterServer {
}
public void unsetSatelliteId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SATELLITEID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SATELLITEID_ISSET_ID);
}
/** Returns true if field satelliteId is set (has been assigned a value) and false otherwise */
public boolean isSetSatelliteId() {
- return EncodingUtils.testBit(__isset_bitfield, __SATELLITEID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SATELLITEID_ISSET_ID);
}
public void setSatelliteIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SATELLITEID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SATELLITEID_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SATELLITE_ID:
if (value == null) {
unsetSatelliteId();
} else {
- setSatelliteId((Integer)value);
+ setSatelliteId((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SATELLITE_ID:
return getSatelliteId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SATELLITE_ID:
return isSetSatelliteId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof startServerAuthentication_args)
return this.equals((startServerAuthentication_args)that);
return false;
@@ -14268,6 +16398,8 @@ public class MasterServer {
public boolean equals(startServerAuthentication_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_satelliteId = true;
boolean that_present_satelliteId = true;
@@ -14283,14 +16415,11 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_satelliteId = true;
- list.add(present_satelliteId);
- if (present_satelliteId)
- list.add(satelliteId);
+ hashCode = hashCode * 8191 + satelliteId;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -14301,7 +16430,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSatelliteId()).compareTo(other.isSetSatelliteId());
+ lastComparison = java.lang.Boolean.compare(isSetSatelliteId(), other.isSetSatelliteId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -14314,21 +16443,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("startServerAuthentication_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("startServerAuthentication_args(");
boolean first = true;
sb.append("satelliteId:");
@@ -14351,7 +16484,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -14361,14 +16494,16 @@ public class MasterServer {
}
}
- private static class startServerAuthentication_argsStandardSchemeFactory implements SchemeFactory {
+ private static class startServerAuthentication_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public startServerAuthentication_argsStandardScheme getScheme() {
return new startServerAuthentication_argsStandardScheme();
}
}
- private static class startServerAuthentication_argsStandardScheme extends StandardScheme<startServerAuthentication_args> {
+ private static class startServerAuthentication_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<startServerAuthentication_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, startServerAuthentication_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -14398,6 +16533,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, startServerAuthentication_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -14411,18 +16547,19 @@ public class MasterServer {
}
- private static class startServerAuthentication_argsTupleSchemeFactory implements SchemeFactory {
+ private static class startServerAuthentication_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public startServerAuthentication_argsTupleScheme getScheme() {
return new startServerAuthentication_argsTupleScheme();
}
}
- private static class startServerAuthentication_argsTupleScheme extends TupleScheme<startServerAuthentication_args> {
+ private static class startServerAuthentication_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<startServerAuthentication_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, startServerAuthentication_args 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.isSetSatelliteId()) {
optionals.set(0);
}
@@ -14434,8 +16571,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, startServerAuthentication_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.satelliteId = iprot.readI32();
struct.setSatelliteIdIsSet(true);
@@ -14443,8 +16580,12 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class startServerAuthentication_result implements org.apache.thrift.TBase<startServerAuthentication_result, startServerAuthentication_result._Fields>, java.io.Serializable, Cloneable, Comparable<startServerAuthentication_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("startServerAuthentication_result");
@@ -14452,15 +16593,12 @@ public class MasterServer {
private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new startServerAuthentication_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new startServerAuthentication_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new startServerAuthentication_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new startServerAuthentication_resultTupleSchemeFactory();
- public ByteBuffer success; // required
- public TAuthorizationException failure; // required
- public TInvocationException error; // required
+ public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException error; // 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 {
@@ -14468,10 +16606,10 @@ public class MasterServer {
FAILURE((short)1, "failure"),
ERROR((short)2, "error");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -14479,6 +16617,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -14498,45 +16637,48 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(startServerAuthentication_result.class, metaDataMap);
}
@@ -14544,7 +16686,7 @@ public class MasterServer {
}
public startServerAuthentication_result(
- ByteBuffer success,
+ java.nio.ByteBuffer success,
TAuthorizationException failure,
TInvocationException error)
{
@@ -14569,6 +16711,7 @@ public class MasterServer {
}
}
+ @Override
public startServerAuthentication_result deepCopy() {
return new startServerAuthentication_result(this);
}
@@ -14585,16 +16728,16 @@ public class MasterServer {
return success == null ? null : success.array();
}
- public ByteBuffer bufferForSuccess() {
+ public java.nio.ByteBuffer bufferForSuccess() {
return org.apache.thrift.TBaseHelper.copyBinary(success);
}
public startServerAuthentication_result setSuccess(byte[] success) {
- this.success = success == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(success, success.length));
+ this.success = success == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(success.clone());
return this;
}
- public startServerAuthentication_result setSuccess(ByteBuffer success) {
+ public startServerAuthentication_result setSuccess(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer success) {
this.success = org.apache.thrift.TBaseHelper.copyBinary(success);
return this;
}
@@ -14614,11 +16757,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getFailure() {
return this.failure;
}
- public startServerAuthentication_result setFailure(TAuthorizationException failure) {
+ public startServerAuthentication_result setFailure(@org.apache.thrift.annotation.Nullable TAuthorizationException failure) {
this.failure = failure;
return this;
}
@@ -14638,11 +16782,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getError() {
return this.error;
}
- public startServerAuthentication_result setError(TInvocationException error) {
+ public startServerAuthentication_result setError(@org.apache.thrift.annotation.Nullable TInvocationException error) {
this.error = error;
return this;
}
@@ -14662,13 +16807,18 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setSuccess((byte[])value);
+ } else {
+ setSuccess((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -14691,7 +16841,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -14703,13 +16855,14 @@ public class MasterServer {
return getError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -14720,13 +16873,11 @@ public class MasterServer {
case ERROR:
return isSetError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof startServerAuthentication_result)
return this.equals((startServerAuthentication_result)that);
return false;
@@ -14735,6 +16886,8 @@ public class MasterServer {
public boolean equals(startServerAuthentication_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -14768,24 +16921,21 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_failure = true && (isSetFailure());
- list.add(present_failure);
- if (present_failure)
- list.add(failure);
+ hashCode = hashCode * 8191 + ((isSetFailure()) ? 131071 : 524287);
+ if (isSetFailure())
+ hashCode = hashCode * 8191 + failure.hashCode();
- boolean present_error = true && (isSetError());
- list.add(present_error);
- if (present_error)
- list.add(error);
+ hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287);
+ if (isSetError())
+ hashCode = hashCode * 8191 + error.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -14796,7 +16946,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -14806,7 +16956,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
+ lastComparison = java.lang.Boolean.compare(isSetFailure(), other.isSetFailure());
if (lastComparison != 0) {
return lastComparison;
}
@@ -14816,7 +16966,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetError()).compareTo(other.isSetError());
+ lastComparison = java.lang.Boolean.compare(isSetError(), other.isSetError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -14829,21 +16979,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("startServerAuthentication_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("startServerAuthentication_result(");
boolean first = true;
sb.append("success:");
@@ -14886,7 +17039,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -14894,14 +17047,16 @@ public class MasterServer {
}
}
- private static class startServerAuthentication_resultStandardSchemeFactory implements SchemeFactory {
+ private static class startServerAuthentication_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public startServerAuthentication_resultStandardScheme getScheme() {
return new startServerAuthentication_resultStandardScheme();
}
}
- private static class startServerAuthentication_resultStandardScheme extends StandardScheme<startServerAuthentication_result> {
+ private static class startServerAuthentication_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<startServerAuthentication_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, startServerAuthentication_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -14949,6 +17104,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, startServerAuthentication_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -14974,18 +17130,19 @@ public class MasterServer {
}
- private static class startServerAuthentication_resultTupleSchemeFactory implements SchemeFactory {
+ private static class startServerAuthentication_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public startServerAuthentication_resultTupleScheme getScheme() {
return new startServerAuthentication_resultTupleScheme();
}
}
- private static class startServerAuthentication_resultTupleScheme extends TupleScheme<startServerAuthentication_result> {
+ private static class startServerAuthentication_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<startServerAuthentication_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, startServerAuthentication_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -15009,8 +17166,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, startServerAuthentication_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readBinary();
struct.setSuccessIsSet(true);
@@ -15028,32 +17185,33 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class serverAuthenticate_args implements org.apache.thrift.TBase<serverAuthenticate_args, serverAuthenticate_args._Fields>, java.io.Serializable, Cloneable, Comparable<serverAuthenticate_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("serverAuthenticate_args");
private static final org.apache.thrift.protocol.TField SATELLITE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("satelliteId", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField CHALLENGE_RESPONSE_FIELD_DESC = new org.apache.thrift.protocol.TField("challengeResponse", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new serverAuthenticate_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new serverAuthenticate_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new serverAuthenticate_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new serverAuthenticate_argsTupleSchemeFactory();
public int satelliteId; // required
- public ByteBuffer challengeResponse; // required
+ public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer challengeResponse; // 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 {
SATELLITE_ID((short)1, "satelliteId"),
CHALLENGE_RESPONSE((short)2, "challengeResponse");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -15061,6 +17219,7 @@ public class MasterServer {
/**
* 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: // SATELLITE_ID
@@ -15078,30 +17237,33 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -15109,14 +17271,14 @@ public class MasterServer {
// isset id assignments
private static final int __SATELLITEID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SATELLITE_ID, new org.apache.thrift.meta_data.FieldMetaData("satelliteId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.CHALLENGE_RESPONSE, new org.apache.thrift.meta_data.FieldMetaData("challengeResponse", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(serverAuthenticate_args.class, metaDataMap);
}
@@ -15125,7 +17287,7 @@ public class MasterServer {
public serverAuthenticate_args(
int satelliteId,
- ByteBuffer challengeResponse)
+ java.nio.ByteBuffer challengeResponse)
{
this();
this.satelliteId = satelliteId;
@@ -15144,6 +17306,7 @@ public class MasterServer {
}
}
+ @Override
public serverAuthenticate_args deepCopy() {
return new serverAuthenticate_args(this);
}
@@ -15166,16 +17329,16 @@ public class MasterServer {
}
public void unsetSatelliteId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SATELLITEID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SATELLITEID_ISSET_ID);
}
/** Returns true if field satelliteId is set (has been assigned a value) and false otherwise */
public boolean isSetSatelliteId() {
- return EncodingUtils.testBit(__isset_bitfield, __SATELLITEID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SATELLITEID_ISSET_ID);
}
public void setSatelliteIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SATELLITEID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SATELLITEID_ISSET_ID, value);
}
public byte[] getChallengeResponse() {
@@ -15183,16 +17346,16 @@ public class MasterServer {
return challengeResponse == null ? null : challengeResponse.array();
}
- public ByteBuffer bufferForChallengeResponse() {
+ public java.nio.ByteBuffer bufferForChallengeResponse() {
return org.apache.thrift.TBaseHelper.copyBinary(challengeResponse);
}
public serverAuthenticate_args setChallengeResponse(byte[] challengeResponse) {
- this.challengeResponse = challengeResponse == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(challengeResponse, challengeResponse.length));
+ this.challengeResponse = challengeResponse == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(challengeResponse.clone());
return this;
}
- public serverAuthenticate_args setChallengeResponse(ByteBuffer challengeResponse) {
+ public serverAuthenticate_args setChallengeResponse(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer challengeResponse) {
this.challengeResponse = org.apache.thrift.TBaseHelper.copyBinary(challengeResponse);
return this;
}
@@ -15212,13 +17375,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SATELLITE_ID:
if (value == null) {
unsetSatelliteId();
} else {
- setSatelliteId((Integer)value);
+ setSatelliteId((java.lang.Integer)value);
}
break;
@@ -15226,14 +17390,20 @@ public class MasterServer {
if (value == null) {
unsetChallengeResponse();
} else {
- setChallengeResponse((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setChallengeResponse((byte[])value);
+ } else {
+ setChallengeResponse((java.nio.ByteBuffer)value);
+ }
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SATELLITE_ID:
return getSatelliteId();
@@ -15242,13 +17412,14 @@ public class MasterServer {
return getChallengeResponse();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -15257,13 +17428,11 @@ public class MasterServer {
case CHALLENGE_RESPONSE:
return isSetChallengeResponse();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof serverAuthenticate_args)
return this.equals((serverAuthenticate_args)that);
return false;
@@ -15272,6 +17441,8 @@ public class MasterServer {
public boolean equals(serverAuthenticate_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_satelliteId = true;
boolean that_present_satelliteId = true;
@@ -15296,19 +17467,15 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_satelliteId = true;
- list.add(present_satelliteId);
- if (present_satelliteId)
- list.add(satelliteId);
+ hashCode = hashCode * 8191 + satelliteId;
- boolean present_challengeResponse = true && (isSetChallengeResponse());
- list.add(present_challengeResponse);
- if (present_challengeResponse)
- list.add(challengeResponse);
+ hashCode = hashCode * 8191 + ((isSetChallengeResponse()) ? 131071 : 524287);
+ if (isSetChallengeResponse())
+ hashCode = hashCode * 8191 + challengeResponse.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -15319,7 +17486,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSatelliteId()).compareTo(other.isSetSatelliteId());
+ lastComparison = java.lang.Boolean.compare(isSetSatelliteId(), other.isSetSatelliteId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -15329,7 +17496,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetChallengeResponse()).compareTo(other.isSetChallengeResponse());
+ lastComparison = java.lang.Boolean.compare(isSetChallengeResponse(), other.isSetChallengeResponse());
if (lastComparison != 0) {
return lastComparison;
}
@@ -15342,21 +17509,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("serverAuthenticate_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("serverAuthenticate_args(");
boolean first = true;
sb.append("satelliteId:");
@@ -15387,7 +17558,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -15397,14 +17568,16 @@ public class MasterServer {
}
}
- private static class serverAuthenticate_argsStandardSchemeFactory implements SchemeFactory {
+ private static class serverAuthenticate_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public serverAuthenticate_argsStandardScheme getScheme() {
return new serverAuthenticate_argsStandardScheme();
}
}
- private static class serverAuthenticate_argsStandardScheme extends StandardScheme<serverAuthenticate_args> {
+ private static class serverAuthenticate_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<serverAuthenticate_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, serverAuthenticate_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -15442,6 +17615,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, serverAuthenticate_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -15460,18 +17634,19 @@ public class MasterServer {
}
- private static class serverAuthenticate_argsTupleSchemeFactory implements SchemeFactory {
+ private static class serverAuthenticate_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public serverAuthenticate_argsTupleScheme getScheme() {
return new serverAuthenticate_argsTupleScheme();
}
}
- private static class serverAuthenticate_argsTupleScheme extends TupleScheme<serverAuthenticate_args> {
+ private static class serverAuthenticate_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<serverAuthenticate_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_args 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.isSetSatelliteId()) {
optionals.set(0);
}
@@ -15489,8 +17664,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.satelliteId = iprot.readI32();
struct.setSatelliteIdIsSet(true);
@@ -15502,8 +17677,12 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class serverAuthenticate_result implements org.apache.thrift.TBase<serverAuthenticate_result, serverAuthenticate_result._Fields>, java.io.Serializable, Cloneable, Comparable<serverAuthenticate_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("serverAuthenticate_result");
@@ -15511,15 +17690,12 @@ public class MasterServer {
private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField ERRR_FIELD_DESC = new org.apache.thrift.protocol.TField("errr", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new serverAuthenticate_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new serverAuthenticate_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new serverAuthenticate_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new serverAuthenticate_resultTupleSchemeFactory();
- public ServerSessionData success; // required
- public TAuthorizationException failure; // required
- public TInvocationException errr; // required
+ public @org.apache.thrift.annotation.Nullable ServerSessionData success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException errr; // 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 {
@@ -15527,10 +17703,10 @@ public class MasterServer {
FAILURE((short)1, "failure"),
ERRR((short)2, "errr");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -15538,6 +17714,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -15557,45 +17734,48 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ServerSessionData.class)));
tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.ERRR, new org.apache.thrift.meta_data.FieldMetaData("errr", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(serverAuthenticate_result.class, metaDataMap);
}
@@ -15628,6 +17808,7 @@ public class MasterServer {
}
}
+ @Override
public serverAuthenticate_result deepCopy() {
return new serverAuthenticate_result(this);
}
@@ -15639,11 +17820,12 @@ public class MasterServer {
this.errr = null;
}
+ @org.apache.thrift.annotation.Nullable
public ServerSessionData getSuccess() {
return this.success;
}
- public serverAuthenticate_result setSuccess(ServerSessionData success) {
+ public serverAuthenticate_result setSuccess(@org.apache.thrift.annotation.Nullable ServerSessionData success) {
this.success = success;
return this;
}
@@ -15663,11 +17845,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getFailure() {
return this.failure;
}
- public serverAuthenticate_result setFailure(TAuthorizationException failure) {
+ public serverAuthenticate_result setFailure(@org.apache.thrift.annotation.Nullable TAuthorizationException failure) {
this.failure = failure;
return this;
}
@@ -15687,11 +17870,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getErrr() {
return this.errr;
}
- public serverAuthenticate_result setErrr(TInvocationException errr) {
+ public serverAuthenticate_result setErrr(@org.apache.thrift.annotation.Nullable TInvocationException errr) {
this.errr = errr;
return this;
}
@@ -15711,7 +17895,8 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -15740,7 +17925,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -15752,13 +17939,14 @@ public class MasterServer {
return getErrr();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -15769,13 +17957,11 @@ public class MasterServer {
case ERRR:
return isSetErrr();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof serverAuthenticate_result)
return this.equals((serverAuthenticate_result)that);
return false;
@@ -15784,6 +17970,8 @@ public class MasterServer {
public boolean equals(serverAuthenticate_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -15817,24 +18005,21 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_failure = true && (isSetFailure());
- list.add(present_failure);
- if (present_failure)
- list.add(failure);
+ hashCode = hashCode * 8191 + ((isSetFailure()) ? 131071 : 524287);
+ if (isSetFailure())
+ hashCode = hashCode * 8191 + failure.hashCode();
- boolean present_errr = true && (isSetErrr());
- list.add(present_errr);
- if (present_errr)
- list.add(errr);
+ hashCode = hashCode * 8191 + ((isSetErrr()) ? 131071 : 524287);
+ if (isSetErrr())
+ hashCode = hashCode * 8191 + errr.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -15845,7 +18030,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -15855,7 +18040,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
+ lastComparison = java.lang.Boolean.compare(isSetFailure(), other.isSetFailure());
if (lastComparison != 0) {
return lastComparison;
}
@@ -15865,7 +18050,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetErrr()).compareTo(other.isSetErrr());
+ lastComparison = java.lang.Boolean.compare(isSetErrr(), other.isSetErrr());
if (lastComparison != 0) {
return lastComparison;
}
@@ -15878,21 +18063,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("serverAuthenticate_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("serverAuthenticate_result(");
boolean first = true;
sb.append("success:");
@@ -15938,7 +18126,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -15946,14 +18134,16 @@ public class MasterServer {
}
}
- private static class serverAuthenticate_resultStandardSchemeFactory implements SchemeFactory {
+ private static class serverAuthenticate_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public serverAuthenticate_resultStandardScheme getScheme() {
return new serverAuthenticate_resultStandardScheme();
}
}
- private static class serverAuthenticate_resultStandardScheme extends StandardScheme<serverAuthenticate_result> {
+ private static class serverAuthenticate_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<serverAuthenticate_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, serverAuthenticate_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -16002,6 +18192,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, serverAuthenticate_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -16027,18 +18218,19 @@ public class MasterServer {
}
- private static class serverAuthenticate_resultTupleSchemeFactory implements SchemeFactory {
+ private static class serverAuthenticate_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public serverAuthenticate_resultTupleScheme getScheme() {
return new serverAuthenticate_resultTupleScheme();
}
}
- private static class serverAuthenticate_resultTupleScheme extends TupleScheme<serverAuthenticate_result> {
+ private static class serverAuthenticate_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<serverAuthenticate_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -16062,8 +18254,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, serverAuthenticate_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = new ServerSessionData();
struct.success.read(iprot);
@@ -16082,32 +18274,33 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getImageData_args implements org.apache.thrift.TBase<getImageData_args, getImageData_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImageData_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageData_args");
private static final org.apache.thrift.protocol.TField SERVER_SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSessionId", 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageData_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageData_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImageData_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImageData_argsTupleSchemeFactory();
- public String serverSessionId; // required
- public String imageVersionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String serverSessionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageVersionId; // 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 {
SERVER_SESSION_ID((short)1, "serverSessionId"),
IMAGE_VERSION_ID((short)2, "imageVersionId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -16115,6 +18308,7 @@ public class MasterServer {
/**
* 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: // SERVER_SESSION_ID
@@ -16132,43 +18326,46 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SERVER_SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("serverSessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
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")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageData_args.class, metaDataMap);
}
@@ -16176,8 +18373,8 @@ public class MasterServer {
}
public getImageData_args(
- String serverSessionId,
- String imageVersionId)
+ java.lang.String serverSessionId,
+ java.lang.String imageVersionId)
{
this();
this.serverSessionId = serverSessionId;
@@ -16196,6 +18393,7 @@ public class MasterServer {
}
}
+ @Override
public getImageData_args deepCopy() {
return new getImageData_args(this);
}
@@ -16206,11 +18404,12 @@ public class MasterServer {
this.imageVersionId = null;
}
- public String getServerSessionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getServerSessionId() {
return this.serverSessionId;
}
- public getImageData_args setServerSessionId(String serverSessionId) {
+ public getImageData_args setServerSessionId(@org.apache.thrift.annotation.Nullable java.lang.String serverSessionId) {
this.serverSessionId = serverSessionId;
return this;
}
@@ -16230,11 +18429,12 @@ public class MasterServer {
}
}
- public String getImageVersionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageVersionId() {
return this.imageVersionId;
}
- public getImageData_args setImageVersionId(String imageVersionId) {
+ public getImageData_args setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.String imageVersionId) {
this.imageVersionId = imageVersionId;
return this;
}
@@ -16254,13 +18454,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SERVER_SESSION_ID:
if (value == null) {
unsetServerSessionId();
} else {
- setServerSessionId((String)value);
+ setServerSessionId((java.lang.String)value);
}
break;
@@ -16268,14 +18469,16 @@ public class MasterServer {
if (value == null) {
unsetImageVersionId();
} else {
- setImageVersionId((String)value);
+ setImageVersionId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SERVER_SESSION_ID:
return getServerSessionId();
@@ -16284,13 +18487,14 @@ public class MasterServer {
return getImageVersionId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -16299,13 +18503,11 @@ public class MasterServer {
case IMAGE_VERSION_ID:
return isSetImageVersionId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getImageData_args)
return this.equals((getImageData_args)that);
return false;
@@ -16314,6 +18516,8 @@ public class MasterServer {
public boolean equals(getImageData_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_serverSessionId = true && this.isSetServerSessionId();
boolean that_present_serverSessionId = true && that.isSetServerSessionId();
@@ -16338,19 +18542,17 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_serverSessionId = true && (isSetServerSessionId());
- list.add(present_serverSessionId);
- if (present_serverSessionId)
- list.add(serverSessionId);
+ hashCode = hashCode * 8191 + ((isSetServerSessionId()) ? 131071 : 524287);
+ if (isSetServerSessionId())
+ hashCode = hashCode * 8191 + serverSessionId.hashCode();
- boolean present_imageVersionId = true && (isSetImageVersionId());
- list.add(present_imageVersionId);
- if (present_imageVersionId)
- list.add(imageVersionId);
+ hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287);
+ if (isSetImageVersionId())
+ hashCode = hashCode * 8191 + imageVersionId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -16361,7 +18563,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(other.isSetServerSessionId());
+ lastComparison = java.lang.Boolean.compare(isSetServerSessionId(), other.isSetServerSessionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -16371,7 +18573,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ lastComparison = java.lang.Boolean.compare(isSetImageVersionId(), other.isSetImageVersionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -16384,21 +18586,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImageData_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getImageData_args(");
boolean first = true;
sb.append("serverSessionId:");
@@ -16433,7 +18639,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -16441,14 +18647,16 @@ public class MasterServer {
}
}
- private static class getImageData_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getImageData_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageData_argsStandardScheme getScheme() {
return new getImageData_argsStandardScheme();
}
}
- private static class getImageData_argsStandardScheme extends StandardScheme<getImageData_args> {
+ private static class getImageData_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getImageData_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getImageData_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -16486,6 +18694,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getImageData_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -16506,18 +18715,19 @@ public class MasterServer {
}
- private static class getImageData_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getImageData_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageData_argsTupleScheme getScheme() {
return new getImageData_argsTupleScheme();
}
}
- private static class getImageData_argsTupleScheme extends TupleScheme<getImageData_args> {
+ private static class getImageData_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getImageData_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getImageData_args 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.isSetServerSessionId()) {
optionals.set(0);
}
@@ -16535,8 +18745,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getImageData_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.serverSessionId = iprot.readString();
struct.setServerSessionIdIsSet(true);
@@ -16548,8 +18758,12 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getImageData_result implements org.apache.thrift.TBase<getImageData_result, getImageData_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImageData_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageData_result");
@@ -16558,16 +18772,13 @@ public class MasterServer {
private static final org.apache.thrift.protocol.TField FAILURE2_FIELD_DESC = new org.apache.thrift.protocol.TField("failure2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField F3_FIELD_DESC = new org.apache.thrift.protocol.TField("f3", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageData_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageData_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImageData_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImageData_resultTupleSchemeFactory();
- public ImagePublishData success; // required
- public TAuthorizationException failure; // required
- public TInvocationException failure2; // required
- public TNotFoundException f3; // required
+ public @org.apache.thrift.annotation.Nullable ImagePublishData success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException failure2; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException f3; // 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 {
@@ -16576,10 +18787,10 @@ public class MasterServer {
FAILURE2((short)2, "failure2"),
F3((short)3, "f3");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -16587,6 +18798,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -16608,47 +18820,50 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePublishData.class)));
tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.FAILURE2, new org.apache.thrift.meta_data.FieldMetaData("failure2", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
tmpMap.put(_Fields.F3, new org.apache.thrift.meta_data.FieldMetaData("f3", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageData_result.class, metaDataMap);
}
@@ -16686,6 +18901,7 @@ public class MasterServer {
}
}
+ @Override
public getImageData_result deepCopy() {
return new getImageData_result(this);
}
@@ -16698,11 +18914,12 @@ public class MasterServer {
this.f3 = null;
}
+ @org.apache.thrift.annotation.Nullable
public ImagePublishData getSuccess() {
return this.success;
}
- public getImageData_result setSuccess(ImagePublishData success) {
+ public getImageData_result setSuccess(@org.apache.thrift.annotation.Nullable ImagePublishData success) {
this.success = success;
return this;
}
@@ -16722,11 +18939,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getFailure() {
return this.failure;
}
- public getImageData_result setFailure(TAuthorizationException failure) {
+ public getImageData_result setFailure(@org.apache.thrift.annotation.Nullable TAuthorizationException failure) {
this.failure = failure;
return this;
}
@@ -16746,11 +18964,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getFailure2() {
return this.failure2;
}
- public getImageData_result setFailure2(TInvocationException failure2) {
+ public getImageData_result setFailure2(@org.apache.thrift.annotation.Nullable TInvocationException failure2) {
this.failure2 = failure2;
return this;
}
@@ -16770,11 +18989,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getF3() {
return this.f3;
}
- public getImageData_result setF3(TNotFoundException f3) {
+ public getImageData_result setF3(@org.apache.thrift.annotation.Nullable TNotFoundException f3) {
this.f3 = f3;
return this;
}
@@ -16794,7 +19014,8 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -16831,7 +19052,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -16846,13 +19069,14 @@ public class MasterServer {
return getF3();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -16865,13 +19089,11 @@ public class MasterServer {
case F3:
return isSetF3();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getImageData_result)
return this.equals((getImageData_result)that);
return false;
@@ -16880,6 +19102,8 @@ public class MasterServer {
public boolean equals(getImageData_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -16922,29 +19146,25 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_failure = true && (isSetFailure());
- list.add(present_failure);
- if (present_failure)
- list.add(failure);
+ hashCode = hashCode * 8191 + ((isSetFailure()) ? 131071 : 524287);
+ if (isSetFailure())
+ hashCode = hashCode * 8191 + failure.hashCode();
- boolean present_failure2 = true && (isSetFailure2());
- list.add(present_failure2);
- if (present_failure2)
- list.add(failure2);
+ hashCode = hashCode * 8191 + ((isSetFailure2()) ? 131071 : 524287);
+ if (isSetFailure2())
+ hashCode = hashCode * 8191 + failure2.hashCode();
- boolean present_f3 = true && (isSetF3());
- list.add(present_f3);
- if (present_f3)
- list.add(f3);
+ hashCode = hashCode * 8191 + ((isSetF3()) ? 131071 : 524287);
+ if (isSetF3())
+ hashCode = hashCode * 8191 + f3.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -16955,7 +19175,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -16965,7 +19185,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
+ lastComparison = java.lang.Boolean.compare(isSetFailure(), other.isSetFailure());
if (lastComparison != 0) {
return lastComparison;
}
@@ -16975,7 +19195,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFailure2()).compareTo(other.isSetFailure2());
+ lastComparison = java.lang.Boolean.compare(isSetFailure2(), other.isSetFailure2());
if (lastComparison != 0) {
return lastComparison;
}
@@ -16985,7 +19205,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetF3()).compareTo(other.isSetF3());
+ lastComparison = java.lang.Boolean.compare(isSetF3(), other.isSetF3());
if (lastComparison != 0) {
return lastComparison;
}
@@ -16998,21 +19218,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImageData_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getImageData_result(");
boolean first = true;
sb.append("success:");
@@ -17066,7 +19289,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -17074,14 +19297,16 @@ public class MasterServer {
}
}
- private static class getImageData_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getImageData_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageData_resultStandardScheme getScheme() {
return new getImageData_resultStandardScheme();
}
}
- private static class getImageData_resultStandardScheme extends StandardScheme<getImageData_result> {
+ private static class getImageData_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getImageData_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getImageData_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -17139,6 +19364,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getImageData_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -17169,18 +19395,19 @@ public class MasterServer {
}
- private static class getImageData_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getImageData_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageData_resultTupleScheme getScheme() {
return new getImageData_resultTupleScheme();
}
}
- private static class getImageData_resultTupleScheme extends TupleScheme<getImageData_result> {
+ private static class getImageData_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getImageData_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getImageData_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -17210,8 +19437,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getImageData_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.success = new ImagePublishData();
struct.success.read(iprot);
@@ -17235,8 +19462,12 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class submitImage_args implements org.apache.thrift.TBase<submitImage_args, submitImage_args._Fields>, java.io.Serializable, Cloneable, Comparable<submitImage_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitImage_args");
@@ -17244,15 +19475,12 @@ public class MasterServer {
private static final org.apache.thrift.protocol.TField IMAGE_DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("imageDescription", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField BLOCK_HASHES_FIELD_DESC = new org.apache.thrift.protocol.TField("blockHashes", org.apache.thrift.protocol.TType.LIST, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new submitImage_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new submitImage_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new submitImage_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new submitImage_argsTupleSchemeFactory();
- public String userToken; // required
- public ImagePublishData imageDescription; // required
- public List<ByteBuffer> blockHashes; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable ImagePublishData imageDescription; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> blockHashes; // 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 {
@@ -17260,10 +19488,10 @@ public class MasterServer {
IMAGE_DESCRIPTION((short)2, "imageDescription"),
BLOCK_HASHES((short)3, "blockHashes");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -17271,6 +19499,7 @@ public class MasterServer {
/**
* 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: // USER_TOKEN
@@ -17290,38 +19519,41 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.IMAGE_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("imageDescription", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -17329,7 +19561,7 @@ public class MasterServer {
tmpMap.put(_Fields.BLOCK_HASHES, new org.apache.thrift.meta_data.FieldMetaData("blockHashes", 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 , true))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitImage_args.class, metaDataMap);
}
@@ -17337,9 +19569,9 @@ public class MasterServer {
}
public submitImage_args(
- String userToken,
+ java.lang.String userToken,
ImagePublishData imageDescription,
- List<ByteBuffer> blockHashes)
+ java.util.List<java.nio.ByteBuffer> blockHashes)
{
this();
this.userToken = userToken;
@@ -17358,11 +19590,12 @@ public class MasterServer {
this.imageDescription = new ImagePublishData(other.imageDescription);
}
if (other.isSetBlockHashes()) {
- List<ByteBuffer> __this__blockHashes = new ArrayList<ByteBuffer>(other.blockHashes);
+ java.util.List<java.nio.ByteBuffer> __this__blockHashes = new java.util.ArrayList<java.nio.ByteBuffer>(other.blockHashes);
this.blockHashes = __this__blockHashes;
}
}
+ @Override
public submitImage_args deepCopy() {
return new submitImage_args(this);
}
@@ -17374,11 +19607,12 @@ public class MasterServer {
this.blockHashes = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public submitImage_args setUserToken(String userToken) {
+ public submitImage_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -17398,11 +19632,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public ImagePublishData getImageDescription() {
return this.imageDescription;
}
- public submitImage_args setImageDescription(ImagePublishData imageDescription) {
+ public submitImage_args setImageDescription(@org.apache.thrift.annotation.Nullable ImagePublishData imageDescription) {
this.imageDescription = imageDescription;
return this;
}
@@ -17426,22 +19661,24 @@ public class MasterServer {
return (this.blockHashes == null) ? 0 : this.blockHashes.size();
}
- public java.util.Iterator<ByteBuffer> getBlockHashesIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.nio.ByteBuffer> getBlockHashesIterator() {
return (this.blockHashes == null) ? null : this.blockHashes.iterator();
}
- public void addToBlockHashes(ByteBuffer elem) {
+ public void addToBlockHashes(java.nio.ByteBuffer elem) {
if (this.blockHashes == null) {
- this.blockHashes = new ArrayList<ByteBuffer>();
+ this.blockHashes = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.blockHashes.add(elem);
}
- public List<ByteBuffer> getBlockHashes() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.nio.ByteBuffer> getBlockHashes() {
return this.blockHashes;
}
- public submitImage_args setBlockHashes(List<ByteBuffer> blockHashes) {
+ public submitImage_args setBlockHashes(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> blockHashes) {
this.blockHashes = blockHashes;
return this;
}
@@ -17461,13 +19698,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -17483,14 +19721,16 @@ public class MasterServer {
if (value == null) {
unsetBlockHashes();
} else {
- setBlockHashes((List<ByteBuffer>)value);
+ setBlockHashes((java.util.List<java.nio.ByteBuffer>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -17502,13 +19742,14 @@ public class MasterServer {
return getBlockHashes();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -17519,13 +19760,11 @@ public class MasterServer {
case BLOCK_HASHES:
return isSetBlockHashes();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof submitImage_args)
return this.equals((submitImage_args)that);
return false;
@@ -17534,6 +19773,8 @@ public class MasterServer {
public boolean equals(submitImage_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -17567,24 +19808,21 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_imageDescription = true && (isSetImageDescription());
- list.add(present_imageDescription);
- if (present_imageDescription)
- list.add(imageDescription);
+ hashCode = hashCode * 8191 + ((isSetImageDescription()) ? 131071 : 524287);
+ if (isSetImageDescription())
+ hashCode = hashCode * 8191 + imageDescription.hashCode();
- boolean present_blockHashes = true && (isSetBlockHashes());
- list.add(present_blockHashes);
- if (present_blockHashes)
- list.add(blockHashes);
+ hashCode = hashCode * 8191 + ((isSetBlockHashes()) ? 131071 : 524287);
+ if (isSetBlockHashes())
+ hashCode = hashCode * 8191 + blockHashes.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -17595,7 +19833,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -17605,7 +19843,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageDescription()).compareTo(other.isSetImageDescription());
+ lastComparison = java.lang.Boolean.compare(isSetImageDescription(), other.isSetImageDescription());
if (lastComparison != 0) {
return lastComparison;
}
@@ -17615,7 +19853,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetBlockHashes()).compareTo(other.isSetBlockHashes());
+ lastComparison = java.lang.Boolean.compare(isSetBlockHashes(), other.isSetBlockHashes());
if (lastComparison != 0) {
return lastComparison;
}
@@ -17628,21 +19866,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("submitImage_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("submitImage_args(");
boolean first = true;
sb.append("userToken:");
@@ -17688,7 +19930,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -17696,14 +19938,16 @@ public class MasterServer {
}
}
- private static class submitImage_argsStandardSchemeFactory implements SchemeFactory {
+ private static class submitImage_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public submitImage_argsStandardScheme getScheme() {
return new submitImage_argsStandardScheme();
}
}
- private static class submitImage_argsStandardScheme extends StandardScheme<submitImage_args> {
+ private static class submitImage_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<submitImage_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, submitImage_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -17734,13 +19978,13 @@ public class MasterServer {
case 3: // BLOCK_HASHES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list322 = iprot.readListBegin();
- struct.blockHashes = new ArrayList<ByteBuffer>(_list322.size);
- ByteBuffer _elem323;
- for (int _i324 = 0; _i324 < _list322.size; ++_i324)
+ org.apache.thrift.protocol.TList _list434 = iprot.readListBegin();
+ struct.blockHashes = new java.util.ArrayList<java.nio.ByteBuffer>(_list434.size);
+ @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem435;
+ for (int _i436 = 0; _i436 < _list434.size; ++_i436)
{
- _elem323 = iprot.readBinary();
- struct.blockHashes.add(_elem323);
+ _elem435 = iprot.readBinary();
+ struct.blockHashes.add(_elem435);
}
iprot.readListEnd();
}
@@ -17760,6 +20004,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, submitImage_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -17778,9 +20023,9 @@ public class MasterServer {
oprot.writeFieldBegin(BLOCK_HASHES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.blockHashes.size()));
- for (ByteBuffer _iter325 : struct.blockHashes)
+ for (java.nio.ByteBuffer _iter437 : struct.blockHashes)
{
- oprot.writeBinary(_iter325);
+ oprot.writeBinary(_iter437);
}
oprot.writeListEnd();
}
@@ -17792,18 +20037,19 @@ public class MasterServer {
}
- private static class submitImage_argsTupleSchemeFactory implements SchemeFactory {
+ private static class submitImage_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public submitImage_argsTupleScheme getScheme() {
return new submitImage_argsTupleScheme();
}
}
- private static class submitImage_argsTupleScheme extends TupleScheme<submitImage_args> {
+ private static class submitImage_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<submitImage_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, submitImage_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -17823,9 +20069,9 @@ public class MasterServer {
if (struct.isSetBlockHashes()) {
{
oprot.writeI32(struct.blockHashes.size());
- for (ByteBuffer _iter326 : struct.blockHashes)
+ for (java.nio.ByteBuffer _iter438 : struct.blockHashes)
{
- oprot.writeBinary(_iter326);
+ oprot.writeBinary(_iter438);
}
}
}
@@ -17833,8 +20079,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, submitImage_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -17846,13 +20092,13 @@ public class MasterServer {
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list327 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.blockHashes = new ArrayList<ByteBuffer>(_list327.size);
- ByteBuffer _elem328;
- for (int _i329 = 0; _i329 < _list327.size; ++_i329)
+ org.apache.thrift.protocol.TList _list439 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.blockHashes = new java.util.ArrayList<java.nio.ByteBuffer>(_list439.size);
+ @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem440;
+ for (int _i441 = 0; _i441 < _list439.size; ++_i441)
{
- _elem328 = iprot.readBinary();
- struct.blockHashes.add(_elem328);
+ _elem440 = iprot.readBinary();
+ struct.blockHashes.add(_elem440);
}
}
struct.setBlockHashesIsSet(true);
@@ -17860,8 +20106,12 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class submitImage_result implements org.apache.thrift.TBase<submitImage_result, submitImage_result._Fields>, java.io.Serializable, Cloneable, Comparable<submitImage_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("submitImage_result");
@@ -17870,16 +20120,13 @@ public class MasterServer {
private static final org.apache.thrift.protocol.TField FAILURE2_FIELD_DESC = new org.apache.thrift.protocol.TField("failure2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField FAILURE3_FIELD_DESC = new org.apache.thrift.protocol.TField("failure3", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new submitImage_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new submitImage_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new submitImage_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new submitImage_resultTupleSchemeFactory();
- public TransferInformation success; // required
- public TAuthorizationException failure; // required
- public TInvocationException failure2; // required
- public TTransferRejectedException failure3; // required
+ public @org.apache.thrift.annotation.Nullable TransferInformation success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException failure2; // required
+ public @org.apache.thrift.annotation.Nullable TTransferRejectedException failure3; // 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 {
@@ -17888,10 +20135,10 @@ public class MasterServer {
FAILURE2((short)2, "failure2"),
FAILURE3((short)3, "failure3");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -17899,6 +20146,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -17920,47 +20168,50 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransferInformation.class)));
tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.FAILURE2, new org.apache.thrift.meta_data.FieldMetaData("failure2", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
tmpMap.put(_Fields.FAILURE3, new org.apache.thrift.meta_data.FieldMetaData("failure3", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTransferRejectedException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(submitImage_result.class, metaDataMap);
}
@@ -17998,6 +20249,7 @@ public class MasterServer {
}
}
+ @Override
public submitImage_result deepCopy() {
return new submitImage_result(this);
}
@@ -18010,11 +20262,12 @@ public class MasterServer {
this.failure3 = null;
}
+ @org.apache.thrift.annotation.Nullable
public TransferInformation getSuccess() {
return this.success;
}
- public submitImage_result setSuccess(TransferInformation success) {
+ public submitImage_result setSuccess(@org.apache.thrift.annotation.Nullable TransferInformation success) {
this.success = success;
return this;
}
@@ -18034,11 +20287,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getFailure() {
return this.failure;
}
- public submitImage_result setFailure(TAuthorizationException failure) {
+ public submitImage_result setFailure(@org.apache.thrift.annotation.Nullable TAuthorizationException failure) {
this.failure = failure;
return this;
}
@@ -18058,11 +20312,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getFailure2() {
return this.failure2;
}
- public submitImage_result setFailure2(TInvocationException failure2) {
+ public submitImage_result setFailure2(@org.apache.thrift.annotation.Nullable TInvocationException failure2) {
this.failure2 = failure2;
return this;
}
@@ -18082,11 +20337,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TTransferRejectedException getFailure3() {
return this.failure3;
}
- public submitImage_result setFailure3(TTransferRejectedException failure3) {
+ public submitImage_result setFailure3(@org.apache.thrift.annotation.Nullable TTransferRejectedException failure3) {
this.failure3 = failure3;
return this;
}
@@ -18106,7 +20362,8 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -18143,7 +20400,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -18158,13 +20417,14 @@ public class MasterServer {
return getFailure3();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -18177,13 +20437,11 @@ public class MasterServer {
case FAILURE3:
return isSetFailure3();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof submitImage_result)
return this.equals((submitImage_result)that);
return false;
@@ -18192,6 +20450,8 @@ public class MasterServer {
public boolean equals(submitImage_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -18234,29 +20494,25 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_failure = true && (isSetFailure());
- list.add(present_failure);
- if (present_failure)
- list.add(failure);
+ hashCode = hashCode * 8191 + ((isSetFailure()) ? 131071 : 524287);
+ if (isSetFailure())
+ hashCode = hashCode * 8191 + failure.hashCode();
- boolean present_failure2 = true && (isSetFailure2());
- list.add(present_failure2);
- if (present_failure2)
- list.add(failure2);
+ hashCode = hashCode * 8191 + ((isSetFailure2()) ? 131071 : 524287);
+ if (isSetFailure2())
+ hashCode = hashCode * 8191 + failure2.hashCode();
- boolean present_failure3 = true && (isSetFailure3());
- list.add(present_failure3);
- if (present_failure3)
- list.add(failure3);
+ hashCode = hashCode * 8191 + ((isSetFailure3()) ? 131071 : 524287);
+ if (isSetFailure3())
+ hashCode = hashCode * 8191 + failure3.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -18267,7 +20523,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -18277,7 +20533,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
+ lastComparison = java.lang.Boolean.compare(isSetFailure(), other.isSetFailure());
if (lastComparison != 0) {
return lastComparison;
}
@@ -18287,7 +20543,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFailure2()).compareTo(other.isSetFailure2());
+ lastComparison = java.lang.Boolean.compare(isSetFailure2(), other.isSetFailure2());
if (lastComparison != 0) {
return lastComparison;
}
@@ -18297,7 +20553,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFailure3()).compareTo(other.isSetFailure3());
+ lastComparison = java.lang.Boolean.compare(isSetFailure3(), other.isSetFailure3());
if (lastComparison != 0) {
return lastComparison;
}
@@ -18310,21 +20566,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("submitImage_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("submitImage_result(");
boolean first = true;
sb.append("success:");
@@ -18378,7 +20637,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -18386,14 +20645,16 @@ public class MasterServer {
}
}
- private static class submitImage_resultStandardSchemeFactory implements SchemeFactory {
+ private static class submitImage_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public submitImage_resultStandardScheme getScheme() {
return new submitImage_resultStandardScheme();
}
}
- private static class submitImage_resultStandardScheme extends StandardScheme<submitImage_result> {
+ private static class submitImage_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<submitImage_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, submitImage_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -18451,6 +20712,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, submitImage_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -18481,18 +20743,19 @@ public class MasterServer {
}
- private static class submitImage_resultTupleSchemeFactory implements SchemeFactory {
+ private static class submitImage_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public submitImage_resultTupleScheme getScheme() {
return new submitImage_resultTupleScheme();
}
}
- private static class submitImage_resultTupleScheme extends TupleScheme<submitImage_result> {
+ private static class submitImage_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<submitImage_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, submitImage_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -18522,8 +20785,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, submitImage_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.success = new TransferInformation();
struct.success.read(iprot);
@@ -18547,8 +20810,12 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class registerSatellite_args implements org.apache.thrift.TBase<registerSatellite_args, registerSatellite_args._Fields>, java.io.Serializable, Cloneable, Comparable<registerSatellite_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerSatellite_args");
@@ -18559,18 +20826,15 @@ public class MasterServer {
private static final org.apache.thrift.protocol.TField EXPONENT_FIELD_DESC = new org.apache.thrift.protocol.TField("exponent", org.apache.thrift.protocol.TType.STRING, (short)4);
private static final org.apache.thrift.protocol.TField CERTSHA256_FIELD_DESC = new org.apache.thrift.protocol.TField("certsha256", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new registerSatellite_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new registerSatellite_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new registerSatellite_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new registerSatellite_argsTupleSchemeFactory();
- public String userToken; // required
- public String displayName; // required
- public List<String> addresses; // required
- public String modulus; // required
- public String exponent; // required
- public ByteBuffer certsha256; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String displayName; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> addresses; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String modulus; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String exponent; // required
+ public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer certsha256; // 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 {
@@ -18581,10 +20845,10 @@ public class MasterServer {
EXPONENT((short)4, "exponent"),
CERTSHA256((short)1, "certsha256");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -18592,6 +20856,7 @@ public class MasterServer {
/**
* 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 6: // USER_TOKEN
@@ -18617,38 +20882,41 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.DISPLAY_NAME, new org.apache.thrift.meta_data.FieldMetaData("displayName", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -18662,7 +20930,7 @@ public class MasterServer {
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.CERTSHA256, new org.apache.thrift.meta_data.FieldMetaData("certsha256", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerSatellite_args.class, metaDataMap);
}
@@ -18670,12 +20938,12 @@ public class MasterServer {
}
public registerSatellite_args(
- String userToken,
- String displayName,
- List<String> addresses,
- String modulus,
- String exponent,
- ByteBuffer certsha256)
+ java.lang.String userToken,
+ java.lang.String displayName,
+ java.util.List<java.lang.String> addresses,
+ java.lang.String modulus,
+ java.lang.String exponent,
+ java.nio.ByteBuffer certsha256)
{
this();
this.userToken = userToken;
@@ -18697,7 +20965,7 @@ public class MasterServer {
this.displayName = other.displayName;
}
if (other.isSetAddresses()) {
- List<String> __this__addresses = new ArrayList<String>(other.addresses);
+ java.util.List<java.lang.String> __this__addresses = new java.util.ArrayList<java.lang.String>(other.addresses);
this.addresses = __this__addresses;
}
if (other.isSetModulus()) {
@@ -18711,6 +20979,7 @@ public class MasterServer {
}
}
+ @Override
public registerSatellite_args deepCopy() {
return new registerSatellite_args(this);
}
@@ -18725,11 +20994,12 @@ public class MasterServer {
this.certsha256 = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public registerSatellite_args setUserToken(String userToken) {
+ public registerSatellite_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -18749,11 +21019,12 @@ public class MasterServer {
}
}
- public String getDisplayName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getDisplayName() {
return this.displayName;
}
- public registerSatellite_args setDisplayName(String displayName) {
+ public registerSatellite_args setDisplayName(@org.apache.thrift.annotation.Nullable java.lang.String displayName) {
this.displayName = displayName;
return this;
}
@@ -18777,22 +21048,24 @@ public class MasterServer {
return (this.addresses == null) ? 0 : this.addresses.size();
}
- public java.util.Iterator<String> getAddressesIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> getAddressesIterator() {
return (this.addresses == null) ? null : this.addresses.iterator();
}
- public void addToAddresses(String elem) {
+ public void addToAddresses(java.lang.String elem) {
if (this.addresses == null) {
- this.addresses = new ArrayList<String>();
+ this.addresses = new java.util.ArrayList<java.lang.String>();
}
this.addresses.add(elem);
}
- public List<String> getAddresses() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getAddresses() {
return this.addresses;
}
- public registerSatellite_args setAddresses(List<String> addresses) {
+ public registerSatellite_args setAddresses(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> addresses) {
this.addresses = addresses;
return this;
}
@@ -18812,11 +21085,12 @@ public class MasterServer {
}
}
- public String getModulus() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getModulus() {
return this.modulus;
}
- public registerSatellite_args setModulus(String modulus) {
+ public registerSatellite_args setModulus(@org.apache.thrift.annotation.Nullable java.lang.String modulus) {
this.modulus = modulus;
return this;
}
@@ -18836,11 +21110,12 @@ public class MasterServer {
}
}
- public String getExponent() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getExponent() {
return this.exponent;
}
- public registerSatellite_args setExponent(String exponent) {
+ public registerSatellite_args setExponent(@org.apache.thrift.annotation.Nullable java.lang.String exponent) {
this.exponent = exponent;
return this;
}
@@ -18865,16 +21140,16 @@ public class MasterServer {
return certsha256 == null ? null : certsha256.array();
}
- public ByteBuffer bufferForCertsha256() {
+ public java.nio.ByteBuffer bufferForCertsha256() {
return org.apache.thrift.TBaseHelper.copyBinary(certsha256);
}
public registerSatellite_args setCertsha256(byte[] certsha256) {
- this.certsha256 = certsha256 == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(certsha256, certsha256.length));
+ this.certsha256 = certsha256 == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(certsha256.clone());
return this;
}
- public registerSatellite_args setCertsha256(ByteBuffer certsha256) {
+ public registerSatellite_args setCertsha256(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer certsha256) {
this.certsha256 = org.apache.thrift.TBaseHelper.copyBinary(certsha256);
return this;
}
@@ -18894,13 +21169,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -18908,7 +21184,7 @@ public class MasterServer {
if (value == null) {
unsetDisplayName();
} else {
- setDisplayName((String)value);
+ setDisplayName((java.lang.String)value);
}
break;
@@ -18916,7 +21192,7 @@ public class MasterServer {
if (value == null) {
unsetAddresses();
} else {
- setAddresses((List<String>)value);
+ setAddresses((java.util.List<java.lang.String>)value);
}
break;
@@ -18924,7 +21200,7 @@ public class MasterServer {
if (value == null) {
unsetModulus();
} else {
- setModulus((String)value);
+ setModulus((java.lang.String)value);
}
break;
@@ -18932,7 +21208,7 @@ public class MasterServer {
if (value == null) {
unsetExponent();
} else {
- setExponent((String)value);
+ setExponent((java.lang.String)value);
}
break;
@@ -18940,14 +21216,20 @@ public class MasterServer {
if (value == null) {
unsetCertsha256();
} else {
- setCertsha256((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setCertsha256((byte[])value);
+ } else {
+ setCertsha256((java.nio.ByteBuffer)value);
+ }
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -18968,13 +21250,14 @@ public class MasterServer {
return getCertsha256();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -18991,13 +21274,11 @@ public class MasterServer {
case CERTSHA256:
return isSetCertsha256();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof registerSatellite_args)
return this.equals((registerSatellite_args)that);
return false;
@@ -19006,6 +21287,8 @@ public class MasterServer {
public boolean equals(registerSatellite_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -19066,39 +21349,33 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_displayName = true && (isSetDisplayName());
- list.add(present_displayName);
- if (present_displayName)
- list.add(displayName);
+ hashCode = hashCode * 8191 + ((isSetDisplayName()) ? 131071 : 524287);
+ if (isSetDisplayName())
+ hashCode = hashCode * 8191 + displayName.hashCode();
- boolean present_addresses = true && (isSetAddresses());
- list.add(present_addresses);
- if (present_addresses)
- list.add(addresses);
+ hashCode = hashCode * 8191 + ((isSetAddresses()) ? 131071 : 524287);
+ if (isSetAddresses())
+ hashCode = hashCode * 8191 + addresses.hashCode();
- boolean present_modulus = true && (isSetModulus());
- list.add(present_modulus);
- if (present_modulus)
- list.add(modulus);
+ hashCode = hashCode * 8191 + ((isSetModulus()) ? 131071 : 524287);
+ if (isSetModulus())
+ hashCode = hashCode * 8191 + modulus.hashCode();
- boolean present_exponent = true && (isSetExponent());
- list.add(present_exponent);
- if (present_exponent)
- list.add(exponent);
+ hashCode = hashCode * 8191 + ((isSetExponent()) ? 131071 : 524287);
+ if (isSetExponent())
+ hashCode = hashCode * 8191 + exponent.hashCode();
- boolean present_certsha256 = true && (isSetCertsha256());
- list.add(present_certsha256);
- if (present_certsha256)
- list.add(certsha256);
+ hashCode = hashCode * 8191 + ((isSetCertsha256()) ? 131071 : 524287);
+ if (isSetCertsha256())
+ hashCode = hashCode * 8191 + certsha256.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -19109,7 +21386,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -19119,7 +21396,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDisplayName()).compareTo(other.isSetDisplayName());
+ lastComparison = java.lang.Boolean.compare(isSetDisplayName(), other.isSetDisplayName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -19129,7 +21406,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAddresses()).compareTo(other.isSetAddresses());
+ lastComparison = java.lang.Boolean.compare(isSetAddresses(), other.isSetAddresses());
if (lastComparison != 0) {
return lastComparison;
}
@@ -19139,7 +21416,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetModulus()).compareTo(other.isSetModulus());
+ lastComparison = java.lang.Boolean.compare(isSetModulus(), other.isSetModulus());
if (lastComparison != 0) {
return lastComparison;
}
@@ -19149,7 +21426,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetExponent()).compareTo(other.isSetExponent());
+ lastComparison = java.lang.Boolean.compare(isSetExponent(), other.isSetExponent());
if (lastComparison != 0) {
return lastComparison;
}
@@ -19159,7 +21436,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCertsha256()).compareTo(other.isSetCertsha256());
+ lastComparison = java.lang.Boolean.compare(isSetCertsha256(), other.isSetCertsha256());
if (lastComparison != 0) {
return lastComparison;
}
@@ -19172,21 +21449,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("registerSatellite_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("registerSatellite_args(");
boolean first = true;
sb.append("userToken:");
@@ -19253,7 +21534,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -19261,14 +21542,16 @@ public class MasterServer {
}
}
- private static class registerSatellite_argsStandardSchemeFactory implements SchemeFactory {
+ private static class registerSatellite_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public registerSatellite_argsStandardScheme getScheme() {
return new registerSatellite_argsStandardScheme();
}
}
- private static class registerSatellite_argsStandardScheme extends StandardScheme<registerSatellite_args> {
+ private static class registerSatellite_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<registerSatellite_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, registerSatellite_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -19298,13 +21581,13 @@ public class MasterServer {
case 2: // ADDRESSES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list330 = iprot.readListBegin();
- struct.addresses = new ArrayList<String>(_list330.size);
- String _elem331;
- for (int _i332 = 0; _i332 < _list330.size; ++_i332)
+ org.apache.thrift.protocol.TList _list442 = iprot.readListBegin();
+ struct.addresses = new java.util.ArrayList<java.lang.String>(_list442.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem443;
+ for (int _i444 = 0; _i444 < _list442.size; ++_i444)
{
- _elem331 = iprot.readString();
- struct.addresses.add(_elem331);
+ _elem443 = iprot.readString();
+ struct.addresses.add(_elem443);
}
iprot.readListEnd();
}
@@ -19348,6 +21631,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, registerSatellite_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -19361,9 +21645,9 @@ public class MasterServer {
oprot.writeFieldBegin(ADDRESSES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.addresses.size()));
- for (String _iter333 : struct.addresses)
+ for (java.lang.String _iter445 : struct.addresses)
{
- oprot.writeString(_iter333);
+ oprot.writeString(_iter445);
}
oprot.writeListEnd();
}
@@ -19395,18 +21679,19 @@ public class MasterServer {
}
- private static class registerSatellite_argsTupleSchemeFactory implements SchemeFactory {
+ private static class registerSatellite_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public registerSatellite_argsTupleScheme getScheme() {
return new registerSatellite_argsTupleScheme();
}
}
- private static class registerSatellite_argsTupleScheme extends TupleScheme<registerSatellite_args> {
+ private static class registerSatellite_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<registerSatellite_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, registerSatellite_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -19435,9 +21720,9 @@ public class MasterServer {
if (struct.isSetAddresses()) {
{
oprot.writeI32(struct.addresses.size());
- for (String _iter334 : struct.addresses)
+ for (java.lang.String _iter446 : struct.addresses)
{
- oprot.writeString(_iter334);
+ oprot.writeString(_iter446);
}
}
}
@@ -19454,8 +21739,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, registerSatellite_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(6);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(6);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -19466,13 +21751,13 @@ public class MasterServer {
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list335 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.addresses = new ArrayList<String>(_list335.size);
- String _elem336;
- for (int _i337 = 0; _i337 < _list335.size; ++_i337)
+ org.apache.thrift.protocol.TList _list447 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.addresses = new java.util.ArrayList<java.lang.String>(_list447.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem448;
+ for (int _i449 = 0; _i449 < _list447.size; ++_i449)
{
- _elem336 = iprot.readString();
- struct.addresses.add(_elem336);
+ _elem448 = iprot.readString();
+ struct.addresses.add(_elem448);
}
}
struct.setAddressesIsSet(true);
@@ -19492,32 +21777,33 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class registerSatellite_result implements org.apache.thrift.TBase<registerSatellite_result, registerSatellite_result._Fields>, java.io.Serializable, Cloneable, Comparable<registerSatellite_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("registerSatellite_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);
private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new registerSatellite_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new registerSatellite_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new registerSatellite_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new registerSatellite_resultTupleSchemeFactory();
public int success; // required
- public TInvocationException error; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException error; // 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 {
SUCCESS((short)0, "success"),
ERROR((short)1, "error");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -19525,6 +21811,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -19542,30 +21829,33 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -19573,14 +21863,14 @@ public class MasterServer {
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerSatellite_result.class, metaDataMap);
}
@@ -19608,6 +21898,7 @@ public class MasterServer {
}
}
+ @Override
public registerSatellite_result deepCopy() {
return new registerSatellite_result(this);
}
@@ -19630,23 +21921,24 @@ public class MasterServer {
}
public void unsetSuccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
- return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getError() {
return this.error;
}
- public registerSatellite_result setError(TInvocationException error) {
+ public registerSatellite_result setError(@org.apache.thrift.annotation.Nullable TInvocationException error) {
this.error = error;
return this;
}
@@ -19666,13 +21958,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((Integer)value);
+ setSuccess((java.lang.Integer)value);
}
break;
@@ -19687,7 +21980,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -19696,13 +21991,14 @@ public class MasterServer {
return getError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -19711,13 +22007,11 @@ public class MasterServer {
case ERROR:
return isSetError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof registerSatellite_result)
return this.equals((registerSatellite_result)that);
return false;
@@ -19726,6 +22020,8 @@ public class MasterServer {
public boolean equals(registerSatellite_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true;
boolean that_present_success = true;
@@ -19750,19 +22046,15 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true;
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + success;
- boolean present_error = true && (isSetError());
- list.add(present_error);
- if (present_error)
- list.add(error);
+ hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287);
+ if (isSetError())
+ hashCode = hashCode * 8191 + error.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -19773,7 +22065,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -19783,7 +22075,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetError()).compareTo(other.isSetError());
+ lastComparison = java.lang.Boolean.compare(isSetError(), other.isSetError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -19796,21 +22088,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("registerSatellite_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("registerSatellite_result(");
boolean first = true;
sb.append("success:");
@@ -19841,7 +22136,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -19851,14 +22146,16 @@ public class MasterServer {
}
}
- private static class registerSatellite_resultStandardSchemeFactory implements SchemeFactory {
+ private static class registerSatellite_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public registerSatellite_resultStandardScheme getScheme() {
return new registerSatellite_resultStandardScheme();
}
}
- private static class registerSatellite_resultStandardScheme extends StandardScheme<registerSatellite_result> {
+ private static class registerSatellite_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<registerSatellite_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, registerSatellite_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -19897,6 +22194,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, registerSatellite_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -19917,18 +22215,19 @@ public class MasterServer {
}
- private static class registerSatellite_resultTupleSchemeFactory implements SchemeFactory {
+ private static class registerSatellite_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public registerSatellite_resultTupleScheme getScheme() {
return new registerSatellite_resultTupleScheme();
}
}
- private static class registerSatellite_resultTupleScheme extends TupleScheme<registerSatellite_result> {
+ private static class registerSatellite_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<registerSatellite_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, registerSatellite_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -19946,8 +22245,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, registerSatellite_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = iprot.readI32();
struct.setSuccessIsSet(true);
@@ -19960,8 +22259,12 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class updateSatellite_args implements org.apache.thrift.TBase<updateSatellite_args, updateSatellite_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateSatellite_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSatellite_args");
@@ -19969,15 +22272,12 @@ public class MasterServer {
private static final org.apache.thrift.protocol.TField DISPLAY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("displayName", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField ADDRESSES_FIELD_DESC = new org.apache.thrift.protocol.TField("addresses", org.apache.thrift.protocol.TType.LIST, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new updateSatellite_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new updateSatellite_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateSatellite_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateSatellite_argsTupleSchemeFactory();
- public String serverSessionId; // required
- public String displayName; // required
- public List<String> addresses; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String serverSessionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String displayName; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> addresses; // 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 {
@@ -19985,10 +22285,10 @@ public class MasterServer {
DISPLAY_NAME((short)2, "displayName"),
ADDRESSES((short)3, "addresses");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -19996,6 +22296,7 @@ public class MasterServer {
/**
* 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: // SERVER_SESSION_ID
@@ -20015,38 +22316,41 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SERVER_SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("serverSessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.DISPLAY_NAME, new org.apache.thrift.meta_data.FieldMetaData("displayName", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -20054,7 +22358,7 @@ public class MasterServer {
tmpMap.put(_Fields.ADDRESSES, new org.apache.thrift.meta_data.FieldMetaData("addresses", 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))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSatellite_args.class, metaDataMap);
}
@@ -20062,9 +22366,9 @@ public class MasterServer {
}
public updateSatellite_args(
- String serverSessionId,
- String displayName,
- List<String> addresses)
+ java.lang.String serverSessionId,
+ java.lang.String displayName,
+ java.util.List<java.lang.String> addresses)
{
this();
this.serverSessionId = serverSessionId;
@@ -20083,11 +22387,12 @@ public class MasterServer {
this.displayName = other.displayName;
}
if (other.isSetAddresses()) {
- List<String> __this__addresses = new ArrayList<String>(other.addresses);
+ java.util.List<java.lang.String> __this__addresses = new java.util.ArrayList<java.lang.String>(other.addresses);
this.addresses = __this__addresses;
}
}
+ @Override
public updateSatellite_args deepCopy() {
return new updateSatellite_args(this);
}
@@ -20099,11 +22404,12 @@ public class MasterServer {
this.addresses = null;
}
- public String getServerSessionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getServerSessionId() {
return this.serverSessionId;
}
- public updateSatellite_args setServerSessionId(String serverSessionId) {
+ public updateSatellite_args setServerSessionId(@org.apache.thrift.annotation.Nullable java.lang.String serverSessionId) {
this.serverSessionId = serverSessionId;
return this;
}
@@ -20123,11 +22429,12 @@ public class MasterServer {
}
}
- public String getDisplayName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getDisplayName() {
return this.displayName;
}
- public updateSatellite_args setDisplayName(String displayName) {
+ public updateSatellite_args setDisplayName(@org.apache.thrift.annotation.Nullable java.lang.String displayName) {
this.displayName = displayName;
return this;
}
@@ -20151,22 +22458,24 @@ public class MasterServer {
return (this.addresses == null) ? 0 : this.addresses.size();
}
- public java.util.Iterator<String> getAddressesIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> getAddressesIterator() {
return (this.addresses == null) ? null : this.addresses.iterator();
}
- public void addToAddresses(String elem) {
+ public void addToAddresses(java.lang.String elem) {
if (this.addresses == null) {
- this.addresses = new ArrayList<String>();
+ this.addresses = new java.util.ArrayList<java.lang.String>();
}
this.addresses.add(elem);
}
- public List<String> getAddresses() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getAddresses() {
return this.addresses;
}
- public updateSatellite_args setAddresses(List<String> addresses) {
+ public updateSatellite_args setAddresses(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> addresses) {
this.addresses = addresses;
return this;
}
@@ -20186,13 +22495,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SERVER_SESSION_ID:
if (value == null) {
unsetServerSessionId();
} else {
- setServerSessionId((String)value);
+ setServerSessionId((java.lang.String)value);
}
break;
@@ -20200,7 +22510,7 @@ public class MasterServer {
if (value == null) {
unsetDisplayName();
} else {
- setDisplayName((String)value);
+ setDisplayName((java.lang.String)value);
}
break;
@@ -20208,14 +22518,16 @@ public class MasterServer {
if (value == null) {
unsetAddresses();
} else {
- setAddresses((List<String>)value);
+ setAddresses((java.util.List<java.lang.String>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SERVER_SESSION_ID:
return getServerSessionId();
@@ -20227,13 +22539,14 @@ public class MasterServer {
return getAddresses();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -20244,13 +22557,11 @@ public class MasterServer {
case ADDRESSES:
return isSetAddresses();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof updateSatellite_args)
return this.equals((updateSatellite_args)that);
return false;
@@ -20259,6 +22570,8 @@ public class MasterServer {
public boolean equals(updateSatellite_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_serverSessionId = true && this.isSetServerSessionId();
boolean that_present_serverSessionId = true && that.isSetServerSessionId();
@@ -20292,24 +22605,21 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_serverSessionId = true && (isSetServerSessionId());
- list.add(present_serverSessionId);
- if (present_serverSessionId)
- list.add(serverSessionId);
+ hashCode = hashCode * 8191 + ((isSetServerSessionId()) ? 131071 : 524287);
+ if (isSetServerSessionId())
+ hashCode = hashCode * 8191 + serverSessionId.hashCode();
- boolean present_displayName = true && (isSetDisplayName());
- list.add(present_displayName);
- if (present_displayName)
- list.add(displayName);
+ hashCode = hashCode * 8191 + ((isSetDisplayName()) ? 131071 : 524287);
+ if (isSetDisplayName())
+ hashCode = hashCode * 8191 + displayName.hashCode();
- boolean present_addresses = true && (isSetAddresses());
- list.add(present_addresses);
- if (present_addresses)
- list.add(addresses);
+ hashCode = hashCode * 8191 + ((isSetAddresses()) ? 131071 : 524287);
+ if (isSetAddresses())
+ hashCode = hashCode * 8191 + addresses.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -20320,7 +22630,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetServerSessionId()).compareTo(other.isSetServerSessionId());
+ lastComparison = java.lang.Boolean.compare(isSetServerSessionId(), other.isSetServerSessionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -20330,7 +22640,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDisplayName()).compareTo(other.isSetDisplayName());
+ lastComparison = java.lang.Boolean.compare(isSetDisplayName(), other.isSetDisplayName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -20340,7 +22650,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAddresses()).compareTo(other.isSetAddresses());
+ lastComparison = java.lang.Boolean.compare(isSetAddresses(), other.isSetAddresses());
if (lastComparison != 0) {
return lastComparison;
}
@@ -20353,21 +22663,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("updateSatellite_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("updateSatellite_args(");
boolean first = true;
sb.append("serverSessionId:");
@@ -20410,7 +22724,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -20418,14 +22732,16 @@ public class MasterServer {
}
}
- private static class updateSatellite_argsStandardSchemeFactory implements SchemeFactory {
+ private static class updateSatellite_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateSatellite_argsStandardScheme getScheme() {
return new updateSatellite_argsStandardScheme();
}
}
- private static class updateSatellite_argsStandardScheme extends StandardScheme<updateSatellite_args> {
+ private static class updateSatellite_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateSatellite_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, updateSatellite_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -20455,13 +22771,13 @@ public class MasterServer {
case 3: // ADDRESSES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list338 = iprot.readListBegin();
- struct.addresses = new ArrayList<String>(_list338.size);
- String _elem339;
- for (int _i340 = 0; _i340 < _list338.size; ++_i340)
+ org.apache.thrift.protocol.TList _list450 = iprot.readListBegin();
+ struct.addresses = new java.util.ArrayList<java.lang.String>(_list450.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem451;
+ for (int _i452 = 0; _i452 < _list450.size; ++_i452)
{
- _elem339 = iprot.readString();
- struct.addresses.add(_elem339);
+ _elem451 = iprot.readString();
+ struct.addresses.add(_elem451);
}
iprot.readListEnd();
}
@@ -20481,6 +22797,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, updateSatellite_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -20499,9 +22816,9 @@ public class MasterServer {
oprot.writeFieldBegin(ADDRESSES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.addresses.size()));
- for (String _iter341 : struct.addresses)
+ for (java.lang.String _iter453 : struct.addresses)
{
- oprot.writeString(_iter341);
+ oprot.writeString(_iter453);
}
oprot.writeListEnd();
}
@@ -20513,18 +22830,19 @@ public class MasterServer {
}
- private static class updateSatellite_argsTupleSchemeFactory implements SchemeFactory {
+ private static class updateSatellite_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateSatellite_argsTupleScheme getScheme() {
return new updateSatellite_argsTupleScheme();
}
}
- private static class updateSatellite_argsTupleScheme extends TupleScheme<updateSatellite_args> {
+ private static class updateSatellite_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateSatellite_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, updateSatellite_args 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.isSetServerSessionId()) {
optionals.set(0);
}
@@ -20544,9 +22862,9 @@ public class MasterServer {
if (struct.isSetAddresses()) {
{
oprot.writeI32(struct.addresses.size());
- for (String _iter342 : struct.addresses)
+ for (java.lang.String _iter454 : struct.addresses)
{
- oprot.writeString(_iter342);
+ oprot.writeString(_iter454);
}
}
}
@@ -20554,8 +22872,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, updateSatellite_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.serverSessionId = iprot.readString();
struct.setServerSessionIdIsSet(true);
@@ -20566,13 +22884,13 @@ public class MasterServer {
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list343 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.addresses = new ArrayList<String>(_list343.size);
- String _elem344;
- for (int _i345 = 0; _i345 < _list343.size; ++_i345)
+ org.apache.thrift.protocol.TList _list455 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.addresses = new java.util.ArrayList<java.lang.String>(_list455.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem456;
+ for (int _i457 = 0; _i457 < _list455.size; ++_i457)
{
- _elem344 = iprot.readString();
- struct.addresses.add(_elem344);
+ _elem456 = iprot.readString();
+ struct.addresses.add(_elem456);
}
}
struct.setAddressesIsSet(true);
@@ -20580,8 +22898,12 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class updateSatellite_result implements org.apache.thrift.TBase<updateSatellite_result, updateSatellite_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateSatellite_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSatellite_result");
@@ -20589,15 +22911,12 @@ public class MasterServer {
private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new updateSatellite_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new updateSatellite_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateSatellite_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateSatellite_resultTupleSchemeFactory();
public boolean success; // required
- public TAuthorizationException failure; // required
- public TInvocationException error; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException error; // 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 {
@@ -20605,10 +22924,10 @@ public class MasterServer {
FAILURE((short)1, "failure"),
ERROR((short)2, "error");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -20616,6 +22935,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -20635,30 +22955,33 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -20666,16 +22989,16 @@ public class MasterServer {
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSatellite_result.class, metaDataMap);
}
@@ -20708,6 +23031,7 @@ public class MasterServer {
}
}
+ @Override
public updateSatellite_result deepCopy() {
return new updateSatellite_result(this);
}
@@ -20731,23 +23055,24 @@ public class MasterServer {
}
public void unsetSuccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
- return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getFailure() {
return this.failure;
}
- public updateSatellite_result setFailure(TAuthorizationException failure) {
+ public updateSatellite_result setFailure(@org.apache.thrift.annotation.Nullable TAuthorizationException failure) {
this.failure = failure;
return this;
}
@@ -20767,11 +23092,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getError() {
return this.error;
}
- public updateSatellite_result setError(TInvocationException error) {
+ public updateSatellite_result setError(@org.apache.thrift.annotation.Nullable TInvocationException error) {
this.error = error;
return this;
}
@@ -20791,13 +23117,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((Boolean)value);
+ setSuccess((java.lang.Boolean)value);
}
break;
@@ -20820,7 +23147,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return isSuccess();
@@ -20832,13 +23161,14 @@ public class MasterServer {
return getError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -20849,13 +23179,11 @@ public class MasterServer {
case ERROR:
return isSetError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof updateSatellite_result)
return this.equals((updateSatellite_result)that);
return false;
@@ -20864,6 +23192,8 @@ public class MasterServer {
public boolean equals(updateSatellite_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true;
boolean that_present_success = true;
@@ -20897,24 +23227,19 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true;
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((success) ? 131071 : 524287);
- boolean present_failure = true && (isSetFailure());
- list.add(present_failure);
- if (present_failure)
- list.add(failure);
+ hashCode = hashCode * 8191 + ((isSetFailure()) ? 131071 : 524287);
+ if (isSetFailure())
+ hashCode = hashCode * 8191 + failure.hashCode();
- boolean present_error = true && (isSetError());
- list.add(present_error);
- if (present_error)
- list.add(error);
+ hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287);
+ if (isSetError())
+ hashCode = hashCode * 8191 + error.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -20925,7 +23250,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -20935,7 +23260,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
+ lastComparison = java.lang.Boolean.compare(isSetFailure(), other.isSetFailure());
if (lastComparison != 0) {
return lastComparison;
}
@@ -20945,7 +23270,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetError()).compareTo(other.isSetError());
+ lastComparison = java.lang.Boolean.compare(isSetError(), other.isSetError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -20958,21 +23283,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("updateSatellite_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("updateSatellite_result(");
boolean first = true;
sb.append("success:");
@@ -21011,7 +23339,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -21021,14 +23349,16 @@ public class MasterServer {
}
}
- private static class updateSatellite_resultStandardSchemeFactory implements SchemeFactory {
+ private static class updateSatellite_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateSatellite_resultStandardScheme getScheme() {
return new updateSatellite_resultStandardScheme();
}
}
- private static class updateSatellite_resultStandardScheme extends StandardScheme<updateSatellite_result> {
+ private static class updateSatellite_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateSatellite_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, updateSatellite_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -21076,6 +23406,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, updateSatellite_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -21101,18 +23432,19 @@ public class MasterServer {
}
- private static class updateSatellite_resultTupleSchemeFactory implements SchemeFactory {
+ private static class updateSatellite_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateSatellite_resultTupleScheme getScheme() {
return new updateSatellite_resultTupleScheme();
}
}
- private static class updateSatellite_resultTupleScheme extends TupleScheme<updateSatellite_result> {
+ private static class updateSatellite_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateSatellite_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, updateSatellite_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -21136,8 +23468,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, updateSatellite_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readBool();
struct.setSuccessIsSet(true);
@@ -21155,32 +23487,33 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class downloadImage_args implements org.apache.thrift.TBase<downloadImage_args, downloadImage_args._Fields>, java.io.Serializable, Cloneable, Comparable<downloadImage_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("downloadImage_args");
private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)2);
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)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new downloadImage_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new downloadImage_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new downloadImage_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new downloadImage_argsTupleSchemeFactory();
- public String sessionId; // required
- public String imageVersionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String sessionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageVersionId; // 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 {
SESSION_ID((short)2, "sessionId"),
IMAGE_VERSION_ID((short)1, "imageVersionId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -21188,6 +23521,7 @@ public class MasterServer {
/**
* 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 2: // SESSION_ID
@@ -21205,43 +23539,46 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
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")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(downloadImage_args.class, metaDataMap);
}
@@ -21249,8 +23586,8 @@ public class MasterServer {
}
public downloadImage_args(
- String sessionId,
- String imageVersionId)
+ java.lang.String sessionId,
+ java.lang.String imageVersionId)
{
this();
this.sessionId = sessionId;
@@ -21269,6 +23606,7 @@ public class MasterServer {
}
}
+ @Override
public downloadImage_args deepCopy() {
return new downloadImage_args(this);
}
@@ -21279,11 +23617,12 @@ public class MasterServer {
this.imageVersionId = null;
}
- public String getSessionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getSessionId() {
return this.sessionId;
}
- public downloadImage_args setSessionId(String sessionId) {
+ public downloadImage_args setSessionId(@org.apache.thrift.annotation.Nullable java.lang.String sessionId) {
this.sessionId = sessionId;
return this;
}
@@ -21303,11 +23642,12 @@ public class MasterServer {
}
}
- public String getImageVersionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageVersionId() {
return this.imageVersionId;
}
- public downloadImage_args setImageVersionId(String imageVersionId) {
+ public downloadImage_args setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.String imageVersionId) {
this.imageVersionId = imageVersionId;
return this;
}
@@ -21327,13 +23667,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SESSION_ID:
if (value == null) {
unsetSessionId();
} else {
- setSessionId((String)value);
+ setSessionId((java.lang.String)value);
}
break;
@@ -21341,14 +23682,16 @@ public class MasterServer {
if (value == null) {
unsetImageVersionId();
} else {
- setImageVersionId((String)value);
+ setImageVersionId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_ID:
return getSessionId();
@@ -21357,13 +23700,14 @@ public class MasterServer {
return getImageVersionId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -21372,13 +23716,11 @@ public class MasterServer {
case IMAGE_VERSION_ID:
return isSetImageVersionId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof downloadImage_args)
return this.equals((downloadImage_args)that);
return false;
@@ -21387,6 +23729,8 @@ public class MasterServer {
public boolean equals(downloadImage_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_sessionId = true && this.isSetSessionId();
boolean that_present_sessionId = true && that.isSetSessionId();
@@ -21411,19 +23755,17 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_sessionId = true && (isSetSessionId());
- list.add(present_sessionId);
- if (present_sessionId)
- list.add(sessionId);
+ hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287);
+ if (isSetSessionId())
+ hashCode = hashCode * 8191 + sessionId.hashCode();
- boolean present_imageVersionId = true && (isSetImageVersionId());
- list.add(present_imageVersionId);
- if (present_imageVersionId)
- list.add(imageVersionId);
+ hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287);
+ if (isSetImageVersionId())
+ hashCode = hashCode * 8191 + imageVersionId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -21434,7 +23776,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
+ lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -21444,7 +23786,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ lastComparison = java.lang.Boolean.compare(isSetImageVersionId(), other.isSetImageVersionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -21457,21 +23799,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("downloadImage_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("downloadImage_args(");
boolean first = true;
sb.append("sessionId:");
@@ -21506,7 +23852,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -21514,14 +23860,16 @@ public class MasterServer {
}
}
- private static class downloadImage_argsStandardSchemeFactory implements SchemeFactory {
+ private static class downloadImage_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public downloadImage_argsStandardScheme getScheme() {
return new downloadImage_argsStandardScheme();
}
}
- private static class downloadImage_argsStandardScheme extends StandardScheme<downloadImage_args> {
+ private static class downloadImage_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<downloadImage_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, downloadImage_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -21559,6 +23907,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, downloadImage_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -21579,18 +23928,19 @@ public class MasterServer {
}
- private static class downloadImage_argsTupleSchemeFactory implements SchemeFactory {
+ private static class downloadImage_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public downloadImage_argsTupleScheme getScheme() {
return new downloadImage_argsTupleScheme();
}
}
- private static class downloadImage_argsTupleScheme extends TupleScheme<downloadImage_args> {
+ private static class downloadImage_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<downloadImage_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, downloadImage_args 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.isSetSessionId()) {
optionals.set(0);
}
@@ -21608,8 +23958,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, downloadImage_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.sessionId = iprot.readString();
struct.setSessionIdIsSet(true);
@@ -21621,8 +23971,12 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class downloadImage_result implements org.apache.thrift.TBase<downloadImage_result, downloadImage_result._Fields>, java.io.Serializable, Cloneable, Comparable<downloadImage_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("downloadImage_result");
@@ -21631,16 +23985,13 @@ public class MasterServer {
private static final org.apache.thrift.protocol.TField FAILURE2_FIELD_DESC = new org.apache.thrift.protocol.TField("failure2", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField F3_FIELD_DESC = new org.apache.thrift.protocol.TField("f3", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new downloadImage_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new downloadImage_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new downloadImage_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new downloadImage_resultTupleSchemeFactory();
- public TransferInformation success; // required
- public TAuthorizationException failure; // required
- public TInvocationException failure2; // required
- public TNotFoundException f3; // required
+ public @org.apache.thrift.annotation.Nullable TransferInformation success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException failure2; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException f3; // 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 {
@@ -21649,10 +24000,10 @@ public class MasterServer {
FAILURE2((short)2, "failure2"),
F3((short)3, "f3");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -21660,6 +24011,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -21681,47 +24033,50 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransferInformation.class)));
tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.FAILURE2, new org.apache.thrift.meta_data.FieldMetaData("failure2", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
tmpMap.put(_Fields.F3, new org.apache.thrift.meta_data.FieldMetaData("f3", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(downloadImage_result.class, metaDataMap);
}
@@ -21759,6 +24114,7 @@ public class MasterServer {
}
}
+ @Override
public downloadImage_result deepCopy() {
return new downloadImage_result(this);
}
@@ -21771,11 +24127,12 @@ public class MasterServer {
this.f3 = null;
}
+ @org.apache.thrift.annotation.Nullable
public TransferInformation getSuccess() {
return this.success;
}
- public downloadImage_result setSuccess(TransferInformation success) {
+ public downloadImage_result setSuccess(@org.apache.thrift.annotation.Nullable TransferInformation success) {
this.success = success;
return this;
}
@@ -21795,11 +24152,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getFailure() {
return this.failure;
}
- public downloadImage_result setFailure(TAuthorizationException failure) {
+ public downloadImage_result setFailure(@org.apache.thrift.annotation.Nullable TAuthorizationException failure) {
this.failure = failure;
return this;
}
@@ -21819,11 +24177,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getFailure2() {
return this.failure2;
}
- public downloadImage_result setFailure2(TInvocationException failure2) {
+ public downloadImage_result setFailure2(@org.apache.thrift.annotation.Nullable TInvocationException failure2) {
this.failure2 = failure2;
return this;
}
@@ -21843,11 +24202,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getF3() {
return this.f3;
}
- public downloadImage_result setF3(TNotFoundException f3) {
+ public downloadImage_result setF3(@org.apache.thrift.annotation.Nullable TNotFoundException f3) {
this.f3 = f3;
return this;
}
@@ -21867,7 +24227,8 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -21904,7 +24265,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -21919,13 +24282,14 @@ public class MasterServer {
return getF3();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -21938,13 +24302,11 @@ public class MasterServer {
case F3:
return isSetF3();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof downloadImage_result)
return this.equals((downloadImage_result)that);
return false;
@@ -21953,6 +24315,8 @@ public class MasterServer {
public boolean equals(downloadImage_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -21995,29 +24359,25 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_failure = true && (isSetFailure());
- list.add(present_failure);
- if (present_failure)
- list.add(failure);
+ hashCode = hashCode * 8191 + ((isSetFailure()) ? 131071 : 524287);
+ if (isSetFailure())
+ hashCode = hashCode * 8191 + failure.hashCode();
- boolean present_failure2 = true && (isSetFailure2());
- list.add(present_failure2);
- if (present_failure2)
- list.add(failure2);
+ hashCode = hashCode * 8191 + ((isSetFailure2()) ? 131071 : 524287);
+ if (isSetFailure2())
+ hashCode = hashCode * 8191 + failure2.hashCode();
- boolean present_f3 = true && (isSetF3());
- list.add(present_f3);
- if (present_f3)
- list.add(f3);
+ hashCode = hashCode * 8191 + ((isSetF3()) ? 131071 : 524287);
+ if (isSetF3())
+ hashCode = hashCode * 8191 + f3.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -22028,7 +24388,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -22038,7 +24398,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
+ lastComparison = java.lang.Boolean.compare(isSetFailure(), other.isSetFailure());
if (lastComparison != 0) {
return lastComparison;
}
@@ -22048,7 +24408,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFailure2()).compareTo(other.isSetFailure2());
+ lastComparison = java.lang.Boolean.compare(isSetFailure2(), other.isSetFailure2());
if (lastComparison != 0) {
return lastComparison;
}
@@ -22058,7 +24418,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetF3()).compareTo(other.isSetF3());
+ lastComparison = java.lang.Boolean.compare(isSetF3(), other.isSetF3());
if (lastComparison != 0) {
return lastComparison;
}
@@ -22071,21 +24431,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("downloadImage_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("downloadImage_result(");
boolean first = true;
sb.append("success:");
@@ -22139,7 +24502,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -22147,14 +24510,16 @@ public class MasterServer {
}
}
- private static class downloadImage_resultStandardSchemeFactory implements SchemeFactory {
+ private static class downloadImage_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public downloadImage_resultStandardScheme getScheme() {
return new downloadImage_resultStandardScheme();
}
}
- private static class downloadImage_resultStandardScheme extends StandardScheme<downloadImage_result> {
+ private static class downloadImage_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<downloadImage_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, downloadImage_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -22212,6 +24577,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, downloadImage_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -22242,18 +24608,19 @@ public class MasterServer {
}
- private static class downloadImage_resultTupleSchemeFactory implements SchemeFactory {
+ private static class downloadImage_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public downloadImage_resultTupleScheme getScheme() {
return new downloadImage_resultTupleScheme();
}
}
- private static class downloadImage_resultTupleScheme extends TupleScheme<downloadImage_result> {
+ private static class downloadImage_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<downloadImage_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, downloadImage_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -22283,8 +24650,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, downloadImage_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.success = new TransferInformation();
struct.success.read(iprot);
@@ -22308,27 +24675,28 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getOrganizations_args implements org.apache.thrift.TBase<getOrganizations_args, getOrganizations_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrganizations_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOrganizations_args");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getOrganizations_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getOrganizations_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getOrganizations_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getOrganizations_argsTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -22336,6 +24704,7 @@ public class MasterServer {
/**
* 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) {
default:
@@ -22349,37 +24718,40 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOrganizations_args.class, metaDataMap);
}
@@ -22392,6 +24764,7 @@ public class MasterServer {
public getOrganizations_args(getOrganizations_args other) {
}
+ @Override
public getOrganizations_args deepCopy() {
return new getOrganizations_args(this);
}
@@ -22400,32 +24773,34 @@ public class MasterServer {
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getOrganizations_args)
return this.equals((getOrganizations_args)that);
return false;
@@ -22434,15 +24809,17 @@ public class MasterServer {
public boolean equals(getOrganizations_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -22456,21 +24833,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getOrganizations_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getOrganizations_args(");
boolean first = true;
sb.append(")");
@@ -22490,7 +24871,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -22498,14 +24879,16 @@ public class MasterServer {
}
}
- private static class getOrganizations_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getOrganizations_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getOrganizations_argsStandardScheme getScheme() {
return new getOrganizations_argsStandardScheme();
}
}
- private static class getOrganizations_argsStandardScheme extends StandardScheme<getOrganizations_args> {
+ private static class getOrganizations_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getOrganizations_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getOrganizations_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -22527,6 +24910,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getOrganizations_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -22537,51 +24921,53 @@ public class MasterServer {
}
- private static class getOrganizations_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getOrganizations_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getOrganizations_argsTupleScheme getScheme() {
return new getOrganizations_argsTupleScheme();
}
}
- private static class getOrganizations_argsTupleScheme extends TupleScheme<getOrganizations_args> {
+ private static class getOrganizations_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getOrganizations_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getOrganizations_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getOrganizations_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getOrganizations_result implements org.apache.thrift.TBase<getOrganizations_result, getOrganizations_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrganizations_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOrganizations_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getOrganizations_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getOrganizations_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getOrganizations_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getOrganizations_resultTupleSchemeFactory();
- public List<Organization> success; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<Organization> success; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
SUCCESS((short)0, "success"),
SERVER_ERROR((short)1, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -22589,6 +24975,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -22606,44 +24993,47 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", 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, Organization.class))));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOrganizations_result.class, metaDataMap);
}
@@ -22651,7 +25041,7 @@ public class MasterServer {
}
public getOrganizations_result(
- List<Organization> success,
+ java.util.List<Organization> success,
TInvocationException serverError)
{
this();
@@ -22664,7 +25054,7 @@ public class MasterServer {
*/
public getOrganizations_result(getOrganizations_result other) {
if (other.isSetSuccess()) {
- List<Organization> __this__success = new ArrayList<Organization>(other.success.size());
+ java.util.List<Organization> __this__success = new java.util.ArrayList<Organization>(other.success.size());
for (Organization other_element : other.success) {
__this__success.add(new Organization(other_element));
}
@@ -22675,6 +25065,7 @@ public class MasterServer {
}
}
+ @Override
public getOrganizations_result deepCopy() {
return new getOrganizations_result(this);
}
@@ -22689,22 +25080,24 @@ public class MasterServer {
return (this.success == null) ? 0 : this.success.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<Organization> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(Organization elem) {
if (this.success == null) {
- this.success = new ArrayList<Organization>();
+ this.success = new java.util.ArrayList<Organization>();
}
this.success.add(elem);
}
- public List<Organization> getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<Organization> getSuccess() {
return this.success;
}
- public getOrganizations_result setSuccess(List<Organization> success) {
+ public getOrganizations_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<Organization> success) {
this.success = success;
return this;
}
@@ -22724,11 +25117,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public getOrganizations_result setServerError(TInvocationException serverError) {
+ public getOrganizations_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -22748,13 +25142,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((List<Organization>)value);
+ setSuccess((java.util.List<Organization>)value);
}
break;
@@ -22769,7 +25164,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -22778,13 +25175,14 @@ public class MasterServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -22793,13 +25191,11 @@ public class MasterServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getOrganizations_result)
return this.equals((getOrganizations_result)that);
return false;
@@ -22808,6 +25204,8 @@ public class MasterServer {
public boolean equals(getOrganizations_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -22832,19 +25230,17 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -22855,7 +25251,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -22865,7 +25261,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -22878,21 +25274,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getOrganizations_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getOrganizations_result(");
boolean first = true;
sb.append("success:");
@@ -22927,7 +25326,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -22935,14 +25334,16 @@ public class MasterServer {
}
}
- private static class getOrganizations_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getOrganizations_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getOrganizations_resultStandardScheme getScheme() {
return new getOrganizations_resultStandardScheme();
}
}
- private static class getOrganizations_resultStandardScheme extends StandardScheme<getOrganizations_result> {
+ private static class getOrganizations_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getOrganizations_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getOrganizations_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -22956,14 +25357,14 @@ public class MasterServer {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list346 = iprot.readListBegin();
- struct.success = new ArrayList<Organization>(_list346.size);
- Organization _elem347;
- for (int _i348 = 0; _i348 < _list346.size; ++_i348)
+ org.apache.thrift.protocol.TList _list458 = iprot.readListBegin();
+ struct.success = new java.util.ArrayList<Organization>(_list458.size);
+ @org.apache.thrift.annotation.Nullable Organization _elem459;
+ for (int _i460 = 0; _i460 < _list458.size; ++_i460)
{
- _elem347 = new Organization();
- _elem347.read(iprot);
- struct.success.add(_elem347);
+ _elem459 = new Organization();
+ _elem459.read(iprot);
+ struct.success.add(_elem459);
}
iprot.readListEnd();
}
@@ -22992,6 +25393,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getOrganizations_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -23000,9 +25402,9 @@ public class MasterServer {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Organization _iter349 : struct.success)
+ for (Organization _iter461 : struct.success)
{
- _iter349.write(oprot);
+ _iter461.write(oprot);
}
oprot.writeListEnd();
}
@@ -23019,18 +25421,19 @@ public class MasterServer {
}
- private static class getOrganizations_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getOrganizations_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getOrganizations_resultTupleScheme getScheme() {
return new getOrganizations_resultTupleScheme();
}
}
- private static class getOrganizations_resultTupleScheme extends TupleScheme<getOrganizations_result> {
+ private static class getOrganizations_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getOrganizations_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getOrganizations_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -23041,9 +25444,9 @@ public class MasterServer {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (Organization _iter350 : struct.success)
+ for (Organization _iter462 : struct.success)
{
- _iter350.write(oprot);
+ _iter462.write(oprot);
}
}
}
@@ -23054,18 +25457,18 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getOrganizations_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list351 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<Organization>(_list351.size);
- Organization _elem352;
- for (int _i353 = 0; _i353 < _list351.size; ++_i353)
+ org.apache.thrift.protocol.TList _list463 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.success = new java.util.ArrayList<Organization>(_list463.size);
+ @org.apache.thrift.annotation.Nullable Organization _elem464;
+ for (int _i465 = 0; _i465 < _list463.size; ++_i465)
{
- _elem352 = new Organization();
- _elem352.read(iprot);
- struct.success.add(_elem352);
+ _elem464 = new Organization();
+ _elem464.read(iprot);
+ struct.success.add(_elem464);
}
}
struct.setSuccessIsSet(true);
@@ -23078,27 +25481,28 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getOperatingSystems_args implements org.apache.thrift.TBase<getOperatingSystems_args, getOperatingSystems_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOperatingSystems_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOperatingSystems_args");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getOperatingSystems_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getOperatingSystems_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getOperatingSystems_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getOperatingSystems_argsTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -23106,6 +25510,7 @@ public class MasterServer {
/**
* 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) {
default:
@@ -23119,37 +25524,40 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOperatingSystems_args.class, metaDataMap);
}
@@ -23162,6 +25570,7 @@ public class MasterServer {
public getOperatingSystems_args(getOperatingSystems_args other) {
}
+ @Override
public getOperatingSystems_args deepCopy() {
return new getOperatingSystems_args(this);
}
@@ -23170,32 +25579,34 @@ public class MasterServer {
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getOperatingSystems_args)
return this.equals((getOperatingSystems_args)that);
return false;
@@ -23204,15 +25615,17 @@ public class MasterServer {
public boolean equals(getOperatingSystems_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -23226,21 +25639,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getOperatingSystems_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getOperatingSystems_args(");
boolean first = true;
sb.append(")");
@@ -23260,7 +25677,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -23268,14 +25685,16 @@ public class MasterServer {
}
}
- private static class getOperatingSystems_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getOperatingSystems_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getOperatingSystems_argsStandardScheme getScheme() {
return new getOperatingSystems_argsStandardScheme();
}
}
- private static class getOperatingSystems_argsStandardScheme extends StandardScheme<getOperatingSystems_args> {
+ private static class getOperatingSystems_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getOperatingSystems_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getOperatingSystems_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -23297,6 +25716,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getOperatingSystems_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -23307,51 +25727,53 @@ public class MasterServer {
}
- private static class getOperatingSystems_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getOperatingSystems_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getOperatingSystems_argsTupleScheme getScheme() {
return new getOperatingSystems_argsTupleScheme();
}
}
- private static class getOperatingSystems_argsTupleScheme extends TupleScheme<getOperatingSystems_args> {
+ private static class getOperatingSystems_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getOperatingSystems_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getOperatingSystems_result implements org.apache.thrift.TBase<getOperatingSystems_result, getOperatingSystems_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOperatingSystems_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOperatingSystems_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getOperatingSystems_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getOperatingSystems_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getOperatingSystems_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getOperatingSystems_resultTupleSchemeFactory();
- public List<OperatingSystem> success; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<OperatingSystem> success; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
SUCCESS((short)0, "success"),
SERVER_ERROR((short)1, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -23359,6 +25781,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -23376,44 +25799,47 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", 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, OperatingSystem.class))));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOperatingSystems_result.class, metaDataMap);
}
@@ -23421,7 +25847,7 @@ public class MasterServer {
}
public getOperatingSystems_result(
- List<OperatingSystem> success,
+ java.util.List<OperatingSystem> success,
TInvocationException serverError)
{
this();
@@ -23434,7 +25860,7 @@ public class MasterServer {
*/
public getOperatingSystems_result(getOperatingSystems_result other) {
if (other.isSetSuccess()) {
- List<OperatingSystem> __this__success = new ArrayList<OperatingSystem>(other.success.size());
+ java.util.List<OperatingSystem> __this__success = new java.util.ArrayList<OperatingSystem>(other.success.size());
for (OperatingSystem other_element : other.success) {
__this__success.add(new OperatingSystem(other_element));
}
@@ -23445,6 +25871,7 @@ public class MasterServer {
}
}
+ @Override
public getOperatingSystems_result deepCopy() {
return new getOperatingSystems_result(this);
}
@@ -23459,22 +25886,24 @@ public class MasterServer {
return (this.success == null) ? 0 : this.success.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<OperatingSystem> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(OperatingSystem elem) {
if (this.success == null) {
- this.success = new ArrayList<OperatingSystem>();
+ this.success = new java.util.ArrayList<OperatingSystem>();
}
this.success.add(elem);
}
- public List<OperatingSystem> getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<OperatingSystem> getSuccess() {
return this.success;
}
- public getOperatingSystems_result setSuccess(List<OperatingSystem> success) {
+ public getOperatingSystems_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<OperatingSystem> success) {
this.success = success;
return this;
}
@@ -23494,11 +25923,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public getOperatingSystems_result setServerError(TInvocationException serverError) {
+ public getOperatingSystems_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -23518,13 +25948,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((List<OperatingSystem>)value);
+ setSuccess((java.util.List<OperatingSystem>)value);
}
break;
@@ -23539,7 +25970,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -23548,13 +25981,14 @@ public class MasterServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -23563,13 +25997,11 @@ public class MasterServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getOperatingSystems_result)
return this.equals((getOperatingSystems_result)that);
return false;
@@ -23578,6 +26010,8 @@ public class MasterServer {
public boolean equals(getOperatingSystems_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -23602,19 +26036,17 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -23625,7 +26057,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -23635,7 +26067,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -23648,21 +26080,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getOperatingSystems_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getOperatingSystems_result(");
boolean first = true;
sb.append("success:");
@@ -23697,7 +26132,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -23705,14 +26140,16 @@ public class MasterServer {
}
}
- private static class getOperatingSystems_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getOperatingSystems_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getOperatingSystems_resultStandardScheme getScheme() {
return new getOperatingSystems_resultStandardScheme();
}
}
- private static class getOperatingSystems_resultStandardScheme extends StandardScheme<getOperatingSystems_result> {
+ private static class getOperatingSystems_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getOperatingSystems_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getOperatingSystems_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -23726,14 +26163,14 @@ public class MasterServer {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list354 = iprot.readListBegin();
- struct.success = new ArrayList<OperatingSystem>(_list354.size);
- OperatingSystem _elem355;
- for (int _i356 = 0; _i356 < _list354.size; ++_i356)
+ org.apache.thrift.protocol.TList _list466 = iprot.readListBegin();
+ struct.success = new java.util.ArrayList<OperatingSystem>(_list466.size);
+ @org.apache.thrift.annotation.Nullable OperatingSystem _elem467;
+ for (int _i468 = 0; _i468 < _list466.size; ++_i468)
{
- _elem355 = new OperatingSystem();
- _elem355.read(iprot);
- struct.success.add(_elem355);
+ _elem467 = new OperatingSystem();
+ _elem467.read(iprot);
+ struct.success.add(_elem467);
}
iprot.readListEnd();
}
@@ -23762,6 +26199,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getOperatingSystems_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -23770,9 +26208,9 @@ public class MasterServer {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (OperatingSystem _iter357 : struct.success)
+ for (OperatingSystem _iter469 : struct.success)
{
- _iter357.write(oprot);
+ _iter469.write(oprot);
}
oprot.writeListEnd();
}
@@ -23789,18 +26227,19 @@ public class MasterServer {
}
- private static class getOperatingSystems_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getOperatingSystems_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getOperatingSystems_resultTupleScheme getScheme() {
return new getOperatingSystems_resultTupleScheme();
}
}
- private static class getOperatingSystems_resultTupleScheme extends TupleScheme<getOperatingSystems_result> {
+ private static class getOperatingSystems_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getOperatingSystems_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -23811,9 +26250,9 @@ public class MasterServer {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (OperatingSystem _iter358 : struct.success)
+ for (OperatingSystem _iter470 : struct.success)
{
- _iter358.write(oprot);
+ _iter470.write(oprot);
}
}
}
@@ -23824,18 +26263,18 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list359 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<OperatingSystem>(_list359.size);
- OperatingSystem _elem360;
- for (int _i361 = 0; _i361 < _list359.size; ++_i361)
+ org.apache.thrift.protocol.TList _list471 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.success = new java.util.ArrayList<OperatingSystem>(_list471.size);
+ @org.apache.thrift.annotation.Nullable OperatingSystem _elem472;
+ for (int _i473 = 0; _i473 < _list471.size; ++_i473)
{
- _elem360 = new OperatingSystem();
- _elem360.read(iprot);
- struct.success.add(_elem360);
+ _elem472 = new OperatingSystem();
+ _elem472.read(iprot);
+ struct.success.add(_elem472);
}
}
struct.setSuccessIsSet(true);
@@ -23848,27 +26287,28 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getVirtualizers_args implements org.apache.thrift.TBase<getVirtualizers_args, getVirtualizers_args._Fields>, java.io.Serializable, Cloneable, Comparable<getVirtualizers_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVirtualizers_args");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getVirtualizers_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getVirtualizers_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getVirtualizers_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getVirtualizers_argsTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -23876,6 +26316,7 @@ public class MasterServer {
/**
* 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) {
default:
@@ -23889,37 +26330,40 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVirtualizers_args.class, metaDataMap);
}
@@ -23932,6 +26376,7 @@ public class MasterServer {
public getVirtualizers_args(getVirtualizers_args other) {
}
+ @Override
public getVirtualizers_args deepCopy() {
return new getVirtualizers_args(this);
}
@@ -23940,32 +26385,34 @@ public class MasterServer {
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getVirtualizers_args)
return this.equals((getVirtualizers_args)that);
return false;
@@ -23974,15 +26421,17 @@ public class MasterServer {
public boolean equals(getVirtualizers_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -23996,21 +26445,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getVirtualizers_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getVirtualizers_args(");
boolean first = true;
sb.append(")");
@@ -24030,7 +26483,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -24038,14 +26491,16 @@ public class MasterServer {
}
}
- private static class getVirtualizers_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getVirtualizers_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getVirtualizers_argsStandardScheme getScheme() {
return new getVirtualizers_argsStandardScheme();
}
}
- private static class getVirtualizers_argsStandardScheme extends StandardScheme<getVirtualizers_args> {
+ private static class getVirtualizers_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getVirtualizers_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getVirtualizers_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -24067,6 +26522,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getVirtualizers_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -24077,51 +26533,53 @@ public class MasterServer {
}
- private static class getVirtualizers_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getVirtualizers_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getVirtualizers_argsTupleScheme getScheme() {
return new getVirtualizers_argsTupleScheme();
}
}
- private static class getVirtualizers_argsTupleScheme extends TupleScheme<getVirtualizers_args> {
+ private static class getVirtualizers_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getVirtualizers_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getVirtualizers_result implements org.apache.thrift.TBase<getVirtualizers_result, getVirtualizers_result._Fields>, java.io.Serializable, Cloneable, Comparable<getVirtualizers_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVirtualizers_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getVirtualizers_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getVirtualizers_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getVirtualizers_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getVirtualizers_resultTupleSchemeFactory();
- public List<Virtualizer> success; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<Virtualizer> success; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
SUCCESS((short)0, "success"),
SERVER_ERROR((short)1, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -24129,6 +26587,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -24146,44 +26605,47 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", 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, Virtualizer.class))));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVirtualizers_result.class, metaDataMap);
}
@@ -24191,7 +26653,7 @@ public class MasterServer {
}
public getVirtualizers_result(
- List<Virtualizer> success,
+ java.util.List<Virtualizer> success,
TInvocationException serverError)
{
this();
@@ -24204,7 +26666,7 @@ public class MasterServer {
*/
public getVirtualizers_result(getVirtualizers_result other) {
if (other.isSetSuccess()) {
- List<Virtualizer> __this__success = new ArrayList<Virtualizer>(other.success.size());
+ java.util.List<Virtualizer> __this__success = new java.util.ArrayList<Virtualizer>(other.success.size());
for (Virtualizer other_element : other.success) {
__this__success.add(new Virtualizer(other_element));
}
@@ -24215,6 +26677,7 @@ public class MasterServer {
}
}
+ @Override
public getVirtualizers_result deepCopy() {
return new getVirtualizers_result(this);
}
@@ -24229,22 +26692,24 @@ public class MasterServer {
return (this.success == null) ? 0 : this.success.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<Virtualizer> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(Virtualizer elem) {
if (this.success == null) {
- this.success = new ArrayList<Virtualizer>();
+ this.success = new java.util.ArrayList<Virtualizer>();
}
this.success.add(elem);
}
- public List<Virtualizer> getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<Virtualizer> getSuccess() {
return this.success;
}
- public getVirtualizers_result setSuccess(List<Virtualizer> success) {
+ public getVirtualizers_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<Virtualizer> success) {
this.success = success;
return this;
}
@@ -24264,11 +26729,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public getVirtualizers_result setServerError(TInvocationException serverError) {
+ public getVirtualizers_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -24288,13 +26754,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((List<Virtualizer>)value);
+ setSuccess((java.util.List<Virtualizer>)value);
}
break;
@@ -24309,7 +26776,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -24318,13 +26787,14 @@ public class MasterServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -24333,13 +26803,11 @@ public class MasterServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getVirtualizers_result)
return this.equals((getVirtualizers_result)that);
return false;
@@ -24348,6 +26816,8 @@ public class MasterServer {
public boolean equals(getVirtualizers_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -24372,19 +26842,17 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -24395,7 +26863,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -24405,7 +26873,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -24418,21 +26886,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getVirtualizers_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getVirtualizers_result(");
boolean first = true;
sb.append("success:");
@@ -24467,7 +26938,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -24475,14 +26946,16 @@ public class MasterServer {
}
}
- private static class getVirtualizers_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getVirtualizers_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getVirtualizers_resultStandardScheme getScheme() {
return new getVirtualizers_resultStandardScheme();
}
}
- private static class getVirtualizers_resultStandardScheme extends StandardScheme<getVirtualizers_result> {
+ private static class getVirtualizers_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getVirtualizers_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getVirtualizers_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -24496,14 +26969,14 @@ public class MasterServer {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list362 = iprot.readListBegin();
- struct.success = new ArrayList<Virtualizer>(_list362.size);
- Virtualizer _elem363;
- for (int _i364 = 0; _i364 < _list362.size; ++_i364)
+ org.apache.thrift.protocol.TList _list474 = iprot.readListBegin();
+ struct.success = new java.util.ArrayList<Virtualizer>(_list474.size);
+ @org.apache.thrift.annotation.Nullable Virtualizer _elem475;
+ for (int _i476 = 0; _i476 < _list474.size; ++_i476)
{
- _elem363 = new Virtualizer();
- _elem363.read(iprot);
- struct.success.add(_elem363);
+ _elem475 = new Virtualizer();
+ _elem475.read(iprot);
+ struct.success.add(_elem475);
}
iprot.readListEnd();
}
@@ -24532,6 +27005,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getVirtualizers_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -24540,9 +27014,9 @@ public class MasterServer {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Virtualizer _iter365 : struct.success)
+ for (Virtualizer _iter477 : struct.success)
{
- _iter365.write(oprot);
+ _iter477.write(oprot);
}
oprot.writeListEnd();
}
@@ -24559,18 +27033,19 @@ public class MasterServer {
}
- private static class getVirtualizers_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getVirtualizers_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getVirtualizers_resultTupleScheme getScheme() {
return new getVirtualizers_resultTupleScheme();
}
}
- private static class getVirtualizers_resultTupleScheme extends TupleScheme<getVirtualizers_result> {
+ private static class getVirtualizers_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getVirtualizers_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -24581,9 +27056,9 @@ public class MasterServer {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (Virtualizer _iter366 : struct.success)
+ for (Virtualizer _iter478 : struct.success)
{
- _iter366.write(oprot);
+ _iter478.write(oprot);
}
}
}
@@ -24594,18 +27069,18 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list367 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<Virtualizer>(_list367.size);
- Virtualizer _elem368;
- for (int _i369 = 0; _i369 < _list367.size; ++_i369)
+ org.apache.thrift.protocol.TList _list479 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.success = new java.util.ArrayList<Virtualizer>(_list479.size);
+ @org.apache.thrift.annotation.Nullable Virtualizer _elem480;
+ for (int _i481 = 0; _i481 < _list479.size; ++_i481)
{
- _elem368 = new Virtualizer();
- _elem368.read(iprot);
- struct.success.add(_elem368);
+ _elem480 = new Virtualizer();
+ _elem480.read(iprot);
+ struct.success.add(_elem480);
}
}
struct.setSuccessIsSet(true);
@@ -24618,18 +27093,19 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getTags_args implements org.apache.thrift.TBase<getTags_args, getTags_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTags_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTags_args");
private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.I64, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getTags_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getTags_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getTags_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getTags_argsTupleSchemeFactory();
public long startDate; // required
@@ -24637,10 +27113,10 @@ public class MasterServer {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
START_DATE((short)1, "startDate");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -24648,6 +27124,7 @@ public class MasterServer {
/**
* 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: // START_DATE
@@ -24663,30 +27140,33 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -24694,12 +27174,12 @@ public class MasterServer {
// isset id assignments
private static final int __STARTDATE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTags_args.class, metaDataMap);
}
@@ -24722,6 +27202,7 @@ public class MasterServer {
this.startDate = other.startDate;
}
+ @Override
public getTags_args deepCopy() {
return new getTags_args(this);
}
@@ -24743,57 +27224,59 @@ public class MasterServer {
}
public void unsetStartDate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTDATE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTDATE_ISSET_ID);
}
/** Returns true if field startDate is set (has been assigned a value) and false otherwise */
public boolean isSetStartDate() {
- return EncodingUtils.testBit(__isset_bitfield, __STARTDATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTDATE_ISSET_ID);
}
public void setStartDateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTDATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTDATE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case START_DATE:
if (value == null) {
unsetStartDate();
} else {
- setStartDate((Long)value);
+ setStartDate((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case START_DATE:
return getStartDate();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case START_DATE:
return isSetStartDate();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getTags_args)
return this.equals((getTags_args)that);
return false;
@@ -24802,6 +27285,8 @@ public class MasterServer {
public boolean equals(getTags_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_startDate = true;
boolean that_present_startDate = true;
@@ -24817,14 +27302,11 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_startDate = true;
- list.add(present_startDate);
- if (present_startDate)
- list.add(startDate);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startDate);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -24835,7 +27317,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(other.isSetStartDate());
+ lastComparison = java.lang.Boolean.compare(isSetStartDate(), other.isSetStartDate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -24848,21 +27330,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getTags_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getTags_args(");
boolean first = true;
sb.append("startDate:");
@@ -24885,7 +27371,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -24895,14 +27381,16 @@ public class MasterServer {
}
}
- private static class getTags_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getTags_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getTags_argsStandardScheme getScheme() {
return new getTags_argsStandardScheme();
}
}
- private static class getTags_argsStandardScheme extends StandardScheme<getTags_args> {
+ private static class getTags_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getTags_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getTags_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -24932,6 +27420,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getTags_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -24945,18 +27434,19 @@ public class MasterServer {
}
- private static class getTags_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getTags_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getTags_argsTupleScheme getScheme() {
return new getTags_argsTupleScheme();
}
}
- private static class getTags_argsTupleScheme extends TupleScheme<getTags_args> {
+ private static class getTags_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getTags_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getTags_args 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.isSetStartDate()) {
optionals.set(0);
}
@@ -24968,8 +27458,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getTags_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.startDate = iprot.readI64();
struct.setStartDateIsSet(true);
@@ -24977,32 +27467,33 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getTags_result implements org.apache.thrift.TBase<getTags_result, getTags_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTags_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getTags_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getTags_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getTags_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getTags_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getTags_resultTupleSchemeFactory();
- public List<MasterTag> success; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<MasterTag> success; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
SUCCESS((short)0, "success"),
SERVER_ERROR((short)1, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -25010,6 +27501,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -25027,44 +27519,47 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", 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, MasterTag.class))));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getTags_result.class, metaDataMap);
}
@@ -25072,7 +27567,7 @@ public class MasterServer {
}
public getTags_result(
- List<MasterTag> success,
+ java.util.List<MasterTag> success,
TInvocationException serverError)
{
this();
@@ -25085,7 +27580,7 @@ public class MasterServer {
*/
public getTags_result(getTags_result other) {
if (other.isSetSuccess()) {
- List<MasterTag> __this__success = new ArrayList<MasterTag>(other.success.size());
+ java.util.List<MasterTag> __this__success = new java.util.ArrayList<MasterTag>(other.success.size());
for (MasterTag other_element : other.success) {
__this__success.add(new MasterTag(other_element));
}
@@ -25096,6 +27591,7 @@ public class MasterServer {
}
}
+ @Override
public getTags_result deepCopy() {
return new getTags_result(this);
}
@@ -25110,22 +27606,24 @@ public class MasterServer {
return (this.success == null) ? 0 : this.success.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<MasterTag> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(MasterTag elem) {
if (this.success == null) {
- this.success = new ArrayList<MasterTag>();
+ this.success = new java.util.ArrayList<MasterTag>();
}
this.success.add(elem);
}
- public List<MasterTag> getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<MasterTag> getSuccess() {
return this.success;
}
- public getTags_result setSuccess(List<MasterTag> success) {
+ public getTags_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<MasterTag> success) {
this.success = success;
return this;
}
@@ -25145,11 +27643,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public getTags_result setServerError(TInvocationException serverError) {
+ public getTags_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -25169,13 +27668,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((List<MasterTag>)value);
+ setSuccess((java.util.List<MasterTag>)value);
}
break;
@@ -25190,7 +27690,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -25199,13 +27701,14 @@ public class MasterServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -25214,13 +27717,11 @@ public class MasterServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getTags_result)
return this.equals((getTags_result)that);
return false;
@@ -25229,6 +27730,8 @@ public class MasterServer {
public boolean equals(getTags_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -25253,19 +27756,17 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -25276,7 +27777,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -25286,7 +27787,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -25299,21 +27800,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getTags_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getTags_result(");
boolean first = true;
sb.append("success:");
@@ -25348,7 +27852,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -25356,14 +27860,16 @@ public class MasterServer {
}
}
- private static class getTags_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getTags_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getTags_resultStandardScheme getScheme() {
return new getTags_resultStandardScheme();
}
}
- private static class getTags_resultStandardScheme extends StandardScheme<getTags_result> {
+ private static class getTags_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getTags_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getTags_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -25377,14 +27883,14 @@ public class MasterServer {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list370 = iprot.readListBegin();
- struct.success = new ArrayList<MasterTag>(_list370.size);
- MasterTag _elem371;
- for (int _i372 = 0; _i372 < _list370.size; ++_i372)
+ org.apache.thrift.protocol.TList _list482 = iprot.readListBegin();
+ struct.success = new java.util.ArrayList<MasterTag>(_list482.size);
+ @org.apache.thrift.annotation.Nullable MasterTag _elem483;
+ for (int _i484 = 0; _i484 < _list482.size; ++_i484)
{
- _elem371 = new MasterTag();
- _elem371.read(iprot);
- struct.success.add(_elem371);
+ _elem483 = new MasterTag();
+ _elem483.read(iprot);
+ struct.success.add(_elem483);
}
iprot.readListEnd();
}
@@ -25413,6 +27919,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getTags_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -25421,9 +27928,9 @@ public class MasterServer {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (MasterTag _iter373 : struct.success)
+ for (MasterTag _iter485 : struct.success)
{
- _iter373.write(oprot);
+ _iter485.write(oprot);
}
oprot.writeListEnd();
}
@@ -25440,18 +27947,19 @@ public class MasterServer {
}
- private static class getTags_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getTags_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getTags_resultTupleScheme getScheme() {
return new getTags_resultTupleScheme();
}
}
- private static class getTags_resultTupleScheme extends TupleScheme<getTags_result> {
+ private static class getTags_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getTags_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getTags_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -25462,9 +27970,9 @@ public class MasterServer {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (MasterTag _iter374 : struct.success)
+ for (MasterTag _iter486 : struct.success)
{
- _iter374.write(oprot);
+ _iter486.write(oprot);
}
}
}
@@ -25475,18 +27983,18 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getTags_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list375 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<MasterTag>(_list375.size);
- MasterTag _elem376;
- for (int _i377 = 0; _i377 < _list375.size; ++_i377)
+ org.apache.thrift.protocol.TList _list487 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.success = new java.util.ArrayList<MasterTag>(_list487.size);
+ @org.apache.thrift.annotation.Nullable MasterTag _elem488;
+ for (int _i489 = 0; _i489 < _list487.size; ++_i489)
{
- _elem376 = new MasterTag();
- _elem376.read(iprot);
- struct.success.add(_elem376);
+ _elem488 = new MasterTag();
+ _elem488.read(iprot);
+ struct.success.add(_elem488);
}
}
struct.setSuccessIsSet(true);
@@ -25499,18 +28007,19 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getSoftware_args implements org.apache.thrift.TBase<getSoftware_args, getSoftware_args._Fields>, java.io.Serializable, Cloneable, Comparable<getSoftware_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSoftware_args");
private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.I64, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getSoftware_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getSoftware_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getSoftware_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getSoftware_argsTupleSchemeFactory();
public long startDate; // required
@@ -25518,10 +28027,10 @@ public class MasterServer {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
START_DATE((short)1, "startDate");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -25529,6 +28038,7 @@ public class MasterServer {
/**
* 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: // START_DATE
@@ -25544,30 +28054,33 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -25575,12 +28088,12 @@ public class MasterServer {
// isset id assignments
private static final int __STARTDATE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSoftware_args.class, metaDataMap);
}
@@ -25603,6 +28116,7 @@ public class MasterServer {
this.startDate = other.startDate;
}
+ @Override
public getSoftware_args deepCopy() {
return new getSoftware_args(this);
}
@@ -25624,57 +28138,59 @@ public class MasterServer {
}
public void unsetStartDate() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __STARTDATE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STARTDATE_ISSET_ID);
}
/** Returns true if field startDate is set (has been assigned a value) and false otherwise */
public boolean isSetStartDate() {
- return EncodingUtils.testBit(__isset_bitfield, __STARTDATE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STARTDATE_ISSET_ID);
}
public void setStartDateIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __STARTDATE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STARTDATE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case START_DATE:
if (value == null) {
unsetStartDate();
} else {
- setStartDate((Long)value);
+ setStartDate((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case START_DATE:
return getStartDate();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case START_DATE:
return isSetStartDate();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getSoftware_args)
return this.equals((getSoftware_args)that);
return false;
@@ -25683,6 +28199,8 @@ public class MasterServer {
public boolean equals(getSoftware_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_startDate = true;
boolean that_present_startDate = true;
@@ -25698,14 +28216,11 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_startDate = true;
- list.add(present_startDate);
- if (present_startDate)
- list.add(startDate);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(startDate);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -25716,7 +28231,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(other.isSetStartDate());
+ lastComparison = java.lang.Boolean.compare(isSetStartDate(), other.isSetStartDate());
if (lastComparison != 0) {
return lastComparison;
}
@@ -25729,21 +28244,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getSoftware_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getSoftware_args(");
boolean first = true;
sb.append("startDate:");
@@ -25766,7 +28285,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -25776,14 +28295,16 @@ public class MasterServer {
}
}
- private static class getSoftware_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getSoftware_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getSoftware_argsStandardScheme getScheme() {
return new getSoftware_argsStandardScheme();
}
}
- private static class getSoftware_argsStandardScheme extends StandardScheme<getSoftware_args> {
+ private static class getSoftware_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getSoftware_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getSoftware_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -25813,6 +28334,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getSoftware_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -25826,18 +28348,19 @@ public class MasterServer {
}
- private static class getSoftware_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getSoftware_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getSoftware_argsTupleScheme getScheme() {
return new getSoftware_argsTupleScheme();
}
}
- private static class getSoftware_argsTupleScheme extends TupleScheme<getSoftware_args> {
+ private static class getSoftware_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getSoftware_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getSoftware_args 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.isSetStartDate()) {
optionals.set(0);
}
@@ -25849,8 +28372,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getSoftware_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.startDate = iprot.readI64();
struct.setStartDateIsSet(true);
@@ -25858,32 +28381,33 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getSoftware_result implements org.apache.thrift.TBase<getSoftware_result, getSoftware_result._Fields>, java.io.Serializable, Cloneable, Comparable<getSoftware_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSoftware_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getSoftware_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getSoftware_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getSoftware_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getSoftware_resultTupleSchemeFactory();
- public List<MasterSoftware> success; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<MasterSoftware> success; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
SUCCESS((short)0, "success"),
SERVER_ERROR((short)1, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -25891,6 +28415,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -25908,44 +28433,47 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", 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, MasterSoftware.class))));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSoftware_result.class, metaDataMap);
}
@@ -25953,7 +28481,7 @@ public class MasterServer {
}
public getSoftware_result(
- List<MasterSoftware> success,
+ java.util.List<MasterSoftware> success,
TInvocationException serverError)
{
this();
@@ -25966,7 +28494,7 @@ public class MasterServer {
*/
public getSoftware_result(getSoftware_result other) {
if (other.isSetSuccess()) {
- List<MasterSoftware> __this__success = new ArrayList<MasterSoftware>(other.success.size());
+ java.util.List<MasterSoftware> __this__success = new java.util.ArrayList<MasterSoftware>(other.success.size());
for (MasterSoftware other_element : other.success) {
__this__success.add(new MasterSoftware(other_element));
}
@@ -25977,6 +28505,7 @@ public class MasterServer {
}
}
+ @Override
public getSoftware_result deepCopy() {
return new getSoftware_result(this);
}
@@ -25991,22 +28520,24 @@ public class MasterServer {
return (this.success == null) ? 0 : this.success.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<MasterSoftware> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(MasterSoftware elem) {
if (this.success == null) {
- this.success = new ArrayList<MasterSoftware>();
+ this.success = new java.util.ArrayList<MasterSoftware>();
}
this.success.add(elem);
}
- public List<MasterSoftware> getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<MasterSoftware> getSuccess() {
return this.success;
}
- public getSoftware_result setSuccess(List<MasterSoftware> success) {
+ public getSoftware_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<MasterSoftware> success) {
this.success = success;
return this;
}
@@ -26026,11 +28557,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public getSoftware_result setServerError(TInvocationException serverError) {
+ public getSoftware_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -26050,13 +28582,14 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((List<MasterSoftware>)value);
+ setSuccess((java.util.List<MasterSoftware>)value);
}
break;
@@ -26071,7 +28604,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -26080,13 +28615,14 @@ public class MasterServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -26095,13 +28631,11 @@ public class MasterServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getSoftware_result)
return this.equals((getSoftware_result)that);
return false;
@@ -26110,6 +28644,8 @@ public class MasterServer {
public boolean equals(getSoftware_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -26134,19 +28670,17 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -26157,7 +28691,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -26167,7 +28701,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -26180,21 +28714,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getSoftware_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getSoftware_result(");
boolean first = true;
sb.append("success:");
@@ -26229,7 +28766,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -26237,14 +28774,16 @@ public class MasterServer {
}
}
- private static class getSoftware_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getSoftware_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getSoftware_resultStandardScheme getScheme() {
return new getSoftware_resultStandardScheme();
}
}
- private static class getSoftware_resultStandardScheme extends StandardScheme<getSoftware_result> {
+ private static class getSoftware_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getSoftware_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getSoftware_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -26258,14 +28797,14 @@ public class MasterServer {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list378 = iprot.readListBegin();
- struct.success = new ArrayList<MasterSoftware>(_list378.size);
- MasterSoftware _elem379;
- for (int _i380 = 0; _i380 < _list378.size; ++_i380)
+ org.apache.thrift.protocol.TList _list490 = iprot.readListBegin();
+ struct.success = new java.util.ArrayList<MasterSoftware>(_list490.size);
+ @org.apache.thrift.annotation.Nullable MasterSoftware _elem491;
+ for (int _i492 = 0; _i492 < _list490.size; ++_i492)
{
- _elem379 = new MasterSoftware();
- _elem379.read(iprot);
- struct.success.add(_elem379);
+ _elem491 = new MasterSoftware();
+ _elem491.read(iprot);
+ struct.success.add(_elem491);
}
iprot.readListEnd();
}
@@ -26294,6 +28833,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getSoftware_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -26302,9 +28842,9 @@ public class MasterServer {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (MasterSoftware _iter381 : struct.success)
+ for (MasterSoftware _iter493 : struct.success)
{
- _iter381.write(oprot);
+ _iter493.write(oprot);
}
oprot.writeListEnd();
}
@@ -26321,18 +28861,19 @@ public class MasterServer {
}
- private static class getSoftware_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getSoftware_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getSoftware_resultTupleScheme getScheme() {
return new getSoftware_resultTupleScheme();
}
}
- private static class getSoftware_resultTupleScheme extends TupleScheme<getSoftware_result> {
+ private static class getSoftware_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getSoftware_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getSoftware_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -26343,9 +28884,9 @@ public class MasterServer {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (MasterSoftware _iter382 : struct.success)
+ for (MasterSoftware _iter494 : struct.success)
{
- _iter382.write(oprot);
+ _iter494.write(oprot);
}
}
}
@@ -26356,18 +28897,18 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getSoftware_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list383 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<MasterSoftware>(_list383.size);
- MasterSoftware _elem384;
- for (int _i385 = 0; _i385 < _list383.size; ++_i385)
+ org.apache.thrift.protocol.TList _list495 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.success = new java.util.ArrayList<MasterSoftware>(_list495.size);
+ @org.apache.thrift.annotation.Nullable MasterSoftware _elem496;
+ for (int _i497 = 0; _i497 < _list495.size; ++_i497)
{
- _elem384 = new MasterSoftware();
- _elem384.read(iprot);
- struct.success.add(_elem384);
+ _elem496 = new MasterSoftware();
+ _elem496.read(iprot);
+ struct.success.add(_elem496);
}
}
struct.setSuccessIsSet(true);
@@ -26380,29 +28921,30 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class queryUploadStatus_args implements org.apache.thrift.TBase<queryUploadStatus_args, queryUploadStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<queryUploadStatus_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("queryUploadStatus_args");
private static final org.apache.thrift.protocol.TField UPLOAD_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("uploadToken", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new queryUploadStatus_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new queryUploadStatus_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new queryUploadStatus_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new queryUploadStatus_argsTupleSchemeFactory();
- public String uploadToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String uploadToken; // 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 {
UPLOAD_TOKEN((short)1, "uploadToken");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -26410,6 +28952,7 @@ public class MasterServer {
/**
* 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: // UPLOAD_TOKEN
@@ -26425,41 +28968,44 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.UPLOAD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("uploadToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queryUploadStatus_args.class, metaDataMap);
}
@@ -26467,7 +29013,7 @@ public class MasterServer {
}
public queryUploadStatus_args(
- String uploadToken)
+ java.lang.String uploadToken)
{
this();
this.uploadToken = uploadToken;
@@ -26482,6 +29028,7 @@ public class MasterServer {
}
}
+ @Override
public queryUploadStatus_args deepCopy() {
return new queryUploadStatus_args(this);
}
@@ -26491,11 +29038,12 @@ public class MasterServer {
this.uploadToken = null;
}
- public String getUploadToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUploadToken() {
return this.uploadToken;
}
- public queryUploadStatus_args setUploadToken(String uploadToken) {
+ public queryUploadStatus_args setUploadToken(@org.apache.thrift.annotation.Nullable java.lang.String uploadToken) {
this.uploadToken = uploadToken;
return this;
}
@@ -26515,45 +29063,47 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case UPLOAD_TOKEN:
if (value == null) {
unsetUploadToken();
} else {
- setUploadToken((String)value);
+ setUploadToken((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case UPLOAD_TOKEN:
return getUploadToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case UPLOAD_TOKEN:
return isSetUploadToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof queryUploadStatus_args)
return this.equals((queryUploadStatus_args)that);
return false;
@@ -26562,6 +29112,8 @@ public class MasterServer {
public boolean equals(queryUploadStatus_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_uploadToken = true && this.isSetUploadToken();
boolean that_present_uploadToken = true && that.isSetUploadToken();
@@ -26577,14 +29129,13 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_uploadToken = true && (isSetUploadToken());
- list.add(present_uploadToken);
- if (present_uploadToken)
- list.add(uploadToken);
+ hashCode = hashCode * 8191 + ((isSetUploadToken()) ? 131071 : 524287);
+ if (isSetUploadToken())
+ hashCode = hashCode * 8191 + uploadToken.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -26595,7 +29146,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUploadToken()).compareTo(other.isSetUploadToken());
+ lastComparison = java.lang.Boolean.compare(isSetUploadToken(), other.isSetUploadToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -26608,21 +29159,25 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("queryUploadStatus_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("queryUploadStatus_args(");
boolean first = true;
sb.append("uploadToken:");
@@ -26649,7 +29204,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -26657,14 +29212,16 @@ public class MasterServer {
}
}
- private static class queryUploadStatus_argsStandardSchemeFactory implements SchemeFactory {
+ private static class queryUploadStatus_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public queryUploadStatus_argsStandardScheme getScheme() {
return new queryUploadStatus_argsStandardScheme();
}
}
- private static class queryUploadStatus_argsStandardScheme extends StandardScheme<queryUploadStatus_args> {
+ private static class queryUploadStatus_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<queryUploadStatus_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, queryUploadStatus_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -26694,6 +29251,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, queryUploadStatus_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -26709,18 +29267,19 @@ public class MasterServer {
}
- private static class queryUploadStatus_argsTupleSchemeFactory implements SchemeFactory {
+ private static class queryUploadStatus_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public queryUploadStatus_argsTupleScheme getScheme() {
return new queryUploadStatus_argsTupleScheme();
}
}
- private static class queryUploadStatus_argsTupleScheme extends TupleScheme<queryUploadStatus_args> {
+ private static class queryUploadStatus_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<queryUploadStatus_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, queryUploadStatus_args 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.isSetUploadToken()) {
optionals.set(0);
}
@@ -26732,8 +29291,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, queryUploadStatus_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.uploadToken = iprot.readString();
struct.setUploadTokenIsSet(true);
@@ -26741,32 +29300,33 @@ public class MasterServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class queryUploadStatus_result implements org.apache.thrift.TBase<queryUploadStatus_result, queryUploadStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<queryUploadStatus_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("queryUploadStatus_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new queryUploadStatus_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new queryUploadStatus_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new queryUploadStatus_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new queryUploadStatus_resultTupleSchemeFactory();
- public TransferStatus success; // required
- public TInvalidTokenException ex1; // required
+ public @org.apache.thrift.annotation.Nullable TransferStatus success; // required
+ public @org.apache.thrift.annotation.Nullable TInvalidTokenException ex1; // 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 {
SUCCESS((short)0, "success"),
EX1((short)1, "ex1");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -26774,6 +29334,7 @@ public class MasterServer {
/**
* 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 0: // SUCCESS
@@ -26791,43 +29352,46 @@ public class MasterServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransferStatus.class)));
tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidTokenException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queryUploadStatus_result.class, metaDataMap);
}
@@ -26855,6 +29419,7 @@ public class MasterServer {
}
}
+ @Override
public queryUploadStatus_result deepCopy() {
return new queryUploadStatus_result(this);
}
@@ -26865,11 +29430,12 @@ public class MasterServer {
this.ex1 = null;
}
+ @org.apache.thrift.annotation.Nullable
public TransferStatus getSuccess() {
return this.success;
}
- public queryUploadStatus_result setSuccess(TransferStatus success) {
+ public queryUploadStatus_result setSuccess(@org.apache.thrift.annotation.Nullable TransferStatus success) {
this.success = success;
return this;
}
@@ -26889,11 +29455,12 @@ public class MasterServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvalidTokenException getEx1() {
return this.ex1;
}
- public queryUploadStatus_result setEx1(TInvalidTokenException ex1) {
+ public queryUploadStatus_result setEx1(@org.apache.thrift.annotation.Nullable TInvalidTokenException ex1) {
this.ex1 = ex1;
return this;
}
@@ -26913,7 +29480,8 @@ public class MasterServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -26934,7 +29502,9 @@ public class MasterServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -26943,13 +29513,14 @@ public class MasterServer {
return getEx1();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -26958,13 +29529,11 @@ public class MasterServer {
case EX1:
return isSetEx1();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof queryUploadStatus_result)
return this.equals((queryUploadStatus_result)that);
return false;
@@ -26973,6 +29542,8 @@ public class MasterServer {
public boolean equals(queryUploadStatus_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -26997,19 +29568,17 @@ public class MasterServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_ex1 = true && (isSetEx1());
- list.add(present_ex1);
- if (present_ex1)
- list.add(ex1);
+ hashCode = hashCode * 8191 + ((isSetEx1()) ? 131071 : 524287);
+ if (isSetEx1())
+ hashCode = hashCode * 8191 + ex1.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -27020,7 +29589,7 @@ public class MasterServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -27030,7 +29599,7 @@ public class MasterServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
+ lastComparison = java.lang.Boolean.compare(isSetEx1(), other.isSetEx1());
if (lastComparison != 0) {
return lastComparison;
}
@@ -27043,21 +29612,24 @@ public class MasterServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("queryUploadStatus_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("queryUploadStatus_result(");
boolean first = true;
sb.append("success:");
@@ -27095,7 +29667,7 @@ public class MasterServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -27103,14 +29675,16 @@ public class MasterServer {
}
}
- private static class queryUploadStatus_resultStandardSchemeFactory implements SchemeFactory {
+ private static class queryUploadStatus_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public queryUploadStatus_resultStandardScheme getScheme() {
return new queryUploadStatus_resultStandardScheme();
}
}
- private static class queryUploadStatus_resultStandardScheme extends StandardScheme<queryUploadStatus_result> {
+ private static class queryUploadStatus_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<queryUploadStatus_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, queryUploadStatus_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -27150,6 +29724,7 @@ public class MasterServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, queryUploadStatus_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -27170,18 +29745,19 @@ public class MasterServer {
}
- private static class queryUploadStatus_resultTupleSchemeFactory implements SchemeFactory {
+ private static class queryUploadStatus_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public queryUploadStatus_resultTupleScheme getScheme() {
return new queryUploadStatus_resultTupleScheme();
}
}
- private static class queryUploadStatus_resultTupleScheme extends TupleScheme<queryUploadStatus_result> {
+ private static class queryUploadStatus_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<queryUploadStatus_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, queryUploadStatus_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -27199,8 +29775,8 @@ public class MasterServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, queryUploadStatus_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new TransferStatus();
struct.success.read(iprot);
@@ -27214,6 +29790,9 @@ public class MasterServer {
}
}
+ 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();
+ }
}
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/MasterSoftware.java b/src/main/java/org/openslx/bwlp/thrift/iface/MasterSoftware.java
index 8eb8c49..87824cd 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/MasterSoftware.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/MasterSoftware.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 MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, MasterSoftware._Fields>, java.io.Serializable, Cloneable, Comparable<MasterSoftware> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MasterSoftware");
@@ -42,13 +15,10 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
private static final org.apache.thrift.protocol.TField IS_RESTRICTED_FIELD_DESC = new org.apache.thrift.protocol.TField("isRestricted", org.apache.thrift.protocol.TType.BOOL, (short)2);
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)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new MasterSoftwareStandardSchemeFactory());
- schemes.put(TupleScheme.class, new MasterSoftwareTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new MasterSoftwareStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new MasterSoftwareTupleSchemeFactory();
- public String software; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String software; // required
public boolean isRestricted; // required
public long createTime; // required
@@ -58,10 +28,10 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
IS_RESTRICTED((short)2, "isRestricted"),
CREATE_TIME((short)3, "createTime");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -69,6 +39,7 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
/**
* 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: // SOFTWARE
@@ -88,21 +59,22 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -111,7 +83,7 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -120,16 +92,16 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
private static final int __ISRESTRICTED_ISSET_ID = 0;
private static final int __CREATETIME_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SOFTWARE, new org.apache.thrift.meta_data.FieldMetaData("software", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.IS_RESTRICTED, new org.apache.thrift.meta_data.FieldMetaData("isRestricted", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
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")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MasterSoftware.class, metaDataMap);
}
@@ -137,7 +109,7 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
}
public MasterSoftware(
- String software,
+ java.lang.String software,
boolean isRestricted,
long createTime)
{
@@ -174,11 +146,12 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
this.createTime = 0;
}
- public String getSoftware() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getSoftware() {
return this.software;
}
- public MasterSoftware setSoftware(String software) {
+ public MasterSoftware setSoftware(@org.apache.thrift.annotation.Nullable java.lang.String software) {
this.software = software;
return this;
}
@@ -209,16 +182,16 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
}
public void unsetIsRestricted() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
}
/** Returns true if field isRestricted is set (has been assigned a value) and false otherwise */
public boolean isSetIsRestricted() {
- return EncodingUtils.testBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID);
}
public void setIsRestrictedIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISRESTRICTED_ISSET_ID, value);
}
public long getCreateTime() {
@@ -232,25 +205,25 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
}
public void unsetCreateTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
}
public void setCreateTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SOFTWARE:
if (value == null) {
unsetSoftware();
} else {
- setSoftware((String)value);
+ setSoftware((java.lang.String)value);
}
break;
@@ -258,7 +231,7 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
if (value == null) {
unsetIsRestricted();
} else {
- setIsRestricted((Boolean)value);
+ setIsRestricted((java.lang.Boolean)value);
}
break;
@@ -266,14 +239,15 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
if (value == null) {
unsetCreateTime();
} else {
- setCreateTime((Long)value);
+ setCreateTime((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SOFTWARE:
return getSoftware();
@@ -285,13 +259,13 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
return getCreateTime();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -302,13 +276,11 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
case CREATE_TIME:
return isSetCreateTime();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof MasterSoftware)
return this.equals((MasterSoftware)that);
return false;
@@ -317,6 +289,8 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
public boolean equals(MasterSoftware that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_software = true && this.isSetSoftware();
boolean that_present_software = true && that.isSetSoftware();
@@ -350,24 +324,17 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_software = true && (isSetSoftware());
- list.add(present_software);
- if (present_software)
- list.add(software);
+ hashCode = hashCode * 8191 + ((isSetSoftware()) ? 131071 : 524287);
+ if (isSetSoftware())
+ hashCode = hashCode * 8191 + software.hashCode();
- boolean present_isRestricted = true;
- list.add(present_isRestricted);
- if (present_isRestricted)
- list.add(isRestricted);
+ hashCode = hashCode * 8191 + ((isRestricted) ? 131071 : 524287);
- boolean present_createTime = true;
- list.add(present_createTime);
- if (present_createTime)
- list.add(createTime);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(createTime);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -378,7 +345,7 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSoftware()).compareTo(other.isSetSoftware());
+ lastComparison = java.lang.Boolean.compare(isSetSoftware(), other.isSetSoftware());
if (lastComparison != 0) {
return lastComparison;
}
@@ -388,7 +355,7 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsRestricted()).compareTo(other.isSetIsRestricted());
+ lastComparison = java.lang.Boolean.compare(isSetIsRestricted(), other.isSetIsRestricted());
if (lastComparison != 0) {
return lastComparison;
}
@@ -398,7 +365,7 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime());
+ lastComparison = java.lang.Boolean.compare(isSetCreateTime(), other.isSetCreateTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -411,21 +378,22 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("MasterSoftware(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("MasterSoftware(");
boolean first = true;
sb.append("software:");
@@ -460,7 +428,7 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -470,13 +438,13 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
}
}
- private static class MasterSoftwareStandardSchemeFactory implements SchemeFactory {
+ private static class MasterSoftwareStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public MasterSoftwareStandardScheme getScheme() {
return new MasterSoftwareStandardScheme();
}
}
- private static class MasterSoftwareStandardScheme extends StandardScheme<MasterSoftware> {
+ private static class MasterSoftwareStandardScheme extends org.apache.thrift.scheme.StandardScheme<MasterSoftware> {
public void read(org.apache.thrift.protocol.TProtocol iprot, MasterSoftware struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -544,18 +512,18 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
}
- private static class MasterSoftwareTupleSchemeFactory implements SchemeFactory {
+ private static class MasterSoftwareTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public MasterSoftwareTupleScheme getScheme() {
return new MasterSoftwareTupleScheme();
}
}
- private static class MasterSoftwareTupleScheme extends TupleScheme<MasterSoftware> {
+ private static class MasterSoftwareTupleScheme extends org.apache.thrift.scheme.TupleScheme<MasterSoftware> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, MasterSoftware 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.isSetSoftware()) {
optionals.set(0);
}
@@ -579,8 +547,8 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, MasterSoftware struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.software = iprot.readString();
struct.setSoftwareIsSet(true);
@@ -596,5 +564,8 @@ public class MasterSoftware implements org.apache.thrift.TBase<MasterSoftware, M
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/MasterTag.java b/src/main/java/org/openslx/bwlp/thrift/iface/MasterTag.java
index 962550b..ffcf8a7 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/MasterTag.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/MasterTag.java
@@ -1,53 +1,23 @@
/**
- * 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 MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._Fields>, java.io.Serializable, Cloneable, Comparable<MasterTag> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("MasterTag");
private static final org.apache.thrift.protocol.TField TAG_FIELD_DESC = new org.apache.thrift.protocol.TField("tag", org.apache.thrift.protocol.TType.STRING, (short)1);
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)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new MasterTagStandardSchemeFactory());
- schemes.put(TupleScheme.class, new MasterTagTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new MasterTagStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new MasterTagTupleSchemeFactory();
- public String tag; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String tag; // required
public long createTime; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -55,10 +25,10 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
TAG((short)1, "tag"),
CREATE_TIME((short)2, "createTime");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -66,6 +36,7 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
/**
* 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: // TAG
@@ -83,21 +54,22 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -106,7 +78,7 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -114,14 +86,14 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
// isset id assignments
private static final int __CREATETIME_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.TAG, new org.apache.thrift.meta_data.FieldMetaData("tag", 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")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(MasterTag.class, metaDataMap);
}
@@ -129,7 +101,7 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
}
public MasterTag(
- String tag,
+ java.lang.String tag,
long createTime)
{
this();
@@ -160,11 +132,12 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
this.createTime = 0;
}
- public String getTag() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getTag() {
return this.tag;
}
- public MasterTag setTag(String tag) {
+ public MasterTag setTag(@org.apache.thrift.annotation.Nullable java.lang.String tag) {
this.tag = tag;
return this;
}
@@ -195,25 +168,25 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
}
public void unsetCreateTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CREATETIME_ISSET_ID);
}
public void setCreateTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CREATETIME_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TAG:
if (value == null) {
unsetTag();
} else {
- setTag((String)value);
+ setTag((java.lang.String)value);
}
break;
@@ -221,14 +194,15 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
if (value == null) {
unsetCreateTime();
} else {
- setCreateTime((Long)value);
+ setCreateTime((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TAG:
return getTag();
@@ -237,13 +211,13 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
return getCreateTime();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -252,13 +226,11 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
case CREATE_TIME:
return isSetCreateTime();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof MasterTag)
return this.equals((MasterTag)that);
return false;
@@ -267,6 +239,8 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
public boolean equals(MasterTag that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_tag = true && this.isSetTag();
boolean that_present_tag = true && that.isSetTag();
@@ -291,19 +265,15 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_tag = true && (isSetTag());
- list.add(present_tag);
- if (present_tag)
- list.add(tag);
+ hashCode = hashCode * 8191 + ((isSetTag()) ? 131071 : 524287);
+ if (isSetTag())
+ hashCode = hashCode * 8191 + tag.hashCode();
- boolean present_createTime = true;
- list.add(present_createTime);
- if (present_createTime)
- list.add(createTime);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(createTime);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -314,7 +284,7 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetTag()).compareTo(other.isSetTag());
+ lastComparison = java.lang.Boolean.compare(isSetTag(), other.isSetTag());
if (lastComparison != 0) {
return lastComparison;
}
@@ -324,7 +294,7 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCreateTime()).compareTo(other.isSetCreateTime());
+ lastComparison = java.lang.Boolean.compare(isSetCreateTime(), other.isSetCreateTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -337,21 +307,22 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("MasterTag(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("MasterTag(");
boolean first = true;
sb.append("tag:");
@@ -382,7 +353,7 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -392,13 +363,13 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
}
}
- private static class MasterTagStandardSchemeFactory implements SchemeFactory {
+ private static class MasterTagStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public MasterTagStandardScheme getScheme() {
return new MasterTagStandardScheme();
}
}
- private static class MasterTagStandardScheme extends StandardScheme<MasterTag> {
+ private static class MasterTagStandardScheme extends org.apache.thrift.scheme.StandardScheme<MasterTag> {
public void read(org.apache.thrift.protocol.TProtocol iprot, MasterTag struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -455,18 +426,18 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
}
- private static class MasterTagTupleSchemeFactory implements SchemeFactory {
+ private static class MasterTagTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public MasterTagTupleScheme getScheme() {
return new MasterTagTupleScheme();
}
}
- private static class MasterTagTupleScheme extends TupleScheme<MasterTag> {
+ private static class MasterTagTupleScheme extends org.apache.thrift.scheme.TupleScheme<MasterTag> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, MasterTag 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.isSetTag()) {
optionals.set(0);
}
@@ -484,8 +455,8 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, MasterTag struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.tag = iprot.readString();
struct.setTagIsSet(true);
@@ -497,5 +468,8 @@ public class MasterTag implements org.apache.thrift.TBase<MasterTag, MasterTag._
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/NetDirection.java b/src/main/java/org/openslx/bwlp/thrift/iface/NetDirection.java
index ae22bfa..e777d20 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/NetDirection.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/NetDirection.java
@@ -1,5 +1,5 @@
/**
- * 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
@@ -7,10 +7,7 @@
package org.openslx.bwlp.thrift.iface;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public enum NetDirection implements org.apache.thrift.TEnum {
IN(0),
OUT(1);
@@ -32,6 +29,7 @@ public enum NetDirection implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static NetDirection findByValue(int value) {
switch (value) {
case 0:
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/NetRule.java b/src/main/java/org/openslx/bwlp/thrift/iface/NetRule.java
index abc7486..ac82656 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/NetRule.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/NetRule.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 = "2019-02-25")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields>, java.io.Serializable, Cloneable, Comparable<NetRule> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NetRule");
@@ -42,18 +15,15 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
private static final org.apache.thrift.protocol.TField HOST_FIELD_DESC = new org.apache.thrift.protocol.TField("host", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField PORT_FIELD_DESC = new org.apache.thrift.protocol.TField("port", org.apache.thrift.protocol.TType.I32, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new NetRuleStandardSchemeFactory());
- schemes.put(TupleScheme.class, new NetRuleTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new NetRuleStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new NetRuleTupleSchemeFactory();
/**
*
* @see NetDirection
*/
- public NetDirection direction; // required
- public String host; // required
+ public @org.apache.thrift.annotation.Nullable NetDirection direction; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String host; // required
public int port; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -66,10 +36,10 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
HOST((short)3, "host"),
PORT((short)4, "port");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -77,6 +47,7 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
/**
* 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 2: // DIRECTION
@@ -96,21 +67,22 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -119,7 +91,7 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -127,16 +99,16 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
// isset id assignments
private static final int __PORT_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.DIRECTION, new org.apache.thrift.meta_data.FieldMetaData("direction", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, NetDirection.class)));
tmpMap.put(_Fields.HOST, new org.apache.thrift.meta_data.FieldMetaData("host", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.PORT, new org.apache.thrift.meta_data.FieldMetaData("port", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NetRule.class, metaDataMap);
}
@@ -145,7 +117,7 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
public NetRule(
NetDirection direction,
- String host,
+ java.lang.String host,
int port)
{
this();
@@ -185,6 +157,7 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
*
* @see NetDirection
*/
+ @org.apache.thrift.annotation.Nullable
public NetDirection getDirection() {
return this.direction;
}
@@ -193,7 +166,7 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
*
* @see NetDirection
*/
- public NetRule setDirection(NetDirection direction) {
+ public NetRule setDirection(@org.apache.thrift.annotation.Nullable NetDirection direction) {
this.direction = direction;
return this;
}
@@ -213,11 +186,12 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
}
}
- public String getHost() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getHost() {
return this.host;
}
- public NetRule setHost(String host) {
+ public NetRule setHost(@org.apache.thrift.annotation.Nullable java.lang.String host) {
this.host = host;
return this;
}
@@ -248,19 +222,19 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
}
public void unsetPort() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PORT_ISSET_ID);
}
/** Returns true if field port is set (has been assigned a value) and false otherwise */
public boolean isSetPort() {
- return EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PORT_ISSET_ID);
}
public void setPortIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PORT_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case DIRECTION:
if (value == null) {
@@ -274,7 +248,7 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
if (value == null) {
unsetHost();
} else {
- setHost((String)value);
+ setHost((java.lang.String)value);
}
break;
@@ -282,14 +256,15 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
if (value == null) {
unsetPort();
} else {
- setPort((Integer)value);
+ setPort((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case DIRECTION:
return getDirection();
@@ -301,13 +276,13 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
return getPort();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -318,13 +293,11 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
case PORT:
return isSetPort();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof NetRule)
return this.equals((NetRule)that);
return false;
@@ -333,6 +306,8 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
public boolean equals(NetRule that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_direction = true && this.isSetDirection();
boolean that_present_direction = true && that.isSetDirection();
@@ -366,24 +341,19 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_direction = true && (isSetDirection());
- list.add(present_direction);
- if (present_direction)
- list.add(direction.getValue());
+ hashCode = hashCode * 8191 + ((isSetDirection()) ? 131071 : 524287);
+ if (isSetDirection())
+ hashCode = hashCode * 8191 + direction.getValue();
- boolean present_host = true && (isSetHost());
- list.add(present_host);
- if (present_host)
- list.add(host);
+ hashCode = hashCode * 8191 + ((isSetHost()) ? 131071 : 524287);
+ if (isSetHost())
+ hashCode = hashCode * 8191 + host.hashCode();
- boolean present_port = true;
- list.add(present_port);
- if (present_port)
- list.add(port);
+ hashCode = hashCode * 8191 + port;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -394,7 +364,7 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetDirection()).compareTo(other.isSetDirection());
+ lastComparison = java.lang.Boolean.compare(isSetDirection(), other.isSetDirection());
if (lastComparison != 0) {
return lastComparison;
}
@@ -404,7 +374,7 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetHost()).compareTo(other.isSetHost());
+ lastComparison = java.lang.Boolean.compare(isSetHost(), other.isSetHost());
if (lastComparison != 0) {
return lastComparison;
}
@@ -414,7 +384,7 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPort()).compareTo(other.isSetPort());
+ lastComparison = java.lang.Boolean.compare(isSetPort(), other.isSetPort());
if (lastComparison != 0) {
return lastComparison;
}
@@ -427,21 +397,22 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("NetRule(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("NetRule(");
boolean first = true;
sb.append("direction:");
@@ -480,7 +451,7 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -490,13 +461,13 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
}
}
- private static class NetRuleStandardSchemeFactory implements SchemeFactory {
+ private static class NetRuleStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NetRuleStandardScheme getScheme() {
return new NetRuleStandardScheme();
}
}
- private static class NetRuleStandardScheme extends StandardScheme<NetRule> {
+ private static class NetRuleStandardScheme extends org.apache.thrift.scheme.StandardScheme<NetRule> {
public void read(org.apache.thrift.protocol.TProtocol iprot, NetRule struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -566,18 +537,18 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
}
- private static class NetRuleTupleSchemeFactory implements SchemeFactory {
+ private static class NetRuleTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NetRuleTupleScheme getScheme() {
return new NetRuleTupleScheme();
}
}
- private static class NetRuleTupleScheme extends TupleScheme<NetRule> {
+ private static class NetRuleTupleScheme extends org.apache.thrift.scheme.TupleScheme<NetRule> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, NetRule 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.isSetDirection()) {
optionals.set(0);
}
@@ -601,8 +572,8 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, NetRule struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.direction = org.openslx.bwlp.thrift.iface.NetDirection.findByValue(iprot.readI32());
struct.setDirectionIsSet(true);
@@ -618,5 +589,8 @@ public class NetRule implements org.apache.thrift.TBase<NetRule, NetRule._Fields
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/NetShare.java b/src/main/java/org/openslx/bwlp/thrift/iface/NetShare.java
index df1d0c4..19205a0 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/NetShare.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/NetShare.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 = "2018-11-23")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fields>, java.io.Serializable, Cloneable, Comparable<NetShare> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NetShare");
@@ -46,22 +19,19 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
private static final org.apache.thrift.protocol.TField PASSWORD_FIELD_DESC = new org.apache.thrift.protocol.TField("password", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField SHARE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("shareId", org.apache.thrift.protocol.TType.I32, (short)7);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new NetShareStandardSchemeFactory());
- schemes.put(TupleScheme.class, new NetShareTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new NetShareStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new NetShareTupleSchemeFactory();
/**
*
* @see NetShareAuth
*/
- public NetShareAuth auth; // required
- public String path; // required
- public String displayname; // optional
- public String mountpoint; // optional
- public String username; // optional
- public String password; // optional
+ public @org.apache.thrift.annotation.Nullable NetShareAuth auth; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String path; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String displayname; // optional
+ public @org.apache.thrift.annotation.Nullable java.lang.String mountpoint; // optional
+ public @org.apache.thrift.annotation.Nullable java.lang.String username; // optional
+ public @org.apache.thrift.annotation.Nullable java.lang.String password; // optional
public int shareId; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -78,10 +48,10 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
PASSWORD((short)3, "password"),
SHARE_ID((short)7, "shareId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -89,6 +59,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
/**
* 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 4: // AUTH
@@ -116,21 +87,22 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -139,7 +111,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -148,9 +120,9 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
private static final int __SHAREID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.DISPLAYNAME,_Fields.MOUNTPOINT,_Fields.USERNAME,_Fields.PASSWORD,_Fields.SHARE_ID};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.AUTH, new org.apache.thrift.meta_data.FieldMetaData("auth", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, NetShareAuth.class)));
tmpMap.put(_Fields.PATH, new org.apache.thrift.meta_data.FieldMetaData("path", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -165,7 +137,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.SHARE_ID, new org.apache.thrift.meta_data.FieldMetaData("shareId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(NetShare.class, metaDataMap);
}
@@ -174,7 +146,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
public NetShare(
NetShareAuth auth,
- String path)
+ java.lang.String path)
{
this();
this.auth = auth;
@@ -227,6 +199,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
*
* @see NetShareAuth
*/
+ @org.apache.thrift.annotation.Nullable
public NetShareAuth getAuth() {
return this.auth;
}
@@ -235,7 +208,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
*
* @see NetShareAuth
*/
- public NetShare setAuth(NetShareAuth auth) {
+ public NetShare setAuth(@org.apache.thrift.annotation.Nullable NetShareAuth auth) {
this.auth = auth;
return this;
}
@@ -255,11 +228,12 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
}
}
- public String getPath() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getPath() {
return this.path;
}
- public NetShare setPath(String path) {
+ public NetShare setPath(@org.apache.thrift.annotation.Nullable java.lang.String path) {
this.path = path;
return this;
}
@@ -279,11 +253,12 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
}
}
- public String getDisplayname() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getDisplayname() {
return this.displayname;
}
- public NetShare setDisplayname(String displayname) {
+ public NetShare setDisplayname(@org.apache.thrift.annotation.Nullable java.lang.String displayname) {
this.displayname = displayname;
return this;
}
@@ -303,11 +278,12 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
}
}
- public String getMountpoint() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getMountpoint() {
return this.mountpoint;
}
- public NetShare setMountpoint(String mountpoint) {
+ public NetShare setMountpoint(@org.apache.thrift.annotation.Nullable java.lang.String mountpoint) {
this.mountpoint = mountpoint;
return this;
}
@@ -327,11 +303,12 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
}
}
- public String getUsername() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUsername() {
return this.username;
}
- public NetShare setUsername(String username) {
+ public NetShare setUsername(@org.apache.thrift.annotation.Nullable java.lang.String username) {
this.username = username;
return this;
}
@@ -351,11 +328,12 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
}
}
- public String getPassword() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getPassword() {
return this.password;
}
- public NetShare setPassword(String password) {
+ public NetShare setPassword(@org.apache.thrift.annotation.Nullable java.lang.String password) {
this.password = password;
return this;
}
@@ -386,19 +364,19 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
}
public void unsetShareId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SHAREID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SHAREID_ISSET_ID);
}
/** Returns true if field shareId is set (has been assigned a value) and false otherwise */
public boolean isSetShareId() {
- return EncodingUtils.testBit(__isset_bitfield, __SHAREID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SHAREID_ISSET_ID);
}
public void setShareIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SHAREID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SHAREID_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case AUTH:
if (value == null) {
@@ -412,7 +390,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
if (value == null) {
unsetPath();
} else {
- setPath((String)value);
+ setPath((java.lang.String)value);
}
break;
@@ -420,7 +398,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
if (value == null) {
unsetDisplayname();
} else {
- setDisplayname((String)value);
+ setDisplayname((java.lang.String)value);
}
break;
@@ -428,7 +406,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
if (value == null) {
unsetMountpoint();
} else {
- setMountpoint((String)value);
+ setMountpoint((java.lang.String)value);
}
break;
@@ -436,7 +414,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
if (value == null) {
unsetUsername();
} else {
- setUsername((String)value);
+ setUsername((java.lang.String)value);
}
break;
@@ -444,7 +422,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
if (value == null) {
unsetPassword();
} else {
- setPassword((String)value);
+ setPassword((java.lang.String)value);
}
break;
@@ -452,14 +430,15 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
if (value == null) {
unsetShareId();
} else {
- setShareId((Integer)value);
+ setShareId((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTH:
return getAuth();
@@ -483,13 +462,13 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
return getShareId();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -508,13 +487,11 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
case SHARE_ID:
return isSetShareId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof NetShare)
return this.equals((NetShare)that);
return false;
@@ -523,6 +500,8 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
public boolean equals(NetShare that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_auth = true && this.isSetAuth();
boolean that_present_auth = true && that.isSetAuth();
@@ -592,44 +571,37 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
-
- boolean present_auth = true && (isSetAuth());
- list.add(present_auth);
- if (present_auth)
- list.add(auth.getValue());
-
- boolean present_path = true && (isSetPath());
- list.add(present_path);
- if (present_path)
- list.add(path);
-
- boolean present_displayname = true && (isSetDisplayname());
- list.add(present_displayname);
- if (present_displayname)
- list.add(displayname);
-
- boolean present_mountpoint = true && (isSetMountpoint());
- list.add(present_mountpoint);
- if (present_mountpoint)
- list.add(mountpoint);
-
- boolean present_username = true && (isSetUsername());
- list.add(present_username);
- if (present_username)
- list.add(username);
-
- boolean present_password = true && (isSetPassword());
- list.add(present_password);
- if (present_password)
- list.add(password);
-
- boolean present_shareId = true && (isSetShareId());
- list.add(present_shareId);
- if (present_shareId)
- list.add(shareId);
-
- return list.hashCode();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetAuth()) ? 131071 : 524287);
+ if (isSetAuth())
+ hashCode = hashCode * 8191 + auth.getValue();
+
+ hashCode = hashCode * 8191 + ((isSetPath()) ? 131071 : 524287);
+ if (isSetPath())
+ hashCode = hashCode * 8191 + path.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetDisplayname()) ? 131071 : 524287);
+ if (isSetDisplayname())
+ hashCode = hashCode * 8191 + displayname.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetMountpoint()) ? 131071 : 524287);
+ if (isSetMountpoint())
+ hashCode = hashCode * 8191 + mountpoint.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetUsername()) ? 131071 : 524287);
+ if (isSetUsername())
+ hashCode = hashCode * 8191 + username.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetPassword()) ? 131071 : 524287);
+ if (isSetPassword())
+ hashCode = hashCode * 8191 + password.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetShareId()) ? 131071 : 524287);
+ if (isSetShareId())
+ hashCode = hashCode * 8191 + shareId;
+
+ return hashCode;
}
@Override
@@ -640,7 +612,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAuth()).compareTo(other.isSetAuth());
+ lastComparison = java.lang.Boolean.compare(isSetAuth(), other.isSetAuth());
if (lastComparison != 0) {
return lastComparison;
}
@@ -650,7 +622,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPath()).compareTo(other.isSetPath());
+ lastComparison = java.lang.Boolean.compare(isSetPath(), other.isSetPath());
if (lastComparison != 0) {
return lastComparison;
}
@@ -660,7 +632,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDisplayname()).compareTo(other.isSetDisplayname());
+ lastComparison = java.lang.Boolean.compare(isSetDisplayname(), other.isSetDisplayname());
if (lastComparison != 0) {
return lastComparison;
}
@@ -670,7 +642,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMountpoint()).compareTo(other.isSetMountpoint());
+ lastComparison = java.lang.Boolean.compare(isSetMountpoint(), other.isSetMountpoint());
if (lastComparison != 0) {
return lastComparison;
}
@@ -680,7 +652,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
+ lastComparison = java.lang.Boolean.compare(isSetUsername(), other.isSetUsername());
if (lastComparison != 0) {
return lastComparison;
}
@@ -690,7 +662,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPassword()).compareTo(other.isSetPassword());
+ lastComparison = java.lang.Boolean.compare(isSetPassword(), other.isSetPassword());
if (lastComparison != 0) {
return lastComparison;
}
@@ -700,7 +672,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetShareId()).compareTo(other.isSetShareId());
+ lastComparison = java.lang.Boolean.compare(isSetShareId(), other.isSetShareId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -713,21 +685,22 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("NetShare(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("NetShare(");
boolean first = true;
sb.append("auth:");
@@ -808,7 +781,7 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -818,13 +791,13 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
}
}
- private static class NetShareStandardSchemeFactory implements SchemeFactory {
+ private static class NetShareStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NetShareStandardScheme getScheme() {
return new NetShareStandardScheme();
}
}
- private static class NetShareStandardScheme extends StandardScheme<NetShare> {
+ private static class NetShareStandardScheme extends org.apache.thrift.scheme.StandardScheme<NetShare> {
public void read(org.apache.thrift.protocol.TProtocol iprot, NetShare struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -956,18 +929,18 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
}
- private static class NetShareTupleSchemeFactory implements SchemeFactory {
+ private static class NetShareTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public NetShareTupleScheme getScheme() {
return new NetShareTupleScheme();
}
}
- private static class NetShareTupleScheme extends TupleScheme<NetShare> {
+ private static class NetShareTupleScheme extends org.apache.thrift.scheme.TupleScheme<NetShare> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, NetShare 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.isSetAuth()) {
optionals.set(0);
}
@@ -1015,8 +988,8 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, NetShare struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(7);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(7);
if (incoming.get(0)) {
struct.auth = org.openslx.bwlp.thrift.iface.NetShareAuth.findByValue(iprot.readI32());
struct.setAuthIsSet(true);
@@ -1048,5 +1021,8 @@ public class NetShare implements org.apache.thrift.TBase<NetShare, NetShare._Fie
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/NetShareAuth.java b/src/main/java/org/openslx/bwlp/thrift/iface/NetShareAuth.java
index cc7b4e9..636b448 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/NetShareAuth.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/NetShareAuth.java
@@ -1,5 +1,5 @@
/**
- * 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
@@ -7,10 +7,7 @@
package org.openslx.bwlp.thrift.iface;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public enum NetShareAuth implements org.apache.thrift.TEnum {
LOGIN_USER(0),
OTHER_USER(1);
@@ -32,6 +29,7 @@ public enum NetShareAuth implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static NetShareAuth findByValue(int value) {
switch (value) {
case 0:
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/OperatingSystem.java b/src/main/java/org/openslx/bwlp/thrift/iface/OperatingSystem.java
index 364ad03..fc1e577 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/OperatingSystem.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/OperatingSystem.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 OperatingSystem implements org.apache.thrift.TBase<OperatingSystem, OperatingSystem._Fields>, java.io.Serializable, Cloneable, Comparable<OperatingSystem> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("OperatingSystem");
@@ -45,16 +18,13 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
private static final org.apache.thrift.protocol.TField MAX_MEM_MB_FIELD_DESC = new org.apache.thrift.protocol.TField("maxMemMb", org.apache.thrift.protocol.TType.I32, (short)5);
private static final org.apache.thrift.protocol.TField MAX_CORES_FIELD_DESC = new org.apache.thrift.protocol.TField("maxCores", org.apache.thrift.protocol.TType.I32, (short)6);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new OperatingSystemStandardSchemeFactory());
- schemes.put(TupleScheme.class, new OperatingSystemTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new OperatingSystemStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new OperatingSystemTupleSchemeFactory();
public int osId; // required
- public String osName; // required
- public Map<String,String> virtualizerOsId; // required
- public String architecture; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String osName; // required
+ public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> virtualizerOsId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String architecture; // required
public int maxMemMb; // required
public int maxCores; // required
@@ -67,10 +37,10 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
MAX_MEM_MB((short)5, "maxMemMb"),
MAX_CORES((short)6, "maxCores");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -78,6 +48,7 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
/**
* 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: // OS_ID
@@ -103,21 +74,22 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -126,7 +98,7 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -136,9 +108,9 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
private static final int __MAXMEMMB_ISSET_ID = 1;
private static final int __MAXCORES_ISSET_ID = 2;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.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.OS_NAME, new org.apache.thrift.meta_data.FieldMetaData("osName", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -153,7 +125,7 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.MAX_CORES, new org.apache.thrift.meta_data.FieldMetaData("maxCores", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(OperatingSystem.class, metaDataMap);
}
@@ -162,9 +134,9 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
public OperatingSystem(
int osId,
- String osName,
- Map<String,String> virtualizerOsId,
- String architecture,
+ java.lang.String osName,
+ java.util.Map<java.lang.String,java.lang.String> virtualizerOsId,
+ java.lang.String architecture,
int maxMemMb,
int maxCores)
{
@@ -190,7 +162,7 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
this.osName = other.osName;
}
if (other.isSetVirtualizerOsId()) {
- Map<String,String> __this__virtualizerOsId = new HashMap<String,String>(other.virtualizerOsId);
+ java.util.Map<java.lang.String,java.lang.String> __this__virtualizerOsId = new java.util.HashMap<java.lang.String,java.lang.String>(other.virtualizerOsId);
this.virtualizerOsId = __this__virtualizerOsId;
}
if (other.isSetArchitecture()) {
@@ -228,23 +200,24 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
}
public void unsetOsId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OSID_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __OSID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __OSID_ISSET_ID);
}
public void setOsIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OSID_ISSET_ID, value);
}
- public String getOsName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getOsName() {
return this.osName;
}
- public OperatingSystem setOsName(String osName) {
+ public OperatingSystem setOsName(@org.apache.thrift.annotation.Nullable java.lang.String osName) {
this.osName = osName;
return this;
}
@@ -268,18 +241,19 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
return (this.virtualizerOsId == null) ? 0 : this.virtualizerOsId.size();
}
- public void putToVirtualizerOsId(String key, String val) {
+ public void putToVirtualizerOsId(java.lang.String key, java.lang.String val) {
if (this.virtualizerOsId == null) {
- this.virtualizerOsId = new HashMap<String,String>();
+ this.virtualizerOsId = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.virtualizerOsId.put(key, val);
}
- public Map<String,String> getVirtualizerOsId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Map<java.lang.String,java.lang.String> getVirtualizerOsId() {
return this.virtualizerOsId;
}
- public OperatingSystem setVirtualizerOsId(Map<String,String> virtualizerOsId) {
+ public OperatingSystem setVirtualizerOsId(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> virtualizerOsId) {
this.virtualizerOsId = virtualizerOsId;
return this;
}
@@ -299,11 +273,12 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
}
}
- public String getArchitecture() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getArchitecture() {
return this.architecture;
}
- public OperatingSystem setArchitecture(String architecture) {
+ public OperatingSystem setArchitecture(@org.apache.thrift.annotation.Nullable java.lang.String architecture) {
this.architecture = architecture;
return this;
}
@@ -334,16 +309,16 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
}
public void unsetMaxMemMb() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXMEMMB_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXMEMMB_ISSET_ID);
}
/** Returns true if field maxMemMb is set (has been assigned a value) and false otherwise */
public boolean isSetMaxMemMb() {
- return EncodingUtils.testBit(__isset_bitfield, __MAXMEMMB_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXMEMMB_ISSET_ID);
}
public void setMaxMemMbIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXMEMMB_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXMEMMB_ISSET_ID, value);
}
public int getMaxCores() {
@@ -357,25 +332,25 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
}
public void unsetMaxCores() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXCORES_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXCORES_ISSET_ID);
}
/** Returns true if field maxCores is set (has been assigned a value) and false otherwise */
public boolean isSetMaxCores() {
- return EncodingUtils.testBit(__isset_bitfield, __MAXCORES_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXCORES_ISSET_ID);
}
public void setMaxCoresIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXCORES_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXCORES_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case OS_ID:
if (value == null) {
unsetOsId();
} else {
- setOsId((Integer)value);
+ setOsId((java.lang.Integer)value);
}
break;
@@ -383,7 +358,7 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
if (value == null) {
unsetOsName();
} else {
- setOsName((String)value);
+ setOsName((java.lang.String)value);
}
break;
@@ -391,7 +366,7 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
if (value == null) {
unsetVirtualizerOsId();
} else {
- setVirtualizerOsId((Map<String,String>)value);
+ setVirtualizerOsId((java.util.Map<java.lang.String,java.lang.String>)value);
}
break;
@@ -399,7 +374,7 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
if (value == null) {
unsetArchitecture();
} else {
- setArchitecture((String)value);
+ setArchitecture((java.lang.String)value);
}
break;
@@ -407,7 +382,7 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
if (value == null) {
unsetMaxMemMb();
} else {
- setMaxMemMb((Integer)value);
+ setMaxMemMb((java.lang.Integer)value);
}
break;
@@ -415,14 +390,15 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
if (value == null) {
unsetMaxCores();
} else {
- setMaxCores((Integer)value);
+ setMaxCores((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case OS_ID:
return getOsId();
@@ -443,13 +419,13 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
return getMaxCores();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -466,13 +442,11 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
case MAX_CORES:
return isSetMaxCores();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof OperatingSystem)
return this.equals((OperatingSystem)that);
return false;
@@ -481,6 +455,8 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
public boolean equals(OperatingSystem that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_osId = true;
boolean that_present_osId = true;
@@ -541,39 +517,27 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_osId = true;
- list.add(present_osId);
- if (present_osId)
- list.add(osId);
+ hashCode = hashCode * 8191 + osId;
- boolean present_osName = true && (isSetOsName());
- list.add(present_osName);
- if (present_osName)
- list.add(osName);
+ hashCode = hashCode * 8191 + ((isSetOsName()) ? 131071 : 524287);
+ if (isSetOsName())
+ hashCode = hashCode * 8191 + osName.hashCode();
- boolean present_virtualizerOsId = true && (isSetVirtualizerOsId());
- list.add(present_virtualizerOsId);
- if (present_virtualizerOsId)
- list.add(virtualizerOsId);
+ hashCode = hashCode * 8191 + ((isSetVirtualizerOsId()) ? 131071 : 524287);
+ if (isSetVirtualizerOsId())
+ hashCode = hashCode * 8191 + virtualizerOsId.hashCode();
- boolean present_architecture = true && (isSetArchitecture());
- list.add(present_architecture);
- if (present_architecture)
- list.add(architecture);
+ hashCode = hashCode * 8191 + ((isSetArchitecture()) ? 131071 : 524287);
+ if (isSetArchitecture())
+ hashCode = hashCode * 8191 + architecture.hashCode();
- boolean present_maxMemMb = true;
- list.add(present_maxMemMb);
- if (present_maxMemMb)
- list.add(maxMemMb);
+ hashCode = hashCode * 8191 + maxMemMb;
- boolean present_maxCores = true;
- list.add(present_maxCores);
- if (present_maxCores)
- list.add(maxCores);
+ hashCode = hashCode * 8191 + maxCores;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -584,7 +548,7 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetOsId()).compareTo(other.isSetOsId());
+ lastComparison = java.lang.Boolean.compare(isSetOsId(), other.isSetOsId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -594,7 +558,7 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOsName()).compareTo(other.isSetOsName());
+ lastComparison = java.lang.Boolean.compare(isSetOsName(), other.isSetOsName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -604,7 +568,7 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetVirtualizerOsId()).compareTo(other.isSetVirtualizerOsId());
+ lastComparison = java.lang.Boolean.compare(isSetVirtualizerOsId(), other.isSetVirtualizerOsId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -614,7 +578,7 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetArchitecture()).compareTo(other.isSetArchitecture());
+ lastComparison = java.lang.Boolean.compare(isSetArchitecture(), other.isSetArchitecture());
if (lastComparison != 0) {
return lastComparison;
}
@@ -624,7 +588,7 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMaxMemMb()).compareTo(other.isSetMaxMemMb());
+ lastComparison = java.lang.Boolean.compare(isSetMaxMemMb(), other.isSetMaxMemMb());
if (lastComparison != 0) {
return lastComparison;
}
@@ -634,7 +598,7 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMaxCores()).compareTo(other.isSetMaxCores());
+ lastComparison = java.lang.Boolean.compare(isSetMaxCores(), other.isSetMaxCores());
if (lastComparison != 0) {
return lastComparison;
}
@@ -647,21 +611,22 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("OperatingSystem(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("OperatingSystem(");
boolean first = true;
sb.append("osId:");
@@ -716,7 +681,7 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -726,13 +691,13 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
}
}
- private static class OperatingSystemStandardSchemeFactory implements SchemeFactory {
+ private static class OperatingSystemStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public OperatingSystemStandardScheme getScheme() {
return new OperatingSystemStandardScheme();
}
}
- private static class OperatingSystemStandardScheme extends StandardScheme<OperatingSystem> {
+ private static class OperatingSystemStandardScheme extends org.apache.thrift.scheme.StandardScheme<OperatingSystem> {
public void read(org.apache.thrift.protocol.TProtocol iprot, OperatingSystem struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -764,9 +729,9 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map24 = iprot.readMapBegin();
- struct.virtualizerOsId = new HashMap<String,String>(2*_map24.size);
- String _key25;
- String _val26;
+ struct.virtualizerOsId = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map24.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key25;
+ @org.apache.thrift.annotation.Nullable java.lang.String _val26;
for (int _i27 = 0; _i27 < _map24.size; ++_i27)
{
_key25 = iprot.readString();
@@ -831,7 +796,7 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
oprot.writeFieldBegin(VIRTUALIZER_OS_ID_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.virtualizerOsId.size()));
- for (Map.Entry<String, String> _iter28 : struct.virtualizerOsId.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter28 : struct.virtualizerOsId.entrySet())
{
oprot.writeString(_iter28.getKey());
oprot.writeString(_iter28.getValue());
@@ -857,18 +822,18 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
}
- private static class OperatingSystemTupleSchemeFactory implements SchemeFactory {
+ private static class OperatingSystemTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public OperatingSystemTupleScheme getScheme() {
return new OperatingSystemTupleScheme();
}
}
- private static class OperatingSystemTupleScheme extends TupleScheme<OperatingSystem> {
+ private static class OperatingSystemTupleScheme extends org.apache.thrift.scheme.TupleScheme<OperatingSystem> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, OperatingSystem 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.isSetOsId()) {
optionals.set(0);
}
@@ -897,7 +862,7 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
if (struct.isSetVirtualizerOsId()) {
{
oprot.writeI32(struct.virtualizerOsId.size());
- for (Map.Entry<String, String> _iter29 : struct.virtualizerOsId.entrySet())
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter29 : struct.virtualizerOsId.entrySet())
{
oprot.writeString(_iter29.getKey());
oprot.writeString(_iter29.getValue());
@@ -917,8 +882,8 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, OperatingSystem struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(6);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(6);
if (incoming.get(0)) {
struct.osId = iprot.readI32();
struct.setOsIdIsSet(true);
@@ -929,10 +894,10 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TMap _map30 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.virtualizerOsId = new HashMap<String,String>(2*_map30.size);
- String _key31;
- String _val32;
+ org.apache.thrift.protocol.TMap _map30 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING);
+ struct.virtualizerOsId = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map30.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key31;
+ @org.apache.thrift.annotation.Nullable java.lang.String _val32;
for (int _i33 = 0; _i33 < _map30.size; ++_i33)
{
_key31 = iprot.readString();
@@ -957,5 +922,8 @@ public class OperatingSystem implements org.apache.thrift.TBase<OperatingSystem,
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/Organization.java b/src/main/java/org/openslx/bwlp/thrift/iface/Organization.java
index 2021634..b9b8b50 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/Organization.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/Organization.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 Organization implements org.apache.thrift.TBase<Organization, Organization._Fields>, java.io.Serializable, Cloneable, Comparable<Organization> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Organization");
@@ -43,16 +16,13 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
private static final org.apache.thrift.protocol.TField ECP_URL_FIELD_DESC = new org.apache.thrift.protocol.TField("ecpUrl", org.apache.thrift.protocol.TType.STRING, (short)3);
private static final org.apache.thrift.protocol.TField SUFFIX_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("suffixList", org.apache.thrift.protocol.TType.LIST, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new OrganizationStandardSchemeFactory());
- schemes.put(TupleScheme.class, new OrganizationTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new OrganizationStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new OrganizationTupleSchemeFactory();
- public String organizationId; // required
- public String displayName; // required
- public String ecpUrl; // required
- public List<String> suffixList; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String organizationId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String displayName; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String ecpUrl; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> suffixList; // 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 {
@@ -61,10 +31,10 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
ECP_URL((short)3, "ecpUrl"),
SUFFIX_LIST((short)4, "suffixList");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -72,6 +42,7 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
/**
* 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: // ORGANIZATION_ID
@@ -93,21 +64,22 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -116,15 +88,15 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.ORGANIZATION_ID, new org.apache.thrift.meta_data.FieldMetaData("organizationId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.DISPLAY_NAME, new org.apache.thrift.meta_data.FieldMetaData("displayName", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -134,7 +106,7 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
tmpMap.put(_Fields.SUFFIX_LIST, new org.apache.thrift.meta_data.FieldMetaData("suffixList", 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))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Organization.class, metaDataMap);
}
@@ -142,10 +114,10 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
}
public Organization(
- String organizationId,
- String displayName,
- String ecpUrl,
- List<String> suffixList)
+ java.lang.String organizationId,
+ java.lang.String displayName,
+ java.lang.String ecpUrl,
+ java.util.List<java.lang.String> suffixList)
{
this();
this.organizationId = organizationId;
@@ -168,7 +140,7 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
this.ecpUrl = other.ecpUrl;
}
if (other.isSetSuffixList()) {
- List<String> __this__suffixList = new ArrayList<String>(other.suffixList);
+ java.util.List<java.lang.String> __this__suffixList = new java.util.ArrayList<java.lang.String>(other.suffixList);
this.suffixList = __this__suffixList;
}
}
@@ -185,11 +157,12 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
this.suffixList = null;
}
- public String getOrganizationId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getOrganizationId() {
return this.organizationId;
}
- public Organization setOrganizationId(String organizationId) {
+ public Organization setOrganizationId(@org.apache.thrift.annotation.Nullable java.lang.String organizationId) {
this.organizationId = organizationId;
return this;
}
@@ -209,11 +182,12 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
}
}
- public String getDisplayName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getDisplayName() {
return this.displayName;
}
- public Organization setDisplayName(String displayName) {
+ public Organization setDisplayName(@org.apache.thrift.annotation.Nullable java.lang.String displayName) {
this.displayName = displayName;
return this;
}
@@ -233,11 +207,12 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
}
}
- public String getEcpUrl() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getEcpUrl() {
return this.ecpUrl;
}
- public Organization setEcpUrl(String ecpUrl) {
+ public Organization setEcpUrl(@org.apache.thrift.annotation.Nullable java.lang.String ecpUrl) {
this.ecpUrl = ecpUrl;
return this;
}
@@ -261,22 +236,24 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
return (this.suffixList == null) ? 0 : this.suffixList.size();
}
- public java.util.Iterator<String> getSuffixListIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> getSuffixListIterator() {
return (this.suffixList == null) ? null : this.suffixList.iterator();
}
- public void addToSuffixList(String elem) {
+ public void addToSuffixList(java.lang.String elem) {
if (this.suffixList == null) {
- this.suffixList = new ArrayList<String>();
+ this.suffixList = new java.util.ArrayList<java.lang.String>();
}
this.suffixList.add(elem);
}
- public List<String> getSuffixList() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getSuffixList() {
return this.suffixList;
}
- public Organization setSuffixList(List<String> suffixList) {
+ public Organization setSuffixList(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> suffixList) {
this.suffixList = suffixList;
return this;
}
@@ -296,13 +273,13 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ORGANIZATION_ID:
if (value == null) {
unsetOrganizationId();
} else {
- setOrganizationId((String)value);
+ setOrganizationId((java.lang.String)value);
}
break;
@@ -310,7 +287,7 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
if (value == null) {
unsetDisplayName();
} else {
- setDisplayName((String)value);
+ setDisplayName((java.lang.String)value);
}
break;
@@ -318,7 +295,7 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
if (value == null) {
unsetEcpUrl();
} else {
- setEcpUrl((String)value);
+ setEcpUrl((java.lang.String)value);
}
break;
@@ -326,14 +303,15 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
if (value == null) {
unsetSuffixList();
} else {
- setSuffixList((List<String>)value);
+ setSuffixList((java.util.List<java.lang.String>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ORGANIZATION_ID:
return getOrganizationId();
@@ -348,13 +326,13 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
return getSuffixList();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -367,13 +345,11 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
case SUFFIX_LIST:
return isSetSuffixList();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof Organization)
return this.equals((Organization)that);
return false;
@@ -382,6 +358,8 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
public boolean equals(Organization that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_organizationId = true && this.isSetOrganizationId();
boolean that_present_organizationId = true && that.isSetOrganizationId();
@@ -424,29 +402,25 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_organizationId = true && (isSetOrganizationId());
- list.add(present_organizationId);
- if (present_organizationId)
- list.add(organizationId);
+ hashCode = hashCode * 8191 + ((isSetOrganizationId()) ? 131071 : 524287);
+ if (isSetOrganizationId())
+ hashCode = hashCode * 8191 + organizationId.hashCode();
- boolean present_displayName = true && (isSetDisplayName());
- list.add(present_displayName);
- if (present_displayName)
- list.add(displayName);
+ hashCode = hashCode * 8191 + ((isSetDisplayName()) ? 131071 : 524287);
+ if (isSetDisplayName())
+ hashCode = hashCode * 8191 + displayName.hashCode();
- boolean present_ecpUrl = true && (isSetEcpUrl());
- list.add(present_ecpUrl);
- if (present_ecpUrl)
- list.add(ecpUrl);
+ hashCode = hashCode * 8191 + ((isSetEcpUrl()) ? 131071 : 524287);
+ if (isSetEcpUrl())
+ hashCode = hashCode * 8191 + ecpUrl.hashCode();
- boolean present_suffixList = true && (isSetSuffixList());
- list.add(present_suffixList);
- if (present_suffixList)
- list.add(suffixList);
+ hashCode = hashCode * 8191 + ((isSetSuffixList()) ? 131071 : 524287);
+ if (isSetSuffixList())
+ hashCode = hashCode * 8191 + suffixList.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -457,7 +431,7 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId());
+ lastComparison = java.lang.Boolean.compare(isSetOrganizationId(), other.isSetOrganizationId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -467,7 +441,7 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDisplayName()).compareTo(other.isSetDisplayName());
+ lastComparison = java.lang.Boolean.compare(isSetDisplayName(), other.isSetDisplayName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -477,7 +451,7 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetEcpUrl()).compareTo(other.isSetEcpUrl());
+ lastComparison = java.lang.Boolean.compare(isSetEcpUrl(), other.isSetEcpUrl());
if (lastComparison != 0) {
return lastComparison;
}
@@ -487,7 +461,7 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSuffixList()).compareTo(other.isSetSuffixList());
+ lastComparison = java.lang.Boolean.compare(isSetSuffixList(), other.isSetSuffixList());
if (lastComparison != 0) {
return lastComparison;
}
@@ -500,21 +474,22 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("Organization(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("Organization(");
boolean first = true;
sb.append("organizationId:");
@@ -565,7 +540,7 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -573,13 +548,13 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
}
}
- private static class OrganizationStandardSchemeFactory implements SchemeFactory {
+ private static class OrganizationStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public OrganizationStandardScheme getScheme() {
return new OrganizationStandardScheme();
}
}
- private static class OrganizationStandardScheme extends StandardScheme<Organization> {
+ private static class OrganizationStandardScheme extends org.apache.thrift.scheme.StandardScheme<Organization> {
public void read(org.apache.thrift.protocol.TProtocol iprot, Organization struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -619,8 +594,8 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
- struct.suffixList = new ArrayList<String>(_list0.size);
- String _elem1;
+ struct.suffixList = new java.util.ArrayList<java.lang.String>(_list0.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = iprot.readString();
@@ -667,7 +642,7 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
oprot.writeFieldBegin(SUFFIX_LIST_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.suffixList.size()));
- for (String _iter3 : struct.suffixList)
+ for (java.lang.String _iter3 : struct.suffixList)
{
oprot.writeString(_iter3);
}
@@ -681,18 +656,18 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
}
- private static class OrganizationTupleSchemeFactory implements SchemeFactory {
+ private static class OrganizationTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public OrganizationTupleScheme getScheme() {
return new OrganizationTupleScheme();
}
}
- private static class OrganizationTupleScheme extends TupleScheme<Organization> {
+ private static class OrganizationTupleScheme extends org.apache.thrift.scheme.TupleScheme<Organization> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Organization 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.isSetOrganizationId()) {
optionals.set(0);
}
@@ -718,7 +693,7 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
if (struct.isSetSuffixList()) {
{
oprot.writeI32(struct.suffixList.size());
- for (String _iter4 : struct.suffixList)
+ for (java.lang.String _iter4 : struct.suffixList)
{
oprot.writeString(_iter4);
}
@@ -728,8 +703,8 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Organization struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.organizationId = iprot.readString();
struct.setOrganizationIdIsSet(true);
@@ -744,9 +719,9 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
}
if (incoming.get(3)) {
{
- org.apache.thrift.protocol.TList _list5 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.suffixList = new ArrayList<String>(_list5.size);
- String _elem6;
+ org.apache.thrift.protocol.TList _list5 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.suffixList = new java.util.ArrayList<java.lang.String>(_list5.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem6;
for (int _i7 = 0; _i7 < _list5.size; ++_i7)
{
_elem6 = iprot.readString();
@@ -758,5 +733,8 @@ public class Organization implements org.apache.thrift.TBase<Organization, Organ
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java b/src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java
index 4032b4e..afdf0b0 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/PredefinedData.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 = "2019-02-25")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, PredefinedData._Fields>, java.io.Serializable, Cloneable, Comparable<PredefinedData> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PredefinedData");
@@ -43,16 +16,13 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
private static final org.apache.thrift.protocol.TField RUN_SCRIPTS_FIELD_DESC = new org.apache.thrift.protocol.TField("runScripts", org.apache.thrift.protocol.TType.LIST, (short)3);
private static final org.apache.thrift.protocol.TField NETWORK_EXCEPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("networkExceptions", org.apache.thrift.protocol.TType.LIST, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new PredefinedDataStandardSchemeFactory());
- schemes.put(TupleScheme.class, new PredefinedDataTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new PredefinedDataStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new PredefinedDataTupleSchemeFactory();
- public List<NetShare> netShares; // required
- public List<LdapFilter> ldapFilter; // required
- public List<PresetRunScript> runScripts; // required
- public List<PresetNetRule> networkExceptions; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<NetShare> netShares; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<LdapFilter> ldapFilter; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<PresetRunScript> runScripts; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<PresetNetRule> networkExceptions; // 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 {
@@ -61,10 +31,10 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
RUN_SCRIPTS((short)3, "runScripts"),
NETWORK_EXCEPTIONS((short)4, "networkExceptions");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -72,6 +42,7 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
/**
* 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: // NET_SHARES
@@ -93,21 +64,22 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -116,15 +88,15 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.NET_SHARES, new org.apache.thrift.meta_data.FieldMetaData("netShares", 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, NetShare.class))));
@@ -137,7 +109,7 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
tmpMap.put(_Fields.NETWORK_EXCEPTIONS, new org.apache.thrift.meta_data.FieldMetaData("networkExceptions", 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, PresetNetRule.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PredefinedData.class, metaDataMap);
}
@@ -145,10 +117,10 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
}
public PredefinedData(
- List<NetShare> netShares,
- List<LdapFilter> ldapFilter,
- List<PresetRunScript> runScripts,
- List<PresetNetRule> networkExceptions)
+ java.util.List<NetShare> netShares,
+ java.util.List<LdapFilter> ldapFilter,
+ java.util.List<PresetRunScript> runScripts,
+ java.util.List<PresetNetRule> networkExceptions)
{
this();
this.netShares = netShares;
@@ -162,28 +134,28 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
*/
public PredefinedData(PredefinedData other) {
if (other.isSetNetShares()) {
- List<NetShare> __this__netShares = new ArrayList<NetShare>(other.netShares.size());
+ java.util.List<NetShare> __this__netShares = new java.util.ArrayList<NetShare>(other.netShares.size());
for (NetShare other_element : other.netShares) {
__this__netShares.add(new NetShare(other_element));
}
this.netShares = __this__netShares;
}
if (other.isSetLdapFilter()) {
- List<LdapFilter> __this__ldapFilter = new ArrayList<LdapFilter>(other.ldapFilter.size());
+ java.util.List<LdapFilter> __this__ldapFilter = new java.util.ArrayList<LdapFilter>(other.ldapFilter.size());
for (LdapFilter other_element : other.ldapFilter) {
__this__ldapFilter.add(new LdapFilter(other_element));
}
this.ldapFilter = __this__ldapFilter;
}
if (other.isSetRunScripts()) {
- List<PresetRunScript> __this__runScripts = new ArrayList<PresetRunScript>(other.runScripts.size());
+ java.util.List<PresetRunScript> __this__runScripts = new java.util.ArrayList<PresetRunScript>(other.runScripts.size());
for (PresetRunScript other_element : other.runScripts) {
__this__runScripts.add(new PresetRunScript(other_element));
}
this.runScripts = __this__runScripts;
}
if (other.isSetNetworkExceptions()) {
- List<PresetNetRule> __this__networkExceptions = new ArrayList<PresetNetRule>(other.networkExceptions.size());
+ java.util.List<PresetNetRule> __this__networkExceptions = new java.util.ArrayList<PresetNetRule>(other.networkExceptions.size());
for (PresetNetRule other_element : other.networkExceptions) {
__this__networkExceptions.add(new PresetNetRule(other_element));
}
@@ -207,22 +179,24 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
return (this.netShares == null) ? 0 : this.netShares.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<NetShare> getNetSharesIterator() {
return (this.netShares == null) ? null : this.netShares.iterator();
}
public void addToNetShares(NetShare elem) {
if (this.netShares == null) {
- this.netShares = new ArrayList<NetShare>();
+ this.netShares = new java.util.ArrayList<NetShare>();
}
this.netShares.add(elem);
}
- public List<NetShare> getNetShares() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<NetShare> getNetShares() {
return this.netShares;
}
- public PredefinedData setNetShares(List<NetShare> netShares) {
+ public PredefinedData setNetShares(@org.apache.thrift.annotation.Nullable java.util.List<NetShare> netShares) {
this.netShares = netShares;
return this;
}
@@ -246,22 +220,24 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
return (this.ldapFilter == null) ? 0 : this.ldapFilter.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<LdapFilter> getLdapFilterIterator() {
return (this.ldapFilter == null) ? null : this.ldapFilter.iterator();
}
public void addToLdapFilter(LdapFilter elem) {
if (this.ldapFilter == null) {
- this.ldapFilter = new ArrayList<LdapFilter>();
+ this.ldapFilter = new java.util.ArrayList<LdapFilter>();
}
this.ldapFilter.add(elem);
}
- public List<LdapFilter> getLdapFilter() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<LdapFilter> getLdapFilter() {
return this.ldapFilter;
}
- public PredefinedData setLdapFilter(List<LdapFilter> ldapFilter) {
+ public PredefinedData setLdapFilter(@org.apache.thrift.annotation.Nullable java.util.List<LdapFilter> ldapFilter) {
this.ldapFilter = ldapFilter;
return this;
}
@@ -285,22 +261,24 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
return (this.runScripts == null) ? 0 : this.runScripts.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<PresetRunScript> getRunScriptsIterator() {
return (this.runScripts == null) ? null : this.runScripts.iterator();
}
public void addToRunScripts(PresetRunScript elem) {
if (this.runScripts == null) {
- this.runScripts = new ArrayList<PresetRunScript>();
+ this.runScripts = new java.util.ArrayList<PresetRunScript>();
}
this.runScripts.add(elem);
}
- public List<PresetRunScript> getRunScripts() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<PresetRunScript> getRunScripts() {
return this.runScripts;
}
- public PredefinedData setRunScripts(List<PresetRunScript> runScripts) {
+ public PredefinedData setRunScripts(@org.apache.thrift.annotation.Nullable java.util.List<PresetRunScript> runScripts) {
this.runScripts = runScripts;
return this;
}
@@ -324,22 +302,24 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
return (this.networkExceptions == null) ? 0 : this.networkExceptions.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<PresetNetRule> getNetworkExceptionsIterator() {
return (this.networkExceptions == null) ? null : this.networkExceptions.iterator();
}
public void addToNetworkExceptions(PresetNetRule elem) {
if (this.networkExceptions == null) {
- this.networkExceptions = new ArrayList<PresetNetRule>();
+ this.networkExceptions = new java.util.ArrayList<PresetNetRule>();
}
this.networkExceptions.add(elem);
}
- public List<PresetNetRule> getNetworkExceptions() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<PresetNetRule> getNetworkExceptions() {
return this.networkExceptions;
}
- public PredefinedData setNetworkExceptions(List<PresetNetRule> networkExceptions) {
+ public PredefinedData setNetworkExceptions(@org.apache.thrift.annotation.Nullable java.util.List<PresetNetRule> networkExceptions) {
this.networkExceptions = networkExceptions;
return this;
}
@@ -359,13 +339,13 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case NET_SHARES:
if (value == null) {
unsetNetShares();
} else {
- setNetShares((List<NetShare>)value);
+ setNetShares((java.util.List<NetShare>)value);
}
break;
@@ -373,7 +353,7 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
if (value == null) {
unsetLdapFilter();
} else {
- setLdapFilter((List<LdapFilter>)value);
+ setLdapFilter((java.util.List<LdapFilter>)value);
}
break;
@@ -381,7 +361,7 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
if (value == null) {
unsetRunScripts();
} else {
- setRunScripts((List<PresetRunScript>)value);
+ setRunScripts((java.util.List<PresetRunScript>)value);
}
break;
@@ -389,14 +369,15 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
if (value == null) {
unsetNetworkExceptions();
} else {
- setNetworkExceptions((List<PresetNetRule>)value);
+ setNetworkExceptions((java.util.List<PresetNetRule>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NET_SHARES:
return getNetShares();
@@ -411,13 +392,13 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
return getNetworkExceptions();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -430,13 +411,11 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
case NETWORK_EXCEPTIONS:
return isSetNetworkExceptions();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof PredefinedData)
return this.equals((PredefinedData)that);
return false;
@@ -445,6 +424,8 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
public boolean equals(PredefinedData that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_netShares = true && this.isSetNetShares();
boolean that_present_netShares = true && that.isSetNetShares();
@@ -487,29 +468,25 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_netShares = true && (isSetNetShares());
- list.add(present_netShares);
- if (present_netShares)
- list.add(netShares);
+ hashCode = hashCode * 8191 + ((isSetNetShares()) ? 131071 : 524287);
+ if (isSetNetShares())
+ hashCode = hashCode * 8191 + netShares.hashCode();
- boolean present_ldapFilter = true && (isSetLdapFilter());
- list.add(present_ldapFilter);
- if (present_ldapFilter)
- list.add(ldapFilter);
+ hashCode = hashCode * 8191 + ((isSetLdapFilter()) ? 131071 : 524287);
+ if (isSetLdapFilter())
+ hashCode = hashCode * 8191 + ldapFilter.hashCode();
- boolean present_runScripts = true && (isSetRunScripts());
- list.add(present_runScripts);
- if (present_runScripts)
- list.add(runScripts);
+ hashCode = hashCode * 8191 + ((isSetRunScripts()) ? 131071 : 524287);
+ if (isSetRunScripts())
+ hashCode = hashCode * 8191 + runScripts.hashCode();
- boolean present_networkExceptions = true && (isSetNetworkExceptions());
- list.add(present_networkExceptions);
- if (present_networkExceptions)
- list.add(networkExceptions);
+ hashCode = hashCode * 8191 + ((isSetNetworkExceptions()) ? 131071 : 524287);
+ if (isSetNetworkExceptions())
+ hashCode = hashCode * 8191 + networkExceptions.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -520,7 +497,7 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetNetShares()).compareTo(other.isSetNetShares());
+ lastComparison = java.lang.Boolean.compare(isSetNetShares(), other.isSetNetShares());
if (lastComparison != 0) {
return lastComparison;
}
@@ -530,7 +507,7 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLdapFilter()).compareTo(other.isSetLdapFilter());
+ lastComparison = java.lang.Boolean.compare(isSetLdapFilter(), other.isSetLdapFilter());
if (lastComparison != 0) {
return lastComparison;
}
@@ -540,7 +517,7 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetRunScripts()).compareTo(other.isSetRunScripts());
+ lastComparison = java.lang.Boolean.compare(isSetRunScripts(), other.isSetRunScripts());
if (lastComparison != 0) {
return lastComparison;
}
@@ -550,7 +527,7 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNetworkExceptions()).compareTo(other.isSetNetworkExceptions());
+ lastComparison = java.lang.Boolean.compare(isSetNetworkExceptions(), other.isSetNetworkExceptions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -563,21 +540,22 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("PredefinedData(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("PredefinedData(");
boolean first = true;
sb.append("netShares:");
@@ -628,7 +606,7 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -636,13 +614,13 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
}
}
- private static class PredefinedDataStandardSchemeFactory implements SchemeFactory {
+ private static class PredefinedDataStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public PredefinedDataStandardScheme getScheme() {
return new PredefinedDataStandardScheme();
}
}
- private static class PredefinedDataStandardScheme extends StandardScheme<PredefinedData> {
+ private static class PredefinedDataStandardScheme extends org.apache.thrift.scheme.StandardScheme<PredefinedData> {
public void read(org.apache.thrift.protocol.TProtocol iprot, PredefinedData struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -658,8 +636,8 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list106 = iprot.readListBegin();
- struct.netShares = new ArrayList<NetShare>(_list106.size);
- NetShare _elem107;
+ struct.netShares = new java.util.ArrayList<NetShare>(_list106.size);
+ @org.apache.thrift.annotation.Nullable NetShare _elem107;
for (int _i108 = 0; _i108 < _list106.size; ++_i108)
{
_elem107 = new NetShare();
@@ -677,8 +655,8 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list109 = iprot.readListBegin();
- struct.ldapFilter = new ArrayList<LdapFilter>(_list109.size);
- LdapFilter _elem110;
+ struct.ldapFilter = new java.util.ArrayList<LdapFilter>(_list109.size);
+ @org.apache.thrift.annotation.Nullable LdapFilter _elem110;
for (int _i111 = 0; _i111 < _list109.size; ++_i111)
{
_elem110 = new LdapFilter();
@@ -696,8 +674,8 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list112 = iprot.readListBegin();
- struct.runScripts = new ArrayList<PresetRunScript>(_list112.size);
- PresetRunScript _elem113;
+ struct.runScripts = new java.util.ArrayList<PresetRunScript>(_list112.size);
+ @org.apache.thrift.annotation.Nullable PresetRunScript _elem113;
for (int _i114 = 0; _i114 < _list112.size; ++_i114)
{
_elem113 = new PresetRunScript();
@@ -715,8 +693,8 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list115 = iprot.readListBegin();
- struct.networkExceptions = new ArrayList<PresetNetRule>(_list115.size);
- PresetNetRule _elem116;
+ struct.networkExceptions = new java.util.ArrayList<PresetNetRule>(_list115.size);
+ @org.apache.thrift.annotation.Nullable PresetNetRule _elem116;
for (int _i117 = 0; _i117 < _list115.size; ++_i117)
{
_elem116 = new PresetNetRule();
@@ -799,18 +777,18 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
}
- private static class PredefinedDataTupleSchemeFactory implements SchemeFactory {
+ private static class PredefinedDataTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public PredefinedDataTupleScheme getScheme() {
return new PredefinedDataTupleScheme();
}
}
- private static class PredefinedDataTupleScheme extends TupleScheme<PredefinedData> {
+ private static class PredefinedDataTupleScheme extends org.apache.thrift.scheme.TupleScheme<PredefinedData> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, PredefinedData 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.isSetNetShares()) {
optionals.set(0);
}
@@ -864,13 +842,13 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, PredefinedData struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list126 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.netShares = new ArrayList<NetShare>(_list126.size);
- NetShare _elem127;
+ org.apache.thrift.protocol.TList _list126 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.netShares = new java.util.ArrayList<NetShare>(_list126.size);
+ @org.apache.thrift.annotation.Nullable NetShare _elem127;
for (int _i128 = 0; _i128 < _list126.size; ++_i128)
{
_elem127 = new NetShare();
@@ -882,9 +860,9 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
}
if (incoming.get(1)) {
{
- org.apache.thrift.protocol.TList _list129 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.ldapFilter = new ArrayList<LdapFilter>(_list129.size);
- LdapFilter _elem130;
+ org.apache.thrift.protocol.TList _list129 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.ldapFilter = new java.util.ArrayList<LdapFilter>(_list129.size);
+ @org.apache.thrift.annotation.Nullable LdapFilter _elem130;
for (int _i131 = 0; _i131 < _list129.size; ++_i131)
{
_elem130 = new LdapFilter();
@@ -896,9 +874,9 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list132 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.runScripts = new ArrayList<PresetRunScript>(_list132.size);
- PresetRunScript _elem133;
+ org.apache.thrift.protocol.TList _list132 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.runScripts = new java.util.ArrayList<PresetRunScript>(_list132.size);
+ @org.apache.thrift.annotation.Nullable PresetRunScript _elem133;
for (int _i134 = 0; _i134 < _list132.size; ++_i134)
{
_elem133 = new PresetRunScript();
@@ -910,9 +888,9 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
}
if (incoming.get(3)) {
{
- org.apache.thrift.protocol.TList _list135 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.networkExceptions = new ArrayList<PresetNetRule>(_list135.size);
- PresetNetRule _elem136;
+ org.apache.thrift.protocol.TList _list135 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.networkExceptions = new java.util.ArrayList<PresetNetRule>(_list135.size);
+ @org.apache.thrift.annotation.Nullable PresetNetRule _elem136;
for (int _i137 = 0; _i137 < _list135.size; ++_i137)
{
_elem136 = new PresetNetRule();
@@ -925,5 +903,8 @@ public class PredefinedData implements org.apache.thrift.TBase<PredefinedData, P
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/PresetNetRule.java b/src/main/java/org/openslx/bwlp/thrift/iface/PresetNetRule.java
index 262c8ac..215d8ba 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/PresetNetRule.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/PresetNetRule.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 = "2019-02-25")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, PresetNetRule._Fields>, java.io.Serializable, Cloneable, Comparable<PresetNetRule> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PresetNetRule");
@@ -42,15 +15,12 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
private static final org.apache.thrift.protocol.TField DISPLAY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("displayName", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField NET_RULES_FIELD_DESC = new org.apache.thrift.protocol.TField("netRules", org.apache.thrift.protocol.TType.LIST, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new PresetNetRuleStandardSchemeFactory());
- schemes.put(TupleScheme.class, new PresetNetRuleTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new PresetNetRuleStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new PresetNetRuleTupleSchemeFactory();
public int ruleId; // required
- public String displayName; // required
- public List<NetRule> netRules; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String displayName; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<NetRule> netRules; // 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 {
@@ -58,10 +28,10 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
DISPLAY_NAME((short)2, "displayName"),
NET_RULES((short)3, "netRules");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -69,6 +39,7 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
/**
* 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: // RULE_ID
@@ -88,21 +59,22 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -111,7 +83,7 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -119,9 +91,9 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
// isset id assignments
private static final int __RULEID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.RULE_ID, new org.apache.thrift.meta_data.FieldMetaData("ruleId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.DISPLAY_NAME, new org.apache.thrift.meta_data.FieldMetaData("displayName", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -129,7 +101,7 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
tmpMap.put(_Fields.NET_RULES, new org.apache.thrift.meta_data.FieldMetaData("netRules", 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, NetRule.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PresetNetRule.class, metaDataMap);
}
@@ -138,8 +110,8 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
public PresetNetRule(
int ruleId,
- String displayName,
- List<NetRule> netRules)
+ java.lang.String displayName,
+ java.util.List<NetRule> netRules)
{
this();
this.ruleId = ruleId;
@@ -158,7 +130,7 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
this.displayName = other.displayName;
}
if (other.isSetNetRules()) {
- List<NetRule> __this__netRules = new ArrayList<NetRule>(other.netRules.size());
+ java.util.List<NetRule> __this__netRules = new java.util.ArrayList<NetRule>(other.netRules.size());
for (NetRule other_element : other.netRules) {
__this__netRules.add(new NetRule(other_element));
}
@@ -189,23 +161,24 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
}
public void unsetRuleId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RULEID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __RULEID_ISSET_ID);
}
/** Returns true if field ruleId is set (has been assigned a value) and false otherwise */
public boolean isSetRuleId() {
- return EncodingUtils.testBit(__isset_bitfield, __RULEID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __RULEID_ISSET_ID);
}
public void setRuleIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RULEID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __RULEID_ISSET_ID, value);
}
- public String getDisplayName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getDisplayName() {
return this.displayName;
}
- public PresetNetRule setDisplayName(String displayName) {
+ public PresetNetRule setDisplayName(@org.apache.thrift.annotation.Nullable java.lang.String displayName) {
this.displayName = displayName;
return this;
}
@@ -229,22 +202,24 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
return (this.netRules == null) ? 0 : this.netRules.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<NetRule> getNetRulesIterator() {
return (this.netRules == null) ? null : this.netRules.iterator();
}
public void addToNetRules(NetRule elem) {
if (this.netRules == null) {
- this.netRules = new ArrayList<NetRule>();
+ this.netRules = new java.util.ArrayList<NetRule>();
}
this.netRules.add(elem);
}
- public List<NetRule> getNetRules() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<NetRule> getNetRules() {
return this.netRules;
}
- public PresetNetRule setNetRules(List<NetRule> netRules) {
+ public PresetNetRule setNetRules(@org.apache.thrift.annotation.Nullable java.util.List<NetRule> netRules) {
this.netRules = netRules;
return this;
}
@@ -264,13 +239,13 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case RULE_ID:
if (value == null) {
unsetRuleId();
} else {
- setRuleId((Integer)value);
+ setRuleId((java.lang.Integer)value);
}
break;
@@ -278,7 +253,7 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
if (value == null) {
unsetDisplayName();
} else {
- setDisplayName((String)value);
+ setDisplayName((java.lang.String)value);
}
break;
@@ -286,14 +261,15 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
if (value == null) {
unsetNetRules();
} else {
- setNetRules((List<NetRule>)value);
+ setNetRules((java.util.List<NetRule>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case RULE_ID:
return getRuleId();
@@ -305,13 +281,13 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
return getNetRules();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -322,13 +298,11 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
case NET_RULES:
return isSetNetRules();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof PresetNetRule)
return this.equals((PresetNetRule)that);
return false;
@@ -337,6 +311,8 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
public boolean equals(PresetNetRule that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_ruleId = true;
boolean that_present_ruleId = true;
@@ -370,24 +346,19 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_ruleId = true;
- list.add(present_ruleId);
- if (present_ruleId)
- list.add(ruleId);
+ hashCode = hashCode * 8191 + ruleId;
- boolean present_displayName = true && (isSetDisplayName());
- list.add(present_displayName);
- if (present_displayName)
- list.add(displayName);
+ hashCode = hashCode * 8191 + ((isSetDisplayName()) ? 131071 : 524287);
+ if (isSetDisplayName())
+ hashCode = hashCode * 8191 + displayName.hashCode();
- boolean present_netRules = true && (isSetNetRules());
- list.add(present_netRules);
- if (present_netRules)
- list.add(netRules);
+ hashCode = hashCode * 8191 + ((isSetNetRules()) ? 131071 : 524287);
+ if (isSetNetRules())
+ hashCode = hashCode * 8191 + netRules.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -398,7 +369,7 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetRuleId()).compareTo(other.isSetRuleId());
+ lastComparison = java.lang.Boolean.compare(isSetRuleId(), other.isSetRuleId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -408,7 +379,7 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDisplayName()).compareTo(other.isSetDisplayName());
+ lastComparison = java.lang.Boolean.compare(isSetDisplayName(), other.isSetDisplayName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -418,7 +389,7 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNetRules()).compareTo(other.isSetNetRules());
+ lastComparison = java.lang.Boolean.compare(isSetNetRules(), other.isSetNetRules());
if (lastComparison != 0) {
return lastComparison;
}
@@ -431,21 +402,22 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("PresetNetRule(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("PresetNetRule(");
boolean first = true;
sb.append("ruleId:");
@@ -484,7 +456,7 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -494,13 +466,13 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
}
}
- private static class PresetNetRuleStandardSchemeFactory implements SchemeFactory {
+ private static class PresetNetRuleStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public PresetNetRuleStandardScheme getScheme() {
return new PresetNetRuleStandardScheme();
}
}
- private static class PresetNetRuleStandardScheme extends StandardScheme<PresetNetRule> {
+ private static class PresetNetRuleStandardScheme extends org.apache.thrift.scheme.StandardScheme<PresetNetRule> {
public void read(org.apache.thrift.protocol.TProtocol iprot, PresetNetRule struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -532,8 +504,8 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list98 = iprot.readListBegin();
- struct.netRules = new ArrayList<NetRule>(_list98.size);
- NetRule _elem99;
+ struct.netRules = new java.util.ArrayList<NetRule>(_list98.size);
+ @org.apache.thrift.annotation.Nullable NetRule _elem99;
for (int _i100 = 0; _i100 < _list98.size; ++_i100)
{
_elem99 = new NetRule();
@@ -588,18 +560,18 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
}
- private static class PresetNetRuleTupleSchemeFactory implements SchemeFactory {
+ private static class PresetNetRuleTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public PresetNetRuleTupleScheme getScheme() {
return new PresetNetRuleTupleScheme();
}
}
- private static class PresetNetRuleTupleScheme extends TupleScheme<PresetNetRule> {
+ private static class PresetNetRuleTupleScheme extends org.apache.thrift.scheme.TupleScheme<PresetNetRule> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, PresetNetRule 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.isSetRuleId()) {
optionals.set(0);
}
@@ -629,8 +601,8 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, PresetNetRule struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.ruleId = iprot.readI32();
struct.setRuleIdIsSet(true);
@@ -641,9 +613,9 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list103 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.netRules = new ArrayList<NetRule>(_list103.size);
- NetRule _elem104;
+ org.apache.thrift.protocol.TList _list103 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.netRules = new java.util.ArrayList<NetRule>(_list103.size);
+ @org.apache.thrift.annotation.Nullable NetRule _elem104;
for (int _i105 = 0; _i105 < _list103.size; ++_i105)
{
_elem104 = new NetRule();
@@ -656,5 +628,8 @@ public class PresetNetRule implements org.apache.thrift.TBase<PresetNetRule, Pre
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/PresetRunScript.java b/src/main/java/org/openslx/bwlp/thrift/iface/PresetRunScript.java
index da245ef..46443b6 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/PresetRunScript.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/PresetRunScript.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 = "2018-12-11")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript, PresetRunScript._Fields>, java.io.Serializable, Cloneable, Comparable<PresetRunScript> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PresetRunScript");
@@ -42,15 +15,12 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
private static final org.apache.thrift.protocol.TField DISPLAYNAME_FIELD_DESC = new org.apache.thrift.protocol.TField("displayname", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField OS_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("osIds", org.apache.thrift.protocol.TType.LIST, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new PresetRunScriptStandardSchemeFactory());
- schemes.put(TupleScheme.class, new PresetRunScriptTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new PresetRunScriptStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new PresetRunScriptTupleSchemeFactory();
public int scriptId; // required
- public String displayname; // required
- public List<Integer> osIds; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String displayname; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> osIds; // 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 {
@@ -58,10 +28,10 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
DISPLAYNAME((short)2, "displayname"),
OS_IDS((short)3, "osIds");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -69,6 +39,7 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
/**
* 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: // SCRIPT_ID
@@ -88,21 +59,22 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -111,7 +83,7 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -119,9 +91,9 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
// isset id assignments
private static final int __SCRIPTID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SCRIPT_ID, new org.apache.thrift.meta_data.FieldMetaData("scriptId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.DISPLAYNAME, new org.apache.thrift.meta_data.FieldMetaData("displayname", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -129,7 +101,7 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
tmpMap.put(_Fields.OS_IDS, new org.apache.thrift.meta_data.FieldMetaData("osIds", 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.I32))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(PresetRunScript.class, metaDataMap);
}
@@ -138,8 +110,8 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
public PresetRunScript(
int scriptId,
- String displayname,
- List<Integer> osIds)
+ java.lang.String displayname,
+ java.util.List<java.lang.Integer> osIds)
{
this();
this.scriptId = scriptId;
@@ -158,7 +130,7 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
this.displayname = other.displayname;
}
if (other.isSetOsIds()) {
- List<Integer> __this__osIds = new ArrayList<Integer>(other.osIds);
+ java.util.List<java.lang.Integer> __this__osIds = new java.util.ArrayList<java.lang.Integer>(other.osIds);
this.osIds = __this__osIds;
}
}
@@ -186,23 +158,24 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
}
public void unsetScriptId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCRIPTID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SCRIPTID_ISSET_ID);
}
/** Returns true if field scriptId is set (has been assigned a value) and false otherwise */
public boolean isSetScriptId() {
- return EncodingUtils.testBit(__isset_bitfield, __SCRIPTID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SCRIPTID_ISSET_ID);
}
public void setScriptIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCRIPTID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SCRIPTID_ISSET_ID, value);
}
- public String getDisplayname() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getDisplayname() {
return this.displayname;
}
- public PresetRunScript setDisplayname(String displayname) {
+ public PresetRunScript setDisplayname(@org.apache.thrift.annotation.Nullable java.lang.String displayname) {
this.displayname = displayname;
return this;
}
@@ -226,22 +199,24 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
return (this.osIds == null) ? 0 : this.osIds.size();
}
- public java.util.Iterator<Integer> getOsIdsIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.Integer> getOsIdsIterator() {
return (this.osIds == null) ? null : this.osIds.iterator();
}
public void addToOsIds(int elem) {
if (this.osIds == null) {
- this.osIds = new ArrayList<Integer>();
+ this.osIds = new java.util.ArrayList<java.lang.Integer>();
}
this.osIds.add(elem);
}
- public List<Integer> getOsIds() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.Integer> getOsIds() {
return this.osIds;
}
- public PresetRunScript setOsIds(List<Integer> osIds) {
+ public PresetRunScript setOsIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> osIds) {
this.osIds = osIds;
return this;
}
@@ -261,13 +236,13 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SCRIPT_ID:
if (value == null) {
unsetScriptId();
} else {
- setScriptId((Integer)value);
+ setScriptId((java.lang.Integer)value);
}
break;
@@ -275,7 +250,7 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
if (value == null) {
unsetDisplayname();
} else {
- setDisplayname((String)value);
+ setDisplayname((java.lang.String)value);
}
break;
@@ -283,14 +258,15 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
if (value == null) {
unsetOsIds();
} else {
- setOsIds((List<Integer>)value);
+ setOsIds((java.util.List<java.lang.Integer>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SCRIPT_ID:
return getScriptId();
@@ -302,13 +278,13 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
return getOsIds();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -319,13 +295,11 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
case OS_IDS:
return isSetOsIds();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof PresetRunScript)
return this.equals((PresetRunScript)that);
return false;
@@ -334,6 +308,8 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
public boolean equals(PresetRunScript that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_scriptId = true;
boolean that_present_scriptId = true;
@@ -367,24 +343,19 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_scriptId = true;
- list.add(present_scriptId);
- if (present_scriptId)
- list.add(scriptId);
+ hashCode = hashCode * 8191 + scriptId;
- boolean present_displayname = true && (isSetDisplayname());
- list.add(present_displayname);
- if (present_displayname)
- list.add(displayname);
+ hashCode = hashCode * 8191 + ((isSetDisplayname()) ? 131071 : 524287);
+ if (isSetDisplayname())
+ hashCode = hashCode * 8191 + displayname.hashCode();
- boolean present_osIds = true && (isSetOsIds());
- list.add(present_osIds);
- if (present_osIds)
- list.add(osIds);
+ hashCode = hashCode * 8191 + ((isSetOsIds()) ? 131071 : 524287);
+ if (isSetOsIds())
+ hashCode = hashCode * 8191 + osIds.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -395,7 +366,7 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetScriptId()).compareTo(other.isSetScriptId());
+ lastComparison = java.lang.Boolean.compare(isSetScriptId(), other.isSetScriptId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -405,7 +376,7 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDisplayname()).compareTo(other.isSetDisplayname());
+ lastComparison = java.lang.Boolean.compare(isSetDisplayname(), other.isSetDisplayname());
if (lastComparison != 0) {
return lastComparison;
}
@@ -415,7 +386,7 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOsIds()).compareTo(other.isSetOsIds());
+ lastComparison = java.lang.Boolean.compare(isSetOsIds(), other.isSetOsIds());
if (lastComparison != 0) {
return lastComparison;
}
@@ -428,21 +399,22 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("PresetRunScript(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("PresetRunScript(");
boolean first = true;
sb.append("scriptId:");
@@ -481,7 +453,7 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -491,13 +463,13 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
}
}
- private static class PresetRunScriptStandardSchemeFactory implements SchemeFactory {
+ private static class PresetRunScriptStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public PresetRunScriptStandardScheme getScheme() {
return new PresetRunScriptStandardScheme();
}
}
- private static class PresetRunScriptStandardScheme extends StandardScheme<PresetRunScript> {
+ private static class PresetRunScriptStandardScheme extends org.apache.thrift.scheme.StandardScheme<PresetRunScript> {
public void read(org.apache.thrift.protocol.TProtocol iprot, PresetRunScript struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -529,7 +501,7 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list90 = iprot.readListBegin();
- struct.osIds = new ArrayList<Integer>(_list90.size);
+ struct.osIds = new java.util.ArrayList<java.lang.Integer>(_list90.size);
int _elem91;
for (int _i92 = 0; _i92 < _list90.size; ++_i92)
{
@@ -584,18 +556,18 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
}
- private static class PresetRunScriptTupleSchemeFactory implements SchemeFactory {
+ private static class PresetRunScriptTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public PresetRunScriptTupleScheme getScheme() {
return new PresetRunScriptTupleScheme();
}
}
- private static class PresetRunScriptTupleScheme extends TupleScheme<PresetRunScript> {
+ private static class PresetRunScriptTupleScheme extends org.apache.thrift.scheme.TupleScheme<PresetRunScript> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, PresetRunScript 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.isSetScriptId()) {
optionals.set(0);
}
@@ -625,8 +597,8 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, PresetRunScript struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.scriptId = iprot.readI32();
struct.setScriptIdIsSet(true);
@@ -637,8 +609,8 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list95 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.osIds = new ArrayList<Integer>(_list95.size);
+ org.apache.thrift.protocol.TList _list95 = iprot.readListBegin(org.apache.thrift.protocol.TType.I32);
+ struct.osIds = new java.util.ArrayList<java.lang.Integer>(_list95.size);
int _elem96;
for (int _i97 = 0; _i97 < _list95.size; ++_i97)
{
@@ -651,5 +623,8 @@ public class PresetRunScript implements org.apache.thrift.TBase<PresetRunScript,
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/Role.java b/src/main/java/org/openslx/bwlp/thrift/iface/Role.java
index bbdd984..fc39705 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/Role.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/Role.java
@@ -1,5 +1,5 @@
/**
- * 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
@@ -7,10 +7,7 @@
package org.openslx.bwlp.thrift.iface;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public enum Role implements org.apache.thrift.TEnum {
STUDENT(0),
TUTOR(1);
@@ -32,6 +29,7 @@ public enum Role implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static Role findByValue(int value) {
switch (value) {
case 0:
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/Satellite.java b/src/main/java/org/openslx/bwlp/thrift/iface/Satellite.java
index 2d498af..6a9cc85 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/Satellite.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/Satellite.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 Satellite implements org.apache.thrift.TBase<Satellite, Satellite._Fields>, java.io.Serializable, Cloneable, Comparable<Satellite> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Satellite");
@@ -42,15 +15,12 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
private static final org.apache.thrift.protocol.TField DISPLAY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("displayName", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField CERT_SHA256_FIELD_DESC = new org.apache.thrift.protocol.TField("certSha256", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SatelliteStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SatelliteTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SatelliteStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SatelliteTupleSchemeFactory();
- public List<String> addressList; // required
- public String displayName; // required
- public ByteBuffer certSha256; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> addressList; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String displayName; // required
+ public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer certSha256; // 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 {
@@ -58,10 +28,10 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
DISPLAY_NAME((short)2, "displayName"),
CERT_SHA256((short)3, "certSha256");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -69,6 +39,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
/**
* 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: // ADDRESS_LIST
@@ -88,21 +59,22 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -111,15 +83,15 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.ADDRESS_LIST, new org.apache.thrift.meta_data.FieldMetaData("addressList", 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))));
@@ -127,7 +99,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.CERT_SHA256, new org.apache.thrift.meta_data.FieldMetaData("certSha256", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Satellite.class, metaDataMap);
}
@@ -135,9 +107,9 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
}
public Satellite(
- List<String> addressList,
- String displayName,
- ByteBuffer certSha256)
+ java.util.List<java.lang.String> addressList,
+ java.lang.String displayName,
+ java.nio.ByteBuffer certSha256)
{
this();
this.addressList = addressList;
@@ -150,7 +122,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
*/
public Satellite(Satellite other) {
if (other.isSetAddressList()) {
- List<String> __this__addressList = new ArrayList<String>(other.addressList);
+ java.util.List<java.lang.String> __this__addressList = new java.util.ArrayList<java.lang.String>(other.addressList);
this.addressList = __this__addressList;
}
if (other.isSetDisplayName()) {
@@ -176,22 +148,24 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
return (this.addressList == null) ? 0 : this.addressList.size();
}
- public java.util.Iterator<String> getAddressListIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> getAddressListIterator() {
return (this.addressList == null) ? null : this.addressList.iterator();
}
- public void addToAddressList(String elem) {
+ public void addToAddressList(java.lang.String elem) {
if (this.addressList == null) {
- this.addressList = new ArrayList<String>();
+ this.addressList = new java.util.ArrayList<java.lang.String>();
}
this.addressList.add(elem);
}
- public List<String> getAddressList() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getAddressList() {
return this.addressList;
}
- public Satellite setAddressList(List<String> addressList) {
+ public Satellite setAddressList(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> addressList) {
this.addressList = addressList;
return this;
}
@@ -211,11 +185,12 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
}
}
- public String getDisplayName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getDisplayName() {
return this.displayName;
}
- public Satellite setDisplayName(String displayName) {
+ public Satellite setDisplayName(@org.apache.thrift.annotation.Nullable java.lang.String displayName) {
this.displayName = displayName;
return this;
}
@@ -240,16 +215,16 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
return certSha256 == null ? null : certSha256.array();
}
- public ByteBuffer bufferForCertSha256() {
+ public java.nio.ByteBuffer bufferForCertSha256() {
return org.apache.thrift.TBaseHelper.copyBinary(certSha256);
}
public Satellite setCertSha256(byte[] certSha256) {
- this.certSha256 = certSha256 == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(certSha256, certSha256.length));
+ this.certSha256 = certSha256 == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(certSha256.clone());
return this;
}
- public Satellite setCertSha256(ByteBuffer certSha256) {
+ public Satellite setCertSha256(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer certSha256) {
this.certSha256 = org.apache.thrift.TBaseHelper.copyBinary(certSha256);
return this;
}
@@ -269,13 +244,13 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case ADDRESS_LIST:
if (value == null) {
unsetAddressList();
} else {
- setAddressList((List<String>)value);
+ setAddressList((java.util.List<java.lang.String>)value);
}
break;
@@ -283,7 +258,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
if (value == null) {
unsetDisplayName();
} else {
- setDisplayName((String)value);
+ setDisplayName((java.lang.String)value);
}
break;
@@ -291,14 +266,19 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
if (value == null) {
unsetCertSha256();
} else {
- setCertSha256((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setCertSha256((byte[])value);
+ } else {
+ setCertSha256((java.nio.ByteBuffer)value);
+ }
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case ADDRESS_LIST:
return getAddressList();
@@ -310,13 +290,13 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
return getCertSha256();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -327,13 +307,11 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
case CERT_SHA256:
return isSetCertSha256();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof Satellite)
return this.equals((Satellite)that);
return false;
@@ -342,6 +320,8 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
public boolean equals(Satellite that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_addressList = true && this.isSetAddressList();
boolean that_present_addressList = true && that.isSetAddressList();
@@ -375,24 +355,21 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_addressList = true && (isSetAddressList());
- list.add(present_addressList);
- if (present_addressList)
- list.add(addressList);
+ hashCode = hashCode * 8191 + ((isSetAddressList()) ? 131071 : 524287);
+ if (isSetAddressList())
+ hashCode = hashCode * 8191 + addressList.hashCode();
- boolean present_displayName = true && (isSetDisplayName());
- list.add(present_displayName);
- if (present_displayName)
- list.add(displayName);
+ hashCode = hashCode * 8191 + ((isSetDisplayName()) ? 131071 : 524287);
+ if (isSetDisplayName())
+ hashCode = hashCode * 8191 + displayName.hashCode();
- boolean present_certSha256 = true && (isSetCertSha256());
- list.add(present_certSha256);
- if (present_certSha256)
- list.add(certSha256);
+ hashCode = hashCode * 8191 + ((isSetCertSha256()) ? 131071 : 524287);
+ if (isSetCertSha256())
+ hashCode = hashCode * 8191 + certSha256.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -403,7 +380,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAddressList()).compareTo(other.isSetAddressList());
+ lastComparison = java.lang.Boolean.compare(isSetAddressList(), other.isSetAddressList());
if (lastComparison != 0) {
return lastComparison;
}
@@ -413,7 +390,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDisplayName()).compareTo(other.isSetDisplayName());
+ lastComparison = java.lang.Boolean.compare(isSetDisplayName(), other.isSetDisplayName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -423,7 +400,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCertSha256()).compareTo(other.isSetCertSha256());
+ lastComparison = java.lang.Boolean.compare(isSetCertSha256(), other.isSetCertSha256());
if (lastComparison != 0) {
return lastComparison;
}
@@ -436,21 +413,22 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("Satellite(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("Satellite(");
boolean first = true;
sb.append("addressList:");
@@ -493,7 +471,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -501,13 +479,13 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
}
}
- private static class SatelliteStandardSchemeFactory implements SchemeFactory {
+ private static class SatelliteStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SatelliteStandardScheme getScheme() {
return new SatelliteStandardScheme();
}
}
- private static class SatelliteStandardScheme extends StandardScheme<Satellite> {
+ private static class SatelliteStandardScheme extends org.apache.thrift.scheme.StandardScheme<Satellite> {
public void read(org.apache.thrift.protocol.TProtocol iprot, Satellite struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -523,8 +501,8 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
- struct.addressList = new ArrayList<String>(_list8.size);
- String _elem9;
+ struct.addressList = new java.util.ArrayList<java.lang.String>(_list8.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem9;
for (int _i10 = 0; _i10 < _list8.size; ++_i10)
{
_elem9 = iprot.readString();
@@ -572,7 +550,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
oprot.writeFieldBegin(ADDRESS_LIST_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.addressList.size()));
- for (String _iter11 : struct.addressList)
+ for (java.lang.String _iter11 : struct.addressList)
{
oprot.writeString(_iter11);
}
@@ -596,18 +574,18 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
}
- private static class SatelliteTupleSchemeFactory implements SchemeFactory {
+ private static class SatelliteTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SatelliteTupleScheme getScheme() {
return new SatelliteTupleScheme();
}
}
- private static class SatelliteTupleScheme extends TupleScheme<Satellite> {
+ private static class SatelliteTupleScheme extends org.apache.thrift.scheme.TupleScheme<Satellite> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Satellite 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.isSetAddressList()) {
optionals.set(0);
}
@@ -621,7 +599,7 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
if (struct.isSetAddressList()) {
{
oprot.writeI32(struct.addressList.size());
- for (String _iter12 : struct.addressList)
+ for (java.lang.String _iter12 : struct.addressList)
{
oprot.writeString(_iter12);
}
@@ -637,13 +615,13 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Satellite struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.addressList = new ArrayList<String>(_list13.size);
- String _elem14;
+ org.apache.thrift.protocol.TList _list13 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.addressList = new java.util.ArrayList<java.lang.String>(_list13.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem14;
for (int _i15 = 0; _i15 < _list13.size; ++_i15)
{
_elem14 = iprot.readString();
@@ -663,5 +641,8 @@ public class Satellite implements org.apache.thrift.TBase<Satellite, Satellite._
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java
index 4737596..d4fd8c8 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteConfig.java
@@ -1,40 +1,13 @@
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.17.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 = "2019-02-22")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2022-11-03")
public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig, SatelliteConfig._Fields>, java.io.Serializable, Cloneable, Comparable<SatelliteConfig> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SatelliteConfig");
@@ -48,16 +21,15 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
private static final org.apache.thrift.protocol.TField MAX_LOCATIONS_PER_LECTURE_FIELD_DESC = new org.apache.thrift.protocol.TField("maxLocationsPerLecture", org.apache.thrift.protocol.TType.I32, (short)8);
private static final org.apache.thrift.protocol.TField ALLOW_LOGIN_BY_DEFAULT_FIELD_DESC = new org.apache.thrift.protocol.TField("allowLoginByDefault", org.apache.thrift.protocol.TType.BOOL, (short)9);
private static final org.apache.thrift.protocol.TField SERVER_SIDE_COPY_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSideCopy", org.apache.thrift.protocol.TType.I32, (short)10);
+ private static final org.apache.thrift.protocol.TField ALLOW_STUDENT_DOWNLOAD_FIELD_DESC = new org.apache.thrift.protocol.TField("allowStudentDownload", org.apache.thrift.protocol.TType.BOOL, (short)11);
+ private static final org.apache.thrift.protocol.TField VM_SIZE_LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("vmSizeLimit", org.apache.thrift.protocol.TType.I64, (short)12);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SatelliteConfigStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SatelliteConfigTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SatelliteConfigStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SatelliteConfigTupleSchemeFactory();
public int pageSize; // required
- public ImagePermissions defaultImagePermissions; // required
- public LecturePermissions defaultLecturePermissions; // required
+ public @org.apache.thrift.annotation.Nullable ImagePermissions defaultImagePermissions; // required
+ public @org.apache.thrift.annotation.Nullable LecturePermissions defaultLecturePermissions; // required
public int maxImageValidityDays; // required
public int maxLectureValidityDays; // required
public int maxTransfers; // optional
@@ -68,7 +40,9 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
*
* @see SscMode
*/
- public SscMode serverSideCopy; // optional
+ public @org.apache.thrift.annotation.Nullable SscMode serverSideCopy; // optional
+ public boolean allowStudentDownload; // optional
+ public long vmSizeLimit; // 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 {
@@ -85,12 +59,14 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
*
* @see SscMode
*/
- SERVER_SIDE_COPY((short)10, "serverSideCopy");
+ SERVER_SIDE_COPY((short)10, "serverSideCopy"),
+ ALLOW_STUDENT_DOWNLOAD((short)11, "allowStudentDownload"),
+ VM_SIZE_LIMIT((short)12, "vmSizeLimit");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -98,6 +74,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
/**
* 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: // PAGE_SIZE
@@ -120,6 +97,10 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
return ALLOW_LOGIN_BY_DEFAULT;
case 10: // SERVER_SIDE_COPY
return SERVER_SIDE_COPY;
+ case 11: // ALLOW_STUDENT_DOWNLOAD
+ return ALLOW_STUDENT_DOWNLOAD;
+ case 12: // VM_SIZE_LIMIT
+ return VM_SIZE_LIMIT;
default:
return null;
}
@@ -131,30 +112,33 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -167,11 +151,13 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
private static final int __MAXCONNECTIONSPERTRANSFER_ISSET_ID = 4;
private static final int __MAXLOCATIONSPERLECTURE_ISSET_ID = 5;
private static final int __ALLOWLOGINBYDEFAULT_ISSET_ID = 6;
- private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.MAX_TRANSFERS,_Fields.MAX_CONNECTIONS_PER_TRANSFER,_Fields.MAX_LOCATIONS_PER_LECTURE,_Fields.ALLOW_LOGIN_BY_DEFAULT,_Fields.SERVER_SIDE_COPY};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ private static final int __ALLOWSTUDENTDOWNLOAD_ISSET_ID = 7;
+ private static final int __VMSIZELIMIT_ISSET_ID = 8;
+ private short __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.MAX_TRANSFERS,_Fields.MAX_CONNECTIONS_PER_TRANSFER,_Fields.MAX_LOCATIONS_PER_LECTURE,_Fields.ALLOW_LOGIN_BY_DEFAULT,_Fields.SERVER_SIDE_COPY,_Fields.ALLOW_STUDENT_DOWNLOAD,_Fields.VM_SIZE_LIMIT};
+ 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.PAGE_SIZE, new org.apache.thrift.meta_data.FieldMetaData("pageSize", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
tmpMap.put(_Fields.DEFAULT_IMAGE_PERMISSIONS, new org.apache.thrift.meta_data.FieldMetaData("defaultImagePermissions", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -192,7 +178,11 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.SERVER_SIDE_COPY, new org.apache.thrift.meta_data.FieldMetaData("serverSideCopy", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, SscMode.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ tmpMap.put(_Fields.ALLOW_STUDENT_DOWNLOAD, new org.apache.thrift.meta_data.FieldMetaData("allowStudentDownload", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.VM_SIZE_LIMIT, new org.apache.thrift.meta_data.FieldMetaData("vmSizeLimit", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SatelliteConfig.class, metaDataMap);
}
@@ -238,8 +228,11 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
if (other.isSetServerSideCopy()) {
this.serverSideCopy = other.serverSideCopy;
}
+ this.allowStudentDownload = other.allowStudentDownload;
+ this.vmSizeLimit = other.vmSizeLimit;
}
+ @Override
public SatelliteConfig deepCopy() {
return new SatelliteConfig(this);
}
@@ -263,6 +256,10 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
setAllowLoginByDefaultIsSet(false);
this.allowLoginByDefault = false;
this.serverSideCopy = null;
+ setAllowStudentDownloadIsSet(false);
+ this.allowStudentDownload = false;
+ setVmSizeLimitIsSet(false);
+ this.vmSizeLimit = 0;
}
public int getPageSize() {
@@ -276,23 +273,24 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
}
public void unsetPageSize() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PAGESIZE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PAGESIZE_ISSET_ID);
}
/** Returns true if field pageSize is set (has been assigned a value) and false otherwise */
public boolean isSetPageSize() {
- return EncodingUtils.testBit(__isset_bitfield, __PAGESIZE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PAGESIZE_ISSET_ID);
}
public void setPageSizeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PAGESIZE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PAGESIZE_ISSET_ID, value);
}
+ @org.apache.thrift.annotation.Nullable
public ImagePermissions getDefaultImagePermissions() {
return this.defaultImagePermissions;
}
- public SatelliteConfig setDefaultImagePermissions(ImagePermissions defaultImagePermissions) {
+ public SatelliteConfig setDefaultImagePermissions(@org.apache.thrift.annotation.Nullable ImagePermissions defaultImagePermissions) {
this.defaultImagePermissions = defaultImagePermissions;
return this;
}
@@ -312,11 +310,12 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
}
}
+ @org.apache.thrift.annotation.Nullable
public LecturePermissions getDefaultLecturePermissions() {
return this.defaultLecturePermissions;
}
- public SatelliteConfig setDefaultLecturePermissions(LecturePermissions defaultLecturePermissions) {
+ public SatelliteConfig setDefaultLecturePermissions(@org.apache.thrift.annotation.Nullable LecturePermissions defaultLecturePermissions) {
this.defaultLecturePermissions = defaultLecturePermissions;
return this;
}
@@ -347,16 +346,16 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
}
public void unsetMaxImageValidityDays() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXIMAGEVALIDITYDAYS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXIMAGEVALIDITYDAYS_ISSET_ID);
}
/** Returns true if field maxImageValidityDays is set (has been assigned a value) and false otherwise */
public boolean isSetMaxImageValidityDays() {
- return EncodingUtils.testBit(__isset_bitfield, __MAXIMAGEVALIDITYDAYS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXIMAGEVALIDITYDAYS_ISSET_ID);
}
public void setMaxImageValidityDaysIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXIMAGEVALIDITYDAYS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXIMAGEVALIDITYDAYS_ISSET_ID, value);
}
public int getMaxLectureValidityDays() {
@@ -370,16 +369,16 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
}
public void unsetMaxLectureValidityDays() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXLECTUREVALIDITYDAYS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXLECTUREVALIDITYDAYS_ISSET_ID);
}
/** Returns true if field maxLectureValidityDays is set (has been assigned a value) and false otherwise */
public boolean isSetMaxLectureValidityDays() {
- return EncodingUtils.testBit(__isset_bitfield, __MAXLECTUREVALIDITYDAYS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXLECTUREVALIDITYDAYS_ISSET_ID);
}
public void setMaxLectureValidityDaysIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXLECTUREVALIDITYDAYS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXLECTUREVALIDITYDAYS_ISSET_ID, value);
}
public int getMaxTransfers() {
@@ -393,16 +392,16 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
}
public void unsetMaxTransfers() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXTRANSFERS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXTRANSFERS_ISSET_ID);
}
/** Returns true if field maxTransfers is set (has been assigned a value) and false otherwise */
public boolean isSetMaxTransfers() {
- return EncodingUtils.testBit(__isset_bitfield, __MAXTRANSFERS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXTRANSFERS_ISSET_ID);
}
public void setMaxTransfersIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXTRANSFERS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXTRANSFERS_ISSET_ID, value);
}
public int getMaxConnectionsPerTransfer() {
@@ -416,16 +415,16 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
}
public void unsetMaxConnectionsPerTransfer() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXCONNECTIONSPERTRANSFER_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXCONNECTIONSPERTRANSFER_ISSET_ID);
}
/** Returns true if field maxConnectionsPerTransfer is set (has been assigned a value) and false otherwise */
public boolean isSetMaxConnectionsPerTransfer() {
- return EncodingUtils.testBit(__isset_bitfield, __MAXCONNECTIONSPERTRANSFER_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXCONNECTIONSPERTRANSFER_ISSET_ID);
}
public void setMaxConnectionsPerTransferIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXCONNECTIONSPERTRANSFER_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXCONNECTIONSPERTRANSFER_ISSET_ID, value);
}
public int getMaxLocationsPerLecture() {
@@ -439,16 +438,16 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
}
public void unsetMaxLocationsPerLecture() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __MAXLOCATIONSPERLECTURE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __MAXLOCATIONSPERLECTURE_ISSET_ID);
}
/** Returns true if field maxLocationsPerLecture is set (has been assigned a value) and false otherwise */
public boolean isSetMaxLocationsPerLecture() {
- return EncodingUtils.testBit(__isset_bitfield, __MAXLOCATIONSPERLECTURE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __MAXLOCATIONSPERLECTURE_ISSET_ID);
}
public void setMaxLocationsPerLectureIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __MAXLOCATIONSPERLECTURE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __MAXLOCATIONSPERLECTURE_ISSET_ID, value);
}
public boolean isAllowLoginByDefault() {
@@ -462,22 +461,23 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
}
public void unsetAllowLoginByDefault() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ALLOWLOGINBYDEFAULT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ALLOWLOGINBYDEFAULT_ISSET_ID);
}
/** Returns true if field allowLoginByDefault is set (has been assigned a value) and false otherwise */
public boolean isSetAllowLoginByDefault() {
- return EncodingUtils.testBit(__isset_bitfield, __ALLOWLOGINBYDEFAULT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ALLOWLOGINBYDEFAULT_ISSET_ID);
}
public void setAllowLoginByDefaultIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ALLOWLOGINBYDEFAULT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ALLOWLOGINBYDEFAULT_ISSET_ID, value);
}
/**
*
* @see SscMode
*/
+ @org.apache.thrift.annotation.Nullable
public SscMode getServerSideCopy() {
return this.serverSideCopy;
}
@@ -486,7 +486,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
*
* @see SscMode
*/
- public SatelliteConfig setServerSideCopy(SscMode serverSideCopy) {
+ public SatelliteConfig setServerSideCopy(@org.apache.thrift.annotation.Nullable SscMode serverSideCopy) {
this.serverSideCopy = serverSideCopy;
return this;
}
@@ -506,13 +506,60 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public boolean isAllowStudentDownload() {
+ return this.allowStudentDownload;
+ }
+
+ public SatelliteConfig setAllowStudentDownload(boolean allowStudentDownload) {
+ this.allowStudentDownload = allowStudentDownload;
+ setAllowStudentDownloadIsSet(true);
+ return this;
+ }
+
+ public void unsetAllowStudentDownload() {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ALLOWSTUDENTDOWNLOAD_ISSET_ID);
+ }
+
+ /** Returns true if field allowStudentDownload is set (has been assigned a value) and false otherwise */
+ public boolean isSetAllowStudentDownload() {
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ALLOWSTUDENTDOWNLOAD_ISSET_ID);
+ }
+
+ public void setAllowStudentDownloadIsSet(boolean value) {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ALLOWSTUDENTDOWNLOAD_ISSET_ID, value);
+ }
+
+ public long getVmSizeLimit() {
+ return this.vmSizeLimit;
+ }
+
+ public SatelliteConfig setVmSizeLimit(long vmSizeLimit) {
+ this.vmSizeLimit = vmSizeLimit;
+ setVmSizeLimitIsSet(true);
+ return this;
+ }
+
+ public void unsetVmSizeLimit() {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VMSIZELIMIT_ISSET_ID);
+ }
+
+ /** Returns true if field vmSizeLimit is set (has been assigned a value) and false otherwise */
+ public boolean isSetVmSizeLimit() {
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VMSIZELIMIT_ISSET_ID);
+ }
+
+ public void setVmSizeLimitIsSet(boolean value) {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VMSIZELIMIT_ISSET_ID, value);
+ }
+
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case PAGE_SIZE:
if (value == null) {
unsetPageSize();
} else {
- setPageSize((Integer)value);
+ setPageSize((java.lang.Integer)value);
}
break;
@@ -536,7 +583,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
if (value == null) {
unsetMaxImageValidityDays();
} else {
- setMaxImageValidityDays((Integer)value);
+ setMaxImageValidityDays((java.lang.Integer)value);
}
break;
@@ -544,7 +591,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
if (value == null) {
unsetMaxLectureValidityDays();
} else {
- setMaxLectureValidityDays((Integer)value);
+ setMaxLectureValidityDays((java.lang.Integer)value);
}
break;
@@ -552,7 +599,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
if (value == null) {
unsetMaxTransfers();
} else {
- setMaxTransfers((Integer)value);
+ setMaxTransfers((java.lang.Integer)value);
}
break;
@@ -560,7 +607,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
if (value == null) {
unsetMaxConnectionsPerTransfer();
} else {
- setMaxConnectionsPerTransfer((Integer)value);
+ setMaxConnectionsPerTransfer((java.lang.Integer)value);
}
break;
@@ -568,7 +615,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
if (value == null) {
unsetMaxLocationsPerLecture();
} else {
- setMaxLocationsPerLecture((Integer)value);
+ setMaxLocationsPerLecture((java.lang.Integer)value);
}
break;
@@ -576,7 +623,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
if (value == null) {
unsetAllowLoginByDefault();
} else {
- setAllowLoginByDefault((Boolean)value);
+ setAllowLoginByDefault((java.lang.Boolean)value);
}
break;
@@ -588,10 +635,28 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
}
break;
+ case ALLOW_STUDENT_DOWNLOAD:
+ if (value == null) {
+ unsetAllowStudentDownload();
+ } else {
+ setAllowStudentDownload((java.lang.Boolean)value);
+ }
+ break;
+
+ case VM_SIZE_LIMIT:
+ if (value == null) {
+ unsetVmSizeLimit();
+ } else {
+ setVmSizeLimit((java.lang.Long)value);
+ }
+ break;
+
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case PAGE_SIZE:
return getPageSize();
@@ -623,14 +688,21 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
case SERVER_SIDE_COPY:
return getServerSideCopy();
+ case ALLOW_STUDENT_DOWNLOAD:
+ return isAllowStudentDownload();
+
+ case VM_SIZE_LIMIT:
+ return getVmSizeLimit();
+
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -654,14 +726,16 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
return isSetAllowLoginByDefault();
case SERVER_SIDE_COPY:
return isSetServerSideCopy();
+ case ALLOW_STUDENT_DOWNLOAD:
+ return isSetAllowStudentDownload();
+ case VM_SIZE_LIMIT:
+ return isSetVmSizeLimit();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof SatelliteConfig)
return this.equals((SatelliteConfig)that);
return false;
@@ -670,6 +744,8 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
public boolean equals(SatelliteConfig that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_pageSize = true;
boolean that_present_pageSize = true;
@@ -761,64 +837,74 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
return false;
}
+ boolean this_present_allowStudentDownload = true && this.isSetAllowStudentDownload();
+ boolean that_present_allowStudentDownload = true && that.isSetAllowStudentDownload();
+ if (this_present_allowStudentDownload || that_present_allowStudentDownload) {
+ if (!(this_present_allowStudentDownload && that_present_allowStudentDownload))
+ return false;
+ if (this.allowStudentDownload != that.allowStudentDownload)
+ return false;
+ }
+
+ boolean this_present_vmSizeLimit = true && this.isSetVmSizeLimit();
+ boolean that_present_vmSizeLimit = true && that.isSetVmSizeLimit();
+ if (this_present_vmSizeLimit || that_present_vmSizeLimit) {
+ if (!(this_present_vmSizeLimit && that_present_vmSizeLimit))
+ return false;
+ if (this.vmSizeLimit != that.vmSizeLimit)
+ return false;
+ }
+
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + pageSize;
+
+ hashCode = hashCode * 8191 + ((isSetDefaultImagePermissions()) ? 131071 : 524287);
+ if (isSetDefaultImagePermissions())
+ hashCode = hashCode * 8191 + defaultImagePermissions.hashCode();
- boolean present_pageSize = true;
- list.add(present_pageSize);
- if (present_pageSize)
- list.add(pageSize);
+ hashCode = hashCode * 8191 + ((isSetDefaultLecturePermissions()) ? 131071 : 524287);
+ if (isSetDefaultLecturePermissions())
+ hashCode = hashCode * 8191 + defaultLecturePermissions.hashCode();
- boolean present_defaultImagePermissions = true && (isSetDefaultImagePermissions());
- list.add(present_defaultImagePermissions);
- if (present_defaultImagePermissions)
- list.add(defaultImagePermissions);
+ hashCode = hashCode * 8191 + maxImageValidityDays;
- boolean present_defaultLecturePermissions = true && (isSetDefaultLecturePermissions());
- list.add(present_defaultLecturePermissions);
- if (present_defaultLecturePermissions)
- list.add(defaultLecturePermissions);
+ hashCode = hashCode * 8191 + maxLectureValidityDays;
- boolean present_maxImageValidityDays = true;
- list.add(present_maxImageValidityDays);
- if (present_maxImageValidityDays)
- list.add(maxImageValidityDays);
+ hashCode = hashCode * 8191 + ((isSetMaxTransfers()) ? 131071 : 524287);
+ if (isSetMaxTransfers())
+ hashCode = hashCode * 8191 + maxTransfers;
- boolean present_maxLectureValidityDays = true;
- list.add(present_maxLectureValidityDays);
- if (present_maxLectureValidityDays)
- list.add(maxLectureValidityDays);
+ hashCode = hashCode * 8191 + ((isSetMaxConnectionsPerTransfer()) ? 131071 : 524287);
+ if (isSetMaxConnectionsPerTransfer())
+ hashCode = hashCode * 8191 + maxConnectionsPerTransfer;
- boolean present_maxTransfers = true && (isSetMaxTransfers());
- list.add(present_maxTransfers);
- if (present_maxTransfers)
- list.add(maxTransfers);
+ hashCode = hashCode * 8191 + ((isSetMaxLocationsPerLecture()) ? 131071 : 524287);
+ if (isSetMaxLocationsPerLecture())
+ hashCode = hashCode * 8191 + maxLocationsPerLecture;
- boolean present_maxConnectionsPerTransfer = true && (isSetMaxConnectionsPerTransfer());
- list.add(present_maxConnectionsPerTransfer);
- if (present_maxConnectionsPerTransfer)
- list.add(maxConnectionsPerTransfer);
+ hashCode = hashCode * 8191 + ((isSetAllowLoginByDefault()) ? 131071 : 524287);
+ if (isSetAllowLoginByDefault())
+ hashCode = hashCode * 8191 + ((allowLoginByDefault) ? 131071 : 524287);
- boolean present_maxLocationsPerLecture = true && (isSetMaxLocationsPerLecture());
- list.add(present_maxLocationsPerLecture);
- if (present_maxLocationsPerLecture)
- list.add(maxLocationsPerLecture);
+ hashCode = hashCode * 8191 + ((isSetServerSideCopy()) ? 131071 : 524287);
+ if (isSetServerSideCopy())
+ hashCode = hashCode * 8191 + serverSideCopy.getValue();
- boolean present_allowLoginByDefault = true && (isSetAllowLoginByDefault());
- list.add(present_allowLoginByDefault);
- if (present_allowLoginByDefault)
- list.add(allowLoginByDefault);
+ hashCode = hashCode * 8191 + ((isSetAllowStudentDownload()) ? 131071 : 524287);
+ if (isSetAllowStudentDownload())
+ hashCode = hashCode * 8191 + ((allowStudentDownload) ? 131071 : 524287);
- boolean present_serverSideCopy = true && (isSetServerSideCopy());
- list.add(present_serverSideCopy);
- if (present_serverSideCopy)
- list.add(serverSideCopy.getValue());
+ hashCode = hashCode * 8191 + ((isSetVmSizeLimit()) ? 131071 : 524287);
+ if (isSetVmSizeLimit())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(vmSizeLimit);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -829,7 +915,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetPageSize()).compareTo(other.isSetPageSize());
+ lastComparison = java.lang.Boolean.compare(isSetPageSize(), other.isSetPageSize());
if (lastComparison != 0) {
return lastComparison;
}
@@ -839,7 +925,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDefaultImagePermissions()).compareTo(other.isSetDefaultImagePermissions());
+ lastComparison = java.lang.Boolean.compare(isSetDefaultImagePermissions(), other.isSetDefaultImagePermissions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -849,7 +935,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDefaultLecturePermissions()).compareTo(other.isSetDefaultLecturePermissions());
+ lastComparison = java.lang.Boolean.compare(isSetDefaultLecturePermissions(), other.isSetDefaultLecturePermissions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -859,7 +945,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMaxImageValidityDays()).compareTo(other.isSetMaxImageValidityDays());
+ lastComparison = java.lang.Boolean.compare(isSetMaxImageValidityDays(), other.isSetMaxImageValidityDays());
if (lastComparison != 0) {
return lastComparison;
}
@@ -869,7 +955,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMaxLectureValidityDays()).compareTo(other.isSetMaxLectureValidityDays());
+ lastComparison = java.lang.Boolean.compare(isSetMaxLectureValidityDays(), other.isSetMaxLectureValidityDays());
if (lastComparison != 0) {
return lastComparison;
}
@@ -879,7 +965,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMaxTransfers()).compareTo(other.isSetMaxTransfers());
+ lastComparison = java.lang.Boolean.compare(isSetMaxTransfers(), other.isSetMaxTransfers());
if (lastComparison != 0) {
return lastComparison;
}
@@ -889,7 +975,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMaxConnectionsPerTransfer()).compareTo(other.isSetMaxConnectionsPerTransfer());
+ lastComparison = java.lang.Boolean.compare(isSetMaxConnectionsPerTransfer(), other.isSetMaxConnectionsPerTransfer());
if (lastComparison != 0) {
return lastComparison;
}
@@ -899,7 +985,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMaxLocationsPerLecture()).compareTo(other.isSetMaxLocationsPerLecture());
+ lastComparison = java.lang.Boolean.compare(isSetMaxLocationsPerLecture(), other.isSetMaxLocationsPerLecture());
if (lastComparison != 0) {
return lastComparison;
}
@@ -909,7 +995,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAllowLoginByDefault()).compareTo(other.isSetAllowLoginByDefault());
+ lastComparison = java.lang.Boolean.compare(isSetAllowLoginByDefault(), other.isSetAllowLoginByDefault());
if (lastComparison != 0) {
return lastComparison;
}
@@ -919,7 +1005,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerSideCopy()).compareTo(other.isSetServerSideCopy());
+ lastComparison = java.lang.Boolean.compare(isSetServerSideCopy(), other.isSetServerSideCopy());
if (lastComparison != 0) {
return lastComparison;
}
@@ -929,24 +1015,48 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
return lastComparison;
}
}
+ lastComparison = java.lang.Boolean.compare(isSetAllowStudentDownload(), other.isSetAllowStudentDownload());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAllowStudentDownload()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.allowStudentDownload, other.allowStudentDownload);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = java.lang.Boolean.compare(isSetVmSizeLimit(), other.isSetVmSizeLimit());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetVmSizeLimit()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vmSizeLimit, other.vmSizeLimit);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SatelliteConfig(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("SatelliteConfig(");
boolean first = true;
sb.append("pageSize:");
@@ -1010,6 +1120,18 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
}
first = false;
}
+ if (isSetAllowStudentDownload()) {
+ if (!first) sb.append(", ");
+ sb.append("allowStudentDownload:");
+ sb.append(this.allowStudentDownload);
+ first = false;
+ }
+ if (isSetVmSizeLimit()) {
+ if (!first) sb.append(", ");
+ sb.append("vmSizeLimit:");
+ sb.append(this.vmSizeLimit);
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
@@ -1033,7 +1155,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -1043,14 +1165,16 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
}
}
- private static class SatelliteConfigStandardSchemeFactory implements SchemeFactory {
+ private static class SatelliteConfigStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public SatelliteConfigStandardScheme getScheme() {
return new SatelliteConfigStandardScheme();
}
}
- private static class SatelliteConfigStandardScheme extends StandardScheme<SatelliteConfig> {
+ private static class SatelliteConfigStandardScheme extends org.apache.thrift.scheme.StandardScheme<SatelliteConfig> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, SatelliteConfig struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -1143,6 +1267,22 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
+ case 11: // ALLOW_STUDENT_DOWNLOAD
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.allowStudentDownload = iprot.readBool();
+ struct.setAllowStudentDownloadIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 12: // VM_SIZE_LIMIT
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.vmSizeLimit = iprot.readI64();
+ struct.setVmSizeLimitIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
@@ -1154,6 +1294,7 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, SatelliteConfig struct) throws org.apache.thrift.TException {
struct.validate();
@@ -1204,24 +1345,35 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
oprot.writeFieldEnd();
}
}
+ if (struct.isSetAllowStudentDownload()) {
+ oprot.writeFieldBegin(ALLOW_STUDENT_DOWNLOAD_FIELD_DESC);
+ oprot.writeBool(struct.allowStudentDownload);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetVmSizeLimit()) {
+ oprot.writeFieldBegin(VM_SIZE_LIMIT_FIELD_DESC);
+ oprot.writeI64(struct.vmSizeLimit);
+ oprot.writeFieldEnd();
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
}
- private static class SatelliteConfigTupleSchemeFactory implements SchemeFactory {
+ private static class SatelliteConfigTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public SatelliteConfigTupleScheme getScheme() {
return new SatelliteConfigTupleScheme();
}
}
- private static class SatelliteConfigTupleScheme extends TupleScheme<SatelliteConfig> {
+ private static class SatelliteConfigTupleScheme extends org.apache.thrift.scheme.TupleScheme<SatelliteConfig> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SatelliteConfig 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.isSetPageSize()) {
optionals.set(0);
}
@@ -1252,7 +1404,13 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
if (struct.isSetServerSideCopy()) {
optionals.set(9);
}
- oprot.writeBitSet(optionals, 10);
+ if (struct.isSetAllowStudentDownload()) {
+ optionals.set(10);
+ }
+ if (struct.isSetVmSizeLimit()) {
+ optionals.set(11);
+ }
+ oprot.writeBitSet(optionals, 12);
if (struct.isSetPageSize()) {
oprot.writeI32(struct.pageSize);
}
@@ -1283,12 +1441,18 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
if (struct.isSetServerSideCopy()) {
oprot.writeI32(struct.serverSideCopy.getValue());
}
+ if (struct.isSetAllowStudentDownload()) {
+ oprot.writeBool(struct.allowStudentDownload);
+ }
+ if (struct.isSetVmSizeLimit()) {
+ oprot.writeI64(struct.vmSizeLimit);
+ }
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SatelliteConfig struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(10);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(12);
if (incoming.get(0)) {
struct.pageSize = iprot.readI32();
struct.setPageSizeIsSet(true);
@@ -1331,8 +1495,19 @@ public class SatelliteConfig implements org.apache.thrift.TBase<SatelliteConfig,
struct.serverSideCopy = org.openslx.bwlp.thrift.iface.SscMode.findByValue(iprot.readI32());
struct.setServerSideCopyIsSet(true);
}
+ if (incoming.get(10)) {
+ struct.allowStudentDownload = iprot.readBool();
+ struct.setAllowStudentDownloadIsSet(true);
+ }
+ if (incoming.get(11)) {
+ struct.vmSizeLimit = iprot.readI64();
+ struct.setVmSizeLimitIsSet(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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java
index 517614e..30ab7c6 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteServer.java
@@ -1,236 +1,211 @@
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.17.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 = "2018-11-23")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.17.0)", date = "2022-11-03")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public class SatelliteServer {
public interface Iface {
public long getVersion(long clientVersion) throws org.apache.thrift.TException;
- public String getSupportedFeatures() throws org.apache.thrift.TException;
+ public java.lang.String getSupportedFeatures() throws org.apache.thrift.TException;
public SatelliteConfig getConfiguration() throws org.apache.thrift.TException;
- public TransferInformation requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, ByteBuffer machineDescription) throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException;
+ public TransferInformation requestImageVersionUpload(java.lang.String userToken, java.lang.String imageBaseId, long fileSize, java.util.List<java.nio.ByteBuffer> blockHashes, java.nio.ByteBuffer machineDescription) throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException;
- public void updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes, String userToken) throws TInvalidTokenException, org.apache.thrift.TException;
+ public void updateBlockHashes(java.lang.String uploadToken, java.util.List<java.nio.ByteBuffer> blockHashes, java.lang.String userToken) throws TInvalidTokenException, org.apache.thrift.TException;
- public UploadOptions setUploadOptions(String userToken, String uploadToken, UploadOptions options) throws TAuthorizationException, TInvalidTokenException, org.apache.thrift.TException;
+ public UploadOptions setUploadOptions(java.lang.String userToken, java.lang.String uploadToken, UploadOptions options) throws TAuthorizationException, TInvalidTokenException, org.apache.thrift.TException;
- public void cancelUpload(String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException;
+ public void cancelUpload(java.lang.String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException;
- public TransferStatus queryUploadStatus(String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException;
+ public TransferStatus queryUploadStatus(java.lang.String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException;
- public TransferInformation requestDownload(String userToken, String imageVersionId) throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException;
+ public TransferInformation requestDownload(java.lang.String userToken, java.lang.String imageVersionId) throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException;
- public void cancelDownload(String downloadToken) throws TInvalidTokenException, org.apache.thrift.TException;
+ public void cancelDownload(java.lang.String downloadToken) throws TInvalidTokenException, org.apache.thrift.TException;
- public void isAuthenticated(String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
+ public void isAuthenticated(java.lang.String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
- public WhoamiInfo whoami(String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
+ public WhoamiInfo whoami(java.lang.String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
- public void invalidateSession(String userToken) throws TInvalidTokenException, org.apache.thrift.TException;
+ public void invalidateSession(java.lang.String userToken) throws TInvalidTokenException, org.apache.thrift.TException;
- public List<UserInfo> getUserList(String userToken, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
+ public java.util.List<UserInfo> getUserList(java.lang.String userToken, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
- public SatelliteUserConfig getUserConfig(String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
+ public SatelliteUserConfig getUserConfig(java.lang.String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
- public void setUserConfig(String userToken, SatelliteUserConfig config) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
+ public void setUserConfig(java.lang.String userToken, SatelliteUserConfig config) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
- public List<OperatingSystem> getOperatingSystems() throws org.apache.thrift.TException;
+ public java.util.List<OperatingSystem> getOperatingSystems() throws org.apache.thrift.TException;
- public List<Virtualizer> getVirtualizers() throws org.apache.thrift.TException;
+ public java.util.List<Virtualizer> getVirtualizers() throws org.apache.thrift.TException;
- public List<Organization> getAllOrganizations() throws org.apache.thrift.TException;
+ public java.util.List<Organization> getAllOrganizations() throws org.apache.thrift.TException;
- public List<Location> getLocations() throws org.apache.thrift.TException;
+ public java.util.List<Location> getLocations() throws org.apache.thrift.TException;
public SatelliteStatus getStatus() throws org.apache.thrift.TException;
- public List<ImageSummaryRead> getImageList(String userToken, List<String> tagSearch, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
+ public java.util.List<ImageSummaryRead> getImageList(java.lang.String userToken, java.util.List<java.lang.String> tagSearch, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
- public ImageDetailsRead getImageDetails(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
+ public ImageDetailsRead getImageDetails(java.lang.String userToken, java.lang.String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
- public String createImage(String userToken, String imageName) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
+ public java.lang.String createImage(java.lang.String userToken, java.lang.String imageName) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
- public void updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
+ public void updateImageBase(java.lang.String userToken, java.lang.String imageBaseId, ImageBaseWrite image) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
- public void updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
+ public void updateImageVersion(java.lang.String userToken, java.lang.String imageVersionId, ImageVersionWrite image) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
- public void deleteImageVersion(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
+ public void deleteImageVersion(java.lang.String userToken, java.lang.String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
- public void deleteImageBase(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
+ public void deleteImageBase(java.lang.String userToken, java.lang.String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
- public void writeImagePermissions(String userToken, String imageBaseId, Map<String,ImagePermissions> permissions) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
+ public void writeImagePermissions(java.lang.String userToken, java.lang.String imageBaseId, java.util.Map<java.lang.String,ImagePermissions> permissions) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
- public Map<String,ImagePermissions> getImagePermissions(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
+ public java.util.Map<java.lang.String,ImagePermissions> getImagePermissions(java.lang.String userToken, java.lang.String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
- public void setImageOwner(String userToken, String imageBaseId, String newOwnerId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
+ public void setImageOwner(java.lang.String userToken, java.lang.String imageBaseId, java.lang.String newOwnerId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
- public void setImageVersionExpiry(String userToken, String imageBaseId, long expireTime) throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException;
+ public void setImageVersionExpiry(java.lang.String userToken, java.lang.String imageBaseId, long expireTime) throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException;
- public ByteBuffer getImageVersionVirtConfig(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
+ public java.nio.ByteBuffer getImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
- public void setImageVersionVirtConfig(String userToken, String imageVersionId, ByteBuffer meta) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
+ public void setImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId, java.nio.ByteBuffer meta) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
- public String requestImageReplication(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
+ public java.lang.String requestImageReplication(java.lang.String userToken, java.lang.String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
- public String publishImageVersion(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException;
+ public java.lang.String publishImageVersion(java.lang.String userToken, java.lang.String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException;
- public String createLecture(String userToken, LectureWrite lecture) throws TAuthorizationException, TInvocationException, TInvalidDateParam, TNotFoundException, org.apache.thrift.TException;
+ public java.lang.String createLecture(java.lang.String userToken, LectureWrite lecture) throws TAuthorizationException, TInvocationException, TInvalidDateParam, TNotFoundException, org.apache.thrift.TException;
- public void updateLecture(String userToken, String lectureId, LectureWrite lecture) throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException;
+ public void updateLecture(java.lang.String userToken, java.lang.String lectureId, LectureWrite lecture) throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException;
- public List<LectureSummary> getLectureList(String userToken, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
+ public java.util.List<LectureSummary> getLectureList(java.lang.String userToken, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
- public LectureRead getLectureDetails(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
+ public LectureRead getLectureDetails(java.lang.String userToken, java.lang.String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
- public void deleteLecture(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
+ public void deleteLecture(java.lang.String userToken, java.lang.String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
- public void writeLecturePermissions(String userToken, String lectureId, Map<String,LecturePermissions> permissions) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
+ public void writeLecturePermissions(java.lang.String userToken, java.lang.String lectureId, java.util.Map<java.lang.String,LecturePermissions> permissions) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
- public Map<String,LecturePermissions> getLecturePermissions(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
+ public java.util.Map<java.lang.String,LecturePermissions> getLecturePermissions(java.lang.String userToken, java.lang.String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
- public void setLectureOwner(String userToken, String lectureId, String newOwnerId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
+ public void setLectureOwner(java.lang.String userToken, java.lang.String lectureId, java.lang.String newOwnerId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException;
- public PredefinedData getPredefinedData(String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
+ public PredefinedData getPredefinedData(java.lang.String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException;
}
public interface AsyncIface {
- public void getVersion(long clientVersion, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getVersion(long clientVersion, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException;
- public void getSupportedFeatures(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getSupportedFeatures(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void getConfiguration(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getConfiguration(org.apache.thrift.async.AsyncMethodCallback<SatelliteConfig> resultHandler) throws org.apache.thrift.TException;
- public void requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, ByteBuffer machineDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void requestImageVersionUpload(java.lang.String userToken, java.lang.String imageBaseId, long fileSize, java.util.List<java.nio.ByteBuffer> blockHashes, java.nio.ByteBuffer machineDescription, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws org.apache.thrift.TException;
- public void updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes, String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void updateBlockHashes(java.lang.String uploadToken, java.util.List<java.nio.ByteBuffer> blockHashes, java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void setUploadOptions(String userToken, String uploadToken, UploadOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void setUploadOptions(java.lang.String userToken, java.lang.String uploadToken, UploadOptions options, org.apache.thrift.async.AsyncMethodCallback<UploadOptions> resultHandler) throws org.apache.thrift.TException;
- public void cancelUpload(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void cancelUpload(java.lang.String uploadToken, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void queryUploadStatus(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void queryUploadStatus(java.lang.String uploadToken, org.apache.thrift.async.AsyncMethodCallback<TransferStatus> resultHandler) throws org.apache.thrift.TException;
- public void requestDownload(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void requestDownload(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws org.apache.thrift.TException;
- public void cancelDownload(String downloadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void cancelDownload(java.lang.String downloadToken, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void isAuthenticated(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void isAuthenticated(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void whoami(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void whoami(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback<WhoamiInfo> resultHandler) throws org.apache.thrift.TException;
- public void invalidateSession(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void invalidateSession(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getUserList(String userToken, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getUserList(java.lang.String userToken, int page, org.apache.thrift.async.AsyncMethodCallback<java.util.List<UserInfo>> resultHandler) throws org.apache.thrift.TException;
- public void getUserConfig(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getUserConfig(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback<SatelliteUserConfig> resultHandler) throws org.apache.thrift.TException;
- public void setUserConfig(String userToken, SatelliteUserConfig config, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void setUserConfig(java.lang.String userToken, SatelliteUserConfig config, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getOperatingSystems(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getOperatingSystems(org.apache.thrift.async.AsyncMethodCallback<java.util.List<OperatingSystem>> resultHandler) throws org.apache.thrift.TException;
- public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback<java.util.List<Virtualizer>> resultHandler) throws org.apache.thrift.TException;
- public void getAllOrganizations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getAllOrganizations(org.apache.thrift.async.AsyncMethodCallback<java.util.List<Organization>> resultHandler) throws org.apache.thrift.TException;
- public void getLocations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getLocations(org.apache.thrift.async.AsyncMethodCallback<java.util.List<Location>> resultHandler) throws org.apache.thrift.TException;
- public void getStatus(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getStatus(org.apache.thrift.async.AsyncMethodCallback<SatelliteStatus> resultHandler) throws org.apache.thrift.TException;
- public void getImageList(String userToken, List<String> tagSearch, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getImageList(java.lang.String userToken, java.util.List<java.lang.String> tagSearch, int page, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ImageSummaryRead>> resultHandler) throws org.apache.thrift.TException;
- public void getImageDetails(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getImageDetails(java.lang.String userToken, java.lang.String imageBaseId, org.apache.thrift.async.AsyncMethodCallback<ImageDetailsRead> resultHandler) throws org.apache.thrift.TException;
- public void createImage(String userToken, String imageName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void createImage(java.lang.String userToken, java.lang.String imageName, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void updateImageBase(java.lang.String userToken, java.lang.String imageBaseId, ImageBaseWrite image, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void updateImageVersion(java.lang.String userToken, java.lang.String imageVersionId, ImageVersionWrite image, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void deleteImageVersion(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void deleteImageVersion(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void deleteImageBase(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void deleteImageBase(java.lang.String userToken, java.lang.String imageBaseId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void writeImagePermissions(String userToken, String imageBaseId, Map<String,ImagePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void writeImagePermissions(java.lang.String userToken, java.lang.String imageBaseId, java.util.Map<java.lang.String,ImagePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getImagePermissions(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getImagePermissions(java.lang.String userToken, java.lang.String imageBaseId, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,ImagePermissions>> resultHandler) throws org.apache.thrift.TException;
- public void setImageOwner(String userToken, String imageBaseId, String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void setImageOwner(java.lang.String userToken, java.lang.String imageBaseId, java.lang.String newOwnerId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void setImageVersionExpiry(String userToken, String imageBaseId, long expireTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void setImageVersionExpiry(java.lang.String userToken, java.lang.String imageBaseId, long expireTime, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getImageVersionVirtConfig(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> resultHandler) throws org.apache.thrift.TException;
- public void setImageVersionVirtConfig(String userToken, String imageVersionId, ByteBuffer meta, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void setImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId, java.nio.ByteBuffer meta, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void requestImageReplication(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void requestImageReplication(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void publishImageVersion(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void publishImageVersion(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void createLecture(String userToken, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void createLecture(java.lang.String userToken, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
- public void updateLecture(String userToken, String lectureId, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void updateLecture(java.lang.String userToken, java.lang.String lectureId, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getLectureList(String userToken, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getLectureList(java.lang.String userToken, int page, org.apache.thrift.async.AsyncMethodCallback<java.util.List<LectureSummary>> resultHandler) throws org.apache.thrift.TException;
- public void getLectureDetails(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getLectureDetails(java.lang.String userToken, java.lang.String lectureId, org.apache.thrift.async.AsyncMethodCallback<LectureRead> resultHandler) throws org.apache.thrift.TException;
- public void deleteLecture(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void deleteLecture(java.lang.String userToken, java.lang.String lectureId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void writeLecturePermissions(String userToken, String lectureId, Map<String,LecturePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void writeLecturePermissions(java.lang.String userToken, java.lang.String lectureId, java.util.Map<java.lang.String,LecturePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getLecturePermissions(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getLecturePermissions(java.lang.String userToken, java.lang.String lectureId, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,LecturePermissions>> resultHandler) throws org.apache.thrift.TException;
- public void setLectureOwner(String userToken, String lectureId, String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void setLectureOwner(java.lang.String userToken, java.lang.String lectureId, java.lang.String newOwnerId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
- public void getPredefinedData(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException;
+ public void getPredefinedData(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback<PredefinedData> resultHandler) throws org.apache.thrift.TException;
}
public static class Client extends org.apache.thrift.TServiceClient implements Iface {
public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
public Factory() {}
+ @Override
public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
return new Client(prot);
}
+ @Override
public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
return new Client(iprot, oprot);
}
@@ -245,6 +220,7 @@ public class SatelliteServer {
super(iprot, oprot);
}
+ @Override
public long getVersion(long clientVersion) throws org.apache.thrift.TException
{
send_getVersion(clientVersion);
@@ -268,7 +244,8 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVersion failed: unknown result");
}
- public String getSupportedFeatures() throws org.apache.thrift.TException
+ @Override
+ public java.lang.String getSupportedFeatures() throws org.apache.thrift.TException
{
send_getSupportedFeatures();
return recv_getSupportedFeatures();
@@ -280,7 +257,7 @@ public class SatelliteServer {
sendBase("getSupportedFeatures", args);
}
- public String recv_getSupportedFeatures() throws org.apache.thrift.TException
+ public java.lang.String recv_getSupportedFeatures() throws org.apache.thrift.TException
{
getSupportedFeatures_result result = new getSupportedFeatures_result();
receiveBase(result, "getSupportedFeatures");
@@ -290,6 +267,7 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSupportedFeatures failed: unknown result");
}
+ @Override
public SatelliteConfig getConfiguration() throws org.apache.thrift.TException
{
send_getConfiguration();
@@ -312,13 +290,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getConfiguration failed: unknown result");
}
- public TransferInformation requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, ByteBuffer machineDescription) throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException
+ @Override
+ public TransferInformation requestImageVersionUpload(java.lang.String userToken, java.lang.String imageBaseId, long fileSize, java.util.List<java.nio.ByteBuffer> blockHashes, java.nio.ByteBuffer machineDescription) throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException
{
send_requestImageVersionUpload(userToken, imageBaseId, fileSize, blockHashes, machineDescription);
return recv_requestImageVersionUpload();
}
- public void send_requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, ByteBuffer machineDescription) throws org.apache.thrift.TException
+ public void send_requestImageVersionUpload(java.lang.String userToken, java.lang.String imageBaseId, long fileSize, java.util.List<java.nio.ByteBuffer> blockHashes, java.nio.ByteBuffer machineDescription) throws org.apache.thrift.TException
{
requestImageVersionUpload_args args = new requestImageVersionUpload_args();
args.setUserToken(userToken);
@@ -351,13 +330,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestImageVersionUpload failed: unknown result");
}
- public void updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes, String userToken) throws TInvalidTokenException, org.apache.thrift.TException
+ @Override
+ public void updateBlockHashes(java.lang.String uploadToken, java.util.List<java.nio.ByteBuffer> blockHashes, java.lang.String userToken) throws TInvalidTokenException, org.apache.thrift.TException
{
send_updateBlockHashes(uploadToken, blockHashes, userToken);
recv_updateBlockHashes();
}
- public void send_updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes, String userToken) throws org.apache.thrift.TException
+ public void send_updateBlockHashes(java.lang.String uploadToken, java.util.List<java.nio.ByteBuffer> blockHashes, java.lang.String userToken) throws org.apache.thrift.TException
{
updateBlockHashes_args args = new updateBlockHashes_args();
args.setUploadToken(uploadToken);
@@ -376,13 +356,14 @@ public class SatelliteServer {
return;
}
- public UploadOptions setUploadOptions(String userToken, String uploadToken, UploadOptions options) throws TAuthorizationException, TInvalidTokenException, org.apache.thrift.TException
+ @Override
+ public UploadOptions setUploadOptions(java.lang.String userToken, java.lang.String uploadToken, UploadOptions options) throws TAuthorizationException, TInvalidTokenException, org.apache.thrift.TException
{
send_setUploadOptions(userToken, uploadToken, options);
return recv_setUploadOptions();
}
- public void send_setUploadOptions(String userToken, String uploadToken, UploadOptions options) throws org.apache.thrift.TException
+ public void send_setUploadOptions(java.lang.String userToken, java.lang.String uploadToken, UploadOptions options) throws org.apache.thrift.TException
{
setUploadOptions_args args = new setUploadOptions_args();
args.setUserToken(userToken);
@@ -407,13 +388,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setUploadOptions failed: unknown result");
}
- public void cancelUpload(String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException
+ @Override
+ public void cancelUpload(java.lang.String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException
{
send_cancelUpload(uploadToken);
recv_cancelUpload();
}
- public void send_cancelUpload(String uploadToken) throws org.apache.thrift.TException
+ public void send_cancelUpload(java.lang.String uploadToken) throws org.apache.thrift.TException
{
cancelUpload_args args = new cancelUpload_args();
args.setUploadToken(uploadToken);
@@ -430,13 +412,14 @@ public class SatelliteServer {
return;
}
- public TransferStatus queryUploadStatus(String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException
+ @Override
+ public TransferStatus queryUploadStatus(java.lang.String uploadToken) throws TInvalidTokenException, org.apache.thrift.TException
{
send_queryUploadStatus(uploadToken);
return recv_queryUploadStatus();
}
- public void send_queryUploadStatus(String uploadToken) throws org.apache.thrift.TException
+ public void send_queryUploadStatus(java.lang.String uploadToken) throws org.apache.thrift.TException
{
queryUploadStatus_args args = new queryUploadStatus_args();
args.setUploadToken(uploadToken);
@@ -456,13 +439,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "queryUploadStatus failed: unknown result");
}
- public TransferInformation requestDownload(String userToken, String imageVersionId) throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException
+ @Override
+ public TransferInformation requestDownload(java.lang.String userToken, java.lang.String imageVersionId) throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException
{
send_requestDownload(userToken, imageVersionId);
return recv_requestDownload();
}
- public void send_requestDownload(String userToken, String imageVersionId) throws org.apache.thrift.TException
+ public void send_requestDownload(java.lang.String userToken, java.lang.String imageVersionId) throws org.apache.thrift.TException
{
requestDownload_args args = new requestDownload_args();
args.setUserToken(userToken);
@@ -492,13 +476,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestDownload failed: unknown result");
}
- public void cancelDownload(String downloadToken) throws TInvalidTokenException, org.apache.thrift.TException
+ @Override
+ public void cancelDownload(java.lang.String downloadToken) throws TInvalidTokenException, org.apache.thrift.TException
{
send_cancelDownload(downloadToken);
recv_cancelDownload();
}
- public void send_cancelDownload(String downloadToken) throws org.apache.thrift.TException
+ public void send_cancelDownload(java.lang.String downloadToken) throws org.apache.thrift.TException
{
cancelDownload_args args = new cancelDownload_args();
args.setDownloadToken(downloadToken);
@@ -515,13 +500,14 @@ public class SatelliteServer {
return;
}
- public void isAuthenticated(String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public void isAuthenticated(java.lang.String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
send_isAuthenticated(userToken);
recv_isAuthenticated();
}
- public void send_isAuthenticated(String userToken) throws org.apache.thrift.TException
+ public void send_isAuthenticated(java.lang.String userToken) throws org.apache.thrift.TException
{
isAuthenticated_args args = new isAuthenticated_args();
args.setUserToken(userToken);
@@ -541,13 +527,14 @@ public class SatelliteServer {
return;
}
- public WhoamiInfo whoami(String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public WhoamiInfo whoami(java.lang.String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
send_whoami(userToken);
return recv_whoami();
}
- public void send_whoami(String userToken) throws org.apache.thrift.TException
+ public void send_whoami(java.lang.String userToken) throws org.apache.thrift.TException
{
whoami_args args = new whoami_args();
args.setUserToken(userToken);
@@ -570,13 +557,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "whoami failed: unknown result");
}
- public void invalidateSession(String userToken) throws TInvalidTokenException, org.apache.thrift.TException
+ @Override
+ public void invalidateSession(java.lang.String userToken) throws TInvalidTokenException, org.apache.thrift.TException
{
send_invalidateSession(userToken);
recv_invalidateSession();
}
- public void send_invalidateSession(String userToken) throws org.apache.thrift.TException
+ public void send_invalidateSession(java.lang.String userToken) throws org.apache.thrift.TException
{
invalidateSession_args args = new invalidateSession_args();
args.setUserToken(userToken);
@@ -593,13 +581,14 @@ public class SatelliteServer {
return;
}
- public List<UserInfo> getUserList(String userToken, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public java.util.List<UserInfo> getUserList(java.lang.String userToken, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
send_getUserList(userToken, page);
return recv_getUserList();
}
- public void send_getUserList(String userToken, int page) throws org.apache.thrift.TException
+ public void send_getUserList(java.lang.String userToken, int page) throws org.apache.thrift.TException
{
getUserList_args args = new getUserList_args();
args.setUserToken(userToken);
@@ -607,7 +596,7 @@ public class SatelliteServer {
sendBase("getUserList", args);
}
- public List<UserInfo> recv_getUserList() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ public java.util.List<UserInfo> recv_getUserList() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
getUserList_result result = new getUserList_result();
receiveBase(result, "getUserList");
@@ -623,13 +612,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserList failed: unknown result");
}
- public SatelliteUserConfig getUserConfig(String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public SatelliteUserConfig getUserConfig(java.lang.String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
send_getUserConfig(userToken);
return recv_getUserConfig();
}
- public void send_getUserConfig(String userToken) throws org.apache.thrift.TException
+ public void send_getUserConfig(java.lang.String userToken) throws org.apache.thrift.TException
{
getUserConfig_args args = new getUserConfig_args();
args.setUserToken(userToken);
@@ -652,13 +642,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUserConfig failed: unknown result");
}
- public void setUserConfig(String userToken, SatelliteUserConfig config) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public void setUserConfig(java.lang.String userToken, SatelliteUserConfig config) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
send_setUserConfig(userToken, config);
recv_setUserConfig();
}
- public void send_setUserConfig(String userToken, SatelliteUserConfig config) throws org.apache.thrift.TException
+ public void send_setUserConfig(java.lang.String userToken, SatelliteUserConfig config) throws org.apache.thrift.TException
{
setUserConfig_args args = new setUserConfig_args();
args.setUserToken(userToken);
@@ -679,7 +670,8 @@ public class SatelliteServer {
return;
}
- public List<OperatingSystem> getOperatingSystems() throws org.apache.thrift.TException
+ @Override
+ public java.util.List<OperatingSystem> getOperatingSystems() throws org.apache.thrift.TException
{
send_getOperatingSystems();
return recv_getOperatingSystems();
@@ -691,7 +683,7 @@ public class SatelliteServer {
sendBase("getOperatingSystems", args);
}
- public List<OperatingSystem> recv_getOperatingSystems() throws org.apache.thrift.TException
+ public java.util.List<OperatingSystem> recv_getOperatingSystems() throws org.apache.thrift.TException
{
getOperatingSystems_result result = new getOperatingSystems_result();
receiveBase(result, "getOperatingSystems");
@@ -701,7 +693,8 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOperatingSystems failed: unknown result");
}
- public List<Virtualizer> getVirtualizers() throws org.apache.thrift.TException
+ @Override
+ public java.util.List<Virtualizer> getVirtualizers() throws org.apache.thrift.TException
{
send_getVirtualizers();
return recv_getVirtualizers();
@@ -713,7 +706,7 @@ public class SatelliteServer {
sendBase("getVirtualizers", args);
}
- public List<Virtualizer> recv_getVirtualizers() throws org.apache.thrift.TException
+ public java.util.List<Virtualizer> recv_getVirtualizers() throws org.apache.thrift.TException
{
getVirtualizers_result result = new getVirtualizers_result();
receiveBase(result, "getVirtualizers");
@@ -723,7 +716,8 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVirtualizers failed: unknown result");
}
- public List<Organization> getAllOrganizations() throws org.apache.thrift.TException
+ @Override
+ public java.util.List<Organization> getAllOrganizations() throws org.apache.thrift.TException
{
send_getAllOrganizations();
return recv_getAllOrganizations();
@@ -735,7 +729,7 @@ public class SatelliteServer {
sendBase("getAllOrganizations", args);
}
- public List<Organization> recv_getAllOrganizations() throws org.apache.thrift.TException
+ public java.util.List<Organization> recv_getAllOrganizations() throws org.apache.thrift.TException
{
getAllOrganizations_result result = new getAllOrganizations_result();
receiveBase(result, "getAllOrganizations");
@@ -745,7 +739,8 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllOrganizations failed: unknown result");
}
- public List<Location> getLocations() throws org.apache.thrift.TException
+ @Override
+ public java.util.List<Location> getLocations() throws org.apache.thrift.TException
{
send_getLocations();
return recv_getLocations();
@@ -757,7 +752,7 @@ public class SatelliteServer {
sendBase("getLocations", args);
}
- public List<Location> recv_getLocations() throws org.apache.thrift.TException
+ public java.util.List<Location> recv_getLocations() throws org.apache.thrift.TException
{
getLocations_result result = new getLocations_result();
receiveBase(result, "getLocations");
@@ -767,6 +762,7 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLocations failed: unknown result");
}
+ @Override
public SatelliteStatus getStatus() throws org.apache.thrift.TException
{
send_getStatus();
@@ -789,13 +785,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getStatus failed: unknown result");
}
- public List<ImageSummaryRead> getImageList(String userToken, List<String> tagSearch, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public java.util.List<ImageSummaryRead> getImageList(java.lang.String userToken, java.util.List<java.lang.String> tagSearch, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
send_getImageList(userToken, tagSearch, page);
return recv_getImageList();
}
- public void send_getImageList(String userToken, List<String> tagSearch, int page) throws org.apache.thrift.TException
+ public void send_getImageList(java.lang.String userToken, java.util.List<java.lang.String> tagSearch, int page) throws org.apache.thrift.TException
{
getImageList_args args = new getImageList_args();
args.setUserToken(userToken);
@@ -804,7 +801,7 @@ public class SatelliteServer {
sendBase("getImageList", args);
}
- public List<ImageSummaryRead> recv_getImageList() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ public java.util.List<ImageSummaryRead> recv_getImageList() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
getImageList_result result = new getImageList_result();
receiveBase(result, "getImageList");
@@ -820,13 +817,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageList failed: unknown result");
}
- public ImageDetailsRead getImageDetails(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public ImageDetailsRead getImageDetails(java.lang.String userToken, java.lang.String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
send_getImageDetails(userToken, imageBaseId);
return recv_getImageDetails();
}
- public void send_getImageDetails(String userToken, String imageBaseId) throws org.apache.thrift.TException
+ public void send_getImageDetails(java.lang.String userToken, java.lang.String imageBaseId) throws org.apache.thrift.TException
{
getImageDetails_args args = new getImageDetails_args();
args.setUserToken(userToken);
@@ -853,13 +851,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageDetails failed: unknown result");
}
- public String createImage(String userToken, String imageName) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public java.lang.String createImage(java.lang.String userToken, java.lang.String imageName) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
send_createImage(userToken, imageName);
return recv_createImage();
}
- public void send_createImage(String userToken, String imageName) throws org.apache.thrift.TException
+ public void send_createImage(java.lang.String userToken, java.lang.String imageName) throws org.apache.thrift.TException
{
createImage_args args = new createImage_args();
args.setUserToken(userToken);
@@ -867,7 +866,7 @@ public class SatelliteServer {
sendBase("createImage", args);
}
- public String recv_createImage() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ public java.lang.String recv_createImage() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
createImage_result result = new createImage_result();
receiveBase(result, "createImage");
@@ -883,13 +882,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createImage failed: unknown result");
}
- public void updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public void updateImageBase(java.lang.String userToken, java.lang.String imageBaseId, ImageBaseWrite image) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
send_updateImageBase(userToken, imageBaseId, image);
recv_updateImageBase();
}
- public void send_updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image) throws org.apache.thrift.TException
+ public void send_updateImageBase(java.lang.String userToken, java.lang.String imageBaseId, ImageBaseWrite image) throws org.apache.thrift.TException
{
updateImageBase_args args = new updateImageBase_args();
args.setUserToken(userToken);
@@ -914,13 +914,14 @@ public class SatelliteServer {
return;
}
- public void updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public void updateImageVersion(java.lang.String userToken, java.lang.String imageVersionId, ImageVersionWrite image) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
send_updateImageVersion(userToken, imageVersionId, image);
recv_updateImageVersion();
}
- public void send_updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image) throws org.apache.thrift.TException
+ public void send_updateImageVersion(java.lang.String userToken, java.lang.String imageVersionId, ImageVersionWrite image) throws org.apache.thrift.TException
{
updateImageVersion_args args = new updateImageVersion_args();
args.setUserToken(userToken);
@@ -945,13 +946,14 @@ public class SatelliteServer {
return;
}
- public void deleteImageVersion(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public void deleteImageVersion(java.lang.String userToken, java.lang.String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
send_deleteImageVersion(userToken, imageVersionId);
recv_deleteImageVersion();
}
- public void send_deleteImageVersion(String userToken, String imageVersionId) throws org.apache.thrift.TException
+ public void send_deleteImageVersion(java.lang.String userToken, java.lang.String imageVersionId) throws org.apache.thrift.TException
{
deleteImageVersion_args args = new deleteImageVersion_args();
args.setUserToken(userToken);
@@ -975,13 +977,14 @@ public class SatelliteServer {
return;
}
- public void deleteImageBase(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public void deleteImageBase(java.lang.String userToken, java.lang.String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
send_deleteImageBase(userToken, imageBaseId);
recv_deleteImageBase();
}
- public void send_deleteImageBase(String userToken, String imageBaseId) throws org.apache.thrift.TException
+ public void send_deleteImageBase(java.lang.String userToken, java.lang.String imageBaseId) throws org.apache.thrift.TException
{
deleteImageBase_args args = new deleteImageBase_args();
args.setUserToken(userToken);
@@ -1005,13 +1008,14 @@ public class SatelliteServer {
return;
}
- public void writeImagePermissions(String userToken, String imageBaseId, Map<String,ImagePermissions> permissions) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public void writeImagePermissions(java.lang.String userToken, java.lang.String imageBaseId, java.util.Map<java.lang.String,ImagePermissions> permissions) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
send_writeImagePermissions(userToken, imageBaseId, permissions);
recv_writeImagePermissions();
}
- public void send_writeImagePermissions(String userToken, String imageBaseId, Map<String,ImagePermissions> permissions) throws org.apache.thrift.TException
+ public void send_writeImagePermissions(java.lang.String userToken, java.lang.String imageBaseId, java.util.Map<java.lang.String,ImagePermissions> permissions) throws org.apache.thrift.TException
{
writeImagePermissions_args args = new writeImagePermissions_args();
args.setUserToken(userToken);
@@ -1036,13 +1040,14 @@ public class SatelliteServer {
return;
}
- public Map<String,ImagePermissions> getImagePermissions(String userToken, String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public java.util.Map<java.lang.String,ImagePermissions> getImagePermissions(java.lang.String userToken, java.lang.String imageBaseId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
send_getImagePermissions(userToken, imageBaseId);
return recv_getImagePermissions();
}
- public void send_getImagePermissions(String userToken, String imageBaseId) throws org.apache.thrift.TException
+ public void send_getImagePermissions(java.lang.String userToken, java.lang.String imageBaseId) throws org.apache.thrift.TException
{
getImagePermissions_args args = new getImagePermissions_args();
args.setUserToken(userToken);
@@ -1050,7 +1055,7 @@ public class SatelliteServer {
sendBase("getImagePermissions", args);
}
- public Map<String,ImagePermissions> recv_getImagePermissions() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ public java.util.Map<java.lang.String,ImagePermissions> recv_getImagePermissions() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
getImagePermissions_result result = new getImagePermissions_result();
receiveBase(result, "getImagePermissions");
@@ -1069,13 +1074,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImagePermissions failed: unknown result");
}
- public void setImageOwner(String userToken, String imageBaseId, String newOwnerId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public void setImageOwner(java.lang.String userToken, java.lang.String imageBaseId, java.lang.String newOwnerId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
send_setImageOwner(userToken, imageBaseId, newOwnerId);
recv_setImageOwner();
}
- public void send_setImageOwner(String userToken, String imageBaseId, String newOwnerId) throws org.apache.thrift.TException
+ public void send_setImageOwner(java.lang.String userToken, java.lang.String imageBaseId, java.lang.String newOwnerId) throws org.apache.thrift.TException
{
setImageOwner_args args = new setImageOwner_args();
args.setUserToken(userToken);
@@ -1100,13 +1106,14 @@ public class SatelliteServer {
return;
}
- public void setImageVersionExpiry(String userToken, String imageBaseId, long expireTime) throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException
+ @Override
+ public void setImageVersionExpiry(java.lang.String userToken, java.lang.String imageBaseId, long expireTime) throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException
{
send_setImageVersionExpiry(userToken, imageBaseId, expireTime);
recv_setImageVersionExpiry();
}
- public void send_setImageVersionExpiry(String userToken, String imageBaseId, long expireTime) throws org.apache.thrift.TException
+ public void send_setImageVersionExpiry(java.lang.String userToken, java.lang.String imageBaseId, long expireTime) throws org.apache.thrift.TException
{
setImageVersionExpiry_args args = new setImageVersionExpiry_args();
args.setUserToken(userToken);
@@ -1134,13 +1141,14 @@ public class SatelliteServer {
return;
}
- public ByteBuffer getImageVersionVirtConfig(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public java.nio.ByteBuffer getImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
send_getImageVersionVirtConfig(userToken, imageVersionId);
return recv_getImageVersionVirtConfig();
}
- public void send_getImageVersionVirtConfig(String userToken, String imageVersionId) throws org.apache.thrift.TException
+ public void send_getImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId) throws org.apache.thrift.TException
{
getImageVersionVirtConfig_args args = new getImageVersionVirtConfig_args();
args.setUserToken(userToken);
@@ -1148,7 +1156,7 @@ public class SatelliteServer {
sendBase("getImageVersionVirtConfig", args);
}
- public ByteBuffer recv_getImageVersionVirtConfig() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ public java.nio.ByteBuffer recv_getImageVersionVirtConfig() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
getImageVersionVirtConfig_result result = new getImageVersionVirtConfig_result();
receiveBase(result, "getImageVersionVirtConfig");
@@ -1167,13 +1175,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getImageVersionVirtConfig failed: unknown result");
}
- public void setImageVersionVirtConfig(String userToken, String imageVersionId, ByteBuffer meta) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public void setImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId, java.nio.ByteBuffer meta) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
send_setImageVersionVirtConfig(userToken, imageVersionId, meta);
recv_setImageVersionVirtConfig();
}
- public void send_setImageVersionVirtConfig(String userToken, String imageVersionId, ByteBuffer meta) throws org.apache.thrift.TException
+ public void send_setImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId, java.nio.ByteBuffer meta) throws org.apache.thrift.TException
{
setImageVersionVirtConfig_args args = new setImageVersionVirtConfig_args();
args.setUserToken(userToken);
@@ -1198,13 +1207,14 @@ public class SatelliteServer {
return;
}
- public String requestImageReplication(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public java.lang.String requestImageReplication(java.lang.String userToken, java.lang.String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
send_requestImageReplication(userToken, imageVersionId);
return recv_requestImageReplication();
}
- public void send_requestImageReplication(String userToken, String imageVersionId) throws org.apache.thrift.TException
+ public void send_requestImageReplication(java.lang.String userToken, java.lang.String imageVersionId) throws org.apache.thrift.TException
{
requestImageReplication_args args = new requestImageReplication_args();
args.setUserToken(userToken);
@@ -1212,7 +1222,7 @@ public class SatelliteServer {
sendBase("requestImageReplication", args);
}
- public String recv_requestImageReplication() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ public java.lang.String recv_requestImageReplication() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
requestImageReplication_result result = new requestImageReplication_result();
receiveBase(result, "requestImageReplication");
@@ -1231,13 +1241,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "requestImageReplication failed: unknown result");
}
- public String publishImageVersion(String userToken, String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException
+ @Override
+ public java.lang.String publishImageVersion(java.lang.String userToken, java.lang.String imageVersionId) throws TAuthorizationException, TNotFoundException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException
{
send_publishImageVersion(userToken, imageVersionId);
return recv_publishImageVersion();
}
- public void send_publishImageVersion(String userToken, String imageVersionId) throws org.apache.thrift.TException
+ public void send_publishImageVersion(java.lang.String userToken, java.lang.String imageVersionId) throws org.apache.thrift.TException
{
publishImageVersion_args args = new publishImageVersion_args();
args.setUserToken(userToken);
@@ -1245,7 +1256,7 @@ public class SatelliteServer {
sendBase("publishImageVersion", args);
}
- public String recv_publishImageVersion() throws TAuthorizationException, TNotFoundException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException
+ public java.lang.String recv_publishImageVersion() throws TAuthorizationException, TNotFoundException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException
{
publishImageVersion_result result = new publishImageVersion_result();
receiveBase(result, "publishImageVersion");
@@ -1267,13 +1278,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "publishImageVersion failed: unknown result");
}
- public String createLecture(String userToken, LectureWrite lecture) throws TAuthorizationException, TInvocationException, TInvalidDateParam, TNotFoundException, org.apache.thrift.TException
+ @Override
+ public java.lang.String createLecture(java.lang.String userToken, LectureWrite lecture) throws TAuthorizationException, TInvocationException, TInvalidDateParam, TNotFoundException, org.apache.thrift.TException
{
send_createLecture(userToken, lecture);
return recv_createLecture();
}
- public void send_createLecture(String userToken, LectureWrite lecture) throws org.apache.thrift.TException
+ public void send_createLecture(java.lang.String userToken, LectureWrite lecture) throws org.apache.thrift.TException
{
createLecture_args args = new createLecture_args();
args.setUserToken(userToken);
@@ -1281,7 +1293,7 @@ public class SatelliteServer {
sendBase("createLecture", args);
}
- public String recv_createLecture() throws TAuthorizationException, TInvocationException, TInvalidDateParam, TNotFoundException, org.apache.thrift.TException
+ public java.lang.String recv_createLecture() throws TAuthorizationException, TInvocationException, TInvalidDateParam, TNotFoundException, org.apache.thrift.TException
{
createLecture_result result = new createLecture_result();
receiveBase(result, "createLecture");
@@ -1303,13 +1315,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createLecture failed: unknown result");
}
- public void updateLecture(String userToken, String lectureId, LectureWrite lecture) throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException
+ @Override
+ public void updateLecture(java.lang.String userToken, java.lang.String lectureId, LectureWrite lecture) throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException
{
send_updateLecture(userToken, lectureId, lecture);
recv_updateLecture();
}
- public void send_updateLecture(String userToken, String lectureId, LectureWrite lecture) throws org.apache.thrift.TException
+ public void send_updateLecture(java.lang.String userToken, java.lang.String lectureId, LectureWrite lecture) throws org.apache.thrift.TException
{
updateLecture_args args = new updateLecture_args();
args.setUserToken(userToken);
@@ -1337,13 +1350,14 @@ public class SatelliteServer {
return;
}
- public List<LectureSummary> getLectureList(String userToken, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public java.util.List<LectureSummary> getLectureList(java.lang.String userToken, int page) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
send_getLectureList(userToken, page);
return recv_getLectureList();
}
- public void send_getLectureList(String userToken, int page) throws org.apache.thrift.TException
+ public void send_getLectureList(java.lang.String userToken, int page) throws org.apache.thrift.TException
{
getLectureList_args args = new getLectureList_args();
args.setUserToken(userToken);
@@ -1351,7 +1365,7 @@ public class SatelliteServer {
sendBase("getLectureList", args);
}
- public List<LectureSummary> recv_getLectureList() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ public java.util.List<LectureSummary> recv_getLectureList() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
getLectureList_result result = new getLectureList_result();
receiveBase(result, "getLectureList");
@@ -1367,13 +1381,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureList failed: unknown result");
}
- public LectureRead getLectureDetails(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public LectureRead getLectureDetails(java.lang.String userToken, java.lang.String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
send_getLectureDetails(userToken, lectureId);
return recv_getLectureDetails();
}
- public void send_getLectureDetails(String userToken, String lectureId) throws org.apache.thrift.TException
+ public void send_getLectureDetails(java.lang.String userToken, java.lang.String lectureId) throws org.apache.thrift.TException
{
getLectureDetails_args args = new getLectureDetails_args();
args.setUserToken(userToken);
@@ -1400,13 +1415,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLectureDetails failed: unknown result");
}
- public void deleteLecture(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public void deleteLecture(java.lang.String userToken, java.lang.String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
send_deleteLecture(userToken, lectureId);
recv_deleteLecture();
}
- public void send_deleteLecture(String userToken, String lectureId) throws org.apache.thrift.TException
+ public void send_deleteLecture(java.lang.String userToken, java.lang.String lectureId) throws org.apache.thrift.TException
{
deleteLecture_args args = new deleteLecture_args();
args.setUserToken(userToken);
@@ -1430,13 +1446,14 @@ public class SatelliteServer {
return;
}
- public void writeLecturePermissions(String userToken, String lectureId, Map<String,LecturePermissions> permissions) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public void writeLecturePermissions(java.lang.String userToken, java.lang.String lectureId, java.util.Map<java.lang.String,LecturePermissions> permissions) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
send_writeLecturePermissions(userToken, lectureId, permissions);
recv_writeLecturePermissions();
}
- public void send_writeLecturePermissions(String userToken, String lectureId, Map<String,LecturePermissions> permissions) throws org.apache.thrift.TException
+ public void send_writeLecturePermissions(java.lang.String userToken, java.lang.String lectureId, java.util.Map<java.lang.String,LecturePermissions> permissions) throws org.apache.thrift.TException
{
writeLecturePermissions_args args = new writeLecturePermissions_args();
args.setUserToken(userToken);
@@ -1461,13 +1478,14 @@ public class SatelliteServer {
return;
}
- public Map<String,LecturePermissions> getLecturePermissions(String userToken, String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public java.util.Map<java.lang.String,LecturePermissions> getLecturePermissions(java.lang.String userToken, java.lang.String lectureId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
send_getLecturePermissions(userToken, lectureId);
return recv_getLecturePermissions();
}
- public void send_getLecturePermissions(String userToken, String lectureId) throws org.apache.thrift.TException
+ public void send_getLecturePermissions(java.lang.String userToken, java.lang.String lectureId) throws org.apache.thrift.TException
{
getLecturePermissions_args args = new getLecturePermissions_args();
args.setUserToken(userToken);
@@ -1475,7 +1493,7 @@ public class SatelliteServer {
sendBase("getLecturePermissions", args);
}
- public Map<String,LecturePermissions> recv_getLecturePermissions() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ public java.util.Map<java.lang.String,LecturePermissions> recv_getLecturePermissions() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
getLecturePermissions_result result = new getLecturePermissions_result();
receiveBase(result, "getLecturePermissions");
@@ -1494,13 +1512,14 @@ public class SatelliteServer {
throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLecturePermissions failed: unknown result");
}
- public void setLectureOwner(String userToken, String lectureId, String newOwnerId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public void setLectureOwner(java.lang.String userToken, java.lang.String lectureId, java.lang.String newOwnerId) throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException
{
send_setLectureOwner(userToken, lectureId, newOwnerId);
recv_setLectureOwner();
}
- public void send_setLectureOwner(String userToken, String lectureId, String newOwnerId) throws org.apache.thrift.TException
+ public void send_setLectureOwner(java.lang.String userToken, java.lang.String lectureId, java.lang.String newOwnerId) throws org.apache.thrift.TException
{
setLectureOwner_args args = new setLectureOwner_args();
args.setUserToken(userToken);
@@ -1525,13 +1544,14 @@ public class SatelliteServer {
return;
}
- public PredefinedData getPredefinedData(String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
+ @Override
+ public PredefinedData getPredefinedData(java.lang.String userToken) throws TAuthorizationException, TInvocationException, org.apache.thrift.TException
{
send_getPredefinedData(userToken);
return recv_getPredefinedData();
}
- public void send_getPredefinedData(String userToken) throws org.apache.thrift.TException
+ public void send_getPredefinedData(java.lang.String userToken) throws org.apache.thrift.TException
{
getPredefinedData_args args = new getPredefinedData_args();
args.setUserToken(userToken);
@@ -1563,6 +1583,7 @@ public class SatelliteServer {
this.clientManager = clientManager;
this.protocolFactory = protocolFactory;
}
+ @Override
public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
return new AsyncClient(protocolFactory, clientManager, transport);
}
@@ -1572,20 +1593,22 @@ public class SatelliteServer {
super(protocolFactory, clientManager, transport);
}
- public void getVersion(long clientVersion, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getVersion(long clientVersion, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
checkReady();
getVersion_call method_call = new getVersion_call(clientVersion, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
+ public static class getVersion_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Long> {
private long clientVersion;
- public getVersion_call(long clientVersion, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public getVersion_call(long clientVersion, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.clientVersion = clientVersion;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
getVersion_args args = new getVersion_args();
@@ -1594,9 +1617,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public long getResult() throws org.apache.thrift.TException {
+ @Override
+ public java.lang.Long getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1604,18 +1628,20 @@ public class SatelliteServer {
}
}
- public void getSupportedFeatures(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getSupportedFeatures(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
getSupportedFeatures_call method_call = new getSupportedFeatures_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getSupportedFeatures_call extends org.apache.thrift.async.TAsyncMethodCall {
- public getSupportedFeatures_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getSupportedFeatures_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
+ public getSupportedFeatures_call(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSupportedFeatures", org.apache.thrift.protocol.TMessageType.CALL, 0));
getSupportedFeatures_args args = new getSupportedFeatures_args();
@@ -1623,9 +1649,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public String getResult() throws org.apache.thrift.TException {
+ @Override
+ public java.lang.String getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1633,18 +1660,20 @@ public class SatelliteServer {
}
}
- public void getConfiguration(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getConfiguration(org.apache.thrift.async.AsyncMethodCallback<SatelliteConfig> resultHandler) throws org.apache.thrift.TException {
checkReady();
getConfiguration_call method_call = new getConfiguration_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getConfiguration_call extends org.apache.thrift.async.TAsyncMethodCall {
- public getConfiguration_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getConfiguration_call extends org.apache.thrift.async.TAsyncMethodCall<SatelliteConfig> {
+ public getConfiguration_call(org.apache.thrift.async.AsyncMethodCallback<SatelliteConfig> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getConfiguration", org.apache.thrift.protocol.TMessageType.CALL, 0));
getConfiguration_args args = new getConfiguration_args();
@@ -1652,9 +1681,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
+ @Override
public SatelliteConfig getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1662,20 +1692,21 @@ public class SatelliteServer {
}
}
- public void requestImageVersionUpload(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, ByteBuffer machineDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void requestImageVersionUpload(java.lang.String userToken, java.lang.String imageBaseId, long fileSize, java.util.List<java.nio.ByteBuffer> blockHashes, java.nio.ByteBuffer machineDescription, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws org.apache.thrift.TException {
checkReady();
requestImageVersionUpload_call method_call = new requestImageVersionUpload_call(userToken, imageBaseId, fileSize, blockHashes, machineDescription, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class requestImageVersionUpload_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String imageBaseId;
+ public static class requestImageVersionUpload_call extends org.apache.thrift.async.TAsyncMethodCall<TransferInformation> {
+ private java.lang.String userToken;
+ private java.lang.String imageBaseId;
private long fileSize;
- private List<ByteBuffer> blockHashes;
- private ByteBuffer machineDescription;
- public requestImageVersionUpload_call(String userToken, String imageBaseId, long fileSize, List<ByteBuffer> blockHashes, ByteBuffer machineDescription, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ private java.util.List<java.nio.ByteBuffer> blockHashes;
+ private java.nio.ByteBuffer machineDescription;
+ public requestImageVersionUpload_call(java.lang.String userToken, java.lang.String imageBaseId, long fileSize, java.util.List<java.nio.ByteBuffer> blockHashes, java.nio.ByteBuffer machineDescription, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.imageBaseId = imageBaseId;
@@ -1684,6 +1715,7 @@ public class SatelliteServer {
this.machineDescription = machineDescription;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requestImageVersionUpload", org.apache.thrift.protocol.TMessageType.CALL, 0));
requestImageVersionUpload_args args = new requestImageVersionUpload_args();
@@ -1696,9 +1728,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
+ @Override
public TransferInformation getResult() throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1706,24 +1739,26 @@ public class SatelliteServer {
}
}
- public void updateBlockHashes(String uploadToken, List<ByteBuffer> blockHashes, String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void updateBlockHashes(java.lang.String uploadToken, java.util.List<java.nio.ByteBuffer> blockHashes, java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
updateBlockHashes_call method_call = new updateBlockHashes_call(uploadToken, blockHashes, userToken, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class updateBlockHashes_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String uploadToken;
- private List<ByteBuffer> blockHashes;
- private String userToken;
- public updateBlockHashes_call(String uploadToken, List<ByteBuffer> blockHashes, String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class updateBlockHashes_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String uploadToken;
+ private java.util.List<java.nio.ByteBuffer> blockHashes;
+ private java.lang.String userToken;
+ public updateBlockHashes_call(java.lang.String uploadToken, java.util.List<java.nio.ByteBuffer> blockHashes, java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.uploadToken = uploadToken;
this.blockHashes = blockHashes;
this.userToken = userToken;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateBlockHashes", org.apache.thrift.protocol.TMessageType.CALL, 0));
updateBlockHashes_args args = new updateBlockHashes_args();
@@ -1734,34 +1769,38 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public void getResult() throws TInvalidTokenException, org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws TInvalidTokenException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_updateBlockHashes();
+ return null;
}
}
- public void setUploadOptions(String userToken, String uploadToken, UploadOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void setUploadOptions(java.lang.String userToken, java.lang.String uploadToken, UploadOptions options, org.apache.thrift.async.AsyncMethodCallback<UploadOptions> resultHandler) throws org.apache.thrift.TException {
checkReady();
setUploadOptions_call method_call = new setUploadOptions_call(userToken, uploadToken, options, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class setUploadOptions_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String uploadToken;
+ public static class setUploadOptions_call extends org.apache.thrift.async.TAsyncMethodCall<UploadOptions> {
+ private java.lang.String userToken;
+ private java.lang.String uploadToken;
private UploadOptions options;
- public setUploadOptions_call(String userToken, String uploadToken, UploadOptions options, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public setUploadOptions_call(java.lang.String userToken, java.lang.String uploadToken, UploadOptions options, org.apache.thrift.async.AsyncMethodCallback<UploadOptions> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.uploadToken = uploadToken;
this.options = options;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setUploadOptions", org.apache.thrift.protocol.TMessageType.CALL, 0));
setUploadOptions_args args = new setUploadOptions_args();
@@ -1772,9 +1811,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
+ @Override
public UploadOptions getResult() throws TAuthorizationException, TInvalidTokenException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1782,20 +1822,22 @@ public class SatelliteServer {
}
}
- public void cancelUpload(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void cancelUpload(java.lang.String uploadToken, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
cancelUpload_call method_call = new cancelUpload_call(uploadToken, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class cancelUpload_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String uploadToken;
- public cancelUpload_call(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class cancelUpload_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String uploadToken;
+ public cancelUpload_call(java.lang.String uploadToken, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.uploadToken = uploadToken;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelUpload", org.apache.thrift.protocol.TMessageType.CALL, 0));
cancelUpload_args args = new cancelUpload_args();
@@ -1804,30 +1846,34 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public void getResult() throws TInvalidTokenException, org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws TInvalidTokenException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_cancelUpload();
+ return null;
}
}
- public void queryUploadStatus(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void queryUploadStatus(java.lang.String uploadToken, org.apache.thrift.async.AsyncMethodCallback<TransferStatus> resultHandler) throws org.apache.thrift.TException {
checkReady();
queryUploadStatus_call method_call = new queryUploadStatus_call(uploadToken, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class queryUploadStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String uploadToken;
- public queryUploadStatus_call(String uploadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class queryUploadStatus_call extends org.apache.thrift.async.TAsyncMethodCall<TransferStatus> {
+ private java.lang.String uploadToken;
+ public queryUploadStatus_call(java.lang.String uploadToken, org.apache.thrift.async.AsyncMethodCallback<TransferStatus> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.uploadToken = uploadToken;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("queryUploadStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
queryUploadStatus_args args = new queryUploadStatus_args();
@@ -1836,9 +1882,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
+ @Override
public TransferStatus getResult() throws TInvalidTokenException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1846,22 +1893,24 @@ public class SatelliteServer {
}
}
- public void requestDownload(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void requestDownload(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws org.apache.thrift.TException {
checkReady();
requestDownload_call method_call = new requestDownload_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class requestDownload_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String imageVersionId;
- public requestDownload_call(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class requestDownload_call extends org.apache.thrift.async.TAsyncMethodCall<TransferInformation> {
+ private java.lang.String userToken;
+ private java.lang.String imageVersionId;
+ public requestDownload_call(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.imageVersionId = imageVersionId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requestDownload", org.apache.thrift.protocol.TMessageType.CALL, 0));
requestDownload_args args = new requestDownload_args();
@@ -1871,9 +1920,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
+ @Override
public TransferInformation getResult() throws TTransferRejectedException, TAuthorizationException, TInvocationException, TNotFoundException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1881,20 +1931,22 @@ public class SatelliteServer {
}
}
- public void cancelDownload(String downloadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void cancelDownload(java.lang.String downloadToken, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
cancelDownload_call method_call = new cancelDownload_call(downloadToken, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class cancelDownload_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String downloadToken;
- public cancelDownload_call(String downloadToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class cancelDownload_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String downloadToken;
+ public cancelDownload_call(java.lang.String downloadToken, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.downloadToken = downloadToken;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("cancelDownload", org.apache.thrift.protocol.TMessageType.CALL, 0));
cancelDownload_args args = new cancelDownload_args();
@@ -1903,30 +1955,34 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public void getResult() throws TInvalidTokenException, org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws TInvalidTokenException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_cancelDownload();
+ return null;
}
}
- public void isAuthenticated(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void isAuthenticated(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
isAuthenticated_call method_call = new isAuthenticated_call(userToken, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class isAuthenticated_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- public isAuthenticated_call(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class isAuthenticated_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String userToken;
+ public isAuthenticated_call(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isAuthenticated", org.apache.thrift.protocol.TMessageType.CALL, 0));
isAuthenticated_args args = new isAuthenticated_args();
@@ -1935,30 +1991,34 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public void getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_isAuthenticated();
+ return null;
}
}
- public void whoami(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void whoami(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback<WhoamiInfo> resultHandler) throws org.apache.thrift.TException {
checkReady();
whoami_call method_call = new whoami_call(userToken, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class whoami_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- public whoami_call(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class whoami_call extends org.apache.thrift.async.TAsyncMethodCall<WhoamiInfo> {
+ private java.lang.String userToken;
+ public whoami_call(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback<WhoamiInfo> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("whoami", org.apache.thrift.protocol.TMessageType.CALL, 0));
whoami_args args = new whoami_args();
@@ -1967,9 +2027,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
+ @Override
public WhoamiInfo getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1977,20 +2038,22 @@ public class SatelliteServer {
}
}
- public void invalidateSession(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void invalidateSession(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
invalidateSession_call method_call = new invalidateSession_call(userToken, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class invalidateSession_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- public invalidateSession_call(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class invalidateSession_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String userToken;
+ public invalidateSession_call(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("invalidateSession", org.apache.thrift.protocol.TMessageType.CALL, 0));
invalidateSession_args args = new invalidateSession_args();
@@ -1999,32 +2062,36 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public void getResult() throws TInvalidTokenException, org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws TInvalidTokenException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_invalidateSession();
+ return null;
}
}
- public void getUserList(String userToken, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getUserList(java.lang.String userToken, int page, org.apache.thrift.async.AsyncMethodCallback<java.util.List<UserInfo>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getUserList_call method_call = new getUserList_call(userToken, page, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getUserList_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
+ public static class getUserList_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<UserInfo>> {
+ private java.lang.String userToken;
private int page;
- public getUserList_call(String userToken, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public getUserList_call(java.lang.String userToken, int page, org.apache.thrift.async.AsyncMethodCallback<java.util.List<UserInfo>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.page = page;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserList", org.apache.thrift.protocol.TMessageType.CALL, 0));
getUserList_args args = new getUserList_args();
@@ -2034,9 +2101,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public List<UserInfo> getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public java.util.List<UserInfo> getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -2044,20 +2112,22 @@ public class SatelliteServer {
}
}
- public void getUserConfig(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getUserConfig(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback<SatelliteUserConfig> resultHandler) throws org.apache.thrift.TException {
checkReady();
getUserConfig_call method_call = new getUserConfig_call(userToken, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getUserConfig_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- public getUserConfig_call(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getUserConfig_call extends org.apache.thrift.async.TAsyncMethodCall<SatelliteUserConfig> {
+ private java.lang.String userToken;
+ public getUserConfig_call(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback<SatelliteUserConfig> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getUserConfig", org.apache.thrift.protocol.TMessageType.CALL, 0));
getUserConfig_args args = new getUserConfig_args();
@@ -2066,9 +2136,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
+ @Override
public SatelliteUserConfig getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -2076,22 +2147,24 @@ public class SatelliteServer {
}
}
- public void setUserConfig(String userToken, SatelliteUserConfig config, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void setUserConfig(java.lang.String userToken, SatelliteUserConfig config, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
setUserConfig_call method_call = new setUserConfig_call(userToken, config, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class setUserConfig_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
+ public static class setUserConfig_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String userToken;
private SatelliteUserConfig config;
- public setUserConfig_call(String userToken, SatelliteUserConfig config, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public setUserConfig_call(java.lang.String userToken, SatelliteUserConfig config, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.config = config;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setUserConfig", org.apache.thrift.protocol.TMessageType.CALL, 0));
setUserConfig_args args = new setUserConfig_args();
@@ -2101,28 +2174,32 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public void getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_setUserConfig();
+ return null;
}
}
- public void getOperatingSystems(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getOperatingSystems(org.apache.thrift.async.AsyncMethodCallback<java.util.List<OperatingSystem>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getOperatingSystems_call method_call = new getOperatingSystems_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getOperatingSystems_call extends org.apache.thrift.async.TAsyncMethodCall {
- public getOperatingSystems_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getOperatingSystems_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<OperatingSystem>> {
+ public getOperatingSystems_call(org.apache.thrift.async.AsyncMethodCallback<java.util.List<OperatingSystem>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getOperatingSystems", org.apache.thrift.protocol.TMessageType.CALL, 0));
getOperatingSystems_args args = new getOperatingSystems_args();
@@ -2130,9 +2207,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public List<OperatingSystem> getResult() throws org.apache.thrift.TException {
+ @Override
+ public java.util.List<OperatingSystem> getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -2140,18 +2218,20 @@ public class SatelliteServer {
}
}
- public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getVirtualizers(org.apache.thrift.async.AsyncMethodCallback<java.util.List<Virtualizer>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getVirtualizers_call method_call = new getVirtualizers_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getVirtualizers_call extends org.apache.thrift.async.TAsyncMethodCall {
- public getVirtualizers_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getVirtualizers_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<Virtualizer>> {
+ public getVirtualizers_call(org.apache.thrift.async.AsyncMethodCallback<java.util.List<Virtualizer>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getVirtualizers", org.apache.thrift.protocol.TMessageType.CALL, 0));
getVirtualizers_args args = new getVirtualizers_args();
@@ -2159,9 +2239,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public List<Virtualizer> getResult() throws org.apache.thrift.TException {
+ @Override
+ public java.util.List<Virtualizer> getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -2169,18 +2250,20 @@ public class SatelliteServer {
}
}
- public void getAllOrganizations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getAllOrganizations(org.apache.thrift.async.AsyncMethodCallback<java.util.List<Organization>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getAllOrganizations_call method_call = new getAllOrganizations_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getAllOrganizations_call extends org.apache.thrift.async.TAsyncMethodCall {
- public getAllOrganizations_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getAllOrganizations_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<Organization>> {
+ public getAllOrganizations_call(org.apache.thrift.async.AsyncMethodCallback<java.util.List<Organization>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllOrganizations", org.apache.thrift.protocol.TMessageType.CALL, 0));
getAllOrganizations_args args = new getAllOrganizations_args();
@@ -2188,9 +2271,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public List<Organization> getResult() throws org.apache.thrift.TException {
+ @Override
+ public java.util.List<Organization> getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -2198,18 +2282,20 @@ public class SatelliteServer {
}
}
- public void getLocations(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getLocations(org.apache.thrift.async.AsyncMethodCallback<java.util.List<Location>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getLocations_call method_call = new getLocations_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getLocations_call extends org.apache.thrift.async.TAsyncMethodCall {
- public getLocations_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getLocations_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<Location>> {
+ public getLocations_call(org.apache.thrift.async.AsyncMethodCallback<java.util.List<Location>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLocations", org.apache.thrift.protocol.TMessageType.CALL, 0));
getLocations_args args = new getLocations_args();
@@ -2217,9 +2303,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public List<Location> getResult() throws org.apache.thrift.TException {
+ @Override
+ public java.util.List<Location> getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -2227,18 +2314,20 @@ public class SatelliteServer {
}
}
- public void getStatus(org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getStatus(org.apache.thrift.async.AsyncMethodCallback<SatelliteStatus> resultHandler) throws org.apache.thrift.TException {
checkReady();
getStatus_call method_call = new getStatus_call(resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getStatus_call extends org.apache.thrift.async.TAsyncMethodCall {
- public getStatus_call(org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getStatus_call extends org.apache.thrift.async.TAsyncMethodCall<SatelliteStatus> {
+ public getStatus_call(org.apache.thrift.async.AsyncMethodCallback<SatelliteStatus> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getStatus", org.apache.thrift.protocol.TMessageType.CALL, 0));
getStatus_args args = new getStatus_args();
@@ -2246,9 +2335,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
+ @Override
public SatelliteStatus getResult() throws org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -2256,24 +2346,26 @@ public class SatelliteServer {
}
}
- public void getImageList(String userToken, List<String> tagSearch, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getImageList(java.lang.String userToken, java.util.List<java.lang.String> tagSearch, int page, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ImageSummaryRead>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getImageList_call method_call = new getImageList_call(userToken, tagSearch, page, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getImageList_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private List<String> tagSearch;
+ public static class getImageList_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<ImageSummaryRead>> {
+ private java.lang.String userToken;
+ private java.util.List<java.lang.String> tagSearch;
private int page;
- public getImageList_call(String userToken, List<String> tagSearch, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public getImageList_call(java.lang.String userToken, java.util.List<java.lang.String> tagSearch, int page, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ImageSummaryRead>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.tagSearch = tagSearch;
this.page = page;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageList", org.apache.thrift.protocol.TMessageType.CALL, 0));
getImageList_args args = new getImageList_args();
@@ -2284,9 +2376,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public List<ImageSummaryRead> getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public java.util.List<ImageSummaryRead> getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -2294,22 +2387,24 @@ public class SatelliteServer {
}
}
- public void getImageDetails(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getImageDetails(java.lang.String userToken, java.lang.String imageBaseId, org.apache.thrift.async.AsyncMethodCallback<ImageDetailsRead> resultHandler) throws org.apache.thrift.TException {
checkReady();
getImageDetails_call method_call = new getImageDetails_call(userToken, imageBaseId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getImageDetails_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String imageBaseId;
- public getImageDetails_call(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getImageDetails_call extends org.apache.thrift.async.TAsyncMethodCall<ImageDetailsRead> {
+ private java.lang.String userToken;
+ private java.lang.String imageBaseId;
+ public getImageDetails_call(java.lang.String userToken, java.lang.String imageBaseId, org.apache.thrift.async.AsyncMethodCallback<ImageDetailsRead> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.imageBaseId = imageBaseId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageDetails", org.apache.thrift.protocol.TMessageType.CALL, 0));
getImageDetails_args args = new getImageDetails_args();
@@ -2319,9 +2414,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
+ @Override
public ImageDetailsRead getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -2329,22 +2425,24 @@ public class SatelliteServer {
}
}
- public void createImage(String userToken, String imageName, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void createImage(java.lang.String userToken, java.lang.String imageName, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
createImage_call method_call = new createImage_call(userToken, imageName, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class createImage_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String imageName;
- public createImage_call(String userToken, String imageName, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class createImage_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
+ private java.lang.String userToken;
+ private java.lang.String imageName;
+ public createImage_call(java.lang.String userToken, java.lang.String imageName, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.imageName = imageName;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createImage", org.apache.thrift.protocol.TMessageType.CALL, 0));
createImage_args args = new createImage_args();
@@ -2354,9 +2452,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public String getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public java.lang.String getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -2364,24 +2463,26 @@ public class SatelliteServer {
}
}
- public void updateImageBase(String userToken, String imageBaseId, ImageBaseWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void updateImageBase(java.lang.String userToken, java.lang.String imageBaseId, ImageBaseWrite image, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
updateImageBase_call method_call = new updateImageBase_call(userToken, imageBaseId, image, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class updateImageBase_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String imageBaseId;
+ public static class updateImageBase_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String userToken;
+ private java.lang.String imageBaseId;
private ImageBaseWrite image;
- public updateImageBase_call(String userToken, String imageBaseId, ImageBaseWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public updateImageBase_call(java.lang.String userToken, java.lang.String imageBaseId, ImageBaseWrite image, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.imageBaseId = imageBaseId;
this.image = image;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateImageBase", org.apache.thrift.protocol.TMessageType.CALL, 0));
updateImageBase_args args = new updateImageBase_args();
@@ -2392,34 +2493,38 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_updateImageBase();
+ return null;
}
}
- public void updateImageVersion(String userToken, String imageVersionId, ImageVersionWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void updateImageVersion(java.lang.String userToken, java.lang.String imageVersionId, ImageVersionWrite image, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
updateImageVersion_call method_call = new updateImageVersion_call(userToken, imageVersionId, image, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class updateImageVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String imageVersionId;
+ public static class updateImageVersion_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String userToken;
+ private java.lang.String imageVersionId;
private ImageVersionWrite image;
- public updateImageVersion_call(String userToken, String imageVersionId, ImageVersionWrite image, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public updateImageVersion_call(java.lang.String userToken, java.lang.String imageVersionId, ImageVersionWrite image, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.imageVersionId = imageVersionId;
this.image = image;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateImageVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
updateImageVersion_args args = new updateImageVersion_args();
@@ -2430,32 +2535,36 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_updateImageVersion();
+ return null;
}
}
- public void deleteImageVersion(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void deleteImageVersion(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
deleteImageVersion_call method_call = new deleteImageVersion_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class deleteImageVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String imageVersionId;
- public deleteImageVersion_call(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class deleteImageVersion_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String userToken;
+ private java.lang.String imageVersionId;
+ public deleteImageVersion_call(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.imageVersionId = imageVersionId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteImageVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
deleteImageVersion_args args = new deleteImageVersion_args();
@@ -2465,32 +2574,36 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_deleteImageVersion();
+ return null;
}
}
- public void deleteImageBase(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void deleteImageBase(java.lang.String userToken, java.lang.String imageBaseId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
deleteImageBase_call method_call = new deleteImageBase_call(userToken, imageBaseId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class deleteImageBase_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String imageBaseId;
- public deleteImageBase_call(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class deleteImageBase_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String userToken;
+ private java.lang.String imageBaseId;
+ public deleteImageBase_call(java.lang.String userToken, java.lang.String imageBaseId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.imageBaseId = imageBaseId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteImageBase", org.apache.thrift.protocol.TMessageType.CALL, 0));
deleteImageBase_args args = new deleteImageBase_args();
@@ -2500,34 +2613,38 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_deleteImageBase();
+ return null;
}
}
- public void writeImagePermissions(String userToken, String imageBaseId, Map<String,ImagePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void writeImagePermissions(java.lang.String userToken, java.lang.String imageBaseId, java.util.Map<java.lang.String,ImagePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
writeImagePermissions_call method_call = new writeImagePermissions_call(userToken, imageBaseId, permissions, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class writeImagePermissions_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String imageBaseId;
- private Map<String,ImagePermissions> permissions;
- public writeImagePermissions_call(String userToken, String imageBaseId, Map<String,ImagePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class writeImagePermissions_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String userToken;
+ private java.lang.String imageBaseId;
+ private java.util.Map<java.lang.String,ImagePermissions> permissions;
+ public writeImagePermissions_call(java.lang.String userToken, java.lang.String imageBaseId, java.util.Map<java.lang.String,ImagePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.imageBaseId = imageBaseId;
this.permissions = permissions;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeImagePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0));
writeImagePermissions_args args = new writeImagePermissions_args();
@@ -2538,32 +2655,36 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_writeImagePermissions();
+ return null;
}
}
- public void getImagePermissions(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getImagePermissions(java.lang.String userToken, java.lang.String imageBaseId, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,ImagePermissions>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getImagePermissions_call method_call = new getImagePermissions_call(userToken, imageBaseId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getImagePermissions_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String imageBaseId;
- public getImagePermissions_call(String userToken, String imageBaseId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getImagePermissions_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.Map<java.lang.String,ImagePermissions>> {
+ private java.lang.String userToken;
+ private java.lang.String imageBaseId;
+ public getImagePermissions_call(java.lang.String userToken, java.lang.String imageBaseId, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,ImagePermissions>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.imageBaseId = imageBaseId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImagePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0));
getImagePermissions_args args = new getImagePermissions_args();
@@ -2573,9 +2694,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public Map<String,ImagePermissions> getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public java.util.Map<java.lang.String,ImagePermissions> getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -2583,24 +2705,26 @@ public class SatelliteServer {
}
}
- public void setImageOwner(String userToken, String imageBaseId, String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void setImageOwner(java.lang.String userToken, java.lang.String imageBaseId, java.lang.String newOwnerId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
setImageOwner_call method_call = new setImageOwner_call(userToken, imageBaseId, newOwnerId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class setImageOwner_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String imageBaseId;
- private String newOwnerId;
- public setImageOwner_call(String userToken, String imageBaseId, String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class setImageOwner_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String userToken;
+ private java.lang.String imageBaseId;
+ private java.lang.String newOwnerId;
+ public setImageOwner_call(java.lang.String userToken, java.lang.String imageBaseId, java.lang.String newOwnerId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.imageBaseId = imageBaseId;
this.newOwnerId = newOwnerId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setImageOwner", org.apache.thrift.protocol.TMessageType.CALL, 0));
setImageOwner_args args = new setImageOwner_args();
@@ -2611,34 +2735,38 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_setImageOwner();
+ return null;
}
}
- public void setImageVersionExpiry(String userToken, String imageBaseId, long expireTime, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void setImageVersionExpiry(java.lang.String userToken, java.lang.String imageBaseId, long expireTime, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
setImageVersionExpiry_call method_call = new setImageVersionExpiry_call(userToken, imageBaseId, expireTime, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class setImageVersionExpiry_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String imageBaseId;
+ public static class setImageVersionExpiry_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String userToken;
+ private java.lang.String imageBaseId;
private long expireTime;
- public setImageVersionExpiry_call(String userToken, String imageBaseId, long expireTime, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public setImageVersionExpiry_call(java.lang.String userToken, java.lang.String imageBaseId, long expireTime, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.imageBaseId = imageBaseId;
this.expireTime = expireTime;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setImageVersionExpiry", org.apache.thrift.protocol.TMessageType.CALL, 0));
setImageVersionExpiry_args args = new setImageVersionExpiry_args();
@@ -2649,32 +2777,36 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_setImageVersionExpiry();
+ return null;
}
}
- public void getImageVersionVirtConfig(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> resultHandler) throws org.apache.thrift.TException {
checkReady();
getImageVersionVirtConfig_call method_call = new getImageVersionVirtConfig_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getImageVersionVirtConfig_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String imageVersionId;
- public getImageVersionVirtConfig_call(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getImageVersionVirtConfig_call extends org.apache.thrift.async.TAsyncMethodCall<java.nio.ByteBuffer> {
+ private java.lang.String userToken;
+ private java.lang.String imageVersionId;
+ public getImageVersionVirtConfig_call(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.imageVersionId = imageVersionId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getImageVersionVirtConfig", org.apache.thrift.protocol.TMessageType.CALL, 0));
getImageVersionVirtConfig_args args = new getImageVersionVirtConfig_args();
@@ -2684,9 +2816,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public ByteBuffer getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public java.nio.ByteBuffer getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -2694,24 +2827,26 @@ public class SatelliteServer {
}
}
- public void setImageVersionVirtConfig(String userToken, String imageVersionId, ByteBuffer meta, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void setImageVersionVirtConfig(java.lang.String userToken, java.lang.String imageVersionId, java.nio.ByteBuffer meta, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
setImageVersionVirtConfig_call method_call = new setImageVersionVirtConfig_call(userToken, imageVersionId, meta, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class setImageVersionVirtConfig_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String imageVersionId;
- private ByteBuffer meta;
- public setImageVersionVirtConfig_call(String userToken, String imageVersionId, ByteBuffer meta, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class setImageVersionVirtConfig_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String userToken;
+ private java.lang.String imageVersionId;
+ private java.nio.ByteBuffer meta;
+ public setImageVersionVirtConfig_call(java.lang.String userToken, java.lang.String imageVersionId, java.nio.ByteBuffer meta, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.imageVersionId = imageVersionId;
this.meta = meta;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setImageVersionVirtConfig", org.apache.thrift.protocol.TMessageType.CALL, 0));
setImageVersionVirtConfig_args args = new setImageVersionVirtConfig_args();
@@ -2722,32 +2857,36 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_setImageVersionVirtConfig();
+ return null;
}
}
- public void requestImageReplication(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void requestImageReplication(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
requestImageReplication_call method_call = new requestImageReplication_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class requestImageReplication_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String imageVersionId;
- public requestImageReplication_call(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class requestImageReplication_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
+ private java.lang.String userToken;
+ private java.lang.String imageVersionId;
+ public requestImageReplication_call(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.imageVersionId = imageVersionId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("requestImageReplication", org.apache.thrift.protocol.TMessageType.CALL, 0));
requestImageReplication_args args = new requestImageReplication_args();
@@ -2757,9 +2896,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public String getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public java.lang.String getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -2767,22 +2907,24 @@ public class SatelliteServer {
}
}
- public void publishImageVersion(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void publishImageVersion(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
publishImageVersion_call method_call = new publishImageVersion_call(userToken, imageVersionId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class publishImageVersion_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String imageVersionId;
- public publishImageVersion_call(String userToken, String imageVersionId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class publishImageVersion_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
+ private java.lang.String userToken;
+ private java.lang.String imageVersionId;
+ public publishImageVersion_call(java.lang.String userToken, java.lang.String imageVersionId, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.imageVersionId = imageVersionId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("publishImageVersion", org.apache.thrift.protocol.TMessageType.CALL, 0));
publishImageVersion_args args = new publishImageVersion_args();
@@ -2792,9 +2934,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public String getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException {
+ @Override
+ public java.lang.String getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, TTransferRejectedException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -2802,22 +2945,24 @@ public class SatelliteServer {
}
}
- public void createLecture(String userToken, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void createLecture(java.lang.String userToken, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
checkReady();
createLecture_call method_call = new createLecture_call(userToken, lecture, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class createLecture_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
+ public static class createLecture_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
+ private java.lang.String userToken;
private LectureWrite lecture;
- public createLecture_call(String userToken, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public createLecture_call(java.lang.String userToken, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.lecture = lecture;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createLecture", org.apache.thrift.protocol.TMessageType.CALL, 0));
createLecture_args args = new createLecture_args();
@@ -2827,9 +2972,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public String getResult() throws TAuthorizationException, TInvocationException, TInvalidDateParam, TNotFoundException, org.apache.thrift.TException {
+ @Override
+ public java.lang.String getResult() throws TAuthorizationException, TInvocationException, TInvalidDateParam, TNotFoundException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -2837,24 +2983,26 @@ public class SatelliteServer {
}
}
- public void updateLecture(String userToken, String lectureId, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void updateLecture(java.lang.String userToken, java.lang.String lectureId, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
updateLecture_call method_call = new updateLecture_call(userToken, lectureId, lecture, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class updateLecture_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String lectureId;
+ public static class updateLecture_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String userToken;
+ private java.lang.String lectureId;
private LectureWrite lecture;
- public updateLecture_call(String userToken, String lectureId, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public updateLecture_call(java.lang.String userToken, java.lang.String lectureId, LectureWrite lecture, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.lectureId = lectureId;
this.lecture = lecture;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateLecture", org.apache.thrift.protocol.TMessageType.CALL, 0));
updateLecture_args args = new updateLecture_args();
@@ -2865,32 +3013,36 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, TInvalidDateParam, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_updateLecture();
+ return null;
}
}
- public void getLectureList(String userToken, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getLectureList(java.lang.String userToken, int page, org.apache.thrift.async.AsyncMethodCallback<java.util.List<LectureSummary>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getLectureList_call method_call = new getLectureList_call(userToken, page, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getLectureList_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
+ public static class getLectureList_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<LectureSummary>> {
+ private java.lang.String userToken;
private int page;
- public getLectureList_call(String userToken, int page, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public getLectureList_call(java.lang.String userToken, int page, org.apache.thrift.async.AsyncMethodCallback<java.util.List<LectureSummary>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.page = page;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLectureList", org.apache.thrift.protocol.TMessageType.CALL, 0));
getLectureList_args args = new getLectureList_args();
@@ -2900,9 +3052,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public List<LectureSummary> getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public java.util.List<LectureSummary> getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -2910,22 +3063,24 @@ public class SatelliteServer {
}
}
- public void getLectureDetails(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getLectureDetails(java.lang.String userToken, java.lang.String lectureId, org.apache.thrift.async.AsyncMethodCallback<LectureRead> resultHandler) throws org.apache.thrift.TException {
checkReady();
getLectureDetails_call method_call = new getLectureDetails_call(userToken, lectureId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getLectureDetails_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String lectureId;
- public getLectureDetails_call(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getLectureDetails_call extends org.apache.thrift.async.TAsyncMethodCall<LectureRead> {
+ private java.lang.String userToken;
+ private java.lang.String lectureId;
+ public getLectureDetails_call(java.lang.String userToken, java.lang.String lectureId, org.apache.thrift.async.AsyncMethodCallback<LectureRead> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.lectureId = lectureId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLectureDetails", org.apache.thrift.protocol.TMessageType.CALL, 0));
getLectureDetails_args args = new getLectureDetails_args();
@@ -2935,9 +3090,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
+ @Override
public LectureRead getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -2945,22 +3101,24 @@ public class SatelliteServer {
}
}
- public void deleteLecture(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void deleteLecture(java.lang.String userToken, java.lang.String lectureId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
deleteLecture_call method_call = new deleteLecture_call(userToken, lectureId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class deleteLecture_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String lectureId;
- public deleteLecture_call(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class deleteLecture_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String userToken;
+ private java.lang.String lectureId;
+ public deleteLecture_call(java.lang.String userToken, java.lang.String lectureId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.lectureId = lectureId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteLecture", org.apache.thrift.protocol.TMessageType.CALL, 0));
deleteLecture_args args = new deleteLecture_args();
@@ -2970,34 +3128,38 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_deleteLecture();
+ return null;
}
}
- public void writeLecturePermissions(String userToken, String lectureId, Map<String,LecturePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void writeLecturePermissions(java.lang.String userToken, java.lang.String lectureId, java.util.Map<java.lang.String,LecturePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
writeLecturePermissions_call method_call = new writeLecturePermissions_call(userToken, lectureId, permissions, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class writeLecturePermissions_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String lectureId;
- private Map<String,LecturePermissions> permissions;
- public writeLecturePermissions_call(String userToken, String lectureId, Map<String,LecturePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class writeLecturePermissions_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String userToken;
+ private java.lang.String lectureId;
+ private java.util.Map<java.lang.String,LecturePermissions> permissions;
+ public writeLecturePermissions_call(java.lang.String userToken, java.lang.String lectureId, java.util.Map<java.lang.String,LecturePermissions> permissions, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.lectureId = lectureId;
this.permissions = permissions;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("writeLecturePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0));
writeLecturePermissions_args args = new writeLecturePermissions_args();
@@ -3008,32 +3170,36 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_writeLecturePermissions();
+ return null;
}
}
- public void getLecturePermissions(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getLecturePermissions(java.lang.String userToken, java.lang.String lectureId, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,LecturePermissions>> resultHandler) throws org.apache.thrift.TException {
checkReady();
getLecturePermissions_call method_call = new getLecturePermissions_call(userToken, lectureId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getLecturePermissions_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String lectureId;
- public getLecturePermissions_call(String userToken, String lectureId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getLecturePermissions_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.Map<java.lang.String,LecturePermissions>> {
+ private java.lang.String userToken;
+ private java.lang.String lectureId;
+ public getLecturePermissions_call(java.lang.String userToken, java.lang.String lectureId, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,LecturePermissions>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.lectureId = lectureId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLecturePermissions", org.apache.thrift.protocol.TMessageType.CALL, 0));
getLecturePermissions_args args = new getLecturePermissions_args();
@@ -3043,9 +3209,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public Map<String,LecturePermissions> getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public java.util.Map<java.lang.String,LecturePermissions> getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -3053,24 +3220,26 @@ public class SatelliteServer {
}
}
- public void setLectureOwner(String userToken, String lectureId, String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void setLectureOwner(java.lang.String userToken, java.lang.String lectureId, java.lang.String newOwnerId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
checkReady();
setLectureOwner_call method_call = new setLectureOwner_call(userToken, lectureId, newOwnerId, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class setLectureOwner_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- private String lectureId;
- private String newOwnerId;
- public setLectureOwner_call(String userToken, String lectureId, String newOwnerId, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class setLectureOwner_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
+ private java.lang.String userToken;
+ private java.lang.String lectureId;
+ private java.lang.String newOwnerId;
+ public setLectureOwner_call(java.lang.String userToken, java.lang.String lectureId, java.lang.String newOwnerId, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
this.lectureId = lectureId;
this.newOwnerId = newOwnerId;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("setLectureOwner", org.apache.thrift.protocol.TMessageType.CALL, 0));
setLectureOwner_args args = new setLectureOwner_args();
@@ -3081,30 +3250,34 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
- public void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
+ @Override
+ public Void getResult() throws TAuthorizationException, TNotFoundException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
(new Client(prot)).recv_setLectureOwner();
+ return null;
}
}
- public void getPredefinedData(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler) throws org.apache.thrift.TException {
+ @Override
+ public void getPredefinedData(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback<PredefinedData> resultHandler) throws org.apache.thrift.TException {
checkReady();
getPredefinedData_call method_call = new getPredefinedData_call(userToken, resultHandler, this, ___protocolFactory, ___transport);
this.___currentMethod = method_call;
___manager.call(method_call);
}
- public static class getPredefinedData_call extends org.apache.thrift.async.TAsyncMethodCall {
- private String userToken;
- public getPredefinedData_call(String userToken, org.apache.thrift.async.AsyncMethodCallback resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+ public static class getPredefinedData_call extends org.apache.thrift.async.TAsyncMethodCall<PredefinedData> {
+ private java.lang.String userToken;
+ public getPredefinedData_call(java.lang.String userToken, org.apache.thrift.async.AsyncMethodCallback<PredefinedData> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
super(client, protocolFactory, transport, resultHandler, false);
this.userToken = userToken;
}
+ @Override
public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPredefinedData", org.apache.thrift.protocol.TMessageType.CALL, 0));
getPredefinedData_args args = new getPredefinedData_args();
@@ -3113,9 +3286,10 @@ public class SatelliteServer {
prot.writeMessageEnd();
}
+ @Override
public PredefinedData getResult() throws TAuthorizationException, TInvocationException, org.apache.thrift.TException {
if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
- throw new IllegalStateException("Method call not finished!");
+ throw new java.lang.IllegalStateException("Method call not finished!");
}
org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -3126,16 +3300,16 @@ public class SatelliteServer {
}
public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
- private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
public Processor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+ super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
}
- protected Processor(I iface, Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ protected Processor(I iface, java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
super(iface, getProcessMap(processMap));
}
- private static <I extends Iface> Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+ private static <I extends Iface> java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
processMap.put("getVersion", new getVersion());
processMap.put("getSupportedFeatures", new getSupportedFeatures());
processMap.put("getConfiguration", new getConfiguration());
@@ -3189,14 +3363,22 @@ public class SatelliteServer {
super("getVersion");
}
+ @Override
public getVersion_args getEmptyArgsInstance() {
return new getVersion_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getVersion_result getResult(I iface, getVersion_args args) throws org.apache.thrift.TException {
getVersion_result result = new getVersion_result();
result.success = iface.getVersion(args.clientVersion);
@@ -3210,14 +3392,22 @@ public class SatelliteServer {
super("getSupportedFeatures");
}
+ @Override
public getSupportedFeatures_args getEmptyArgsInstance() {
return new getSupportedFeatures_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getSupportedFeatures_result getResult(I iface, getSupportedFeatures_args args) throws org.apache.thrift.TException {
getSupportedFeatures_result result = new getSupportedFeatures_result();
result.success = iface.getSupportedFeatures();
@@ -3230,14 +3420,22 @@ public class SatelliteServer {
super("getConfiguration");
}
+ @Override
public getConfiguration_args getEmptyArgsInstance() {
return new getConfiguration_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getConfiguration_result getResult(I iface, getConfiguration_args args) throws org.apache.thrift.TException {
getConfiguration_result result = new getConfiguration_result();
result.success = iface.getConfiguration();
@@ -3250,14 +3448,22 @@ public class SatelliteServer {
super("requestImageVersionUpload");
}
+ @Override
public requestImageVersionUpload_args getEmptyArgsInstance() {
return new requestImageVersionUpload_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public requestImageVersionUpload_result getResult(I iface, requestImageVersionUpload_args args) throws org.apache.thrift.TException {
requestImageVersionUpload_result result = new requestImageVersionUpload_result();
try {
@@ -3280,14 +3486,22 @@ public class SatelliteServer {
super("updateBlockHashes");
}
+ @Override
public updateBlockHashes_args getEmptyArgsInstance() {
return new updateBlockHashes_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public updateBlockHashes_result getResult(I iface, updateBlockHashes_args args) throws org.apache.thrift.TException {
updateBlockHashes_result result = new updateBlockHashes_result();
try {
@@ -3304,14 +3518,22 @@ public class SatelliteServer {
super("setUploadOptions");
}
+ @Override
public setUploadOptions_args getEmptyArgsInstance() {
return new setUploadOptions_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public setUploadOptions_result getResult(I iface, setUploadOptions_args args) throws org.apache.thrift.TException {
setUploadOptions_result result = new setUploadOptions_result();
try {
@@ -3330,14 +3552,22 @@ public class SatelliteServer {
super("cancelUpload");
}
+ @Override
public cancelUpload_args getEmptyArgsInstance() {
return new cancelUpload_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public cancelUpload_result getResult(I iface, cancelUpload_args args) throws org.apache.thrift.TException {
cancelUpload_result result = new cancelUpload_result();
try {
@@ -3354,14 +3584,22 @@ public class SatelliteServer {
super("queryUploadStatus");
}
+ @Override
public queryUploadStatus_args getEmptyArgsInstance() {
return new queryUploadStatus_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public queryUploadStatus_result getResult(I iface, queryUploadStatus_args args) throws org.apache.thrift.TException {
queryUploadStatus_result result = new queryUploadStatus_result();
try {
@@ -3378,14 +3616,22 @@ public class SatelliteServer {
super("requestDownload");
}
+ @Override
public requestDownload_args getEmptyArgsInstance() {
return new requestDownload_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public requestDownload_result getResult(I iface, requestDownload_args args) throws org.apache.thrift.TException {
requestDownload_result result = new requestDownload_result();
try {
@@ -3408,14 +3654,22 @@ public class SatelliteServer {
super("cancelDownload");
}
+ @Override
public cancelDownload_args getEmptyArgsInstance() {
return new cancelDownload_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public cancelDownload_result getResult(I iface, cancelDownload_args args) throws org.apache.thrift.TException {
cancelDownload_result result = new cancelDownload_result();
try {
@@ -3432,14 +3686,22 @@ public class SatelliteServer {
super("isAuthenticated");
}
+ @Override
public isAuthenticated_args getEmptyArgsInstance() {
return new isAuthenticated_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public isAuthenticated_result getResult(I iface, isAuthenticated_args args) throws org.apache.thrift.TException {
isAuthenticated_result result = new isAuthenticated_result();
try {
@@ -3458,14 +3720,22 @@ public class SatelliteServer {
super("whoami");
}
+ @Override
public whoami_args getEmptyArgsInstance() {
return new whoami_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public whoami_result getResult(I iface, whoami_args args) throws org.apache.thrift.TException {
whoami_result result = new whoami_result();
try {
@@ -3484,14 +3754,22 @@ public class SatelliteServer {
super("invalidateSession");
}
+ @Override
public invalidateSession_args getEmptyArgsInstance() {
return new invalidateSession_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public invalidateSession_result getResult(I iface, invalidateSession_args args) throws org.apache.thrift.TException {
invalidateSession_result result = new invalidateSession_result();
try {
@@ -3508,14 +3786,22 @@ public class SatelliteServer {
super("getUserList");
}
+ @Override
public getUserList_args getEmptyArgsInstance() {
return new getUserList_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getUserList_result getResult(I iface, getUserList_args args) throws org.apache.thrift.TException {
getUserList_result result = new getUserList_result();
try {
@@ -3534,14 +3820,22 @@ public class SatelliteServer {
super("getUserConfig");
}
+ @Override
public getUserConfig_args getEmptyArgsInstance() {
return new getUserConfig_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getUserConfig_result getResult(I iface, getUserConfig_args args) throws org.apache.thrift.TException {
getUserConfig_result result = new getUserConfig_result();
try {
@@ -3560,14 +3854,22 @@ public class SatelliteServer {
super("setUserConfig");
}
+ @Override
public setUserConfig_args getEmptyArgsInstance() {
return new setUserConfig_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public setUserConfig_result getResult(I iface, setUserConfig_args args) throws org.apache.thrift.TException {
setUserConfig_result result = new setUserConfig_result();
try {
@@ -3586,14 +3888,22 @@ public class SatelliteServer {
super("getOperatingSystems");
}
+ @Override
public getOperatingSystems_args getEmptyArgsInstance() {
return new getOperatingSystems_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getOperatingSystems_result getResult(I iface, getOperatingSystems_args args) throws org.apache.thrift.TException {
getOperatingSystems_result result = new getOperatingSystems_result();
result.success = iface.getOperatingSystems();
@@ -3606,14 +3916,22 @@ public class SatelliteServer {
super("getVirtualizers");
}
+ @Override
public getVirtualizers_args getEmptyArgsInstance() {
return new getVirtualizers_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getVirtualizers_result getResult(I iface, getVirtualizers_args args) throws org.apache.thrift.TException {
getVirtualizers_result result = new getVirtualizers_result();
result.success = iface.getVirtualizers();
@@ -3626,14 +3944,22 @@ public class SatelliteServer {
super("getAllOrganizations");
}
+ @Override
public getAllOrganizations_args getEmptyArgsInstance() {
return new getAllOrganizations_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getAllOrganizations_result getResult(I iface, getAllOrganizations_args args) throws org.apache.thrift.TException {
getAllOrganizations_result result = new getAllOrganizations_result();
result.success = iface.getAllOrganizations();
@@ -3646,14 +3972,22 @@ public class SatelliteServer {
super("getLocations");
}
+ @Override
public getLocations_args getEmptyArgsInstance() {
return new getLocations_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getLocations_result getResult(I iface, getLocations_args args) throws org.apache.thrift.TException {
getLocations_result result = new getLocations_result();
result.success = iface.getLocations();
@@ -3666,14 +4000,22 @@ public class SatelliteServer {
super("getStatus");
}
+ @Override
public getStatus_args getEmptyArgsInstance() {
return new getStatus_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getStatus_result getResult(I iface, getStatus_args args) throws org.apache.thrift.TException {
getStatus_result result = new getStatus_result();
result.success = iface.getStatus();
@@ -3686,14 +4028,22 @@ public class SatelliteServer {
super("getImageList");
}
+ @Override
public getImageList_args getEmptyArgsInstance() {
return new getImageList_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getImageList_result getResult(I iface, getImageList_args args) throws org.apache.thrift.TException {
getImageList_result result = new getImageList_result();
try {
@@ -3712,14 +4062,22 @@ public class SatelliteServer {
super("getImageDetails");
}
+ @Override
public getImageDetails_args getEmptyArgsInstance() {
return new getImageDetails_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getImageDetails_result getResult(I iface, getImageDetails_args args) throws org.apache.thrift.TException {
getImageDetails_result result = new getImageDetails_result();
try {
@@ -3740,14 +4098,22 @@ public class SatelliteServer {
super("createImage");
}
+ @Override
public createImage_args getEmptyArgsInstance() {
return new createImage_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public createImage_result getResult(I iface, createImage_args args) throws org.apache.thrift.TException {
createImage_result result = new createImage_result();
try {
@@ -3766,14 +4132,22 @@ public class SatelliteServer {
super("updateImageBase");
}
+ @Override
public updateImageBase_args getEmptyArgsInstance() {
return new updateImageBase_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public updateImageBase_result getResult(I iface, updateImageBase_args args) throws org.apache.thrift.TException {
updateImageBase_result result = new updateImageBase_result();
try {
@@ -3794,14 +4168,22 @@ public class SatelliteServer {
super("updateImageVersion");
}
+ @Override
public updateImageVersion_args getEmptyArgsInstance() {
return new updateImageVersion_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public updateImageVersion_result getResult(I iface, updateImageVersion_args args) throws org.apache.thrift.TException {
updateImageVersion_result result = new updateImageVersion_result();
try {
@@ -3822,14 +4204,22 @@ public class SatelliteServer {
super("deleteImageVersion");
}
+ @Override
public deleteImageVersion_args getEmptyArgsInstance() {
return new deleteImageVersion_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public deleteImageVersion_result getResult(I iface, deleteImageVersion_args args) throws org.apache.thrift.TException {
deleteImageVersion_result result = new deleteImageVersion_result();
try {
@@ -3850,14 +4240,22 @@ public class SatelliteServer {
super("deleteImageBase");
}
+ @Override
public deleteImageBase_args getEmptyArgsInstance() {
return new deleteImageBase_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public deleteImageBase_result getResult(I iface, deleteImageBase_args args) throws org.apache.thrift.TException {
deleteImageBase_result result = new deleteImageBase_result();
try {
@@ -3878,14 +4276,22 @@ public class SatelliteServer {
super("writeImagePermissions");
}
+ @Override
public writeImagePermissions_args getEmptyArgsInstance() {
return new writeImagePermissions_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public writeImagePermissions_result getResult(I iface, writeImagePermissions_args args) throws org.apache.thrift.TException {
writeImagePermissions_result result = new writeImagePermissions_result();
try {
@@ -3906,14 +4312,22 @@ public class SatelliteServer {
super("getImagePermissions");
}
+ @Override
public getImagePermissions_args getEmptyArgsInstance() {
return new getImagePermissions_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getImagePermissions_result getResult(I iface, getImagePermissions_args args) throws org.apache.thrift.TException {
getImagePermissions_result result = new getImagePermissions_result();
try {
@@ -3934,14 +4348,22 @@ public class SatelliteServer {
super("setImageOwner");
}
+ @Override
public setImageOwner_args getEmptyArgsInstance() {
return new setImageOwner_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public setImageOwner_result getResult(I iface, setImageOwner_args args) throws org.apache.thrift.TException {
setImageOwner_result result = new setImageOwner_result();
try {
@@ -3962,14 +4384,22 @@ public class SatelliteServer {
super("setImageVersionExpiry");
}
+ @Override
public setImageVersionExpiry_args getEmptyArgsInstance() {
return new setImageVersionExpiry_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public setImageVersionExpiry_result getResult(I iface, setImageVersionExpiry_args args) throws org.apache.thrift.TException {
setImageVersionExpiry_result result = new setImageVersionExpiry_result();
try {
@@ -3992,14 +4422,22 @@ public class SatelliteServer {
super("getImageVersionVirtConfig");
}
+ @Override
public getImageVersionVirtConfig_args getEmptyArgsInstance() {
return new getImageVersionVirtConfig_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getImageVersionVirtConfig_result getResult(I iface, getImageVersionVirtConfig_args args) throws org.apache.thrift.TException {
getImageVersionVirtConfig_result result = new getImageVersionVirtConfig_result();
try {
@@ -4020,14 +4458,22 @@ public class SatelliteServer {
super("setImageVersionVirtConfig");
}
+ @Override
public setImageVersionVirtConfig_args getEmptyArgsInstance() {
return new setImageVersionVirtConfig_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public setImageVersionVirtConfig_result getResult(I iface, setImageVersionVirtConfig_args args) throws org.apache.thrift.TException {
setImageVersionVirtConfig_result result = new setImageVersionVirtConfig_result();
try {
@@ -4048,14 +4494,22 @@ public class SatelliteServer {
super("requestImageReplication");
}
+ @Override
public requestImageReplication_args getEmptyArgsInstance() {
return new requestImageReplication_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public requestImageReplication_result getResult(I iface, requestImageReplication_args args) throws org.apache.thrift.TException {
requestImageReplication_result result = new requestImageReplication_result();
try {
@@ -4076,14 +4530,22 @@ public class SatelliteServer {
super("publishImageVersion");
}
+ @Override
public publishImageVersion_args getEmptyArgsInstance() {
return new publishImageVersion_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public publishImageVersion_result getResult(I iface, publishImageVersion_args args) throws org.apache.thrift.TException {
publishImageVersion_result result = new publishImageVersion_result();
try {
@@ -4106,14 +4568,22 @@ public class SatelliteServer {
super("createLecture");
}
+ @Override
public createLecture_args getEmptyArgsInstance() {
return new createLecture_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public createLecture_result getResult(I iface, createLecture_args args) throws org.apache.thrift.TException {
createLecture_result result = new createLecture_result();
try {
@@ -4136,14 +4606,22 @@ public class SatelliteServer {
super("updateLecture");
}
+ @Override
public updateLecture_args getEmptyArgsInstance() {
return new updateLecture_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public updateLecture_result getResult(I iface, updateLecture_args args) throws org.apache.thrift.TException {
updateLecture_result result = new updateLecture_result();
try {
@@ -4166,14 +4644,22 @@ public class SatelliteServer {
super("getLectureList");
}
+ @Override
public getLectureList_args getEmptyArgsInstance() {
return new getLectureList_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getLectureList_result getResult(I iface, getLectureList_args args) throws org.apache.thrift.TException {
getLectureList_result result = new getLectureList_result();
try {
@@ -4192,14 +4678,22 @@ public class SatelliteServer {
super("getLectureDetails");
}
+ @Override
public getLectureDetails_args getEmptyArgsInstance() {
return new getLectureDetails_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getLectureDetails_result getResult(I iface, getLectureDetails_args args) throws org.apache.thrift.TException {
getLectureDetails_result result = new getLectureDetails_result();
try {
@@ -4220,14 +4714,22 @@ public class SatelliteServer {
super("deleteLecture");
}
+ @Override
public deleteLecture_args getEmptyArgsInstance() {
return new deleteLecture_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public deleteLecture_result getResult(I iface, deleteLecture_args args) throws org.apache.thrift.TException {
deleteLecture_result result = new deleteLecture_result();
try {
@@ -4248,14 +4750,22 @@ public class SatelliteServer {
super("writeLecturePermissions");
}
+ @Override
public writeLecturePermissions_args getEmptyArgsInstance() {
return new writeLecturePermissions_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public writeLecturePermissions_result getResult(I iface, writeLecturePermissions_args args) throws org.apache.thrift.TException {
writeLecturePermissions_result result = new writeLecturePermissions_result();
try {
@@ -4276,14 +4786,22 @@ public class SatelliteServer {
super("getLecturePermissions");
}
+ @Override
public getLecturePermissions_args getEmptyArgsInstance() {
return new getLecturePermissions_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getLecturePermissions_result getResult(I iface, getLecturePermissions_args args) throws org.apache.thrift.TException {
getLecturePermissions_result result = new getLecturePermissions_result();
try {
@@ -4304,14 +4822,22 @@ public class SatelliteServer {
super("setLectureOwner");
}
+ @Override
public setLectureOwner_args getEmptyArgsInstance() {
return new setLectureOwner_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public setLectureOwner_result getResult(I iface, setLectureOwner_args args) throws org.apache.thrift.TException {
setLectureOwner_result result = new setLectureOwner_result();
try {
@@ -4332,14 +4858,22 @@ public class SatelliteServer {
super("getPredefinedData");
}
+ @Override
public getPredefinedData_args getEmptyArgsInstance() {
return new getPredefinedData_args();
}
+ @Override
protected boolean isOneway() {
return false;
}
+ @Override
+ protected boolean rethrowUnhandledExceptions() {
+ return false;
+ }
+
+ @Override
public getPredefinedData_result getResult(I iface, getPredefinedData_args args) throws org.apache.thrift.TException {
getPredefinedData_result result = new getPredefinedData_result();
try {
@@ -4356,16 +4890,16 @@ public class SatelliteServer {
}
public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
- private static final Logger LOGGER = LoggerFactory.getLogger(AsyncProcessor.class.getName());
+ private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
public AsyncProcessor(I iface) {
- super(iface, getProcessMap(new HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+ super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
}
- protected AsyncProcessor(I iface, Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ protected AsyncProcessor(I iface, java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
super(iface, getProcessMap(processMap));
}
- private static <I extends AsyncIface> Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(Map<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
+ private static <I extends AsyncIface> java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>> processMap) {
processMap.put("getVersion", new getVersion());
processMap.put("getSupportedFeatures", new getSupportedFeatures());
processMap.put("getConfiguration", new getConfiguration());
@@ -4414,105 +4948,137 @@ public class SatelliteServer {
return processMap;
}
- public static class getVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getVersion_args, Long> {
+ public static class getVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getVersion_args, java.lang.Long> {
public getVersion() {
super("getVersion");
}
+ @Override
public getVersion_args getEmptyArgsInstance() {
return new getVersion_args();
}
- public AsyncMethodCallback<Long> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Long>() {
- public void onComplete(Long o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Long>() {
+ @Override
+ public void onComplete(java.lang.Long o) {
getVersion_result result = new getVersion_result();
result.success = o;
result.setSuccessIsSet(true);
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getVersion_result result = new getVersion_result();
- {
+ if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getVersion_args args, org.apache.thrift.async.AsyncMethodCallback<Long> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getVersion_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Long> resultHandler) throws org.apache.thrift.TException {
iface.getVersion(args.clientVersion,resultHandler);
}
}
- public static class getSupportedFeatures<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getSupportedFeatures_args, String> {
+ public static class getSupportedFeatures<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getSupportedFeatures_args, java.lang.String> {
public getSupportedFeatures() {
super("getSupportedFeatures");
}
+ @Override
public getSupportedFeatures_args getEmptyArgsInstance() {
return new getSupportedFeatures_args();
}
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() {
+ @Override
+ public void onComplete(java.lang.String o) {
getSupportedFeatures_result result = new getSupportedFeatures_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getSupportedFeatures_result result = new getSupportedFeatures_result();
- {
+ if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getSupportedFeatures_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getSupportedFeatures_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
iface.getSupportedFeatures(resultHandler);
}
}
@@ -4522,48 +5088,64 @@ public class SatelliteServer {
super("getConfiguration");
}
+ @Override
public getConfiguration_args getEmptyArgsInstance() {
return new getConfiguration_args();
}
- public AsyncMethodCallback<SatelliteConfig> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<SatelliteConfig> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<SatelliteConfig>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<SatelliteConfig>() {
+ @Override
public void onComplete(SatelliteConfig o) {
getConfiguration_result result = new getConfiguration_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getConfiguration_result result = new getConfiguration_result();
- {
+ if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getConfiguration_args args, org.apache.thrift.async.AsyncMethodCallback<SatelliteConfig> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getConfiguration_args args, org.apache.thrift.async.AsyncMethodCallback<SatelliteConfig> resultHandler) throws org.apache.thrift.TException {
iface.getConfiguration(resultHandler);
}
}
@@ -4573,69 +5155,80 @@ public class SatelliteServer {
super("requestImageVersionUpload");
}
+ @Override
public requestImageVersionUpload_args getEmptyArgsInstance() {
return new requestImageVersionUpload_args();
}
- public AsyncMethodCallback<TransferInformation> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<TransferInformation> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<TransferInformation>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<TransferInformation>() {
+ @Override
public void onComplete(TransferInformation o) {
requestImageVersionUpload_result result = new requestImageVersionUpload_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
requestImageVersionUpload_result result = new requestImageVersionUpload_result();
if (e instanceof TTransferRejectedException) {
- result.rejection = (TTransferRejectedException) e;
- result.setRejectionIsSet(true);
- msg = result;
- }
- else if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.ffff = (TInvocationException) e;
- result.setFfffIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.sdf = (TNotFoundException) e;
- result.setSdfIsSet(true);
- msg = result;
- }
- else
- {
+ result.rejection = (TTransferRejectedException) e;
+ result.setRejectionIsSet(true);
+ msg = result;
+ } else if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.ffff = (TInvocationException) e;
+ result.setFfffIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.sdf = (TNotFoundException) e;
+ result.setSdfIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, requestImageVersionUpload_args args, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws TException {
+ @Override
+ public void start(I iface, requestImageVersionUpload_args args, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws org.apache.thrift.TException {
iface.requestImageVersionUpload(args.userToken, args.imageBaseId, args.fileSize, args.blockHashes, args.machineDescription,resultHandler);
}
}
@@ -4645,53 +5238,67 @@ public class SatelliteServer {
super("updateBlockHashes");
}
+ @Override
public updateBlockHashes_args getEmptyArgsInstance() {
return new updateBlockHashes_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
updateBlockHashes_result result = new updateBlockHashes_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
updateBlockHashes_result result = new updateBlockHashes_result();
if (e instanceof TInvalidTokenException) {
- result.ex1 = (TInvalidTokenException) e;
- result.setEx1IsSet(true);
- msg = result;
- }
- else
- {
+ result.ex1 = (TInvalidTokenException) e;
+ result.setEx1IsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, updateBlockHashes_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, updateBlockHashes_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.updateBlockHashes(args.uploadToken, args.blockHashes, args.userToken,resultHandler);
}
}
@@ -4701,59 +5308,72 @@ public class SatelliteServer {
super("setUploadOptions");
}
+ @Override
public setUploadOptions_args getEmptyArgsInstance() {
return new setUploadOptions_args();
}
- public AsyncMethodCallback<UploadOptions> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<UploadOptions> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<UploadOptions>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<UploadOptions>() {
+ @Override
public void onComplete(UploadOptions o) {
setUploadOptions_result result = new setUploadOptions_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
setUploadOptions_result result = new setUploadOptions_result();
if (e instanceof TAuthorizationException) {
- result.frootloops = (TAuthorizationException) e;
- result.setFrootloopsIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvalidTokenException) {
- result.imcyborgbutthatsok = (TInvalidTokenException) e;
- result.setImcyborgbutthatsokIsSet(true);
- msg = result;
- }
- else
- {
+ result.frootloops = (TAuthorizationException) e;
+ result.setFrootloopsIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvalidTokenException) {
+ result.imcyborgbutthatsok = (TInvalidTokenException) e;
+ result.setImcyborgbutthatsokIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, setUploadOptions_args args, org.apache.thrift.async.AsyncMethodCallback<UploadOptions> resultHandler) throws TException {
+ @Override
+ public void start(I iface, setUploadOptions_args args, org.apache.thrift.async.AsyncMethodCallback<UploadOptions> resultHandler) throws org.apache.thrift.TException {
iface.setUploadOptions(args.userToken, args.uploadToken, args.options,resultHandler);
}
}
@@ -4763,53 +5383,67 @@ public class SatelliteServer {
super("cancelUpload");
}
+ @Override
public cancelUpload_args getEmptyArgsInstance() {
return new cancelUpload_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
cancelUpload_result result = new cancelUpload_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
cancelUpload_result result = new cancelUpload_result();
if (e instanceof TInvalidTokenException) {
- result.ex1 = (TInvalidTokenException) e;
- result.setEx1IsSet(true);
- msg = result;
- }
- else
- {
+ result.ex1 = (TInvalidTokenException) e;
+ result.setEx1IsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, cancelUpload_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, cancelUpload_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.cancelUpload(args.uploadToken,resultHandler);
}
}
@@ -4819,54 +5453,68 @@ public class SatelliteServer {
super("queryUploadStatus");
}
+ @Override
public queryUploadStatus_args getEmptyArgsInstance() {
return new queryUploadStatus_args();
}
- public AsyncMethodCallback<TransferStatus> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<TransferStatus> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<TransferStatus>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<TransferStatus>() {
+ @Override
public void onComplete(TransferStatus o) {
queryUploadStatus_result result = new queryUploadStatus_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
queryUploadStatus_result result = new queryUploadStatus_result();
if (e instanceof TInvalidTokenException) {
- result.ex1 = (TInvalidTokenException) e;
- result.setEx1IsSet(true);
- msg = result;
- }
- else
- {
+ result.ex1 = (TInvalidTokenException) e;
+ result.setEx1IsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, queryUploadStatus_args args, org.apache.thrift.async.AsyncMethodCallback<TransferStatus> resultHandler) throws TException {
+ @Override
+ public void start(I iface, queryUploadStatus_args args, org.apache.thrift.async.AsyncMethodCallback<TransferStatus> resultHandler) throws org.apache.thrift.TException {
iface.queryUploadStatus(args.uploadToken,resultHandler);
}
}
@@ -4876,69 +5524,80 @@ public class SatelliteServer {
super("requestDownload");
}
+ @Override
public requestDownload_args getEmptyArgsInstance() {
return new requestDownload_args();
}
- public AsyncMethodCallback<TransferInformation> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<TransferInformation> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<TransferInformation>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<TransferInformation>() {
+ @Override
public void onComplete(TransferInformation o) {
requestDownload_result result = new requestDownload_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
requestDownload_result result = new requestDownload_result();
if (e instanceof TTransferRejectedException) {
- result.rejection = (TTransferRejectedException) e;
- result.setRejectionIsSet(true);
- msg = result;
- }
- else if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.ffff = (TInvocationException) e;
- result.setFfffIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.sdf = (TNotFoundException) e;
- result.setSdfIsSet(true);
- msg = result;
- }
- else
- {
+ result.rejection = (TTransferRejectedException) e;
+ result.setRejectionIsSet(true);
+ msg = result;
+ } else if (e instanceof TAuthorizationException) {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.ffff = (TInvocationException) e;
+ result.setFfffIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.sdf = (TNotFoundException) e;
+ result.setSdfIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, requestDownload_args args, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws TException {
+ @Override
+ public void start(I iface, requestDownload_args args, org.apache.thrift.async.AsyncMethodCallback<TransferInformation> resultHandler) throws org.apache.thrift.TException {
iface.requestDownload(args.userToken, args.imageVersionId,resultHandler);
}
}
@@ -4948,53 +5607,67 @@ public class SatelliteServer {
super("cancelDownload");
}
+ @Override
public cancelDownload_args getEmptyArgsInstance() {
return new cancelDownload_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
cancelDownload_result result = new cancelDownload_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
cancelDownload_result result = new cancelDownload_result();
if (e instanceof TInvalidTokenException) {
- result.ex1 = (TInvalidTokenException) e;
- result.setEx1IsSet(true);
- msg = result;
- }
- else
- {
+ result.ex1 = (TInvalidTokenException) e;
+ result.setEx1IsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, cancelDownload_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, cancelDownload_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.cancelDownload(args.downloadToken,resultHandler);
}
}
@@ -5004,58 +5677,71 @@ public class SatelliteServer {
super("isAuthenticated");
}
+ @Override
public isAuthenticated_args getEmptyArgsInstance() {
return new isAuthenticated_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
isAuthenticated_result result = new isAuthenticated_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
isAuthenticated_result result = new isAuthenticated_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, isAuthenticated_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, isAuthenticated_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.isAuthenticated(args.userToken,resultHandler);
}
}
@@ -5065,59 +5751,72 @@ public class SatelliteServer {
super("whoami");
}
+ @Override
public whoami_args getEmptyArgsInstance() {
return new whoami_args();
}
- public AsyncMethodCallback<WhoamiInfo> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<WhoamiInfo> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<WhoamiInfo>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<WhoamiInfo>() {
+ @Override
public void onComplete(WhoamiInfo o) {
whoami_result result = new whoami_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
whoami_result result = new whoami_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, whoami_args args, org.apache.thrift.async.AsyncMethodCallback<WhoamiInfo> resultHandler) throws TException {
+ @Override
+ public void start(I iface, whoami_args args, org.apache.thrift.async.AsyncMethodCallback<WhoamiInfo> resultHandler) throws org.apache.thrift.TException {
iface.whoami(args.userToken,resultHandler);
}
}
@@ -5127,115 +5826,142 @@ public class SatelliteServer {
super("invalidateSession");
}
+ @Override
public invalidateSession_args getEmptyArgsInstance() {
return new invalidateSession_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
invalidateSession_result result = new invalidateSession_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
invalidateSession_result result = new invalidateSession_result();
if (e instanceof TInvalidTokenException) {
- result.ex = (TInvalidTokenException) e;
- result.setExIsSet(true);
- msg = result;
- }
- else
- {
+ result.ex = (TInvalidTokenException) e;
+ result.setExIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, invalidateSession_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, invalidateSession_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.invalidateSession(args.userToken,resultHandler);
}
}
- public static class getUserList<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserList_args, List<UserInfo>> {
+ public static class getUserList<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUserList_args, java.util.List<UserInfo>> {
public getUserList() {
super("getUserList");
}
+ @Override
public getUserList_args getEmptyArgsInstance() {
return new getUserList_args();
}
- public AsyncMethodCallback<List<UserInfo>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.util.List<UserInfo>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<UserInfo>>() {
- public void onComplete(List<UserInfo> o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<UserInfo>>() {
+ @Override
+ public void onComplete(java.util.List<UserInfo> o) {
getUserList_result result = new getUserList_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getUserList_result result = new getUserList_result();
if (e instanceof TAuthorizationException) {
- result.failure = (TAuthorizationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.failure = (TAuthorizationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getUserList_args args, org.apache.thrift.async.AsyncMethodCallback<List<UserInfo>> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getUserList_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<UserInfo>> resultHandler) throws org.apache.thrift.TException {
iface.getUserList(args.userToken, args.page,resultHandler);
}
}
@@ -5245,59 +5971,72 @@ public class SatelliteServer {
super("getUserConfig");
}
+ @Override
public getUserConfig_args getEmptyArgsInstance() {
return new getUserConfig_args();
}
- public AsyncMethodCallback<SatelliteUserConfig> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<SatelliteUserConfig> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<SatelliteUserConfig>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<SatelliteUserConfig>() {
+ @Override
public void onComplete(SatelliteUserConfig o) {
getUserConfig_result result = new getUserConfig_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getUserConfig_result result = new getUserConfig_result();
if (e instanceof TAuthorizationException) {
- result.failure = (TAuthorizationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.failure = (TAuthorizationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getUserConfig_args args, org.apache.thrift.async.AsyncMethodCallback<SatelliteUserConfig> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getUserConfig_args args, org.apache.thrift.async.AsyncMethodCallback<SatelliteUserConfig> resultHandler) throws org.apache.thrift.TException {
iface.getUserConfig(args.userToken,resultHandler);
}
}
@@ -5307,262 +6046,339 @@ public class SatelliteServer {
super("setUserConfig");
}
+ @Override
public setUserConfig_args getEmptyArgsInstance() {
return new setUserConfig_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
setUserConfig_result result = new setUserConfig_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
setUserConfig_result result = new setUserConfig_result();
if (e instanceof TAuthorizationException) {
- result.failure = (TAuthorizationException) e;
- result.setFailureIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.failure = (TAuthorizationException) e;
+ result.setFailureIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, setUserConfig_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, setUserConfig_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.setUserConfig(args.userToken, args.config,resultHandler);
}
}
- public static class getOperatingSystems<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getOperatingSystems_args, List<OperatingSystem>> {
+ public static class getOperatingSystems<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getOperatingSystems_args, java.util.List<OperatingSystem>> {
public getOperatingSystems() {
super("getOperatingSystems");
}
+ @Override
public getOperatingSystems_args getEmptyArgsInstance() {
return new getOperatingSystems_args();
}
- public AsyncMethodCallback<List<OperatingSystem>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.util.List<OperatingSystem>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<OperatingSystem>>() {
- public void onComplete(List<OperatingSystem> o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<OperatingSystem>>() {
+ @Override
+ public void onComplete(java.util.List<OperatingSystem> o) {
getOperatingSystems_result result = new getOperatingSystems_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getOperatingSystems_result result = new getOperatingSystems_result();
- {
+ if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getOperatingSystems_args args, org.apache.thrift.async.AsyncMethodCallback<List<OperatingSystem>> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getOperatingSystems_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<OperatingSystem>> resultHandler) throws org.apache.thrift.TException {
iface.getOperatingSystems(resultHandler);
}
}
- public static class getVirtualizers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getVirtualizers_args, List<Virtualizer>> {
+ public static class getVirtualizers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getVirtualizers_args, java.util.List<Virtualizer>> {
public getVirtualizers() {
super("getVirtualizers");
}
+ @Override
public getVirtualizers_args getEmptyArgsInstance() {
return new getVirtualizers_args();
}
- public AsyncMethodCallback<List<Virtualizer>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.util.List<Virtualizer>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<Virtualizer>>() {
- public void onComplete(List<Virtualizer> o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<Virtualizer>>() {
+ @Override
+ public void onComplete(java.util.List<Virtualizer> o) {
getVirtualizers_result result = new getVirtualizers_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getVirtualizers_result result = new getVirtualizers_result();
- {
+ if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getVirtualizers_args args, org.apache.thrift.async.AsyncMethodCallback<List<Virtualizer>> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getVirtualizers_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<Virtualizer>> resultHandler) throws org.apache.thrift.TException {
iface.getVirtualizers(resultHandler);
}
}
- public static class getAllOrganizations<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllOrganizations_args, List<Organization>> {
+ public static class getAllOrganizations<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAllOrganizations_args, java.util.List<Organization>> {
public getAllOrganizations() {
super("getAllOrganizations");
}
+ @Override
public getAllOrganizations_args getEmptyArgsInstance() {
return new getAllOrganizations_args();
}
- public AsyncMethodCallback<List<Organization>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.util.List<Organization>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<Organization>>() {
- public void onComplete(List<Organization> o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<Organization>>() {
+ @Override
+ public void onComplete(java.util.List<Organization> o) {
getAllOrganizations_result result = new getAllOrganizations_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getAllOrganizations_result result = new getAllOrganizations_result();
- {
+ if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getAllOrganizations_args args, org.apache.thrift.async.AsyncMethodCallback<List<Organization>> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getAllOrganizations_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<Organization>> resultHandler) throws org.apache.thrift.TException {
iface.getAllOrganizations(resultHandler);
}
}
- public static class getLocations<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLocations_args, List<Location>> {
+ public static class getLocations<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLocations_args, java.util.List<Location>> {
public getLocations() {
super("getLocations");
}
+ @Override
public getLocations_args getEmptyArgsInstance() {
return new getLocations_args();
}
- public AsyncMethodCallback<List<Location>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.util.List<Location>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<Location>>() {
- public void onComplete(List<Location> o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<Location>>() {
+ @Override
+ public void onComplete(java.util.List<Location> o) {
getLocations_result result = new getLocations_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getLocations_result result = new getLocations_result();
- {
+ if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getLocations_args args, org.apache.thrift.async.AsyncMethodCallback<List<Location>> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getLocations_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<Location>> resultHandler) throws org.apache.thrift.TException {
iface.getLocations(resultHandler);
}
}
@@ -5572,110 +6388,139 @@ public class SatelliteServer {
super("getStatus");
}
+ @Override
public getStatus_args getEmptyArgsInstance() {
return new getStatus_args();
}
- public AsyncMethodCallback<SatelliteStatus> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<SatelliteStatus> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<SatelliteStatus>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<SatelliteStatus>() {
+ @Override
public void onComplete(SatelliteStatus o) {
getStatus_result result = new getStatus_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getStatus_result result = new getStatus_result();
- {
+ if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getStatus_args args, org.apache.thrift.async.AsyncMethodCallback<SatelliteStatus> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getStatus_args args, org.apache.thrift.async.AsyncMethodCallback<SatelliteStatus> resultHandler) throws org.apache.thrift.TException {
iface.getStatus(resultHandler);
}
}
- public static class getImageList<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageList_args, List<ImageSummaryRead>> {
+ public static class getImageList<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageList_args, java.util.List<ImageSummaryRead>> {
public getImageList() {
super("getImageList");
}
+ @Override
public getImageList_args getEmptyArgsInstance() {
return new getImageList_args();
}
- public AsyncMethodCallback<List<ImageSummaryRead>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.util.List<ImageSummaryRead>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<ImageSummaryRead>>() {
- public void onComplete(List<ImageSummaryRead> o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<ImageSummaryRead>>() {
+ @Override
+ public void onComplete(java.util.List<ImageSummaryRead> o) {
getImageList_result result = new getImageList_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getImageList_result result = new getImageList_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getImageList_args args, org.apache.thrift.async.AsyncMethodCallback<List<ImageSummaryRead>> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getImageList_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<ImageSummaryRead>> resultHandler) throws org.apache.thrift.TException {
iface.getImageList(args.userToken, args.tagSearch, args.page,resultHandler);
}
}
@@ -5685,126 +6530,151 @@ public class SatelliteServer {
super("getImageDetails");
}
+ @Override
public getImageDetails_args getEmptyArgsInstance() {
return new getImageDetails_args();
}
- public AsyncMethodCallback<ImageDetailsRead> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<ImageDetailsRead> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<ImageDetailsRead>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<ImageDetailsRead>() {
+ @Override
public void onComplete(ImageDetailsRead o) {
getImageDetails_result result = new getImageDetails_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getImageDetails_result result = new getImageDetails_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getImageDetails_args args, org.apache.thrift.async.AsyncMethodCallback<ImageDetailsRead> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getImageDetails_args args, org.apache.thrift.async.AsyncMethodCallback<ImageDetailsRead> resultHandler) throws org.apache.thrift.TException {
iface.getImageDetails(args.userToken, args.imageBaseId,resultHandler);
}
}
- public static class createImage<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createImage_args, String> {
+ public static class createImage<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createImage_args, java.lang.String> {
public createImage() {
super("createImage");
}
+ @Override
public createImage_args getEmptyArgsInstance() {
return new createImage_args();
}
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() {
+ @Override
+ public void onComplete(java.lang.String o) {
createImage_result result = new createImage_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
createImage_result result = new createImage_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.error = (TInvocationException) e;
- result.setErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.error = (TInvocationException) e;
+ result.setErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, createImage_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ @Override
+ public void start(I iface, createImage_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
iface.createImage(args.userToken, args.imageName,resultHandler);
}
}
@@ -5814,63 +6684,75 @@ public class SatelliteServer {
super("updateImageBase");
}
+ @Override
public updateImageBase_args getEmptyArgsInstance() {
return new updateImageBase_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
updateImageBase_result result = new updateImageBase_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
updateImageBase_result result = new updateImageBase_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.imgError = (TInvocationException) e;
- result.setImgErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.imgError = (TInvocationException) e;
+ result.setImgErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, updateImageBase_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, updateImageBase_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.updateImageBase(args.userToken, args.imageBaseId, args.image,resultHandler);
}
}
@@ -5880,63 +6762,75 @@ public class SatelliteServer {
super("updateImageVersion");
}
+ @Override
public updateImageVersion_args getEmptyArgsInstance() {
return new updateImageVersion_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
updateImageVersion_result result = new updateImageVersion_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
updateImageVersion_result result = new updateImageVersion_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.imgError = (TInvocationException) e;
- result.setImgErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.imgError = (TInvocationException) e;
+ result.setImgErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, updateImageVersion_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, updateImageVersion_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.updateImageVersion(args.userToken, args.imageVersionId, args.image,resultHandler);
}
}
@@ -5946,63 +6840,75 @@ public class SatelliteServer {
super("deleteImageVersion");
}
+ @Override
public deleteImageVersion_args getEmptyArgsInstance() {
return new deleteImageVersion_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
deleteImageVersion_result result = new deleteImageVersion_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
deleteImageVersion_result result = new deleteImageVersion_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, deleteImageVersion_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, deleteImageVersion_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.deleteImageVersion(args.userToken, args.imageVersionId,resultHandler);
}
}
@@ -6012,63 +6918,75 @@ public class SatelliteServer {
super("deleteImageBase");
}
+ @Override
public deleteImageBase_args getEmptyArgsInstance() {
return new deleteImageBase_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
deleteImageBase_result result = new deleteImageBase_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
deleteImageBase_result result = new deleteImageBase_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, deleteImageBase_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, deleteImageBase_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.deleteImageBase(args.userToken, args.imageBaseId,resultHandler);
}
}
@@ -6078,130 +6996,154 @@ public class SatelliteServer {
super("writeImagePermissions");
}
+ @Override
public writeImagePermissions_args getEmptyArgsInstance() {
return new writeImagePermissions_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
writeImagePermissions_result result = new writeImagePermissions_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
writeImagePermissions_result result = new writeImagePermissions_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, writeImagePermissions_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, writeImagePermissions_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.writeImagePermissions(args.userToken, args.imageBaseId, args.permissions,resultHandler);
}
}
- public static class getImagePermissions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImagePermissions_args, Map<String,ImagePermissions>> {
+ public static class getImagePermissions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImagePermissions_args, java.util.Map<java.lang.String,ImagePermissions>> {
public getImagePermissions() {
super("getImagePermissions");
}
+ @Override
public getImagePermissions_args getEmptyArgsInstance() {
return new getImagePermissions_args();
}
- public AsyncMethodCallback<Map<String,ImagePermissions>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,ImagePermissions>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Map<String,ImagePermissions>>() {
- public void onComplete(Map<String,ImagePermissions> o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,ImagePermissions>>() {
+ @Override
+ public void onComplete(java.util.Map<java.lang.String,ImagePermissions> o) {
getImagePermissions_result result = new getImagePermissions_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getImagePermissions_result result = new getImagePermissions_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getImagePermissions_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,ImagePermissions>> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getImagePermissions_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,ImagePermissions>> resultHandler) throws org.apache.thrift.TException {
iface.getImagePermissions(args.userToken, args.imageBaseId,resultHandler);
}
}
@@ -6211,63 +7153,75 @@ public class SatelliteServer {
super("setImageOwner");
}
+ @Override
public setImageOwner_args getEmptyArgsInstance() {
return new setImageOwner_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
setImageOwner_result result = new setImageOwner_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
setImageOwner_result result = new setImageOwner_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, setImageOwner_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, setImageOwner_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.setImageOwner(args.userToken, args.imageBaseId, args.newOwnerId,resultHandler);
}
}
@@ -6277,135 +7231,158 @@ public class SatelliteServer {
super("setImageVersionExpiry");
}
+ @Override
public setImageVersionExpiry_args getEmptyArgsInstance() {
return new setImageVersionExpiry_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
setImageVersionExpiry_result result = new setImageVersionExpiry_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
setImageVersionExpiry_result result = new setImageVersionExpiry_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvalidDateParam) {
- result.dateError = (TInvalidDateParam) e;
- result.setDateErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvalidDateParam) {
+ result.dateError = (TInvalidDateParam) e;
+ result.setDateErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, setImageVersionExpiry_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, setImageVersionExpiry_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.setImageVersionExpiry(args.userToken, args.imageBaseId, args.expireTime,resultHandler);
}
}
- public static class getImageVersionVirtConfig<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageVersionVirtConfig_args, ByteBuffer> {
+ public static class getImageVersionVirtConfig<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getImageVersionVirtConfig_args, java.nio.ByteBuffer> {
public getImageVersionVirtConfig() {
super("getImageVersionVirtConfig");
}
+ @Override
public getImageVersionVirtConfig_args getEmptyArgsInstance() {
return new getImageVersionVirtConfig_args();
}
- public AsyncMethodCallback<ByteBuffer> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<ByteBuffer>() {
- public void onComplete(ByteBuffer o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer>() {
+ @Override
+ public void onComplete(java.nio.ByteBuffer o) {
getImageVersionVirtConfig_result result = new getImageVersionVirtConfig_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getImageVersionVirtConfig_result result = new getImageVersionVirtConfig_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getImageVersionVirtConfig_args args, org.apache.thrift.async.AsyncMethodCallback<ByteBuffer> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getImageVersionVirtConfig_args args, org.apache.thrift.async.AsyncMethodCallback<java.nio.ByteBuffer> resultHandler) throws org.apache.thrift.TException {
iface.getImageVersionVirtConfig(args.userToken, args.imageVersionId,resultHandler);
}
}
@@ -6415,274 +7392,320 @@ public class SatelliteServer {
super("setImageVersionVirtConfig");
}
+ @Override
public setImageVersionVirtConfig_args getEmptyArgsInstance() {
return new setImageVersionVirtConfig_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
setImageVersionVirtConfig_result result = new setImageVersionVirtConfig_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
setImageVersionVirtConfig_result result = new setImageVersionVirtConfig_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, setImageVersionVirtConfig_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, setImageVersionVirtConfig_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.setImageVersionVirtConfig(args.userToken, args.imageVersionId, args.meta,resultHandler);
}
}
- public static class requestImageReplication<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, requestImageReplication_args, String> {
+ public static class requestImageReplication<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, requestImageReplication_args, java.lang.String> {
public requestImageReplication() {
super("requestImageReplication");
}
+ @Override
public requestImageReplication_args getEmptyArgsInstance() {
return new requestImageReplication_args();
}
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() {
+ @Override
+ public void onComplete(java.lang.String o) {
requestImageReplication_result result = new requestImageReplication_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
requestImageReplication_result result = new requestImageReplication_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, requestImageReplication_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ @Override
+ public void start(I iface, requestImageReplication_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
iface.requestImageReplication(args.userToken, args.imageVersionId,resultHandler);
}
}
- public static class publishImageVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, publishImageVersion_args, String> {
+ public static class publishImageVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, publishImageVersion_args, java.lang.String> {
public publishImageVersion() {
super("publishImageVersion");
}
+ @Override
public publishImageVersion_args getEmptyArgsInstance() {
return new publishImageVersion_args();
}
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() {
+ @Override
+ public void onComplete(java.lang.String o) {
publishImageVersion_result result = new publishImageVersion_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
publishImageVersion_result result = new publishImageVersion_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TTransferRejectedException) {
- result.tre = (TTransferRejectedException) e;
- result.setTreIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TTransferRejectedException) {
+ result.tre = (TTransferRejectedException) e;
+ result.setTreIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, publishImageVersion_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ @Override
+ public void start(I iface, publishImageVersion_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
iface.publishImageVersion(args.userToken, args.imageVersionId,resultHandler);
}
}
- public static class createLecture<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createLecture_args, String> {
+ public static class createLecture<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, createLecture_args, java.lang.String> {
public createLecture() {
super("createLecture");
}
+ @Override
public createLecture_args getEmptyArgsInstance() {
return new createLecture_args();
}
- public AsyncMethodCallback<String> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<String>() {
- public void onComplete(String o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() {
+ @Override
+ public void onComplete(java.lang.String o) {
createLecture_result result = new createLecture_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
createLecture_result result = new createLecture_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvalidDateParam) {
- result.dateError = (TInvalidDateParam) e;
- result.setDateErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvalidDateParam) {
+ result.dateError = (TInvalidDateParam) e;
+ result.setDateErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, createLecture_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws TException {
+ @Override
+ public void start(I iface, createLecture_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
iface.createLecture(args.userToken, args.lecture,resultHandler);
}
}
@@ -6692,130 +7715,154 @@ public class SatelliteServer {
super("updateLecture");
}
+ @Override
public updateLecture_args getEmptyArgsInstance() {
return new updateLecture_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
updateLecture_result result = new updateLecture_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
updateLecture_result result = new updateLecture_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvalidDateParam) {
- result.dateError = (TInvalidDateParam) e;
- result.setDateErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvalidDateParam) {
+ result.dateError = (TInvalidDateParam) e;
+ result.setDateErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, updateLecture_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, updateLecture_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.updateLecture(args.userToken, args.lectureId, args.lecture,resultHandler);
}
}
- public static class getLectureList<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLectureList_args, List<LectureSummary>> {
+ public static class getLectureList<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLectureList_args, java.util.List<LectureSummary>> {
public getLectureList() {
super("getLectureList");
}
+ @Override
public getLectureList_args getEmptyArgsInstance() {
return new getLectureList_args();
}
- public AsyncMethodCallback<List<LectureSummary>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.util.List<LectureSummary>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<List<LectureSummary>>() {
- public void onComplete(List<LectureSummary> o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<LectureSummary>>() {
+ @Override
+ public void onComplete(java.util.List<LectureSummary> o) {
getLectureList_result result = new getLectureList_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getLectureList_result result = new getLectureList_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getLectureList_args args, org.apache.thrift.async.AsyncMethodCallback<List<LectureSummary>> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getLectureList_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<LectureSummary>> resultHandler) throws org.apache.thrift.TException {
iface.getLectureList(args.userToken, args.page,resultHandler);
}
}
@@ -6825,64 +7872,76 @@ public class SatelliteServer {
super("getLectureDetails");
}
+ @Override
public getLectureDetails_args getEmptyArgsInstance() {
return new getLectureDetails_args();
}
- public AsyncMethodCallback<LectureRead> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<LectureRead> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<LectureRead>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<LectureRead>() {
+ @Override
public void onComplete(LectureRead o) {
getLectureDetails_result result = new getLectureDetails_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getLectureDetails_result result = new getLectureDetails_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getLectureDetails_args args, org.apache.thrift.async.AsyncMethodCallback<LectureRead> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getLectureDetails_args args, org.apache.thrift.async.AsyncMethodCallback<LectureRead> resultHandler) throws org.apache.thrift.TException {
iface.getLectureDetails(args.userToken, args.lectureId,resultHandler);
}
}
@@ -6892,63 +7951,75 @@ public class SatelliteServer {
super("deleteLecture");
}
+ @Override
public deleteLecture_args getEmptyArgsInstance() {
return new deleteLecture_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
deleteLecture_result result = new deleteLecture_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
deleteLecture_result result = new deleteLecture_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, deleteLecture_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, deleteLecture_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.deleteLecture(args.userToken, args.lectureId,resultHandler);
}
}
@@ -6958,130 +8029,154 @@ public class SatelliteServer {
super("writeLecturePermissions");
}
+ @Override
public writeLecturePermissions_args getEmptyArgsInstance() {
return new writeLecturePermissions_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
writeLecturePermissions_result result = new writeLecturePermissions_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
writeLecturePermissions_result result = new writeLecturePermissions_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, writeLecturePermissions_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, writeLecturePermissions_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.writeLecturePermissions(args.userToken, args.lectureId, args.permissions,resultHandler);
}
}
- public static class getLecturePermissions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLecturePermissions_args, Map<String,LecturePermissions>> {
+ public static class getLecturePermissions<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getLecturePermissions_args, java.util.Map<java.lang.String,LecturePermissions>> {
public getLecturePermissions() {
super("getLecturePermissions");
}
+ @Override
public getLecturePermissions_args getEmptyArgsInstance() {
return new getLecturePermissions_args();
}
- public AsyncMethodCallback<Map<String,LecturePermissions>> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,LecturePermissions>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Map<String,LecturePermissions>>() {
- public void onComplete(Map<String,LecturePermissions> o) {
+ return new org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,LecturePermissions>>() {
+ @Override
+ public void onComplete(java.util.Map<java.lang.String,LecturePermissions> o) {
getLecturePermissions_result result = new getLecturePermissions_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getLecturePermissions_result result = new getLecturePermissions_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getLecturePermissions_args args, org.apache.thrift.async.AsyncMethodCallback<Map<String,LecturePermissions>> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getLecturePermissions_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.Map<java.lang.String,LecturePermissions>> resultHandler) throws org.apache.thrift.TException {
iface.getLecturePermissions(args.userToken, args.lectureId,resultHandler);
}
}
@@ -7091,63 +8186,75 @@ public class SatelliteServer {
super("setLectureOwner");
}
+ @Override
public setLectureOwner_args getEmptyArgsInstance() {
return new setLectureOwner_args();
}
- public AsyncMethodCallback<Void> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<Void> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<Void>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<Void>() {
+ @Override
public void onComplete(Void o) {
setLectureOwner_result result = new setLectureOwner_result();
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
setLectureOwner_result result = new setLectureOwner_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TNotFoundException) {
- result.notFound = (TNotFoundException) e;
- result.setNotFoundIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TNotFoundException) {
+ result.notFound = (TNotFoundException) e;
+ result.setNotFoundIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, setLectureOwner_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws TException {
+ @Override
+ public void start(I iface, setLectureOwner_args args, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
iface.setLectureOwner(args.userToken, args.lectureId, args.newOwnerId,resultHandler);
}
}
@@ -7157,75 +8264,86 @@ public class SatelliteServer {
super("getPredefinedData");
}
+ @Override
public getPredefinedData_args getEmptyArgsInstance() {
return new getPredefinedData_args();
}
- public AsyncMethodCallback<PredefinedData> getResultHandler(final AsyncFrameBuffer fb, final int seqid) {
+ @Override
+ public org.apache.thrift.async.AsyncMethodCallback<PredefinedData> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
final org.apache.thrift.AsyncProcessFunction fcall = this;
- return new AsyncMethodCallback<PredefinedData>() {
+ return new org.apache.thrift.async.AsyncMethodCallback<PredefinedData>() {
+ @Override
public void onComplete(PredefinedData o) {
getPredefinedData_result result = new getPredefinedData_result();
result.success = o;
try {
- fcall.sendResponse(fb,result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
- return;
- } catch (Exception e) {
- LOGGER.error("Exception writing to internal frame buffer", e);
+ fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
+ } catch (org.apache.thrift.transport.TTransportException e) {
+ _LOGGER.error("TTransportException writing to internal frame buffer", e);
+ fb.close();
+ } catch (java.lang.Exception e) {
+ _LOGGER.error("Exception writing to internal frame buffer", e);
+ onError(e);
}
- fb.close();
}
- public void onError(Exception e) {
+ @Override
+ public void onError(java.lang.Exception e) {
byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
- org.apache.thrift.TBase msg;
+ org.apache.thrift.TSerializable msg;
getPredefinedData_result result = new getPredefinedData_result();
if (e instanceof TAuthorizationException) {
- result.authError = (TAuthorizationException) e;
- result.setAuthErrorIsSet(true);
- msg = result;
- }
- else if (e instanceof TInvocationException) {
- result.serverError = (TInvocationException) e;
- result.setServerErrorIsSet(true);
- msg = result;
- }
- else
- {
+ result.authError = (TAuthorizationException) e;
+ result.setAuthErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof TInvocationException) {
+ result.serverError = (TInvocationException) e;
+ result.setServerErrorIsSet(true);
+ msg = result;
+ } else if (e instanceof org.apache.thrift.transport.TTransportException) {
+ _LOGGER.error("TTransportException inside handler", e);
+ fb.close();
+ return;
+ } else if (e instanceof org.apache.thrift.TApplicationException) {
+ _LOGGER.error("TApplicationException inside handler", e);
msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
- msg = (org.apache.thrift.TBase)new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
+ msg = (org.apache.thrift.TApplicationException)e;
+ } else {
+ _LOGGER.error("Exception inside handler", e);
+ msgType = org.apache.thrift.protocol.TMessageType.EXCEPTION;
+ msg = new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.INTERNAL_ERROR, e.getMessage());
}
try {
fcall.sendResponse(fb,msg,msgType,seqid);
- return;
- } catch (Exception ex) {
- LOGGER.error("Exception writing to internal frame buffer", ex);
+ } catch (java.lang.Exception ex) {
+ _LOGGER.error("Exception writing to internal frame buffer", ex);
+ fb.close();
}
- fb.close();
}
};
}
+ @Override
protected boolean isOneway() {
return false;
}
- public void start(I iface, getPredefinedData_args args, org.apache.thrift.async.AsyncMethodCallback<PredefinedData> resultHandler) throws TException {
+ @Override
+ public void start(I iface, getPredefinedData_args args, org.apache.thrift.async.AsyncMethodCallback<PredefinedData> resultHandler) throws org.apache.thrift.TException {
iface.getPredefinedData(args.userToken,resultHandler);
}
}
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getVersion_args implements org.apache.thrift.TBase<getVersion_args, getVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<getVersion_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVersion_args");
private static final org.apache.thrift.protocol.TField CLIENT_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("clientVersion", org.apache.thrift.protocol.TType.I64, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getVersion_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getVersion_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getVersion_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getVersion_argsTupleSchemeFactory();
public long clientVersion; // required
@@ -7233,10 +8351,10 @@ public class SatelliteServer {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
CLIENT_VERSION((short)1, "clientVersion");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -7244,6 +8362,7 @@ public class SatelliteServer {
/**
* 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: // CLIENT_VERSION
@@ -7259,30 +8378,33 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -7290,12 +8412,12 @@ public class SatelliteServer {
// isset id assignments
private static final int __CLIENTVERSION_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.CLIENT_VERSION, new org.apache.thrift.meta_data.FieldMetaData("clientVersion", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVersion_args.class, metaDataMap);
}
@@ -7318,6 +8440,7 @@ public class SatelliteServer {
this.clientVersion = other.clientVersion;
}
+ @Override
public getVersion_args deepCopy() {
return new getVersion_args(this);
}
@@ -7339,57 +8462,59 @@ public class SatelliteServer {
}
public void unsetClientVersion() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CLIENTVERSION_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CLIENTVERSION_ISSET_ID);
}
/** Returns true if field clientVersion is set (has been assigned a value) and false otherwise */
public boolean isSetClientVersion() {
- return EncodingUtils.testBit(__isset_bitfield, __CLIENTVERSION_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CLIENTVERSION_ISSET_ID);
}
public void setClientVersionIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CLIENTVERSION_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CLIENTVERSION_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case CLIENT_VERSION:
if (value == null) {
unsetClientVersion();
} else {
- setClientVersion((Long)value);
+ setClientVersion((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case CLIENT_VERSION:
return getClientVersion();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case CLIENT_VERSION:
return isSetClientVersion();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getVersion_args)
return this.equals((getVersion_args)that);
return false;
@@ -7398,6 +8523,8 @@ public class SatelliteServer {
public boolean equals(getVersion_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_clientVersion = true;
boolean that_present_clientVersion = true;
@@ -7413,14 +8540,11 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_clientVersion = true;
- list.add(present_clientVersion);
- if (present_clientVersion)
- list.add(clientVersion);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(clientVersion);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -7431,7 +8555,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetClientVersion()).compareTo(other.isSetClientVersion());
+ lastComparison = java.lang.Boolean.compare(isSetClientVersion(), other.isSetClientVersion());
if (lastComparison != 0) {
return lastComparison;
}
@@ -7444,21 +8568,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getVersion_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getVersion_args(");
boolean first = true;
sb.append("clientVersion:");
@@ -7481,7 +8609,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -7491,14 +8619,16 @@ public class SatelliteServer {
}
}
- private static class getVersion_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getVersion_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getVersion_argsStandardScheme getScheme() {
return new getVersion_argsStandardScheme();
}
}
- private static class getVersion_argsStandardScheme extends StandardScheme<getVersion_args> {
+ private static class getVersion_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getVersion_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getVersion_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -7528,6 +8658,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getVersion_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -7541,18 +8672,19 @@ public class SatelliteServer {
}
- private static class getVersion_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getVersion_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getVersion_argsTupleScheme getScheme() {
return new getVersion_argsTupleScheme();
}
}
- private static class getVersion_argsTupleScheme extends TupleScheme<getVersion_args> {
+ private static class getVersion_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getVersion_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getVersion_args 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.isSetClientVersion()) {
optionals.set(0);
}
@@ -7564,8 +8696,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getVersion_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.clientVersion = iprot.readI64();
struct.setClientVersionIsSet(true);
@@ -7573,18 +8705,19 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getVersion_result implements org.apache.thrift.TBase<getVersion_result, getVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<getVersion_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVersion_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getVersion_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getVersion_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getVersion_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getVersion_resultTupleSchemeFactory();
public long success; // required
@@ -7592,10 +8725,10 @@ public class SatelliteServer {
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -7603,6 +8736,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -7618,30 +8752,33 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -7649,12 +8786,12 @@ public class SatelliteServer {
// isset id assignments
private static final int __SUCCESS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "int")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVersion_result.class, metaDataMap);
}
@@ -7677,6 +8814,7 @@ public class SatelliteServer {
this.success = other.success;
}
+ @Override
public getVersion_result deepCopy() {
return new getVersion_result(this);
}
@@ -7698,57 +8836,59 @@ public class SatelliteServer {
}
public void unsetSuccess() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
/** Returns true if field success is set (has been assigned a value) and false otherwise */
public boolean isSetSuccess() {
- return EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SUCCESS_ISSET_ID);
}
public void setSuccessIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((Long)value);
+ setSuccess((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getVersion_result)
return this.equals((getVersion_result)that);
return false;
@@ -7757,6 +8897,8 @@ public class SatelliteServer {
public boolean equals(getVersion_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true;
boolean that_present_success = true;
@@ -7772,14 +8914,11 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true;
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(success);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -7790,7 +8929,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -7803,21 +8942,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getVersion_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getVersion_result(");
boolean first = true;
sb.append("success:");
@@ -7840,7 +8982,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -7850,14 +8992,16 @@ public class SatelliteServer {
}
}
- private static class getVersion_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getVersion_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getVersion_resultStandardScheme getScheme() {
return new getVersion_resultStandardScheme();
}
}
- private static class getVersion_resultStandardScheme extends StandardScheme<getVersion_result> {
+ private static class getVersion_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getVersion_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getVersion_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -7887,6 +9031,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getVersion_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -7902,18 +9047,19 @@ public class SatelliteServer {
}
- private static class getVersion_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getVersion_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getVersion_resultTupleScheme getScheme() {
return new getVersion_resultTupleScheme();
}
}
- private static class getVersion_resultTupleScheme extends TupleScheme<getVersion_result> {
+ private static class getVersion_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getVersion_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getVersion_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -7925,8 +9071,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getVersion_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readI64();
struct.setSuccessIsSet(true);
@@ -7934,27 +9080,28 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getSupportedFeatures_args implements org.apache.thrift.TBase<getSupportedFeatures_args, getSupportedFeatures_args._Fields>, java.io.Serializable, Cloneable, Comparable<getSupportedFeatures_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupportedFeatures_args");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getSupportedFeatures_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getSupportedFeatures_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getSupportedFeatures_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getSupportedFeatures_argsTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -7962,6 +9109,7 @@ public class SatelliteServer {
/**
* 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) {
default:
@@ -7975,37 +9123,40 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupportedFeatures_args.class, metaDataMap);
}
@@ -8018,6 +9169,7 @@ public class SatelliteServer {
public getSupportedFeatures_args(getSupportedFeatures_args other) {
}
+ @Override
public getSupportedFeatures_args deepCopy() {
return new getSupportedFeatures_args(this);
}
@@ -8026,32 +9178,34 @@ public class SatelliteServer {
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getSupportedFeatures_args)
return this.equals((getSupportedFeatures_args)that);
return false;
@@ -8060,15 +9214,17 @@ public class SatelliteServer {
public boolean equals(getSupportedFeatures_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -8082,21 +9238,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getSupportedFeatures_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getSupportedFeatures_args(");
boolean first = true;
sb.append(")");
@@ -8116,7 +9276,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -8124,14 +9284,16 @@ public class SatelliteServer {
}
}
- private static class getSupportedFeatures_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getSupportedFeatures_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getSupportedFeatures_argsStandardScheme getScheme() {
return new getSupportedFeatures_argsStandardScheme();
}
}
- private static class getSupportedFeatures_argsStandardScheme extends StandardScheme<getSupportedFeatures_args> {
+ private static class getSupportedFeatures_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getSupportedFeatures_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getSupportedFeatures_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -8153,6 +9315,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getSupportedFeatures_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -8163,48 +9326,50 @@ public class SatelliteServer {
}
- private static class getSupportedFeatures_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getSupportedFeatures_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getSupportedFeatures_argsTupleScheme getScheme() {
return new getSupportedFeatures_argsTupleScheme();
}
}
- private static class getSupportedFeatures_argsTupleScheme extends TupleScheme<getSupportedFeatures_args> {
+ private static class getSupportedFeatures_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getSupportedFeatures_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getSupportedFeatures_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getSupportedFeatures_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getSupportedFeatures_result implements org.apache.thrift.TBase<getSupportedFeatures_result, getSupportedFeatures_result._Fields>, java.io.Serializable, Cloneable, Comparable<getSupportedFeatures_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSupportedFeatures_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getSupportedFeatures_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getSupportedFeatures_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getSupportedFeatures_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getSupportedFeatures_resultTupleSchemeFactory();
- public String success; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String success; // 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 {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -8212,6 +9377,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -8227,41 +9393,44 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSupportedFeatures_result.class, metaDataMap);
}
@@ -8269,7 +9438,7 @@ public class SatelliteServer {
}
public getSupportedFeatures_result(
- String success)
+ java.lang.String success)
{
this();
this.success = success;
@@ -8284,6 +9453,7 @@ public class SatelliteServer {
}
}
+ @Override
public getSupportedFeatures_result deepCopy() {
return new getSupportedFeatures_result(this);
}
@@ -8293,11 +9463,12 @@ public class SatelliteServer {
this.success = null;
}
- public String getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getSuccess() {
return this.success;
}
- public getSupportedFeatures_result setSuccess(String success) {
+ public getSupportedFeatures_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.String success) {
this.success = success;
return this;
}
@@ -8317,45 +9488,47 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((String)value);
+ setSuccess((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getSupportedFeatures_result)
return this.equals((getSupportedFeatures_result)that);
return false;
@@ -8364,6 +9537,8 @@ public class SatelliteServer {
public boolean equals(getSupportedFeatures_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -8379,14 +9554,13 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -8397,7 +9571,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -8410,21 +9584,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getSupportedFeatures_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getSupportedFeatures_result(");
boolean first = true;
sb.append("success:");
@@ -8451,7 +9628,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -8459,14 +9636,16 @@ public class SatelliteServer {
}
}
- private static class getSupportedFeatures_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getSupportedFeatures_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getSupportedFeatures_resultStandardScheme getScheme() {
return new getSupportedFeatures_resultStandardScheme();
}
}
- private static class getSupportedFeatures_resultStandardScheme extends StandardScheme<getSupportedFeatures_result> {
+ private static class getSupportedFeatures_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getSupportedFeatures_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getSupportedFeatures_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -8496,6 +9675,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getSupportedFeatures_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -8511,18 +9691,19 @@ public class SatelliteServer {
}
- private static class getSupportedFeatures_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getSupportedFeatures_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getSupportedFeatures_resultTupleScheme getScheme() {
return new getSupportedFeatures_resultTupleScheme();
}
}
- private static class getSupportedFeatures_resultTupleScheme extends TupleScheme<getSupportedFeatures_result> {
+ private static class getSupportedFeatures_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getSupportedFeatures_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getSupportedFeatures_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -8534,8 +9715,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getSupportedFeatures_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
@@ -8543,27 +9724,28 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getConfiguration_args implements org.apache.thrift.TBase<getConfiguration_args, getConfiguration_args._Fields>, java.io.Serializable, Cloneable, Comparable<getConfiguration_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getConfiguration_args");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getConfiguration_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getConfiguration_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getConfiguration_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getConfiguration_argsTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -8571,6 +9753,7 @@ public class SatelliteServer {
/**
* 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) {
default:
@@ -8584,37 +9767,40 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getConfiguration_args.class, metaDataMap);
}
@@ -8627,6 +9813,7 @@ public class SatelliteServer {
public getConfiguration_args(getConfiguration_args other) {
}
+ @Override
public getConfiguration_args deepCopy() {
return new getConfiguration_args(this);
}
@@ -8635,32 +9822,34 @@ public class SatelliteServer {
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getConfiguration_args)
return this.equals((getConfiguration_args)that);
return false;
@@ -8669,15 +9858,17 @@ public class SatelliteServer {
public boolean equals(getConfiguration_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -8691,21 +9882,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getConfiguration_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getConfiguration_args(");
boolean first = true;
sb.append(")");
@@ -8725,7 +9920,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -8733,14 +9928,16 @@ public class SatelliteServer {
}
}
- private static class getConfiguration_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getConfiguration_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getConfiguration_argsStandardScheme getScheme() {
return new getConfiguration_argsStandardScheme();
}
}
- private static class getConfiguration_argsStandardScheme extends StandardScheme<getConfiguration_args> {
+ private static class getConfiguration_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getConfiguration_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getConfiguration_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -8762,6 +9959,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getConfiguration_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -8772,48 +9970,50 @@ public class SatelliteServer {
}
- private static class getConfiguration_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getConfiguration_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getConfiguration_argsTupleScheme getScheme() {
return new getConfiguration_argsTupleScheme();
}
}
- private static class getConfiguration_argsTupleScheme extends TupleScheme<getConfiguration_args> {
+ private static class getConfiguration_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getConfiguration_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getConfiguration_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getConfiguration_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getConfiguration_result implements org.apache.thrift.TBase<getConfiguration_result, getConfiguration_result._Fields>, java.io.Serializable, Cloneable, Comparable<getConfiguration_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getConfiguration_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getConfiguration_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getConfiguration_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getConfiguration_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getConfiguration_resultTupleSchemeFactory();
- public SatelliteConfig success; // required
+ public @org.apache.thrift.annotation.Nullable SatelliteConfig success; // 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 {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -8821,6 +10021,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -8836,41 +10037,44 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SatelliteConfig.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getConfiguration_result.class, metaDataMap);
}
@@ -8893,6 +10097,7 @@ public class SatelliteServer {
}
}
+ @Override
public getConfiguration_result deepCopy() {
return new getConfiguration_result(this);
}
@@ -8902,11 +10107,12 @@ public class SatelliteServer {
this.success = null;
}
+ @org.apache.thrift.annotation.Nullable
public SatelliteConfig getSuccess() {
return this.success;
}
- public getConfiguration_result setSuccess(SatelliteConfig success) {
+ public getConfiguration_result setSuccess(@org.apache.thrift.annotation.Nullable SatelliteConfig success) {
this.success = success;
return this;
}
@@ -8926,7 +10132,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -8939,32 +10146,33 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getConfiguration_result)
return this.equals((getConfiguration_result)that);
return false;
@@ -8973,6 +10181,8 @@ public class SatelliteServer {
public boolean equals(getConfiguration_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -8988,14 +10198,13 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -9006,7 +10215,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -9019,21 +10228,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getConfiguration_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getConfiguration_result(");
boolean first = true;
sb.append("success:");
@@ -9063,7 +10275,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -9071,14 +10283,16 @@ public class SatelliteServer {
}
}
- private static class getConfiguration_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getConfiguration_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getConfiguration_resultStandardScheme getScheme() {
return new getConfiguration_resultStandardScheme();
}
}
- private static class getConfiguration_resultStandardScheme extends StandardScheme<getConfiguration_result> {
+ private static class getConfiguration_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getConfiguration_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getConfiguration_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -9109,6 +10323,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getConfiguration_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -9124,18 +10339,19 @@ public class SatelliteServer {
}
- private static class getConfiguration_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getConfiguration_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getConfiguration_resultTupleScheme getScheme() {
return new getConfiguration_resultTupleScheme();
}
}
- private static class getConfiguration_resultTupleScheme extends TupleScheme<getConfiguration_result> {
+ private static class getConfiguration_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getConfiguration_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getConfiguration_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -9147,8 +10363,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getConfiguration_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = new SatelliteConfig();
struct.success.read(iprot);
@@ -9157,8 +10373,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class requestImageVersionUpload_args implements org.apache.thrift.TBase<requestImageVersionUpload_args, requestImageVersionUpload_args._Fields>, java.io.Serializable, Cloneable, Comparable<requestImageVersionUpload_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestImageVersionUpload_args");
@@ -9168,17 +10388,14 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField BLOCK_HASHES_FIELD_DESC = new org.apache.thrift.protocol.TField("blockHashes", org.apache.thrift.protocol.TType.LIST, (short)4);
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)5);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new requestImageVersionUpload_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new requestImageVersionUpload_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new requestImageVersionUpload_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new requestImageVersionUpload_argsTupleSchemeFactory();
- public String userToken; // required
- public String imageBaseId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageBaseId; // required
public long fileSize; // required
- public List<ByteBuffer> blockHashes; // required
- public ByteBuffer machineDescription; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> blockHashes; // 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 {
@@ -9188,10 +10405,10 @@ public class SatelliteServer {
BLOCK_HASHES((short)4, "blockHashes"),
MACHINE_DESCRIPTION((short)5, "machineDescription");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -9199,6 +10416,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -9222,30 +10440,33 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -9253,9 +10474,9 @@ public class SatelliteServer {
// isset id assignments
private static final int __FILESIZE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -9267,7 +10488,7 @@ public class SatelliteServer {
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
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 = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestImageVersionUpload_args.class, metaDataMap);
}
@@ -9275,11 +10496,11 @@ public class SatelliteServer {
}
public requestImageVersionUpload_args(
- String userToken,
- String imageBaseId,
+ java.lang.String userToken,
+ java.lang.String imageBaseId,
long fileSize,
- List<ByteBuffer> blockHashes,
- ByteBuffer machineDescription)
+ java.util.List<java.nio.ByteBuffer> blockHashes,
+ java.nio.ByteBuffer machineDescription)
{
this();
this.userToken = userToken;
@@ -9303,7 +10524,7 @@ public class SatelliteServer {
}
this.fileSize = other.fileSize;
if (other.isSetBlockHashes()) {
- List<ByteBuffer> __this__blockHashes = new ArrayList<ByteBuffer>(other.blockHashes);
+ java.util.List<java.nio.ByteBuffer> __this__blockHashes = new java.util.ArrayList<java.nio.ByteBuffer>(other.blockHashes);
this.blockHashes = __this__blockHashes;
}
if (other.isSetMachineDescription()) {
@@ -9311,6 +10532,7 @@ public class SatelliteServer {
}
}
+ @Override
public requestImageVersionUpload_args deepCopy() {
return new requestImageVersionUpload_args(this);
}
@@ -9325,11 +10547,12 @@ public class SatelliteServer {
this.machineDescription = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public requestImageVersionUpload_args setUserToken(String userToken) {
+ public requestImageVersionUpload_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -9349,11 +10572,12 @@ public class SatelliteServer {
}
}
- public String getImageBaseId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageBaseId() {
return this.imageBaseId;
}
- public requestImageVersionUpload_args setImageBaseId(String imageBaseId) {
+ public requestImageVersionUpload_args setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.String imageBaseId) {
this.imageBaseId = imageBaseId;
return this;
}
@@ -9384,38 +10608,40 @@ public class SatelliteServer {
}
public void unsetFileSize() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __FILESIZE_ISSET_ID);
+ __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 EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __FILESIZE_ISSET_ID);
}
public void setFileSizeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __FILESIZE_ISSET_ID, value);
}
public int getBlockHashesSize() {
return (this.blockHashes == null) ? 0 : this.blockHashes.size();
}
- public java.util.Iterator<ByteBuffer> getBlockHashesIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.nio.ByteBuffer> getBlockHashesIterator() {
return (this.blockHashes == null) ? null : this.blockHashes.iterator();
}
- public void addToBlockHashes(ByteBuffer elem) {
+ public void addToBlockHashes(java.nio.ByteBuffer elem) {
if (this.blockHashes == null) {
- this.blockHashes = new ArrayList<ByteBuffer>();
+ this.blockHashes = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.blockHashes.add(elem);
}
- public List<ByteBuffer> getBlockHashes() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.nio.ByteBuffer> getBlockHashes() {
return this.blockHashes;
}
- public requestImageVersionUpload_args setBlockHashes(List<ByteBuffer> blockHashes) {
+ public requestImageVersionUpload_args setBlockHashes(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> blockHashes) {
this.blockHashes = blockHashes;
return this;
}
@@ -9440,16 +10666,16 @@ public class SatelliteServer {
return machineDescription == null ? null : machineDescription.array();
}
- public ByteBuffer bufferForMachineDescription() {
+ public java.nio.ByteBuffer bufferForMachineDescription() {
return org.apache.thrift.TBaseHelper.copyBinary(machineDescription);
}
public requestImageVersionUpload_args setMachineDescription(byte[] machineDescription) {
- this.machineDescription = machineDescription == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(machineDescription, machineDescription.length));
+ this.machineDescription = machineDescription == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(machineDescription.clone());
return this;
}
- public requestImageVersionUpload_args setMachineDescription(ByteBuffer machineDescription) {
+ public requestImageVersionUpload_args setMachineDescription(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer machineDescription) {
this.machineDescription = org.apache.thrift.TBaseHelper.copyBinary(machineDescription);
return this;
}
@@ -9469,13 +10695,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -9483,7 +10710,7 @@ public class SatelliteServer {
if (value == null) {
unsetImageBaseId();
} else {
- setImageBaseId((String)value);
+ setImageBaseId((java.lang.String)value);
}
break;
@@ -9491,7 +10718,7 @@ public class SatelliteServer {
if (value == null) {
unsetFileSize();
} else {
- setFileSize((Long)value);
+ setFileSize((java.lang.Long)value);
}
break;
@@ -9499,7 +10726,7 @@ public class SatelliteServer {
if (value == null) {
unsetBlockHashes();
} else {
- setBlockHashes((List<ByteBuffer>)value);
+ setBlockHashes((java.util.List<java.nio.ByteBuffer>)value);
}
break;
@@ -9507,14 +10734,20 @@ public class SatelliteServer {
if (value == null) {
unsetMachineDescription();
} else {
- setMachineDescription((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setMachineDescription((byte[])value);
+ } else {
+ setMachineDescription((java.nio.ByteBuffer)value);
+ }
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -9532,13 +10765,14 @@ public class SatelliteServer {
return getMachineDescription();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -9553,13 +10787,11 @@ public class SatelliteServer {
case MACHINE_DESCRIPTION:
return isSetMachineDescription();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof requestImageVersionUpload_args)
return this.equals((requestImageVersionUpload_args)that);
return false;
@@ -9568,6 +10800,8 @@ public class SatelliteServer {
public boolean equals(requestImageVersionUpload_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -9619,34 +10853,27 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_imageBaseId = true && (isSetImageBaseId());
- list.add(present_imageBaseId);
- if (present_imageBaseId)
- list.add(imageBaseId);
+ hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287);
+ if (isSetImageBaseId())
+ hashCode = hashCode * 8191 + imageBaseId.hashCode();
- boolean present_fileSize = true;
- list.add(present_fileSize);
- if (present_fileSize)
- list.add(fileSize);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(fileSize);
- boolean present_blockHashes = true && (isSetBlockHashes());
- list.add(present_blockHashes);
- if (present_blockHashes)
- list.add(blockHashes);
+ hashCode = hashCode * 8191 + ((isSetBlockHashes()) ? 131071 : 524287);
+ if (isSetBlockHashes())
+ hashCode = hashCode * 8191 + blockHashes.hashCode();
- boolean present_machineDescription = true && (isSetMachineDescription());
- list.add(present_machineDescription);
- if (present_machineDescription)
- list.add(machineDescription);
+ hashCode = hashCode * 8191 + ((isSetMachineDescription()) ? 131071 : 524287);
+ if (isSetMachineDescription())
+ hashCode = hashCode * 8191 + machineDescription.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -9657,7 +10884,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -9667,7 +10894,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ lastComparison = java.lang.Boolean.compare(isSetImageBaseId(), other.isSetImageBaseId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -9677,7 +10904,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFileSize()).compareTo(other.isSetFileSize());
+ lastComparison = java.lang.Boolean.compare(isSetFileSize(), other.isSetFileSize());
if (lastComparison != 0) {
return lastComparison;
}
@@ -9687,7 +10914,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetBlockHashes()).compareTo(other.isSetBlockHashes());
+ lastComparison = java.lang.Boolean.compare(isSetBlockHashes(), other.isSetBlockHashes());
if (lastComparison != 0) {
return lastComparison;
}
@@ -9697,7 +10924,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMachineDescription()).compareTo(other.isSetMachineDescription());
+ lastComparison = java.lang.Boolean.compare(isSetMachineDescription(), other.isSetMachineDescription());
if (lastComparison != 0) {
return lastComparison;
}
@@ -9710,21 +10937,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("requestImageVersionUpload_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("requestImageVersionUpload_args(");
boolean first = true;
sb.append("userToken:");
@@ -9779,7 +11010,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -9789,14 +11020,16 @@ public class SatelliteServer {
}
}
- private static class requestImageVersionUpload_argsStandardSchemeFactory implements SchemeFactory {
+ private static class requestImageVersionUpload_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public requestImageVersionUpload_argsStandardScheme getScheme() {
return new requestImageVersionUpload_argsStandardScheme();
}
}
- private static class requestImageVersionUpload_argsStandardScheme extends StandardScheme<requestImageVersionUpload_args> {
+ private static class requestImageVersionUpload_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<requestImageVersionUpload_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, requestImageVersionUpload_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -9834,13 +11067,13 @@ public class SatelliteServer {
case 4: // BLOCK_HASHES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list218 = iprot.readListBegin();
- struct.blockHashes = new ArrayList<ByteBuffer>(_list218.size);
- ByteBuffer _elem219;
- for (int _i220 = 0; _i220 < _list218.size; ++_i220)
+ org.apache.thrift.protocol.TList _list298 = iprot.readListBegin();
+ struct.blockHashes = new java.util.ArrayList<java.nio.ByteBuffer>(_list298.size);
+ @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem299;
+ for (int _i300 = 0; _i300 < _list298.size; ++_i300)
{
- _elem219 = iprot.readBinary();
- struct.blockHashes.add(_elem219);
+ _elem299 = iprot.readBinary();
+ struct.blockHashes.add(_elem299);
}
iprot.readListEnd();
}
@@ -9868,6 +11101,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, requestImageVersionUpload_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -9889,9 +11123,9 @@ public class SatelliteServer {
oprot.writeFieldBegin(BLOCK_HASHES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.blockHashes.size()));
- for (ByteBuffer _iter221 : struct.blockHashes)
+ for (java.nio.ByteBuffer _iter301 : struct.blockHashes)
{
- oprot.writeBinary(_iter221);
+ oprot.writeBinary(_iter301);
}
oprot.writeListEnd();
}
@@ -9908,18 +11142,19 @@ public class SatelliteServer {
}
- private static class requestImageVersionUpload_argsTupleSchemeFactory implements SchemeFactory {
+ private static class requestImageVersionUpload_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public requestImageVersionUpload_argsTupleScheme getScheme() {
return new requestImageVersionUpload_argsTupleScheme();
}
}
- private static class requestImageVersionUpload_argsTupleScheme extends TupleScheme<requestImageVersionUpload_args> {
+ private static class requestImageVersionUpload_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<requestImageVersionUpload_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -9948,9 +11183,9 @@ public class SatelliteServer {
if (struct.isSetBlockHashes()) {
{
oprot.writeI32(struct.blockHashes.size());
- for (ByteBuffer _iter222 : struct.blockHashes)
+ for (java.nio.ByteBuffer _iter302 : struct.blockHashes)
{
- oprot.writeBinary(_iter222);
+ oprot.writeBinary(_iter302);
}
}
}
@@ -9961,8 +11196,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -9977,13 +11212,13 @@ public class SatelliteServer {
}
if (incoming.get(3)) {
{
- org.apache.thrift.protocol.TList _list223 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.blockHashes = new ArrayList<ByteBuffer>(_list223.size);
- ByteBuffer _elem224;
- for (int _i225 = 0; _i225 < _list223.size; ++_i225)
+ org.apache.thrift.protocol.TList _list303 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.blockHashes = new java.util.ArrayList<java.nio.ByteBuffer>(_list303.size);
+ @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem304;
+ for (int _i305 = 0; _i305 < _list303.size; ++_i305)
{
- _elem224 = iprot.readBinary();
- struct.blockHashes.add(_elem224);
+ _elem304 = iprot.readBinary();
+ struct.blockHashes.add(_elem304);
}
}
struct.setBlockHashesIsSet(true);
@@ -9995,8 +11230,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class requestImageVersionUpload_result implements org.apache.thrift.TBase<requestImageVersionUpload_result, requestImageVersionUpload_result._Fields>, java.io.Serializable, Cloneable, Comparable<requestImageVersionUpload_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestImageVersionUpload_result");
@@ -10006,17 +11245,14 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField FFFF_FIELD_DESC = new org.apache.thrift.protocol.TField("ffff", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField SDF_FIELD_DESC = new org.apache.thrift.protocol.TField("sdf", org.apache.thrift.protocol.TType.STRUCT, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new requestImageVersionUpload_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new requestImageVersionUpload_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new requestImageVersionUpload_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new requestImageVersionUpload_resultTupleSchemeFactory();
- public TransferInformation success; // required
- public TTransferRejectedException rejection; // required
- public TAuthorizationException authError; // required
- public TInvocationException ffff; // required
- public TNotFoundException sdf; // required
+ public @org.apache.thrift.annotation.Nullable TransferInformation success; // required
+ public @org.apache.thrift.annotation.Nullable TTransferRejectedException rejection; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException ffff; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException sdf; // 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 {
@@ -10026,10 +11262,10 @@ public class SatelliteServer {
FFFF((short)3, "ffff"),
SDF((short)4, "sdf");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -10037,6 +11273,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -10060,49 +11297,52 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransferInformation.class)));
tmpMap.put(_Fields.REJECTION, new org.apache.thrift.meta_data.FieldMetaData("rejection", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTransferRejectedException.class)));
tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.FFFF, new org.apache.thrift.meta_data.FieldMetaData("ffff", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
tmpMap.put(_Fields.SDF, new org.apache.thrift.meta_data.FieldMetaData("sdf", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestImageVersionUpload_result.class, metaDataMap);
}
@@ -10145,6 +11385,7 @@ public class SatelliteServer {
}
}
+ @Override
public requestImageVersionUpload_result deepCopy() {
return new requestImageVersionUpload_result(this);
}
@@ -10158,11 +11399,12 @@ public class SatelliteServer {
this.sdf = null;
}
+ @org.apache.thrift.annotation.Nullable
public TransferInformation getSuccess() {
return this.success;
}
- public requestImageVersionUpload_result setSuccess(TransferInformation success) {
+ public requestImageVersionUpload_result setSuccess(@org.apache.thrift.annotation.Nullable TransferInformation success) {
this.success = success;
return this;
}
@@ -10182,11 +11424,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TTransferRejectedException getRejection() {
return this.rejection;
}
- public requestImageVersionUpload_result setRejection(TTransferRejectedException rejection) {
+ public requestImageVersionUpload_result setRejection(@org.apache.thrift.annotation.Nullable TTransferRejectedException rejection) {
this.rejection = rejection;
return this;
}
@@ -10206,11 +11449,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public requestImageVersionUpload_result setAuthError(TAuthorizationException authError) {
+ public requestImageVersionUpload_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -10230,11 +11474,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getFfff() {
return this.ffff;
}
- public requestImageVersionUpload_result setFfff(TInvocationException ffff) {
+ public requestImageVersionUpload_result setFfff(@org.apache.thrift.annotation.Nullable TInvocationException ffff) {
this.ffff = ffff;
return this;
}
@@ -10254,11 +11499,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getSdf() {
return this.sdf;
}
- public requestImageVersionUpload_result setSdf(TNotFoundException sdf) {
+ public requestImageVersionUpload_result setSdf(@org.apache.thrift.annotation.Nullable TNotFoundException sdf) {
this.sdf = sdf;
return this;
}
@@ -10278,7 +11524,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -10323,7 +11570,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -10341,13 +11590,14 @@ public class SatelliteServer {
return getSdf();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -10362,13 +11612,11 @@ public class SatelliteServer {
case SDF:
return isSetSdf();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof requestImageVersionUpload_result)
return this.equals((requestImageVersionUpload_result)that);
return false;
@@ -10377,6 +11625,8 @@ public class SatelliteServer {
public boolean equals(requestImageVersionUpload_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -10428,34 +11678,29 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_rejection = true && (isSetRejection());
- list.add(present_rejection);
- if (present_rejection)
- list.add(rejection);
+ hashCode = hashCode * 8191 + ((isSetRejection()) ? 131071 : 524287);
+ if (isSetRejection())
+ hashCode = hashCode * 8191 + rejection.hashCode();
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_ffff = true && (isSetFfff());
- list.add(present_ffff);
- if (present_ffff)
- list.add(ffff);
+ hashCode = hashCode * 8191 + ((isSetFfff()) ? 131071 : 524287);
+ if (isSetFfff())
+ hashCode = hashCode * 8191 + ffff.hashCode();
- boolean present_sdf = true && (isSetSdf());
- list.add(present_sdf);
- if (present_sdf)
- list.add(sdf);
+ hashCode = hashCode * 8191 + ((isSetSdf()) ? 131071 : 524287);
+ if (isSetSdf())
+ hashCode = hashCode * 8191 + sdf.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -10466,7 +11711,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -10476,7 +11721,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetRejection()).compareTo(other.isSetRejection());
+ lastComparison = java.lang.Boolean.compare(isSetRejection(), other.isSetRejection());
if (lastComparison != 0) {
return lastComparison;
}
@@ -10486,7 +11731,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -10496,7 +11741,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFfff()).compareTo(other.isSetFfff());
+ lastComparison = java.lang.Boolean.compare(isSetFfff(), other.isSetFfff());
if (lastComparison != 0) {
return lastComparison;
}
@@ -10506,7 +11751,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSdf()).compareTo(other.isSetSdf());
+ lastComparison = java.lang.Boolean.compare(isSetSdf(), other.isSetSdf());
if (lastComparison != 0) {
return lastComparison;
}
@@ -10519,21 +11764,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("requestImageVersionUpload_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("requestImageVersionUpload_result(");
boolean first = true;
sb.append("success:");
@@ -10595,7 +11843,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -10603,14 +11851,16 @@ public class SatelliteServer {
}
}
- private static class requestImageVersionUpload_resultStandardSchemeFactory implements SchemeFactory {
+ private static class requestImageVersionUpload_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public requestImageVersionUpload_resultStandardScheme getScheme() {
return new requestImageVersionUpload_resultStandardScheme();
}
}
- private static class requestImageVersionUpload_resultStandardScheme extends StandardScheme<requestImageVersionUpload_result> {
+ private static class requestImageVersionUpload_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<requestImageVersionUpload_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, requestImageVersionUpload_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -10677,6 +11927,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, requestImageVersionUpload_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -10712,18 +11963,19 @@ public class SatelliteServer {
}
- private static class requestImageVersionUpload_resultTupleSchemeFactory implements SchemeFactory {
+ private static class requestImageVersionUpload_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public requestImageVersionUpload_resultTupleScheme getScheme() {
return new requestImageVersionUpload_resultTupleScheme();
}
}
- private static class requestImageVersionUpload_resultTupleScheme extends TupleScheme<requestImageVersionUpload_result> {
+ private static class requestImageVersionUpload_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<requestImageVersionUpload_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -10759,8 +12011,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, requestImageVersionUpload_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.success = new TransferInformation();
struct.success.read(iprot);
@@ -10789,8 +12041,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class updateBlockHashes_args implements org.apache.thrift.TBase<updateBlockHashes_args, updateBlockHashes_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateBlockHashes_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateBlockHashes_args");
@@ -10798,15 +12054,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField BLOCK_HASHES_FIELD_DESC = new org.apache.thrift.protocol.TField("blockHashes", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new updateBlockHashes_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new updateBlockHashes_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateBlockHashes_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateBlockHashes_argsTupleSchemeFactory();
- public String uploadToken; // required
- public List<ByteBuffer> blockHashes; // required
- public String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String uploadToken; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> blockHashes; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // 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 {
@@ -10814,10 +12067,10 @@ public class SatelliteServer {
BLOCK_HASHES((short)2, "blockHashes"),
USER_TOKEN((short)3, "userToken");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -10825,6 +12078,7 @@ public class SatelliteServer {
/**
* 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: // UPLOAD_TOKEN
@@ -10844,38 +12098,41 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.UPLOAD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("uploadToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.BLOCK_HASHES, new org.apache.thrift.meta_data.FieldMetaData("blockHashes", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -10883,7 +12140,7 @@ public class SatelliteServer {
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
tmpMap.put(_Fields.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateBlockHashes_args.class, metaDataMap);
}
@@ -10891,9 +12148,9 @@ public class SatelliteServer {
}
public updateBlockHashes_args(
- String uploadToken,
- List<ByteBuffer> blockHashes,
- String userToken)
+ java.lang.String uploadToken,
+ java.util.List<java.nio.ByteBuffer> blockHashes,
+ java.lang.String userToken)
{
this();
this.uploadToken = uploadToken;
@@ -10909,7 +12166,7 @@ public class SatelliteServer {
this.uploadToken = other.uploadToken;
}
if (other.isSetBlockHashes()) {
- List<ByteBuffer> __this__blockHashes = new ArrayList<ByteBuffer>(other.blockHashes);
+ java.util.List<java.nio.ByteBuffer> __this__blockHashes = new java.util.ArrayList<java.nio.ByteBuffer>(other.blockHashes);
this.blockHashes = __this__blockHashes;
}
if (other.isSetUserToken()) {
@@ -10917,6 +12174,7 @@ public class SatelliteServer {
}
}
+ @Override
public updateBlockHashes_args deepCopy() {
return new updateBlockHashes_args(this);
}
@@ -10928,11 +12186,12 @@ public class SatelliteServer {
this.userToken = null;
}
- public String getUploadToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUploadToken() {
return this.uploadToken;
}
- public updateBlockHashes_args setUploadToken(String uploadToken) {
+ public updateBlockHashes_args setUploadToken(@org.apache.thrift.annotation.Nullable java.lang.String uploadToken) {
this.uploadToken = uploadToken;
return this;
}
@@ -10956,22 +12215,24 @@ public class SatelliteServer {
return (this.blockHashes == null) ? 0 : this.blockHashes.size();
}
- public java.util.Iterator<ByteBuffer> getBlockHashesIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.nio.ByteBuffer> getBlockHashesIterator() {
return (this.blockHashes == null) ? null : this.blockHashes.iterator();
}
- public void addToBlockHashes(ByteBuffer elem) {
+ public void addToBlockHashes(java.nio.ByteBuffer elem) {
if (this.blockHashes == null) {
- this.blockHashes = new ArrayList<ByteBuffer>();
+ this.blockHashes = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.blockHashes.add(elem);
}
- public List<ByteBuffer> getBlockHashes() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.nio.ByteBuffer> getBlockHashes() {
return this.blockHashes;
}
- public updateBlockHashes_args setBlockHashes(List<ByteBuffer> blockHashes) {
+ public updateBlockHashes_args setBlockHashes(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> blockHashes) {
this.blockHashes = blockHashes;
return this;
}
@@ -10991,11 +12252,12 @@ public class SatelliteServer {
}
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public updateBlockHashes_args setUserToken(String userToken) {
+ public updateBlockHashes_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -11015,13 +12277,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case UPLOAD_TOKEN:
if (value == null) {
unsetUploadToken();
} else {
- setUploadToken((String)value);
+ setUploadToken((java.lang.String)value);
}
break;
@@ -11029,7 +12292,7 @@ public class SatelliteServer {
if (value == null) {
unsetBlockHashes();
} else {
- setBlockHashes((List<ByteBuffer>)value);
+ setBlockHashes((java.util.List<java.nio.ByteBuffer>)value);
}
break;
@@ -11037,14 +12300,16 @@ public class SatelliteServer {
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case UPLOAD_TOKEN:
return getUploadToken();
@@ -11056,13 +12321,14 @@ public class SatelliteServer {
return getUserToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -11073,13 +12339,11 @@ public class SatelliteServer {
case USER_TOKEN:
return isSetUserToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof updateBlockHashes_args)
return this.equals((updateBlockHashes_args)that);
return false;
@@ -11088,6 +12352,8 @@ public class SatelliteServer {
public boolean equals(updateBlockHashes_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_uploadToken = true && this.isSetUploadToken();
boolean that_present_uploadToken = true && that.isSetUploadToken();
@@ -11121,24 +12387,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_uploadToken = true && (isSetUploadToken());
- list.add(present_uploadToken);
- if (present_uploadToken)
- list.add(uploadToken);
+ hashCode = hashCode * 8191 + ((isSetUploadToken()) ? 131071 : 524287);
+ if (isSetUploadToken())
+ hashCode = hashCode * 8191 + uploadToken.hashCode();
- boolean present_blockHashes = true && (isSetBlockHashes());
- list.add(present_blockHashes);
- if (present_blockHashes)
- list.add(blockHashes);
+ hashCode = hashCode * 8191 + ((isSetBlockHashes()) ? 131071 : 524287);
+ if (isSetBlockHashes())
+ hashCode = hashCode * 8191 + blockHashes.hashCode();
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -11149,7 +12412,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUploadToken()).compareTo(other.isSetUploadToken());
+ lastComparison = java.lang.Boolean.compare(isSetUploadToken(), other.isSetUploadToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -11159,7 +12422,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetBlockHashes()).compareTo(other.isSetBlockHashes());
+ lastComparison = java.lang.Boolean.compare(isSetBlockHashes(), other.isSetBlockHashes());
if (lastComparison != 0) {
return lastComparison;
}
@@ -11169,7 +12432,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -11182,21 +12445,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("updateBlockHashes_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("updateBlockHashes_args(");
boolean first = true;
sb.append("uploadToken:");
@@ -11239,7 +12506,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -11247,14 +12514,16 @@ public class SatelliteServer {
}
}
- private static class updateBlockHashes_argsStandardSchemeFactory implements SchemeFactory {
+ private static class updateBlockHashes_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateBlockHashes_argsStandardScheme getScheme() {
return new updateBlockHashes_argsStandardScheme();
}
}
- private static class updateBlockHashes_argsStandardScheme extends StandardScheme<updateBlockHashes_args> {
+ private static class updateBlockHashes_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateBlockHashes_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, updateBlockHashes_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -11276,13 +12545,13 @@ public class SatelliteServer {
case 2: // BLOCK_HASHES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list226 = iprot.readListBegin();
- struct.blockHashes = new ArrayList<ByteBuffer>(_list226.size);
- ByteBuffer _elem227;
- for (int _i228 = 0; _i228 < _list226.size; ++_i228)
+ org.apache.thrift.protocol.TList _list306 = iprot.readListBegin();
+ struct.blockHashes = new java.util.ArrayList<java.nio.ByteBuffer>(_list306.size);
+ @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem307;
+ for (int _i308 = 0; _i308 < _list306.size; ++_i308)
{
- _elem227 = iprot.readBinary();
- struct.blockHashes.add(_elem227);
+ _elem307 = iprot.readBinary();
+ struct.blockHashes.add(_elem307);
}
iprot.readListEnd();
}
@@ -11310,6 +12579,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, updateBlockHashes_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -11323,9 +12593,9 @@ public class SatelliteServer {
oprot.writeFieldBegin(BLOCK_HASHES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.blockHashes.size()));
- for (ByteBuffer _iter229 : struct.blockHashes)
+ for (java.nio.ByteBuffer _iter309 : struct.blockHashes)
{
- oprot.writeBinary(_iter229);
+ oprot.writeBinary(_iter309);
}
oprot.writeListEnd();
}
@@ -11342,18 +12612,19 @@ public class SatelliteServer {
}
- private static class updateBlockHashes_argsTupleSchemeFactory implements SchemeFactory {
+ private static class updateBlockHashes_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateBlockHashes_argsTupleScheme getScheme() {
return new updateBlockHashes_argsTupleScheme();
}
}
- private static class updateBlockHashes_argsTupleScheme extends TupleScheme<updateBlockHashes_args> {
+ private static class updateBlockHashes_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateBlockHashes_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, updateBlockHashes_args 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.isSetUploadToken()) {
optionals.set(0);
}
@@ -11370,9 +12641,9 @@ public class SatelliteServer {
if (struct.isSetBlockHashes()) {
{
oprot.writeI32(struct.blockHashes.size());
- for (ByteBuffer _iter230 : struct.blockHashes)
+ for (java.nio.ByteBuffer _iter310 : struct.blockHashes)
{
- oprot.writeBinary(_iter230);
+ oprot.writeBinary(_iter310);
}
}
}
@@ -11383,21 +12654,21 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, updateBlockHashes_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.uploadToken = iprot.readString();
struct.setUploadTokenIsSet(true);
}
if (incoming.get(1)) {
{
- org.apache.thrift.protocol.TList _list231 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.blockHashes = new ArrayList<ByteBuffer>(_list231.size);
- ByteBuffer _elem232;
- for (int _i233 = 0; _i233 < _list231.size; ++_i233)
+ org.apache.thrift.protocol.TList _list311 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.blockHashes = new java.util.ArrayList<java.nio.ByteBuffer>(_list311.size);
+ @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem312;
+ for (int _i313 = 0; _i313 < _list311.size; ++_i313)
{
- _elem232 = iprot.readBinary();
- struct.blockHashes.add(_elem232);
+ _elem312 = iprot.readBinary();
+ struct.blockHashes.add(_elem312);
}
}
struct.setBlockHashesIsSet(true);
@@ -11409,29 +12680,30 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class updateBlockHashes_result implements org.apache.thrift.TBase<updateBlockHashes_result, updateBlockHashes_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateBlockHashes_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateBlockHashes_result");
private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new updateBlockHashes_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new updateBlockHashes_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateBlockHashes_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateBlockHashes_resultTupleSchemeFactory();
- public TInvalidTokenException ex1; // required
+ public @org.apache.thrift.annotation.Nullable TInvalidTokenException ex1; // 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 {
EX1((short)1, "ex1");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -11439,6 +12711,7 @@ public class SatelliteServer {
/**
* 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: // EX1
@@ -11454,41 +12727,44 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidTokenException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateBlockHashes_result.class, metaDataMap);
}
@@ -11511,6 +12787,7 @@ public class SatelliteServer {
}
}
+ @Override
public updateBlockHashes_result deepCopy() {
return new updateBlockHashes_result(this);
}
@@ -11520,11 +12797,12 @@ public class SatelliteServer {
this.ex1 = null;
}
+ @org.apache.thrift.annotation.Nullable
public TInvalidTokenException getEx1() {
return this.ex1;
}
- public updateBlockHashes_result setEx1(TInvalidTokenException ex1) {
+ public updateBlockHashes_result setEx1(@org.apache.thrift.annotation.Nullable TInvalidTokenException ex1) {
this.ex1 = ex1;
return this;
}
@@ -11544,7 +12822,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case EX1:
if (value == null) {
@@ -11557,32 +12836,33 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EX1:
return getEx1();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case EX1:
return isSetEx1();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof updateBlockHashes_result)
return this.equals((updateBlockHashes_result)that);
return false;
@@ -11591,6 +12871,8 @@ public class SatelliteServer {
public boolean equals(updateBlockHashes_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_ex1 = true && this.isSetEx1();
boolean that_present_ex1 = true && that.isSetEx1();
@@ -11606,14 +12888,13 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_ex1 = true && (isSetEx1());
- list.add(present_ex1);
- if (present_ex1)
- list.add(ex1);
+ hashCode = hashCode * 8191 + ((isSetEx1()) ? 131071 : 524287);
+ if (isSetEx1())
+ hashCode = hashCode * 8191 + ex1.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -11624,7 +12905,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
+ lastComparison = java.lang.Boolean.compare(isSetEx1(), other.isSetEx1());
if (lastComparison != 0) {
return lastComparison;
}
@@ -11637,21 +12918,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("updateBlockHashes_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("updateBlockHashes_result(");
boolean first = true;
sb.append("ex1:");
@@ -11678,7 +12962,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -11686,14 +12970,16 @@ public class SatelliteServer {
}
}
- private static class updateBlockHashes_resultStandardSchemeFactory implements SchemeFactory {
+ private static class updateBlockHashes_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateBlockHashes_resultStandardScheme getScheme() {
return new updateBlockHashes_resultStandardScheme();
}
}
- private static class updateBlockHashes_resultStandardScheme extends StandardScheme<updateBlockHashes_result> {
+ private static class updateBlockHashes_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateBlockHashes_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, updateBlockHashes_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -11724,6 +13010,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, updateBlockHashes_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -11739,18 +13026,19 @@ public class SatelliteServer {
}
- private static class updateBlockHashes_resultTupleSchemeFactory implements SchemeFactory {
+ private static class updateBlockHashes_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateBlockHashes_resultTupleScheme getScheme() {
return new updateBlockHashes_resultTupleScheme();
}
}
- private static class updateBlockHashes_resultTupleScheme extends TupleScheme<updateBlockHashes_result> {
+ private static class updateBlockHashes_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateBlockHashes_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, updateBlockHashes_result 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.isSetEx1()) {
optionals.set(0);
}
@@ -11762,8 +13050,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, updateBlockHashes_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.ex1 = new TInvalidTokenException();
struct.ex1.read(iprot);
@@ -11772,8 +13060,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class setUploadOptions_args implements org.apache.thrift.TBase<setUploadOptions_args, setUploadOptions_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUploadOptions_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUploadOptions_args");
@@ -11781,15 +13073,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField UPLOAD_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("uploadToken", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("options", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setUploadOptions_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setUploadOptions_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setUploadOptions_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setUploadOptions_argsTupleSchemeFactory();
- public String userToken; // required
- public String uploadToken; // required
- public UploadOptions options; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String uploadToken; // required
+ public @org.apache.thrift.annotation.Nullable UploadOptions options; // 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 {
@@ -11797,10 +13086,10 @@ public class SatelliteServer {
UPLOAD_TOKEN((short)2, "uploadToken"),
OPTIONS((short)3, "options");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -11808,6 +13097,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -11827,45 +13117,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.UPLOAD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("uploadToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("options", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UploadOptions.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUploadOptions_args.class, metaDataMap);
}
@@ -11873,8 +13166,8 @@ public class SatelliteServer {
}
public setUploadOptions_args(
- String userToken,
- String uploadToken,
+ java.lang.String userToken,
+ java.lang.String uploadToken,
UploadOptions options)
{
this();
@@ -11898,6 +13191,7 @@ public class SatelliteServer {
}
}
+ @Override
public setUploadOptions_args deepCopy() {
return new setUploadOptions_args(this);
}
@@ -11909,11 +13203,12 @@ public class SatelliteServer {
this.options = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public setUploadOptions_args setUserToken(String userToken) {
+ public setUploadOptions_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -11933,11 +13228,12 @@ public class SatelliteServer {
}
}
- public String getUploadToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUploadToken() {
return this.uploadToken;
}
- public setUploadOptions_args setUploadToken(String uploadToken) {
+ public setUploadOptions_args setUploadToken(@org.apache.thrift.annotation.Nullable java.lang.String uploadToken) {
this.uploadToken = uploadToken;
return this;
}
@@ -11957,11 +13253,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public UploadOptions getOptions() {
return this.options;
}
- public setUploadOptions_args setOptions(UploadOptions options) {
+ public setUploadOptions_args setOptions(@org.apache.thrift.annotation.Nullable UploadOptions options) {
this.options = options;
return this;
}
@@ -11981,13 +13278,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -11995,7 +13293,7 @@ public class SatelliteServer {
if (value == null) {
unsetUploadToken();
} else {
- setUploadToken((String)value);
+ setUploadToken((java.lang.String)value);
}
break;
@@ -12010,7 +13308,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -12022,13 +13322,14 @@ public class SatelliteServer {
return getOptions();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -12039,13 +13340,11 @@ public class SatelliteServer {
case OPTIONS:
return isSetOptions();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof setUploadOptions_args)
return this.equals((setUploadOptions_args)that);
return false;
@@ -12054,6 +13353,8 @@ public class SatelliteServer {
public boolean equals(setUploadOptions_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -12087,24 +13388,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_uploadToken = true && (isSetUploadToken());
- list.add(present_uploadToken);
- if (present_uploadToken)
- list.add(uploadToken);
+ hashCode = hashCode * 8191 + ((isSetUploadToken()) ? 131071 : 524287);
+ if (isSetUploadToken())
+ hashCode = hashCode * 8191 + uploadToken.hashCode();
- boolean present_options = true && (isSetOptions());
- list.add(present_options);
- if (present_options)
- list.add(options);
+ hashCode = hashCode * 8191 + ((isSetOptions()) ? 131071 : 524287);
+ if (isSetOptions())
+ hashCode = hashCode * 8191 + options.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -12115,7 +13413,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -12125,7 +13423,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetUploadToken()).compareTo(other.isSetUploadToken());
+ lastComparison = java.lang.Boolean.compare(isSetUploadToken(), other.isSetUploadToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -12135,7 +13433,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOptions()).compareTo(other.isSetOptions());
+ lastComparison = java.lang.Boolean.compare(isSetOptions(), other.isSetOptions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -12148,21 +13446,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("setUploadOptions_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("setUploadOptions_args(");
boolean first = true;
sb.append("userToken:");
@@ -12208,7 +13510,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -12216,14 +13518,16 @@ public class SatelliteServer {
}
}
- private static class setUploadOptions_argsStandardSchemeFactory implements SchemeFactory {
+ private static class setUploadOptions_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setUploadOptions_argsStandardScheme getScheme() {
return new setUploadOptions_argsStandardScheme();
}
}
- private static class setUploadOptions_argsStandardScheme extends StandardScheme<setUploadOptions_args> {
+ private static class setUploadOptions_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<setUploadOptions_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, setUploadOptions_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -12270,6 +13574,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, setUploadOptions_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -12295,18 +13600,19 @@ public class SatelliteServer {
}
- private static class setUploadOptions_argsTupleSchemeFactory implements SchemeFactory {
+ private static class setUploadOptions_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setUploadOptions_argsTupleScheme getScheme() {
return new setUploadOptions_argsTupleScheme();
}
}
- private static class setUploadOptions_argsTupleScheme extends TupleScheme<setUploadOptions_args> {
+ private static class setUploadOptions_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<setUploadOptions_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, setUploadOptions_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -12330,8 +13636,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, setUploadOptions_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -12348,8 +13654,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class setUploadOptions_result implements org.apache.thrift.TBase<setUploadOptions_result, setUploadOptions_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUploadOptions_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUploadOptions_result");
@@ -12357,15 +13667,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField FROOTLOOPS_FIELD_DESC = new org.apache.thrift.protocol.TField("frootloops", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField IMCYBORGBUTTHATSOK_FIELD_DESC = new org.apache.thrift.protocol.TField("imcyborgbutthatsok", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setUploadOptions_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setUploadOptions_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setUploadOptions_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setUploadOptions_resultTupleSchemeFactory();
- public UploadOptions success; // required
- public TAuthorizationException frootloops; // required
- public TInvalidTokenException imcyborgbutthatsok; // required
+ public @org.apache.thrift.annotation.Nullable UploadOptions success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException frootloops; // required
+ public @org.apache.thrift.annotation.Nullable TInvalidTokenException imcyborgbutthatsok; // 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 {
@@ -12373,10 +13680,10 @@ public class SatelliteServer {
FROOTLOOPS((short)1, "frootloops"),
IMCYBORGBUTTHATSOK((short)2, "imcyborgbutthatsok");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -12384,6 +13691,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -12403,45 +13711,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UploadOptions.class)));
tmpMap.put(_Fields.FROOTLOOPS, new org.apache.thrift.meta_data.FieldMetaData("frootloops", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.IMCYBORGBUTTHATSOK, new org.apache.thrift.meta_data.FieldMetaData("imcyborgbutthatsok", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidTokenException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUploadOptions_result.class, metaDataMap);
}
@@ -12474,6 +13785,7 @@ public class SatelliteServer {
}
}
+ @Override
public setUploadOptions_result deepCopy() {
return new setUploadOptions_result(this);
}
@@ -12485,11 +13797,12 @@ public class SatelliteServer {
this.imcyborgbutthatsok = null;
}
+ @org.apache.thrift.annotation.Nullable
public UploadOptions getSuccess() {
return this.success;
}
- public setUploadOptions_result setSuccess(UploadOptions success) {
+ public setUploadOptions_result setSuccess(@org.apache.thrift.annotation.Nullable UploadOptions success) {
this.success = success;
return this;
}
@@ -12509,11 +13822,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getFrootloops() {
return this.frootloops;
}
- public setUploadOptions_result setFrootloops(TAuthorizationException frootloops) {
+ public setUploadOptions_result setFrootloops(@org.apache.thrift.annotation.Nullable TAuthorizationException frootloops) {
this.frootloops = frootloops;
return this;
}
@@ -12533,11 +13847,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvalidTokenException getImcyborgbutthatsok() {
return this.imcyborgbutthatsok;
}
- public setUploadOptions_result setImcyborgbutthatsok(TInvalidTokenException imcyborgbutthatsok) {
+ public setUploadOptions_result setImcyborgbutthatsok(@org.apache.thrift.annotation.Nullable TInvalidTokenException imcyborgbutthatsok) {
this.imcyborgbutthatsok = imcyborgbutthatsok;
return this;
}
@@ -12557,7 +13872,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -12586,7 +13902,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -12598,13 +13916,14 @@ public class SatelliteServer {
return getImcyborgbutthatsok();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -12615,13 +13934,11 @@ public class SatelliteServer {
case IMCYBORGBUTTHATSOK:
return isSetImcyborgbutthatsok();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof setUploadOptions_result)
return this.equals((setUploadOptions_result)that);
return false;
@@ -12630,6 +13947,8 @@ public class SatelliteServer {
public boolean equals(setUploadOptions_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -12663,24 +13982,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_frootloops = true && (isSetFrootloops());
- list.add(present_frootloops);
- if (present_frootloops)
- list.add(frootloops);
+ hashCode = hashCode * 8191 + ((isSetFrootloops()) ? 131071 : 524287);
+ if (isSetFrootloops())
+ hashCode = hashCode * 8191 + frootloops.hashCode();
- boolean present_imcyborgbutthatsok = true && (isSetImcyborgbutthatsok());
- list.add(present_imcyborgbutthatsok);
- if (present_imcyborgbutthatsok)
- list.add(imcyborgbutthatsok);
+ hashCode = hashCode * 8191 + ((isSetImcyborgbutthatsok()) ? 131071 : 524287);
+ if (isSetImcyborgbutthatsok())
+ hashCode = hashCode * 8191 + imcyborgbutthatsok.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -12691,7 +14007,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -12701,7 +14017,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFrootloops()).compareTo(other.isSetFrootloops());
+ lastComparison = java.lang.Boolean.compare(isSetFrootloops(), other.isSetFrootloops());
if (lastComparison != 0) {
return lastComparison;
}
@@ -12711,7 +14027,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImcyborgbutthatsok()).compareTo(other.isSetImcyborgbutthatsok());
+ lastComparison = java.lang.Boolean.compare(isSetImcyborgbutthatsok(), other.isSetImcyborgbutthatsok());
if (lastComparison != 0) {
return lastComparison;
}
@@ -12724,21 +14040,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("setUploadOptions_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("setUploadOptions_result(");
boolean first = true;
sb.append("success:");
@@ -12784,7 +14103,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -12792,14 +14111,16 @@ public class SatelliteServer {
}
}
- private static class setUploadOptions_resultStandardSchemeFactory implements SchemeFactory {
+ private static class setUploadOptions_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setUploadOptions_resultStandardScheme getScheme() {
return new setUploadOptions_resultStandardScheme();
}
}
- private static class setUploadOptions_resultStandardScheme extends StandardScheme<setUploadOptions_result> {
+ private static class setUploadOptions_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<setUploadOptions_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, setUploadOptions_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -12848,6 +14169,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, setUploadOptions_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -12873,18 +14195,19 @@ public class SatelliteServer {
}
- private static class setUploadOptions_resultTupleSchemeFactory implements SchemeFactory {
+ private static class setUploadOptions_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setUploadOptions_resultTupleScheme getScheme() {
return new setUploadOptions_resultTupleScheme();
}
}
- private static class setUploadOptions_resultTupleScheme extends TupleScheme<setUploadOptions_result> {
+ private static class setUploadOptions_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<setUploadOptions_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, setUploadOptions_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -12908,8 +14231,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, setUploadOptions_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = new UploadOptions();
struct.success.read(iprot);
@@ -12928,29 +14251,30 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class cancelUpload_args implements org.apache.thrift.TBase<cancelUpload_args, cancelUpload_args._Fields>, java.io.Serializable, Cloneable, Comparable<cancelUpload_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelUpload_args");
private static final org.apache.thrift.protocol.TField UPLOAD_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("uploadToken", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new cancelUpload_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new cancelUpload_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new cancelUpload_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new cancelUpload_argsTupleSchemeFactory();
- public String uploadToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String uploadToken; // 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 {
UPLOAD_TOKEN((short)1, "uploadToken");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -12958,6 +14282,7 @@ public class SatelliteServer {
/**
* 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: // UPLOAD_TOKEN
@@ -12973,41 +14298,44 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.UPLOAD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("uploadToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelUpload_args.class, metaDataMap);
}
@@ -13015,7 +14343,7 @@ public class SatelliteServer {
}
public cancelUpload_args(
- String uploadToken)
+ java.lang.String uploadToken)
{
this();
this.uploadToken = uploadToken;
@@ -13030,6 +14358,7 @@ public class SatelliteServer {
}
}
+ @Override
public cancelUpload_args deepCopy() {
return new cancelUpload_args(this);
}
@@ -13039,11 +14368,12 @@ public class SatelliteServer {
this.uploadToken = null;
}
- public String getUploadToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUploadToken() {
return this.uploadToken;
}
- public cancelUpload_args setUploadToken(String uploadToken) {
+ public cancelUpload_args setUploadToken(@org.apache.thrift.annotation.Nullable java.lang.String uploadToken) {
this.uploadToken = uploadToken;
return this;
}
@@ -13063,45 +14393,47 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case UPLOAD_TOKEN:
if (value == null) {
unsetUploadToken();
} else {
- setUploadToken((String)value);
+ setUploadToken((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case UPLOAD_TOKEN:
return getUploadToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case UPLOAD_TOKEN:
return isSetUploadToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof cancelUpload_args)
return this.equals((cancelUpload_args)that);
return false;
@@ -13110,6 +14442,8 @@ public class SatelliteServer {
public boolean equals(cancelUpload_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_uploadToken = true && this.isSetUploadToken();
boolean that_present_uploadToken = true && that.isSetUploadToken();
@@ -13125,14 +14459,13 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_uploadToken = true && (isSetUploadToken());
- list.add(present_uploadToken);
- if (present_uploadToken)
- list.add(uploadToken);
+ hashCode = hashCode * 8191 + ((isSetUploadToken()) ? 131071 : 524287);
+ if (isSetUploadToken())
+ hashCode = hashCode * 8191 + uploadToken.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -13143,7 +14476,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUploadToken()).compareTo(other.isSetUploadToken());
+ lastComparison = java.lang.Boolean.compare(isSetUploadToken(), other.isSetUploadToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -13156,21 +14489,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("cancelUpload_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("cancelUpload_args(");
boolean first = true;
sb.append("uploadToken:");
@@ -13197,7 +14534,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -13205,14 +14542,16 @@ public class SatelliteServer {
}
}
- private static class cancelUpload_argsStandardSchemeFactory implements SchemeFactory {
+ private static class cancelUpload_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public cancelUpload_argsStandardScheme getScheme() {
return new cancelUpload_argsStandardScheme();
}
}
- private static class cancelUpload_argsStandardScheme extends StandardScheme<cancelUpload_args> {
+ private static class cancelUpload_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<cancelUpload_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, cancelUpload_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -13242,6 +14581,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, cancelUpload_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -13257,18 +14597,19 @@ public class SatelliteServer {
}
- private static class cancelUpload_argsTupleSchemeFactory implements SchemeFactory {
+ private static class cancelUpload_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public cancelUpload_argsTupleScheme getScheme() {
return new cancelUpload_argsTupleScheme();
}
}
- private static class cancelUpload_argsTupleScheme extends TupleScheme<cancelUpload_args> {
+ private static class cancelUpload_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<cancelUpload_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, cancelUpload_args 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.isSetUploadToken()) {
optionals.set(0);
}
@@ -13280,8 +14621,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, cancelUpload_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.uploadToken = iprot.readString();
struct.setUploadTokenIsSet(true);
@@ -13289,29 +14630,30 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class cancelUpload_result implements org.apache.thrift.TBase<cancelUpload_result, cancelUpload_result._Fields>, java.io.Serializable, Cloneable, Comparable<cancelUpload_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelUpload_result");
private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new cancelUpload_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new cancelUpload_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new cancelUpload_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new cancelUpload_resultTupleSchemeFactory();
- public TInvalidTokenException ex1; // required
+ public @org.apache.thrift.annotation.Nullable TInvalidTokenException ex1; // 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 {
EX1((short)1, "ex1");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -13319,6 +14661,7 @@ public class SatelliteServer {
/**
* 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: // EX1
@@ -13334,41 +14677,44 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidTokenException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelUpload_result.class, metaDataMap);
}
@@ -13391,6 +14737,7 @@ public class SatelliteServer {
}
}
+ @Override
public cancelUpload_result deepCopy() {
return new cancelUpload_result(this);
}
@@ -13400,11 +14747,12 @@ public class SatelliteServer {
this.ex1 = null;
}
+ @org.apache.thrift.annotation.Nullable
public TInvalidTokenException getEx1() {
return this.ex1;
}
- public cancelUpload_result setEx1(TInvalidTokenException ex1) {
+ public cancelUpload_result setEx1(@org.apache.thrift.annotation.Nullable TInvalidTokenException ex1) {
this.ex1 = ex1;
return this;
}
@@ -13424,7 +14772,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case EX1:
if (value == null) {
@@ -13437,32 +14786,33 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EX1:
return getEx1();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case EX1:
return isSetEx1();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof cancelUpload_result)
return this.equals((cancelUpload_result)that);
return false;
@@ -13471,6 +14821,8 @@ public class SatelliteServer {
public boolean equals(cancelUpload_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_ex1 = true && this.isSetEx1();
boolean that_present_ex1 = true && that.isSetEx1();
@@ -13486,14 +14838,13 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_ex1 = true && (isSetEx1());
- list.add(present_ex1);
- if (present_ex1)
- list.add(ex1);
+ hashCode = hashCode * 8191 + ((isSetEx1()) ? 131071 : 524287);
+ if (isSetEx1())
+ hashCode = hashCode * 8191 + ex1.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -13504,7 +14855,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
+ lastComparison = java.lang.Boolean.compare(isSetEx1(), other.isSetEx1());
if (lastComparison != 0) {
return lastComparison;
}
@@ -13517,21 +14868,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("cancelUpload_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("cancelUpload_result(");
boolean first = true;
sb.append("ex1:");
@@ -13558,7 +14912,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -13566,14 +14920,16 @@ public class SatelliteServer {
}
}
- private static class cancelUpload_resultStandardSchemeFactory implements SchemeFactory {
+ private static class cancelUpload_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public cancelUpload_resultStandardScheme getScheme() {
return new cancelUpload_resultStandardScheme();
}
}
- private static class cancelUpload_resultStandardScheme extends StandardScheme<cancelUpload_result> {
+ private static class cancelUpload_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<cancelUpload_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, cancelUpload_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -13604,6 +14960,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, cancelUpload_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -13619,18 +14976,19 @@ public class SatelliteServer {
}
- private static class cancelUpload_resultTupleSchemeFactory implements SchemeFactory {
+ private static class cancelUpload_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public cancelUpload_resultTupleScheme getScheme() {
return new cancelUpload_resultTupleScheme();
}
}
- private static class cancelUpload_resultTupleScheme extends TupleScheme<cancelUpload_result> {
+ private static class cancelUpload_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<cancelUpload_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, cancelUpload_result 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.isSetEx1()) {
optionals.set(0);
}
@@ -13642,8 +15000,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, cancelUpload_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.ex1 = new TInvalidTokenException();
struct.ex1.read(iprot);
@@ -13652,29 +15010,30 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class queryUploadStatus_args implements org.apache.thrift.TBase<queryUploadStatus_args, queryUploadStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<queryUploadStatus_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("queryUploadStatus_args");
private static final org.apache.thrift.protocol.TField UPLOAD_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("uploadToken", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new queryUploadStatus_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new queryUploadStatus_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new queryUploadStatus_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new queryUploadStatus_argsTupleSchemeFactory();
- public String uploadToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String uploadToken; // 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 {
UPLOAD_TOKEN((short)1, "uploadToken");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -13682,6 +15041,7 @@ public class SatelliteServer {
/**
* 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: // UPLOAD_TOKEN
@@ -13697,41 +15057,44 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.UPLOAD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("uploadToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queryUploadStatus_args.class, metaDataMap);
}
@@ -13739,7 +15102,7 @@ public class SatelliteServer {
}
public queryUploadStatus_args(
- String uploadToken)
+ java.lang.String uploadToken)
{
this();
this.uploadToken = uploadToken;
@@ -13754,6 +15117,7 @@ public class SatelliteServer {
}
}
+ @Override
public queryUploadStatus_args deepCopy() {
return new queryUploadStatus_args(this);
}
@@ -13763,11 +15127,12 @@ public class SatelliteServer {
this.uploadToken = null;
}
- public String getUploadToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUploadToken() {
return this.uploadToken;
}
- public queryUploadStatus_args setUploadToken(String uploadToken) {
+ public queryUploadStatus_args setUploadToken(@org.apache.thrift.annotation.Nullable java.lang.String uploadToken) {
this.uploadToken = uploadToken;
return this;
}
@@ -13787,45 +15152,47 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case UPLOAD_TOKEN:
if (value == null) {
unsetUploadToken();
} else {
- setUploadToken((String)value);
+ setUploadToken((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case UPLOAD_TOKEN:
return getUploadToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case UPLOAD_TOKEN:
return isSetUploadToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof queryUploadStatus_args)
return this.equals((queryUploadStatus_args)that);
return false;
@@ -13834,6 +15201,8 @@ public class SatelliteServer {
public boolean equals(queryUploadStatus_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_uploadToken = true && this.isSetUploadToken();
boolean that_present_uploadToken = true && that.isSetUploadToken();
@@ -13849,14 +15218,13 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_uploadToken = true && (isSetUploadToken());
- list.add(present_uploadToken);
- if (present_uploadToken)
- list.add(uploadToken);
+ hashCode = hashCode * 8191 + ((isSetUploadToken()) ? 131071 : 524287);
+ if (isSetUploadToken())
+ hashCode = hashCode * 8191 + uploadToken.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -13867,7 +15235,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUploadToken()).compareTo(other.isSetUploadToken());
+ lastComparison = java.lang.Boolean.compare(isSetUploadToken(), other.isSetUploadToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -13880,21 +15248,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("queryUploadStatus_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("queryUploadStatus_args(");
boolean first = true;
sb.append("uploadToken:");
@@ -13921,7 +15293,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -13929,14 +15301,16 @@ public class SatelliteServer {
}
}
- private static class queryUploadStatus_argsStandardSchemeFactory implements SchemeFactory {
+ private static class queryUploadStatus_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public queryUploadStatus_argsStandardScheme getScheme() {
return new queryUploadStatus_argsStandardScheme();
}
}
- private static class queryUploadStatus_argsStandardScheme extends StandardScheme<queryUploadStatus_args> {
+ private static class queryUploadStatus_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<queryUploadStatus_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, queryUploadStatus_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -13966,6 +15340,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, queryUploadStatus_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -13981,18 +15356,19 @@ public class SatelliteServer {
}
- private static class queryUploadStatus_argsTupleSchemeFactory implements SchemeFactory {
+ private static class queryUploadStatus_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public queryUploadStatus_argsTupleScheme getScheme() {
return new queryUploadStatus_argsTupleScheme();
}
}
- private static class queryUploadStatus_argsTupleScheme extends TupleScheme<queryUploadStatus_args> {
+ private static class queryUploadStatus_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<queryUploadStatus_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, queryUploadStatus_args 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.isSetUploadToken()) {
optionals.set(0);
}
@@ -14004,8 +15380,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, queryUploadStatus_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.uploadToken = iprot.readString();
struct.setUploadTokenIsSet(true);
@@ -14013,32 +15389,33 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class queryUploadStatus_result implements org.apache.thrift.TBase<queryUploadStatus_result, queryUploadStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<queryUploadStatus_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("queryUploadStatus_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new queryUploadStatus_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new queryUploadStatus_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new queryUploadStatus_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new queryUploadStatus_resultTupleSchemeFactory();
- public TransferStatus success; // required
- public TInvalidTokenException ex1; // required
+ public @org.apache.thrift.annotation.Nullable TransferStatus success; // required
+ public @org.apache.thrift.annotation.Nullable TInvalidTokenException ex1; // 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 {
SUCCESS((short)0, "success"),
EX1((short)1, "ex1");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -14046,6 +15423,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -14063,43 +15441,46 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransferStatus.class)));
tmpMap.put(_Fields.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidTokenException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(queryUploadStatus_result.class, metaDataMap);
}
@@ -14127,6 +15508,7 @@ public class SatelliteServer {
}
}
+ @Override
public queryUploadStatus_result deepCopy() {
return new queryUploadStatus_result(this);
}
@@ -14137,11 +15519,12 @@ public class SatelliteServer {
this.ex1 = null;
}
+ @org.apache.thrift.annotation.Nullable
public TransferStatus getSuccess() {
return this.success;
}
- public queryUploadStatus_result setSuccess(TransferStatus success) {
+ public queryUploadStatus_result setSuccess(@org.apache.thrift.annotation.Nullable TransferStatus success) {
this.success = success;
return this;
}
@@ -14161,11 +15544,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvalidTokenException getEx1() {
return this.ex1;
}
- public queryUploadStatus_result setEx1(TInvalidTokenException ex1) {
+ public queryUploadStatus_result setEx1(@org.apache.thrift.annotation.Nullable TInvalidTokenException ex1) {
this.ex1 = ex1;
return this;
}
@@ -14185,7 +15569,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -14206,7 +15591,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -14215,13 +15602,14 @@ public class SatelliteServer {
return getEx1();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -14230,13 +15618,11 @@ public class SatelliteServer {
case EX1:
return isSetEx1();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof queryUploadStatus_result)
return this.equals((queryUploadStatus_result)that);
return false;
@@ -14245,6 +15631,8 @@ public class SatelliteServer {
public boolean equals(queryUploadStatus_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -14269,19 +15657,17 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_ex1 = true && (isSetEx1());
- list.add(present_ex1);
- if (present_ex1)
- list.add(ex1);
+ hashCode = hashCode * 8191 + ((isSetEx1()) ? 131071 : 524287);
+ if (isSetEx1())
+ hashCode = hashCode * 8191 + ex1.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -14292,7 +15678,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -14302,7 +15688,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
+ lastComparison = java.lang.Boolean.compare(isSetEx1(), other.isSetEx1());
if (lastComparison != 0) {
return lastComparison;
}
@@ -14315,21 +15701,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("queryUploadStatus_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("queryUploadStatus_result(");
boolean first = true;
sb.append("success:");
@@ -14367,7 +15756,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -14375,14 +15764,16 @@ public class SatelliteServer {
}
}
- private static class queryUploadStatus_resultStandardSchemeFactory implements SchemeFactory {
+ private static class queryUploadStatus_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public queryUploadStatus_resultStandardScheme getScheme() {
return new queryUploadStatus_resultStandardScheme();
}
}
- private static class queryUploadStatus_resultStandardScheme extends StandardScheme<queryUploadStatus_result> {
+ private static class queryUploadStatus_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<queryUploadStatus_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, queryUploadStatus_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -14422,6 +15813,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, queryUploadStatus_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -14442,18 +15834,19 @@ public class SatelliteServer {
}
- private static class queryUploadStatus_resultTupleSchemeFactory implements SchemeFactory {
+ private static class queryUploadStatus_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public queryUploadStatus_resultTupleScheme getScheme() {
return new queryUploadStatus_resultTupleScheme();
}
}
- private static class queryUploadStatus_resultTupleScheme extends TupleScheme<queryUploadStatus_result> {
+ private static class queryUploadStatus_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<queryUploadStatus_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, queryUploadStatus_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -14471,8 +15864,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, queryUploadStatus_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.success = new TransferStatus();
struct.success.read(iprot);
@@ -14486,32 +15879,33 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class requestDownload_args implements org.apache.thrift.TBase<requestDownload_args, requestDownload_args._Fields>, java.io.Serializable, Cloneable, Comparable<requestDownload_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestDownload_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new requestDownload_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new requestDownload_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new requestDownload_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new requestDownload_argsTupleSchemeFactory();
- public String userToken; // required
- public String imageVersionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageVersionId; // 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 {
USER_TOKEN((short)1, "userToken"),
IMAGE_VERSION_ID((short)2, "imageVersionId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -14519,6 +15913,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -14536,43 +15931,46 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
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")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestDownload_args.class, metaDataMap);
}
@@ -14580,8 +15978,8 @@ public class SatelliteServer {
}
public requestDownload_args(
- String userToken,
- String imageVersionId)
+ java.lang.String userToken,
+ java.lang.String imageVersionId)
{
this();
this.userToken = userToken;
@@ -14600,6 +15998,7 @@ public class SatelliteServer {
}
}
+ @Override
public requestDownload_args deepCopy() {
return new requestDownload_args(this);
}
@@ -14610,11 +16009,12 @@ public class SatelliteServer {
this.imageVersionId = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public requestDownload_args setUserToken(String userToken) {
+ public requestDownload_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -14634,11 +16034,12 @@ public class SatelliteServer {
}
}
- public String getImageVersionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageVersionId() {
return this.imageVersionId;
}
- public requestDownload_args setImageVersionId(String imageVersionId) {
+ public requestDownload_args setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.String imageVersionId) {
this.imageVersionId = imageVersionId;
return this;
}
@@ -14658,13 +16059,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -14672,14 +16074,16 @@ public class SatelliteServer {
if (value == null) {
unsetImageVersionId();
} else {
- setImageVersionId((String)value);
+ setImageVersionId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -14688,13 +16092,14 @@ public class SatelliteServer {
return getImageVersionId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -14703,13 +16108,11 @@ public class SatelliteServer {
case IMAGE_VERSION_ID:
return isSetImageVersionId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof requestDownload_args)
return this.equals((requestDownload_args)that);
return false;
@@ -14718,6 +16121,8 @@ public class SatelliteServer {
public boolean equals(requestDownload_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -14742,19 +16147,17 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_imageVersionId = true && (isSetImageVersionId());
- list.add(present_imageVersionId);
- if (present_imageVersionId)
- list.add(imageVersionId);
+ hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287);
+ if (isSetImageVersionId())
+ hashCode = hashCode * 8191 + imageVersionId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -14765,7 +16168,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -14775,7 +16178,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ lastComparison = java.lang.Boolean.compare(isSetImageVersionId(), other.isSetImageVersionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -14788,21 +16191,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("requestDownload_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("requestDownload_args(");
boolean first = true;
sb.append("userToken:");
@@ -14837,7 +16244,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -14845,14 +16252,16 @@ public class SatelliteServer {
}
}
- private static class requestDownload_argsStandardSchemeFactory implements SchemeFactory {
+ private static class requestDownload_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public requestDownload_argsStandardScheme getScheme() {
return new requestDownload_argsStandardScheme();
}
}
- private static class requestDownload_argsStandardScheme extends StandardScheme<requestDownload_args> {
+ private static class requestDownload_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<requestDownload_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, requestDownload_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -14890,6 +16299,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, requestDownload_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -14910,18 +16320,19 @@ public class SatelliteServer {
}
- private static class requestDownload_argsTupleSchemeFactory implements SchemeFactory {
+ private static class requestDownload_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public requestDownload_argsTupleScheme getScheme() {
return new requestDownload_argsTupleScheme();
}
}
- private static class requestDownload_argsTupleScheme extends TupleScheme<requestDownload_args> {
+ private static class requestDownload_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<requestDownload_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, requestDownload_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -14939,8 +16350,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, requestDownload_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -14952,8 +16363,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class requestDownload_result implements org.apache.thrift.TBase<requestDownload_result, requestDownload_result._Fields>, java.io.Serializable, Cloneable, Comparable<requestDownload_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestDownload_result");
@@ -14963,17 +16378,14 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField FFFF_FIELD_DESC = new org.apache.thrift.protocol.TField("ffff", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField SDF_FIELD_DESC = new org.apache.thrift.protocol.TField("sdf", org.apache.thrift.protocol.TType.STRUCT, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new requestDownload_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new requestDownload_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new requestDownload_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new requestDownload_resultTupleSchemeFactory();
- public TransferInformation success; // required
- public TTransferRejectedException rejection; // required
- public TAuthorizationException authError; // required
- public TInvocationException ffff; // required
- public TNotFoundException sdf; // required
+ public @org.apache.thrift.annotation.Nullable TransferInformation success; // required
+ public @org.apache.thrift.annotation.Nullable TTransferRejectedException rejection; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException ffff; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException sdf; // 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 {
@@ -14983,10 +16395,10 @@ public class SatelliteServer {
FFFF((short)3, "ffff"),
SDF((short)4, "sdf");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -14994,6 +16406,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -15017,49 +16430,52 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TransferInformation.class)));
tmpMap.put(_Fields.REJECTION, new org.apache.thrift.meta_data.FieldMetaData("rejection", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTransferRejectedException.class)));
tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.FFFF, new org.apache.thrift.meta_data.FieldMetaData("ffff", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
tmpMap.put(_Fields.SDF, new org.apache.thrift.meta_data.FieldMetaData("sdf", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestDownload_result.class, metaDataMap);
}
@@ -15102,6 +16518,7 @@ public class SatelliteServer {
}
}
+ @Override
public requestDownload_result deepCopy() {
return new requestDownload_result(this);
}
@@ -15115,11 +16532,12 @@ public class SatelliteServer {
this.sdf = null;
}
+ @org.apache.thrift.annotation.Nullable
public TransferInformation getSuccess() {
return this.success;
}
- public requestDownload_result setSuccess(TransferInformation success) {
+ public requestDownload_result setSuccess(@org.apache.thrift.annotation.Nullable TransferInformation success) {
this.success = success;
return this;
}
@@ -15139,11 +16557,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TTransferRejectedException getRejection() {
return this.rejection;
}
- public requestDownload_result setRejection(TTransferRejectedException rejection) {
+ public requestDownload_result setRejection(@org.apache.thrift.annotation.Nullable TTransferRejectedException rejection) {
this.rejection = rejection;
return this;
}
@@ -15163,11 +16582,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public requestDownload_result setAuthError(TAuthorizationException authError) {
+ public requestDownload_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -15187,11 +16607,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getFfff() {
return this.ffff;
}
- public requestDownload_result setFfff(TInvocationException ffff) {
+ public requestDownload_result setFfff(@org.apache.thrift.annotation.Nullable TInvocationException ffff) {
this.ffff = ffff;
return this;
}
@@ -15211,11 +16632,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getSdf() {
return this.sdf;
}
- public requestDownload_result setSdf(TNotFoundException sdf) {
+ public requestDownload_result setSdf(@org.apache.thrift.annotation.Nullable TNotFoundException sdf) {
this.sdf = sdf;
return this;
}
@@ -15235,7 +16657,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -15280,7 +16703,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -15298,13 +16723,14 @@ public class SatelliteServer {
return getSdf();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -15319,13 +16745,11 @@ public class SatelliteServer {
case SDF:
return isSetSdf();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof requestDownload_result)
return this.equals((requestDownload_result)that);
return false;
@@ -15334,6 +16758,8 @@ public class SatelliteServer {
public boolean equals(requestDownload_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -15385,34 +16811,29 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_rejection = true && (isSetRejection());
- list.add(present_rejection);
- if (present_rejection)
- list.add(rejection);
+ hashCode = hashCode * 8191 + ((isSetRejection()) ? 131071 : 524287);
+ if (isSetRejection())
+ hashCode = hashCode * 8191 + rejection.hashCode();
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_ffff = true && (isSetFfff());
- list.add(present_ffff);
- if (present_ffff)
- list.add(ffff);
+ hashCode = hashCode * 8191 + ((isSetFfff()) ? 131071 : 524287);
+ if (isSetFfff())
+ hashCode = hashCode * 8191 + ffff.hashCode();
- boolean present_sdf = true && (isSetSdf());
- list.add(present_sdf);
- if (present_sdf)
- list.add(sdf);
+ hashCode = hashCode * 8191 + ((isSetSdf()) ? 131071 : 524287);
+ if (isSetSdf())
+ hashCode = hashCode * 8191 + sdf.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -15423,7 +16844,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -15433,7 +16854,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetRejection()).compareTo(other.isSetRejection());
+ lastComparison = java.lang.Boolean.compare(isSetRejection(), other.isSetRejection());
if (lastComparison != 0) {
return lastComparison;
}
@@ -15443,7 +16864,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -15453,7 +16874,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFfff()).compareTo(other.isSetFfff());
+ lastComparison = java.lang.Boolean.compare(isSetFfff(), other.isSetFfff());
if (lastComparison != 0) {
return lastComparison;
}
@@ -15463,7 +16884,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSdf()).compareTo(other.isSetSdf());
+ lastComparison = java.lang.Boolean.compare(isSetSdf(), other.isSetSdf());
if (lastComparison != 0) {
return lastComparison;
}
@@ -15476,21 +16897,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("requestDownload_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("requestDownload_result(");
boolean first = true;
sb.append("success:");
@@ -15552,7 +16976,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -15560,14 +16984,16 @@ public class SatelliteServer {
}
}
- private static class requestDownload_resultStandardSchemeFactory implements SchemeFactory {
+ private static class requestDownload_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public requestDownload_resultStandardScheme getScheme() {
return new requestDownload_resultStandardScheme();
}
}
- private static class requestDownload_resultStandardScheme extends StandardScheme<requestDownload_result> {
+ private static class requestDownload_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<requestDownload_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, requestDownload_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -15634,6 +17060,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, requestDownload_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -15669,18 +17096,19 @@ public class SatelliteServer {
}
- private static class requestDownload_resultTupleSchemeFactory implements SchemeFactory {
+ private static class requestDownload_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public requestDownload_resultTupleScheme getScheme() {
return new requestDownload_resultTupleScheme();
}
}
- private static class requestDownload_resultTupleScheme extends TupleScheme<requestDownload_result> {
+ private static class requestDownload_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<requestDownload_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, requestDownload_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -15716,8 +17144,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, requestDownload_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.success = new TransferInformation();
struct.success.read(iprot);
@@ -15746,29 +17174,30 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class cancelDownload_args implements org.apache.thrift.TBase<cancelDownload_args, cancelDownload_args._Fields>, java.io.Serializable, Cloneable, Comparable<cancelDownload_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelDownload_args");
private static final org.apache.thrift.protocol.TField DOWNLOAD_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("downloadToken", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new cancelDownload_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new cancelDownload_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new cancelDownload_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new cancelDownload_argsTupleSchemeFactory();
- public String downloadToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String downloadToken; // 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 {
DOWNLOAD_TOKEN((short)1, "downloadToken");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -15776,6 +17205,7 @@ public class SatelliteServer {
/**
* 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: // DOWNLOAD_TOKEN
@@ -15791,41 +17221,44 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.DOWNLOAD_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("downloadToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelDownload_args.class, metaDataMap);
}
@@ -15833,7 +17266,7 @@ public class SatelliteServer {
}
public cancelDownload_args(
- String downloadToken)
+ java.lang.String downloadToken)
{
this();
this.downloadToken = downloadToken;
@@ -15848,6 +17281,7 @@ public class SatelliteServer {
}
}
+ @Override
public cancelDownload_args deepCopy() {
return new cancelDownload_args(this);
}
@@ -15857,11 +17291,12 @@ public class SatelliteServer {
this.downloadToken = null;
}
- public String getDownloadToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getDownloadToken() {
return this.downloadToken;
}
- public cancelDownload_args setDownloadToken(String downloadToken) {
+ public cancelDownload_args setDownloadToken(@org.apache.thrift.annotation.Nullable java.lang.String downloadToken) {
this.downloadToken = downloadToken;
return this;
}
@@ -15881,45 +17316,47 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case DOWNLOAD_TOKEN:
if (value == null) {
unsetDownloadToken();
} else {
- setDownloadToken((String)value);
+ setDownloadToken((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case DOWNLOAD_TOKEN:
return getDownloadToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case DOWNLOAD_TOKEN:
return isSetDownloadToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof cancelDownload_args)
return this.equals((cancelDownload_args)that);
return false;
@@ -15928,6 +17365,8 @@ public class SatelliteServer {
public boolean equals(cancelDownload_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_downloadToken = true && this.isSetDownloadToken();
boolean that_present_downloadToken = true && that.isSetDownloadToken();
@@ -15943,14 +17382,13 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_downloadToken = true && (isSetDownloadToken());
- list.add(present_downloadToken);
- if (present_downloadToken)
- list.add(downloadToken);
+ hashCode = hashCode * 8191 + ((isSetDownloadToken()) ? 131071 : 524287);
+ if (isSetDownloadToken())
+ hashCode = hashCode * 8191 + downloadToken.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -15961,7 +17399,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetDownloadToken()).compareTo(other.isSetDownloadToken());
+ lastComparison = java.lang.Boolean.compare(isSetDownloadToken(), other.isSetDownloadToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -15974,21 +17412,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("cancelDownload_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("cancelDownload_args(");
boolean first = true;
sb.append("downloadToken:");
@@ -16015,7 +17457,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -16023,14 +17465,16 @@ public class SatelliteServer {
}
}
- private static class cancelDownload_argsStandardSchemeFactory implements SchemeFactory {
+ private static class cancelDownload_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public cancelDownload_argsStandardScheme getScheme() {
return new cancelDownload_argsStandardScheme();
}
}
- private static class cancelDownload_argsStandardScheme extends StandardScheme<cancelDownload_args> {
+ private static class cancelDownload_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<cancelDownload_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, cancelDownload_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -16060,6 +17504,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, cancelDownload_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -16075,18 +17520,19 @@ public class SatelliteServer {
}
- private static class cancelDownload_argsTupleSchemeFactory implements SchemeFactory {
+ private static class cancelDownload_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public cancelDownload_argsTupleScheme getScheme() {
return new cancelDownload_argsTupleScheme();
}
}
- private static class cancelDownload_argsTupleScheme extends TupleScheme<cancelDownload_args> {
+ private static class cancelDownload_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<cancelDownload_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, cancelDownload_args 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.isSetDownloadToken()) {
optionals.set(0);
}
@@ -16098,8 +17544,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, cancelDownload_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.downloadToken = iprot.readString();
struct.setDownloadTokenIsSet(true);
@@ -16107,29 +17553,30 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class cancelDownload_result implements org.apache.thrift.TBase<cancelDownload_result, cancelDownload_result._Fields>, java.io.Serializable, Cloneable, Comparable<cancelDownload_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("cancelDownload_result");
private static final org.apache.thrift.protocol.TField EX1_FIELD_DESC = new org.apache.thrift.protocol.TField("ex1", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new cancelDownload_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new cancelDownload_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new cancelDownload_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new cancelDownload_resultTupleSchemeFactory();
- public TInvalidTokenException ex1; // required
+ public @org.apache.thrift.annotation.Nullable TInvalidTokenException ex1; // 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 {
EX1((short)1, "ex1");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -16137,6 +17584,7 @@ public class SatelliteServer {
/**
* 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: // EX1
@@ -16152,41 +17600,44 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.EX1, new org.apache.thrift.meta_data.FieldMetaData("ex1", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidTokenException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(cancelDownload_result.class, metaDataMap);
}
@@ -16209,6 +17660,7 @@ public class SatelliteServer {
}
}
+ @Override
public cancelDownload_result deepCopy() {
return new cancelDownload_result(this);
}
@@ -16218,11 +17670,12 @@ public class SatelliteServer {
this.ex1 = null;
}
+ @org.apache.thrift.annotation.Nullable
public TInvalidTokenException getEx1() {
return this.ex1;
}
- public cancelDownload_result setEx1(TInvalidTokenException ex1) {
+ public cancelDownload_result setEx1(@org.apache.thrift.annotation.Nullable TInvalidTokenException ex1) {
this.ex1 = ex1;
return this;
}
@@ -16242,7 +17695,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case EX1:
if (value == null) {
@@ -16255,32 +17709,33 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EX1:
return getEx1();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case EX1:
return isSetEx1();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof cancelDownload_result)
return this.equals((cancelDownload_result)that);
return false;
@@ -16289,6 +17744,8 @@ public class SatelliteServer {
public boolean equals(cancelDownload_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_ex1 = true && this.isSetEx1();
boolean that_present_ex1 = true && that.isSetEx1();
@@ -16304,14 +17761,13 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_ex1 = true && (isSetEx1());
- list.add(present_ex1);
- if (present_ex1)
- list.add(ex1);
+ hashCode = hashCode * 8191 + ((isSetEx1()) ? 131071 : 524287);
+ if (isSetEx1())
+ hashCode = hashCode * 8191 + ex1.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -16322,7 +17778,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetEx1()).compareTo(other.isSetEx1());
+ lastComparison = java.lang.Boolean.compare(isSetEx1(), other.isSetEx1());
if (lastComparison != 0) {
return lastComparison;
}
@@ -16335,21 +17791,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("cancelDownload_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("cancelDownload_result(");
boolean first = true;
sb.append("ex1:");
@@ -16376,7 +17835,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -16384,14 +17843,16 @@ public class SatelliteServer {
}
}
- private static class cancelDownload_resultStandardSchemeFactory implements SchemeFactory {
+ private static class cancelDownload_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public cancelDownload_resultStandardScheme getScheme() {
return new cancelDownload_resultStandardScheme();
}
}
- private static class cancelDownload_resultStandardScheme extends StandardScheme<cancelDownload_result> {
+ private static class cancelDownload_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<cancelDownload_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, cancelDownload_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -16422,6 +17883,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, cancelDownload_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -16437,18 +17899,19 @@ public class SatelliteServer {
}
- private static class cancelDownload_resultTupleSchemeFactory implements SchemeFactory {
+ private static class cancelDownload_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public cancelDownload_resultTupleScheme getScheme() {
return new cancelDownload_resultTupleScheme();
}
}
- private static class cancelDownload_resultTupleScheme extends TupleScheme<cancelDownload_result> {
+ private static class cancelDownload_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<cancelDownload_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, cancelDownload_result 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.isSetEx1()) {
optionals.set(0);
}
@@ -16460,8 +17923,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, cancelDownload_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.ex1 = new TInvalidTokenException();
struct.ex1.read(iprot);
@@ -16470,29 +17933,30 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class isAuthenticated_args implements org.apache.thrift.TBase<isAuthenticated_args, isAuthenticated_args._Fields>, java.io.Serializable, Cloneable, Comparable<isAuthenticated_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isAuthenticated_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new isAuthenticated_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new isAuthenticated_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new isAuthenticated_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isAuthenticated_argsTupleSchemeFactory();
- public String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // 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 {
USER_TOKEN((short)1, "userToken");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -16500,6 +17964,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -16515,41 +17980,44 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isAuthenticated_args.class, metaDataMap);
}
@@ -16557,7 +18025,7 @@ public class SatelliteServer {
}
public isAuthenticated_args(
- String userToken)
+ java.lang.String userToken)
{
this();
this.userToken = userToken;
@@ -16572,6 +18040,7 @@ public class SatelliteServer {
}
}
+ @Override
public isAuthenticated_args deepCopy() {
return new isAuthenticated_args(this);
}
@@ -16581,11 +18050,12 @@ public class SatelliteServer {
this.userToken = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public isAuthenticated_args setUserToken(String userToken) {
+ public isAuthenticated_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -16605,45 +18075,47 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case USER_TOKEN:
return isSetUserToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof isAuthenticated_args)
return this.equals((isAuthenticated_args)that);
return false;
@@ -16652,6 +18124,8 @@ public class SatelliteServer {
public boolean equals(isAuthenticated_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -16667,14 +18141,13 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -16685,7 +18158,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -16698,21 +18171,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("isAuthenticated_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("isAuthenticated_args(");
boolean first = true;
sb.append("userToken:");
@@ -16739,7 +18216,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -16747,14 +18224,16 @@ public class SatelliteServer {
}
}
- private static class isAuthenticated_argsStandardSchemeFactory implements SchemeFactory {
+ private static class isAuthenticated_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public isAuthenticated_argsStandardScheme getScheme() {
return new isAuthenticated_argsStandardScheme();
}
}
- private static class isAuthenticated_argsStandardScheme extends StandardScheme<isAuthenticated_args> {
+ private static class isAuthenticated_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<isAuthenticated_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, isAuthenticated_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -16784,6 +18263,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, isAuthenticated_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -16799,18 +18279,19 @@ public class SatelliteServer {
}
- private static class isAuthenticated_argsTupleSchemeFactory implements SchemeFactory {
+ private static class isAuthenticated_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public isAuthenticated_argsTupleScheme getScheme() {
return new isAuthenticated_argsTupleScheme();
}
}
- private static class isAuthenticated_argsTupleScheme extends TupleScheme<isAuthenticated_args> {
+ private static class isAuthenticated_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<isAuthenticated_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, isAuthenticated_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -16822,8 +18303,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, isAuthenticated_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -16831,32 +18312,33 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class isAuthenticated_result implements org.apache.thrift.TBase<isAuthenticated_result, isAuthenticated_result._Fields>, java.io.Serializable, Cloneable, Comparable<isAuthenticated_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isAuthenticated_result");
private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new isAuthenticated_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new isAuthenticated_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new isAuthenticated_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isAuthenticated_resultTupleSchemeFactory();
- public TAuthorizationException authError; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
AUTH_ERROR((short)1, "authError"),
SERVER_ERROR((short)2, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -16864,6 +18346,7 @@ public class SatelliteServer {
/**
* 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: // AUTH_ERROR
@@ -16881,43 +18364,46 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isAuthenticated_result.class, metaDataMap);
}
@@ -16945,6 +18431,7 @@ public class SatelliteServer {
}
}
+ @Override
public isAuthenticated_result deepCopy() {
return new isAuthenticated_result(this);
}
@@ -16955,11 +18442,12 @@ public class SatelliteServer {
this.serverError = null;
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public isAuthenticated_result setAuthError(TAuthorizationException authError) {
+ public isAuthenticated_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -16979,11 +18467,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public isAuthenticated_result setServerError(TInvocationException serverError) {
+ public isAuthenticated_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -17003,7 +18492,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case AUTH_ERROR:
if (value == null) {
@@ -17024,7 +18514,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTH_ERROR:
return getAuthError();
@@ -17033,13 +18525,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -17048,13 +18541,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof isAuthenticated_result)
return this.equals((isAuthenticated_result)that);
return false;
@@ -17063,6 +18554,8 @@ public class SatelliteServer {
public boolean equals(isAuthenticated_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_authError = true && this.isSetAuthError();
boolean that_present_authError = true && that.isSetAuthError();
@@ -17087,19 +18580,17 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -17110,7 +18601,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -17120,7 +18611,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -17133,21 +18624,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("isAuthenticated_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("isAuthenticated_result(");
boolean first = true;
sb.append("authError:");
@@ -17182,7 +18676,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -17190,14 +18684,16 @@ public class SatelliteServer {
}
}
- private static class isAuthenticated_resultStandardSchemeFactory implements SchemeFactory {
+ private static class isAuthenticated_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public isAuthenticated_resultStandardScheme getScheme() {
return new isAuthenticated_resultStandardScheme();
}
}
- private static class isAuthenticated_resultStandardScheme extends StandardScheme<isAuthenticated_result> {
+ private static class isAuthenticated_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<isAuthenticated_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, isAuthenticated_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -17237,6 +18733,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, isAuthenticated_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -17257,18 +18754,19 @@ public class SatelliteServer {
}
- private static class isAuthenticated_resultTupleSchemeFactory implements SchemeFactory {
+ private static class isAuthenticated_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public isAuthenticated_resultTupleScheme getScheme() {
return new isAuthenticated_resultTupleScheme();
}
}
- private static class isAuthenticated_resultTupleScheme extends TupleScheme<isAuthenticated_result> {
+ private static class isAuthenticated_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<isAuthenticated_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, isAuthenticated_result 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.isSetAuthError()) {
optionals.set(0);
}
@@ -17286,8 +18784,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, isAuthenticated_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.authError = new TAuthorizationException();
struct.authError.read(iprot);
@@ -17301,29 +18799,30 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class whoami_args implements org.apache.thrift.TBase<whoami_args, whoami_args._Fields>, java.io.Serializable, Cloneable, Comparable<whoami_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("whoami_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new whoami_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new whoami_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new whoami_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new whoami_argsTupleSchemeFactory();
- public String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // 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 {
USER_TOKEN((short)1, "userToken");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -17331,6 +18830,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -17346,41 +18846,44 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(whoami_args.class, metaDataMap);
}
@@ -17388,7 +18891,7 @@ public class SatelliteServer {
}
public whoami_args(
- String userToken)
+ java.lang.String userToken)
{
this();
this.userToken = userToken;
@@ -17403,6 +18906,7 @@ public class SatelliteServer {
}
}
+ @Override
public whoami_args deepCopy() {
return new whoami_args(this);
}
@@ -17412,11 +18916,12 @@ public class SatelliteServer {
this.userToken = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public whoami_args setUserToken(String userToken) {
+ public whoami_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -17436,45 +18941,47 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case USER_TOKEN:
return isSetUserToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof whoami_args)
return this.equals((whoami_args)that);
return false;
@@ -17483,6 +18990,8 @@ public class SatelliteServer {
public boolean equals(whoami_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -17498,14 +19007,13 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -17516,7 +19024,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -17529,21 +19037,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("whoami_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("whoami_args(");
boolean first = true;
sb.append("userToken:");
@@ -17570,7 +19082,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -17578,14 +19090,16 @@ public class SatelliteServer {
}
}
- private static class whoami_argsStandardSchemeFactory implements SchemeFactory {
+ private static class whoami_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public whoami_argsStandardScheme getScheme() {
return new whoami_argsStandardScheme();
}
}
- private static class whoami_argsStandardScheme extends StandardScheme<whoami_args> {
+ private static class whoami_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<whoami_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, whoami_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -17615,6 +19129,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, whoami_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -17630,18 +19145,19 @@ public class SatelliteServer {
}
- private static class whoami_argsTupleSchemeFactory implements SchemeFactory {
+ private static class whoami_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public whoami_argsTupleScheme getScheme() {
return new whoami_argsTupleScheme();
}
}
- private static class whoami_argsTupleScheme extends TupleScheme<whoami_args> {
+ private static class whoami_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<whoami_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, whoami_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -17653,8 +19169,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, whoami_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -17662,8 +19178,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class whoami_result implements org.apache.thrift.TBase<whoami_result, whoami_result._Fields>, java.io.Serializable, Cloneable, Comparable<whoami_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("whoami_result");
@@ -17671,15 +19191,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new whoami_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new whoami_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new whoami_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new whoami_resultTupleSchemeFactory();
- public WhoamiInfo success; // required
- public TAuthorizationException authError; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable WhoamiInfo success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -17687,10 +19204,10 @@ public class SatelliteServer {
AUTH_ERROR((short)1, "authError"),
SERVER_ERROR((short)2, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -17698,6 +19215,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -17717,45 +19235,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, WhoamiInfo.class)));
tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(whoami_result.class, metaDataMap);
}
@@ -17788,6 +19309,7 @@ public class SatelliteServer {
}
}
+ @Override
public whoami_result deepCopy() {
return new whoami_result(this);
}
@@ -17799,11 +19321,12 @@ public class SatelliteServer {
this.serverError = null;
}
+ @org.apache.thrift.annotation.Nullable
public WhoamiInfo getSuccess() {
return this.success;
}
- public whoami_result setSuccess(WhoamiInfo success) {
+ public whoami_result setSuccess(@org.apache.thrift.annotation.Nullable WhoamiInfo success) {
this.success = success;
return this;
}
@@ -17823,11 +19346,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public whoami_result setAuthError(TAuthorizationException authError) {
+ public whoami_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -17847,11 +19371,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public whoami_result setServerError(TInvocationException serverError) {
+ public whoami_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -17871,7 +19396,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -17900,7 +19426,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -17912,13 +19440,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -17929,13 +19458,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof whoami_result)
return this.equals((whoami_result)that);
return false;
@@ -17944,6 +19471,8 @@ public class SatelliteServer {
public boolean equals(whoami_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -17977,24 +19506,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -18005,7 +19531,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -18015,7 +19541,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -18025,7 +19551,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -18038,21 +19564,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("whoami_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("whoami_result(");
boolean first = true;
sb.append("success:");
@@ -18098,7 +19627,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -18106,14 +19635,16 @@ public class SatelliteServer {
}
}
- private static class whoami_resultStandardSchemeFactory implements SchemeFactory {
+ private static class whoami_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public whoami_resultStandardScheme getScheme() {
return new whoami_resultStandardScheme();
}
}
- private static class whoami_resultStandardScheme extends StandardScheme<whoami_result> {
+ private static class whoami_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<whoami_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, whoami_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -18162,6 +19693,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, whoami_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -18187,18 +19719,19 @@ public class SatelliteServer {
}
- private static class whoami_resultTupleSchemeFactory implements SchemeFactory {
+ private static class whoami_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public whoami_resultTupleScheme getScheme() {
return new whoami_resultTupleScheme();
}
}
- private static class whoami_resultTupleScheme extends TupleScheme<whoami_result> {
+ private static class whoami_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<whoami_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, whoami_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -18222,8 +19755,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, whoami_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = new WhoamiInfo();
struct.success.read(iprot);
@@ -18242,29 +19775,30 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class invalidateSession_args implements org.apache.thrift.TBase<invalidateSession_args, invalidateSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<invalidateSession_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("invalidateSession_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new invalidateSession_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new invalidateSession_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new invalidateSession_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new invalidateSession_argsTupleSchemeFactory();
- public String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // 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 {
USER_TOKEN((short)1, "userToken");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -18272,6 +19806,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -18287,41 +19822,44 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(invalidateSession_args.class, metaDataMap);
}
@@ -18329,7 +19867,7 @@ public class SatelliteServer {
}
public invalidateSession_args(
- String userToken)
+ java.lang.String userToken)
{
this();
this.userToken = userToken;
@@ -18344,6 +19882,7 @@ public class SatelliteServer {
}
}
+ @Override
public invalidateSession_args deepCopy() {
return new invalidateSession_args(this);
}
@@ -18353,11 +19892,12 @@ public class SatelliteServer {
this.userToken = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public invalidateSession_args setUserToken(String userToken) {
+ public invalidateSession_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -18377,45 +19917,47 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case USER_TOKEN:
return isSetUserToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof invalidateSession_args)
return this.equals((invalidateSession_args)that);
return false;
@@ -18424,6 +19966,8 @@ public class SatelliteServer {
public boolean equals(invalidateSession_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -18439,14 +19983,13 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -18457,7 +20000,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -18470,21 +20013,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("invalidateSession_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("invalidateSession_args(");
boolean first = true;
sb.append("userToken:");
@@ -18511,7 +20058,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -18519,14 +20066,16 @@ public class SatelliteServer {
}
}
- private static class invalidateSession_argsStandardSchemeFactory implements SchemeFactory {
+ private static class invalidateSession_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public invalidateSession_argsStandardScheme getScheme() {
return new invalidateSession_argsStandardScheme();
}
}
- private static class invalidateSession_argsStandardScheme extends StandardScheme<invalidateSession_args> {
+ private static class invalidateSession_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<invalidateSession_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, invalidateSession_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -18556,6 +20105,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, invalidateSession_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -18571,18 +20121,19 @@ public class SatelliteServer {
}
- private static class invalidateSession_argsTupleSchemeFactory implements SchemeFactory {
+ private static class invalidateSession_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public invalidateSession_argsTupleScheme getScheme() {
return new invalidateSession_argsTupleScheme();
}
}
- private static class invalidateSession_argsTupleScheme extends TupleScheme<invalidateSession_args> {
+ private static class invalidateSession_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<invalidateSession_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, invalidateSession_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -18594,8 +20145,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, invalidateSession_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -18603,29 +20154,30 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class invalidateSession_result implements org.apache.thrift.TBase<invalidateSession_result, invalidateSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<invalidateSession_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("invalidateSession_result");
private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new invalidateSession_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new invalidateSession_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new invalidateSession_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new invalidateSession_resultTupleSchemeFactory();
- public TInvalidTokenException ex; // required
+ public @org.apache.thrift.annotation.Nullable TInvalidTokenException ex; // 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 {
EX((short)1, "ex");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -18633,6 +20185,7 @@ public class SatelliteServer {
/**
* 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: // EX
@@ -18648,41 +20201,44 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidTokenException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(invalidateSession_result.class, metaDataMap);
}
@@ -18705,6 +20261,7 @@ public class SatelliteServer {
}
}
+ @Override
public invalidateSession_result deepCopy() {
return new invalidateSession_result(this);
}
@@ -18714,11 +20271,12 @@ public class SatelliteServer {
this.ex = null;
}
+ @org.apache.thrift.annotation.Nullable
public TInvalidTokenException getEx() {
return this.ex;
}
- public invalidateSession_result setEx(TInvalidTokenException ex) {
+ public invalidateSession_result setEx(@org.apache.thrift.annotation.Nullable TInvalidTokenException ex) {
this.ex = ex;
return this;
}
@@ -18738,7 +20296,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case EX:
if (value == null) {
@@ -18751,32 +20310,33 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EX:
return getEx();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case EX:
return isSetEx();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof invalidateSession_result)
return this.equals((invalidateSession_result)that);
return false;
@@ -18785,6 +20345,8 @@ public class SatelliteServer {
public boolean equals(invalidateSession_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_ex = true && this.isSetEx();
boolean that_present_ex = true && that.isSetEx();
@@ -18800,14 +20362,13 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_ex = true && (isSetEx());
- list.add(present_ex);
- if (present_ex)
- list.add(ex);
+ hashCode = hashCode * 8191 + ((isSetEx()) ? 131071 : 524287);
+ if (isSetEx())
+ hashCode = hashCode * 8191 + ex.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -18818,7 +20379,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetEx()).compareTo(other.isSetEx());
+ lastComparison = java.lang.Boolean.compare(isSetEx(), other.isSetEx());
if (lastComparison != 0) {
return lastComparison;
}
@@ -18831,21 +20392,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("invalidateSession_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("invalidateSession_result(");
boolean first = true;
sb.append("ex:");
@@ -18872,7 +20436,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -18880,14 +20444,16 @@ public class SatelliteServer {
}
}
- private static class invalidateSession_resultStandardSchemeFactory implements SchemeFactory {
+ private static class invalidateSession_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public invalidateSession_resultStandardScheme getScheme() {
return new invalidateSession_resultStandardScheme();
}
}
- private static class invalidateSession_resultStandardScheme extends StandardScheme<invalidateSession_result> {
+ private static class invalidateSession_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<invalidateSession_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, invalidateSession_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -18918,6 +20484,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, invalidateSession_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -18933,18 +20500,19 @@ public class SatelliteServer {
}
- private static class invalidateSession_resultTupleSchemeFactory implements SchemeFactory {
+ private static class invalidateSession_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public invalidateSession_resultTupleScheme getScheme() {
return new invalidateSession_resultTupleScheme();
}
}
- private static class invalidateSession_resultTupleScheme extends TupleScheme<invalidateSession_result> {
+ private static class invalidateSession_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<invalidateSession_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, invalidateSession_result 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.isSetEx()) {
optionals.set(0);
}
@@ -18956,8 +20524,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, invalidateSession_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.ex = new TInvalidTokenException();
struct.ex.read(iprot);
@@ -18966,21 +20534,22 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getUserList_args implements org.apache.thrift.TBase<getUserList_args, getUserList_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserList_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserList_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField PAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("page", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getUserList_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getUserList_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUserList_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUserList_argsTupleSchemeFactory();
- public String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
public int page; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -18988,10 +20557,10 @@ public class SatelliteServer {
USER_TOKEN((short)1, "userToken"),
PAGE((short)2, "page");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -18999,6 +20568,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -19016,30 +20586,33 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -19047,14 +20620,14 @@ public class SatelliteServer {
// isset id assignments
private static final int __PAGE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.PAGE, new org.apache.thrift.meta_data.FieldMetaData("page", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserList_args.class, metaDataMap);
}
@@ -19062,7 +20635,7 @@ public class SatelliteServer {
}
public getUserList_args(
- String userToken,
+ java.lang.String userToken,
int page)
{
this();
@@ -19082,6 +20655,7 @@ public class SatelliteServer {
this.page = other.page;
}
+ @Override
public getUserList_args deepCopy() {
return new getUserList_args(this);
}
@@ -19093,11 +20667,12 @@ public class SatelliteServer {
this.page = 0;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public getUserList_args setUserToken(String userToken) {
+ public getUserList_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -19128,25 +20703,26 @@ public class SatelliteServer {
}
public void unsetPage() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID);
}
/** Returns true if field page is set (has been assigned a value) and false otherwise */
public boolean isSetPage() {
- return EncodingUtils.testBit(__isset_bitfield, __PAGE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PAGE_ISSET_ID);
}
public void setPageIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -19154,14 +20730,16 @@ public class SatelliteServer {
if (value == null) {
unsetPage();
} else {
- setPage((Integer)value);
+ setPage((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -19170,13 +20748,14 @@ public class SatelliteServer {
return getPage();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -19185,13 +20764,11 @@ public class SatelliteServer {
case PAGE:
return isSetPage();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getUserList_args)
return this.equals((getUserList_args)that);
return false;
@@ -19200,6 +20777,8 @@ public class SatelliteServer {
public boolean equals(getUserList_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -19224,19 +20803,15 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_page = true;
- list.add(present_page);
- if (present_page)
- list.add(page);
+ hashCode = hashCode * 8191 + page;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -19247,7 +20822,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -19257,7 +20832,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPage()).compareTo(other.isSetPage());
+ lastComparison = java.lang.Boolean.compare(isSetPage(), other.isSetPage());
if (lastComparison != 0) {
return lastComparison;
}
@@ -19270,21 +20845,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getUserList_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getUserList_args(");
boolean first = true;
sb.append("userToken:");
@@ -19315,7 +20894,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -19325,14 +20904,16 @@ public class SatelliteServer {
}
}
- private static class getUserList_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getUserList_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getUserList_argsStandardScheme getScheme() {
return new getUserList_argsStandardScheme();
}
}
- private static class getUserList_argsStandardScheme extends StandardScheme<getUserList_args> {
+ private static class getUserList_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getUserList_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getUserList_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -19370,6 +20951,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getUserList_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -19388,18 +20970,19 @@ public class SatelliteServer {
}
- private static class getUserList_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getUserList_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getUserList_argsTupleScheme getScheme() {
return new getUserList_argsTupleScheme();
}
}
- private static class getUserList_argsTupleScheme extends TupleScheme<getUserList_args> {
+ private static class getUserList_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getUserList_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUserList_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -19417,8 +21000,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUserList_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -19430,8 +21013,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getUserList_result implements org.apache.thrift.TBase<getUserList_result, getUserList_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserList_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserList_result");
@@ -19439,15 +21026,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getUserList_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getUserList_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUserList_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUserList_resultTupleSchemeFactory();
- public List<UserInfo> success; // required
- public TAuthorizationException failure; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<UserInfo> success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -19455,10 +21039,10 @@ public class SatelliteServer {
FAILURE((short)1, "failure"),
SERVER_ERROR((short)2, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -19466,6 +21050,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -19485,46 +21070,49 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", 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, UserInfo.class))));
tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserList_result.class, metaDataMap);
}
@@ -19532,7 +21120,7 @@ public class SatelliteServer {
}
public getUserList_result(
- List<UserInfo> success,
+ java.util.List<UserInfo> success,
TAuthorizationException failure,
TInvocationException serverError)
{
@@ -19547,7 +21135,7 @@ public class SatelliteServer {
*/
public getUserList_result(getUserList_result other) {
if (other.isSetSuccess()) {
- List<UserInfo> __this__success = new ArrayList<UserInfo>(other.success.size());
+ java.util.List<UserInfo> __this__success = new java.util.ArrayList<UserInfo>(other.success.size());
for (UserInfo other_element : other.success) {
__this__success.add(new UserInfo(other_element));
}
@@ -19561,6 +21149,7 @@ public class SatelliteServer {
}
}
+ @Override
public getUserList_result deepCopy() {
return new getUserList_result(this);
}
@@ -19576,22 +21165,24 @@ public class SatelliteServer {
return (this.success == null) ? 0 : this.success.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<UserInfo> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(UserInfo elem) {
if (this.success == null) {
- this.success = new ArrayList<UserInfo>();
+ this.success = new java.util.ArrayList<UserInfo>();
}
this.success.add(elem);
}
- public List<UserInfo> getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<UserInfo> getSuccess() {
return this.success;
}
- public getUserList_result setSuccess(List<UserInfo> success) {
+ public getUserList_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<UserInfo> success) {
this.success = success;
return this;
}
@@ -19611,11 +21202,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getFailure() {
return this.failure;
}
- public getUserList_result setFailure(TAuthorizationException failure) {
+ public getUserList_result setFailure(@org.apache.thrift.annotation.Nullable TAuthorizationException failure) {
this.failure = failure;
return this;
}
@@ -19635,11 +21227,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public getUserList_result setServerError(TInvocationException serverError) {
+ public getUserList_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -19659,13 +21252,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((List<UserInfo>)value);
+ setSuccess((java.util.List<UserInfo>)value);
}
break;
@@ -19688,7 +21282,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -19700,13 +21296,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -19717,13 +21314,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getUserList_result)
return this.equals((getUserList_result)that);
return false;
@@ -19732,6 +21327,8 @@ public class SatelliteServer {
public boolean equals(getUserList_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -19765,24 +21362,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_failure = true && (isSetFailure());
- list.add(present_failure);
- if (present_failure)
- list.add(failure);
+ hashCode = hashCode * 8191 + ((isSetFailure()) ? 131071 : 524287);
+ if (isSetFailure())
+ hashCode = hashCode * 8191 + failure.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -19793,7 +21387,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -19803,7 +21397,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
+ lastComparison = java.lang.Boolean.compare(isSetFailure(), other.isSetFailure());
if (lastComparison != 0) {
return lastComparison;
}
@@ -19813,7 +21407,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -19826,21 +21420,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getUserList_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getUserList_result(");
boolean first = true;
sb.append("success:");
@@ -19883,7 +21480,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -19891,14 +21488,16 @@ public class SatelliteServer {
}
}
- private static class getUserList_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getUserList_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getUserList_resultStandardScheme getScheme() {
return new getUserList_resultStandardScheme();
}
}
- private static class getUserList_resultStandardScheme extends StandardScheme<getUserList_result> {
+ private static class getUserList_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getUserList_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getUserList_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -19912,14 +21511,14 @@ public class SatelliteServer {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list234 = iprot.readListBegin();
- struct.success = new ArrayList<UserInfo>(_list234.size);
- UserInfo _elem235;
- for (int _i236 = 0; _i236 < _list234.size; ++_i236)
+ org.apache.thrift.protocol.TList _list314 = iprot.readListBegin();
+ struct.success = new java.util.ArrayList<UserInfo>(_list314.size);
+ @org.apache.thrift.annotation.Nullable UserInfo _elem315;
+ for (int _i316 = 0; _i316 < _list314.size; ++_i316)
{
- _elem235 = new UserInfo();
- _elem235.read(iprot);
- struct.success.add(_elem235);
+ _elem315 = new UserInfo();
+ _elem315.read(iprot);
+ struct.success.add(_elem315);
}
iprot.readListEnd();
}
@@ -19957,6 +21556,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getUserList_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -19965,9 +21565,9 @@ public class SatelliteServer {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (UserInfo _iter237 : struct.success)
+ for (UserInfo _iter317 : struct.success)
{
- _iter237.write(oprot);
+ _iter317.write(oprot);
}
oprot.writeListEnd();
}
@@ -19989,18 +21589,19 @@ public class SatelliteServer {
}
- private static class getUserList_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getUserList_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getUserList_resultTupleScheme getScheme() {
return new getUserList_resultTupleScheme();
}
}
- private static class getUserList_resultTupleScheme extends TupleScheme<getUserList_result> {
+ private static class getUserList_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getUserList_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUserList_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -20014,9 +21615,9 @@ public class SatelliteServer {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (UserInfo _iter238 : struct.success)
+ for (UserInfo _iter318 : struct.success)
{
- _iter238.write(oprot);
+ _iter318.write(oprot);
}
}
}
@@ -20030,18 +21631,18 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUserList_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list239 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<UserInfo>(_list239.size);
- UserInfo _elem240;
- for (int _i241 = 0; _i241 < _list239.size; ++_i241)
+ org.apache.thrift.protocol.TList _list319 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.success = new java.util.ArrayList<UserInfo>(_list319.size);
+ @org.apache.thrift.annotation.Nullable UserInfo _elem320;
+ for (int _i321 = 0; _i321 < _list319.size; ++_i321)
{
- _elem240 = new UserInfo();
- _elem240.read(iprot);
- struct.success.add(_elem240);
+ _elem320 = new UserInfo();
+ _elem320.read(iprot);
+ struct.success.add(_elem320);
}
}
struct.setSuccessIsSet(true);
@@ -20059,29 +21660,30 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getUserConfig_args implements org.apache.thrift.TBase<getUserConfig_args, getUserConfig_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserConfig_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserConfig_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getUserConfig_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getUserConfig_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUserConfig_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUserConfig_argsTupleSchemeFactory();
- public String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // 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 {
USER_TOKEN((short)1, "userToken");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -20089,6 +21691,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -20104,41 +21707,44 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserConfig_args.class, metaDataMap);
}
@@ -20146,7 +21752,7 @@ public class SatelliteServer {
}
public getUserConfig_args(
- String userToken)
+ java.lang.String userToken)
{
this();
this.userToken = userToken;
@@ -20161,6 +21767,7 @@ public class SatelliteServer {
}
}
+ @Override
public getUserConfig_args deepCopy() {
return new getUserConfig_args(this);
}
@@ -20170,11 +21777,12 @@ public class SatelliteServer {
this.userToken = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public getUserConfig_args setUserToken(String userToken) {
+ public getUserConfig_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -20194,45 +21802,47 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case USER_TOKEN:
return isSetUserToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getUserConfig_args)
return this.equals((getUserConfig_args)that);
return false;
@@ -20241,6 +21851,8 @@ public class SatelliteServer {
public boolean equals(getUserConfig_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -20256,14 +21868,13 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -20274,7 +21885,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -20287,21 +21898,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getUserConfig_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getUserConfig_args(");
boolean first = true;
sb.append("userToken:");
@@ -20328,7 +21943,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -20336,14 +21951,16 @@ public class SatelliteServer {
}
}
- private static class getUserConfig_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getUserConfig_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getUserConfig_argsStandardScheme getScheme() {
return new getUserConfig_argsStandardScheme();
}
}
- private static class getUserConfig_argsStandardScheme extends StandardScheme<getUserConfig_args> {
+ private static class getUserConfig_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getUserConfig_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getUserConfig_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -20373,6 +21990,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getUserConfig_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -20388,18 +22006,19 @@ public class SatelliteServer {
}
- private static class getUserConfig_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getUserConfig_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getUserConfig_argsTupleScheme getScheme() {
return new getUserConfig_argsTupleScheme();
}
}
- private static class getUserConfig_argsTupleScheme extends TupleScheme<getUserConfig_args> {
+ private static class getUserConfig_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getUserConfig_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUserConfig_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -20411,8 +22030,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUserConfig_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -20420,8 +22039,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getUserConfig_result implements org.apache.thrift.TBase<getUserConfig_result, getUserConfig_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserConfig_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getUserConfig_result");
@@ -20429,15 +22052,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getUserConfig_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getUserConfig_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getUserConfig_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getUserConfig_resultTupleSchemeFactory();
- public SatelliteUserConfig success; // required
- public TAuthorizationException failure; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable SatelliteUserConfig success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -20445,10 +22065,10 @@ public class SatelliteServer {
FAILURE((short)1, "failure"),
SERVER_ERROR((short)2, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -20456,6 +22076,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -20475,45 +22096,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SatelliteUserConfig.class)));
tmpMap.put(_Fields.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getUserConfig_result.class, metaDataMap);
}
@@ -20546,6 +22170,7 @@ public class SatelliteServer {
}
}
+ @Override
public getUserConfig_result deepCopy() {
return new getUserConfig_result(this);
}
@@ -20557,11 +22182,12 @@ public class SatelliteServer {
this.serverError = null;
}
+ @org.apache.thrift.annotation.Nullable
public SatelliteUserConfig getSuccess() {
return this.success;
}
- public getUserConfig_result setSuccess(SatelliteUserConfig success) {
+ public getUserConfig_result setSuccess(@org.apache.thrift.annotation.Nullable SatelliteUserConfig success) {
this.success = success;
return this;
}
@@ -20581,11 +22207,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getFailure() {
return this.failure;
}
- public getUserConfig_result setFailure(TAuthorizationException failure) {
+ public getUserConfig_result setFailure(@org.apache.thrift.annotation.Nullable TAuthorizationException failure) {
this.failure = failure;
return this;
}
@@ -20605,11 +22232,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public getUserConfig_result setServerError(TInvocationException serverError) {
+ public getUserConfig_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -20629,7 +22257,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -20658,7 +22287,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -20670,13 +22301,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -20687,13 +22319,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getUserConfig_result)
return this.equals((getUserConfig_result)that);
return false;
@@ -20702,6 +22332,8 @@ public class SatelliteServer {
public boolean equals(getUserConfig_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -20735,24 +22367,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_failure = true && (isSetFailure());
- list.add(present_failure);
- if (present_failure)
- list.add(failure);
+ hashCode = hashCode * 8191 + ((isSetFailure()) ? 131071 : 524287);
+ if (isSetFailure())
+ hashCode = hashCode * 8191 + failure.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -20763,7 +22392,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -20773,7 +22402,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
+ lastComparison = java.lang.Boolean.compare(isSetFailure(), other.isSetFailure());
if (lastComparison != 0) {
return lastComparison;
}
@@ -20783,7 +22412,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -20796,21 +22425,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getUserConfig_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getUserConfig_result(");
boolean first = true;
sb.append("success:");
@@ -20856,7 +22488,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -20864,14 +22496,16 @@ public class SatelliteServer {
}
}
- private static class getUserConfig_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getUserConfig_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getUserConfig_resultStandardScheme getScheme() {
return new getUserConfig_resultStandardScheme();
}
}
- private static class getUserConfig_resultStandardScheme extends StandardScheme<getUserConfig_result> {
+ private static class getUserConfig_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getUserConfig_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getUserConfig_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -20920,6 +22554,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getUserConfig_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -20945,18 +22580,19 @@ public class SatelliteServer {
}
- private static class getUserConfig_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getUserConfig_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getUserConfig_resultTupleScheme getScheme() {
return new getUserConfig_resultTupleScheme();
}
}
- private static class getUserConfig_resultTupleScheme extends TupleScheme<getUserConfig_result> {
+ private static class getUserConfig_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getUserConfig_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getUserConfig_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -20980,8 +22616,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getUserConfig_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = new SatelliteUserConfig();
struct.success.read(iprot);
@@ -21000,32 +22636,33 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class setUserConfig_args implements org.apache.thrift.TBase<setUserConfig_args, setUserConfig_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserConfig_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUserConfig_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField CONFIG_FIELD_DESC = new org.apache.thrift.protocol.TField("config", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setUserConfig_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setUserConfig_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setUserConfig_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setUserConfig_argsTupleSchemeFactory();
- public String userToken; // required
- public SatelliteUserConfig config; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable SatelliteUserConfig config; // 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 {
USER_TOKEN((short)1, "userToken"),
CONFIG((short)2, "config");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -21033,6 +22670,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -21050,43 +22688,46 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.CONFIG, new org.apache.thrift.meta_data.FieldMetaData("config", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SatelliteUserConfig.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUserConfig_args.class, metaDataMap);
}
@@ -21094,7 +22735,7 @@ public class SatelliteServer {
}
public setUserConfig_args(
- String userToken,
+ java.lang.String userToken,
SatelliteUserConfig config)
{
this();
@@ -21114,6 +22755,7 @@ public class SatelliteServer {
}
}
+ @Override
public setUserConfig_args deepCopy() {
return new setUserConfig_args(this);
}
@@ -21124,11 +22766,12 @@ public class SatelliteServer {
this.config = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public setUserConfig_args setUserToken(String userToken) {
+ public setUserConfig_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -21148,11 +22791,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public SatelliteUserConfig getConfig() {
return this.config;
}
- public setUserConfig_args setConfig(SatelliteUserConfig config) {
+ public setUserConfig_args setConfig(@org.apache.thrift.annotation.Nullable SatelliteUserConfig config) {
this.config = config;
return this;
}
@@ -21172,13 +22816,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -21193,7 +22838,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -21202,13 +22849,14 @@ public class SatelliteServer {
return getConfig();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -21217,13 +22865,11 @@ public class SatelliteServer {
case CONFIG:
return isSetConfig();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof setUserConfig_args)
return this.equals((setUserConfig_args)that);
return false;
@@ -21232,6 +22878,8 @@ public class SatelliteServer {
public boolean equals(setUserConfig_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -21256,19 +22904,17 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_config = true && (isSetConfig());
- list.add(present_config);
- if (present_config)
- list.add(config);
+ hashCode = hashCode * 8191 + ((isSetConfig()) ? 131071 : 524287);
+ if (isSetConfig())
+ hashCode = hashCode * 8191 + config.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -21279,7 +22925,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -21289,7 +22935,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetConfig()).compareTo(other.isSetConfig());
+ lastComparison = java.lang.Boolean.compare(isSetConfig(), other.isSetConfig());
if (lastComparison != 0) {
return lastComparison;
}
@@ -21302,21 +22948,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("setUserConfig_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("setUserConfig_args(");
boolean first = true;
sb.append("userToken:");
@@ -21354,7 +23004,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -21362,14 +23012,16 @@ public class SatelliteServer {
}
}
- private static class setUserConfig_argsStandardSchemeFactory implements SchemeFactory {
+ private static class setUserConfig_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setUserConfig_argsStandardScheme getScheme() {
return new setUserConfig_argsStandardScheme();
}
}
- private static class setUserConfig_argsStandardScheme extends StandardScheme<setUserConfig_args> {
+ private static class setUserConfig_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<setUserConfig_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, setUserConfig_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -21408,6 +23060,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, setUserConfig_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -21428,18 +23081,19 @@ public class SatelliteServer {
}
- private static class setUserConfig_argsTupleSchemeFactory implements SchemeFactory {
+ private static class setUserConfig_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setUserConfig_argsTupleScheme getScheme() {
return new setUserConfig_argsTupleScheme();
}
}
- private static class setUserConfig_argsTupleScheme extends TupleScheme<setUserConfig_args> {
+ private static class setUserConfig_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<setUserConfig_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, setUserConfig_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -21457,8 +23111,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, setUserConfig_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -21471,32 +23125,33 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class setUserConfig_result implements org.apache.thrift.TBase<setUserConfig_result, setUserConfig_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserConfig_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setUserConfig_result");
private static final org.apache.thrift.protocol.TField FAILURE_FIELD_DESC = new org.apache.thrift.protocol.TField("failure", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setUserConfig_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setUserConfig_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setUserConfig_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setUserConfig_resultTupleSchemeFactory();
- public TAuthorizationException failure; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException failure; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
FAILURE((short)1, "failure"),
SERVER_ERROR((short)2, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -21504,6 +23159,7 @@ public class SatelliteServer {
/**
* 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: // FAILURE
@@ -21521,43 +23177,46 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.FAILURE, new org.apache.thrift.meta_data.FieldMetaData("failure", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUserConfig_result.class, metaDataMap);
}
@@ -21585,6 +23244,7 @@ public class SatelliteServer {
}
}
+ @Override
public setUserConfig_result deepCopy() {
return new setUserConfig_result(this);
}
@@ -21595,11 +23255,12 @@ public class SatelliteServer {
this.serverError = null;
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getFailure() {
return this.failure;
}
- public setUserConfig_result setFailure(TAuthorizationException failure) {
+ public setUserConfig_result setFailure(@org.apache.thrift.annotation.Nullable TAuthorizationException failure) {
this.failure = failure;
return this;
}
@@ -21619,11 +23280,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public setUserConfig_result setServerError(TInvocationException serverError) {
+ public setUserConfig_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -21643,7 +23305,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case FAILURE:
if (value == null) {
@@ -21664,7 +23327,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case FAILURE:
return getFailure();
@@ -21673,13 +23338,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -21688,13 +23354,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof setUserConfig_result)
return this.equals((setUserConfig_result)that);
return false;
@@ -21703,6 +23367,8 @@ public class SatelliteServer {
public boolean equals(setUserConfig_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_failure = true && this.isSetFailure();
boolean that_present_failure = true && that.isSetFailure();
@@ -21727,19 +23393,17 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_failure = true && (isSetFailure());
- list.add(present_failure);
- if (present_failure)
- list.add(failure);
+ hashCode = hashCode * 8191 + ((isSetFailure()) ? 131071 : 524287);
+ if (isSetFailure())
+ hashCode = hashCode * 8191 + failure.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -21750,7 +23414,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetFailure()).compareTo(other.isSetFailure());
+ lastComparison = java.lang.Boolean.compare(isSetFailure(), other.isSetFailure());
if (lastComparison != 0) {
return lastComparison;
}
@@ -21760,7 +23424,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -21773,21 +23437,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("setUserConfig_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("setUserConfig_result(");
boolean first = true;
sb.append("failure:");
@@ -21822,7 +23489,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -21830,14 +23497,16 @@ public class SatelliteServer {
}
}
- private static class setUserConfig_resultStandardSchemeFactory implements SchemeFactory {
+ private static class setUserConfig_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setUserConfig_resultStandardScheme getScheme() {
return new setUserConfig_resultStandardScheme();
}
}
- private static class setUserConfig_resultStandardScheme extends StandardScheme<setUserConfig_result> {
+ private static class setUserConfig_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<setUserConfig_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, setUserConfig_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -21877,6 +23546,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, setUserConfig_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -21897,18 +23567,19 @@ public class SatelliteServer {
}
- private static class setUserConfig_resultTupleSchemeFactory implements SchemeFactory {
+ private static class setUserConfig_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setUserConfig_resultTupleScheme getScheme() {
return new setUserConfig_resultTupleScheme();
}
}
- private static class setUserConfig_resultTupleScheme extends TupleScheme<setUserConfig_result> {
+ private static class setUserConfig_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<setUserConfig_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, setUserConfig_result 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.isSetFailure()) {
optionals.set(0);
}
@@ -21926,8 +23597,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, setUserConfig_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.failure = new TAuthorizationException();
struct.failure.read(iprot);
@@ -21941,27 +23612,28 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getOperatingSystems_args implements org.apache.thrift.TBase<getOperatingSystems_args, getOperatingSystems_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOperatingSystems_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOperatingSystems_args");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getOperatingSystems_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getOperatingSystems_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getOperatingSystems_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getOperatingSystems_argsTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -21969,6 +23641,7 @@ public class SatelliteServer {
/**
* 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) {
default:
@@ -21982,37 +23655,40 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOperatingSystems_args.class, metaDataMap);
}
@@ -22025,6 +23701,7 @@ public class SatelliteServer {
public getOperatingSystems_args(getOperatingSystems_args other) {
}
+ @Override
public getOperatingSystems_args deepCopy() {
return new getOperatingSystems_args(this);
}
@@ -22033,32 +23710,34 @@ public class SatelliteServer {
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getOperatingSystems_args)
return this.equals((getOperatingSystems_args)that);
return false;
@@ -22067,15 +23746,17 @@ public class SatelliteServer {
public boolean equals(getOperatingSystems_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -22089,21 +23770,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getOperatingSystems_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getOperatingSystems_args(");
boolean first = true;
sb.append(")");
@@ -22123,7 +23808,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -22131,14 +23816,16 @@ public class SatelliteServer {
}
}
- private static class getOperatingSystems_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getOperatingSystems_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getOperatingSystems_argsStandardScheme getScheme() {
return new getOperatingSystems_argsStandardScheme();
}
}
- private static class getOperatingSystems_argsStandardScheme extends StandardScheme<getOperatingSystems_args> {
+ private static class getOperatingSystems_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getOperatingSystems_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getOperatingSystems_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -22160,6 +23847,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getOperatingSystems_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -22170,48 +23858,50 @@ public class SatelliteServer {
}
- private static class getOperatingSystems_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getOperatingSystems_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getOperatingSystems_argsTupleScheme getScheme() {
return new getOperatingSystems_argsTupleScheme();
}
}
- private static class getOperatingSystems_argsTupleScheme extends TupleScheme<getOperatingSystems_args> {
+ private static class getOperatingSystems_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getOperatingSystems_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getOperatingSystems_result implements org.apache.thrift.TBase<getOperatingSystems_result, getOperatingSystems_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOperatingSystems_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOperatingSystems_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getOperatingSystems_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getOperatingSystems_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getOperatingSystems_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getOperatingSystems_resultTupleSchemeFactory();
- public List<OperatingSystem> success; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<OperatingSystem> success; // 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 {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -22219,6 +23909,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -22234,42 +23925,45 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", 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, OperatingSystem.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOperatingSystems_result.class, metaDataMap);
}
@@ -22277,7 +23971,7 @@ public class SatelliteServer {
}
public getOperatingSystems_result(
- List<OperatingSystem> success)
+ java.util.List<OperatingSystem> success)
{
this();
this.success = success;
@@ -22288,7 +23982,7 @@ public class SatelliteServer {
*/
public getOperatingSystems_result(getOperatingSystems_result other) {
if (other.isSetSuccess()) {
- List<OperatingSystem> __this__success = new ArrayList<OperatingSystem>(other.success.size());
+ java.util.List<OperatingSystem> __this__success = new java.util.ArrayList<OperatingSystem>(other.success.size());
for (OperatingSystem other_element : other.success) {
__this__success.add(new OperatingSystem(other_element));
}
@@ -22296,6 +23990,7 @@ public class SatelliteServer {
}
}
+ @Override
public getOperatingSystems_result deepCopy() {
return new getOperatingSystems_result(this);
}
@@ -22309,22 +24004,24 @@ public class SatelliteServer {
return (this.success == null) ? 0 : this.success.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<OperatingSystem> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(OperatingSystem elem) {
if (this.success == null) {
- this.success = new ArrayList<OperatingSystem>();
+ this.success = new java.util.ArrayList<OperatingSystem>();
}
this.success.add(elem);
}
- public List<OperatingSystem> getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<OperatingSystem> getSuccess() {
return this.success;
}
- public getOperatingSystems_result setSuccess(List<OperatingSystem> success) {
+ public getOperatingSystems_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<OperatingSystem> success) {
this.success = success;
return this;
}
@@ -22344,45 +24041,47 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((List<OperatingSystem>)value);
+ setSuccess((java.util.List<OperatingSystem>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getOperatingSystems_result)
return this.equals((getOperatingSystems_result)that);
return false;
@@ -22391,6 +24090,8 @@ public class SatelliteServer {
public boolean equals(getOperatingSystems_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -22406,14 +24107,13 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -22424,7 +24124,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -22437,21 +24137,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getOperatingSystems_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getOperatingSystems_result(");
boolean first = true;
sb.append("success:");
@@ -22478,7 +24181,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -22486,14 +24189,16 @@ public class SatelliteServer {
}
}
- private static class getOperatingSystems_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getOperatingSystems_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getOperatingSystems_resultStandardScheme getScheme() {
return new getOperatingSystems_resultStandardScheme();
}
}
- private static class getOperatingSystems_resultStandardScheme extends StandardScheme<getOperatingSystems_result> {
+ private static class getOperatingSystems_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getOperatingSystems_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getOperatingSystems_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -22507,14 +24212,14 @@ public class SatelliteServer {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list242 = iprot.readListBegin();
- struct.success = new ArrayList<OperatingSystem>(_list242.size);
- OperatingSystem _elem243;
- for (int _i244 = 0; _i244 < _list242.size; ++_i244)
+ org.apache.thrift.protocol.TList _list322 = iprot.readListBegin();
+ struct.success = new java.util.ArrayList<OperatingSystem>(_list322.size);
+ @org.apache.thrift.annotation.Nullable OperatingSystem _elem323;
+ for (int _i324 = 0; _i324 < _list322.size; ++_i324)
{
- _elem243 = new OperatingSystem();
- _elem243.read(iprot);
- struct.success.add(_elem243);
+ _elem323 = new OperatingSystem();
+ _elem323.read(iprot);
+ struct.success.add(_elem323);
}
iprot.readListEnd();
}
@@ -22534,6 +24239,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getOperatingSystems_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -22542,9 +24248,9 @@ public class SatelliteServer {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (OperatingSystem _iter245 : struct.success)
+ for (OperatingSystem _iter325 : struct.success)
{
- _iter245.write(oprot);
+ _iter325.write(oprot);
}
oprot.writeListEnd();
}
@@ -22556,18 +24262,19 @@ public class SatelliteServer {
}
- private static class getOperatingSystems_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getOperatingSystems_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getOperatingSystems_resultTupleScheme getScheme() {
return new getOperatingSystems_resultTupleScheme();
}
}
- private static class getOperatingSystems_resultTupleScheme extends TupleScheme<getOperatingSystems_result> {
+ private static class getOperatingSystems_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getOperatingSystems_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -22575,9 +24282,9 @@ public class SatelliteServer {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (OperatingSystem _iter246 : struct.success)
+ for (OperatingSystem _iter326 : struct.success)
{
- _iter246.write(oprot);
+ _iter326.write(oprot);
}
}
}
@@ -22585,18 +24292,18 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getOperatingSystems_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list247 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<OperatingSystem>(_list247.size);
- OperatingSystem _elem248;
- for (int _i249 = 0; _i249 < _list247.size; ++_i249)
+ org.apache.thrift.protocol.TList _list327 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.success = new java.util.ArrayList<OperatingSystem>(_list327.size);
+ @org.apache.thrift.annotation.Nullable OperatingSystem _elem328;
+ for (int _i329 = 0; _i329 < _list327.size; ++_i329)
{
- _elem248 = new OperatingSystem();
- _elem248.read(iprot);
- struct.success.add(_elem248);
+ _elem328 = new OperatingSystem();
+ _elem328.read(iprot);
+ struct.success.add(_elem328);
}
}
struct.setSuccessIsSet(true);
@@ -22604,27 +24311,28 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getVirtualizers_args implements org.apache.thrift.TBase<getVirtualizers_args, getVirtualizers_args._Fields>, java.io.Serializable, Cloneable, Comparable<getVirtualizers_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVirtualizers_args");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getVirtualizers_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getVirtualizers_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getVirtualizers_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getVirtualizers_argsTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -22632,6 +24340,7 @@ public class SatelliteServer {
/**
* 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) {
default:
@@ -22645,37 +24354,40 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVirtualizers_args.class, metaDataMap);
}
@@ -22688,6 +24400,7 @@ public class SatelliteServer {
public getVirtualizers_args(getVirtualizers_args other) {
}
+ @Override
public getVirtualizers_args deepCopy() {
return new getVirtualizers_args(this);
}
@@ -22696,32 +24409,34 @@ public class SatelliteServer {
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getVirtualizers_args)
return this.equals((getVirtualizers_args)that);
return false;
@@ -22730,15 +24445,17 @@ public class SatelliteServer {
public boolean equals(getVirtualizers_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -22752,21 +24469,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getVirtualizers_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getVirtualizers_args(");
boolean first = true;
sb.append(")");
@@ -22786,7 +24507,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -22794,14 +24515,16 @@ public class SatelliteServer {
}
}
- private static class getVirtualizers_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getVirtualizers_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getVirtualizers_argsStandardScheme getScheme() {
return new getVirtualizers_argsStandardScheme();
}
}
- private static class getVirtualizers_argsStandardScheme extends StandardScheme<getVirtualizers_args> {
+ private static class getVirtualizers_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getVirtualizers_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getVirtualizers_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -22823,6 +24546,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getVirtualizers_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -22833,48 +24557,50 @@ public class SatelliteServer {
}
- private static class getVirtualizers_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getVirtualizers_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getVirtualizers_argsTupleScheme getScheme() {
return new getVirtualizers_argsTupleScheme();
}
}
- private static class getVirtualizers_argsTupleScheme extends TupleScheme<getVirtualizers_args> {
+ private static class getVirtualizers_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getVirtualizers_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getVirtualizers_result implements org.apache.thrift.TBase<getVirtualizers_result, getVirtualizers_result._Fields>, java.io.Serializable, Cloneable, Comparable<getVirtualizers_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVirtualizers_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getVirtualizers_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getVirtualizers_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getVirtualizers_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getVirtualizers_resultTupleSchemeFactory();
- public List<Virtualizer> success; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<Virtualizer> success; // 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 {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -22882,6 +24608,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -22897,42 +24624,45 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", 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, Virtualizer.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVirtualizers_result.class, metaDataMap);
}
@@ -22940,7 +24670,7 @@ public class SatelliteServer {
}
public getVirtualizers_result(
- List<Virtualizer> success)
+ java.util.List<Virtualizer> success)
{
this();
this.success = success;
@@ -22951,7 +24681,7 @@ public class SatelliteServer {
*/
public getVirtualizers_result(getVirtualizers_result other) {
if (other.isSetSuccess()) {
- List<Virtualizer> __this__success = new ArrayList<Virtualizer>(other.success.size());
+ java.util.List<Virtualizer> __this__success = new java.util.ArrayList<Virtualizer>(other.success.size());
for (Virtualizer other_element : other.success) {
__this__success.add(new Virtualizer(other_element));
}
@@ -22959,6 +24689,7 @@ public class SatelliteServer {
}
}
+ @Override
public getVirtualizers_result deepCopy() {
return new getVirtualizers_result(this);
}
@@ -22972,22 +24703,24 @@ public class SatelliteServer {
return (this.success == null) ? 0 : this.success.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<Virtualizer> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(Virtualizer elem) {
if (this.success == null) {
- this.success = new ArrayList<Virtualizer>();
+ this.success = new java.util.ArrayList<Virtualizer>();
}
this.success.add(elem);
}
- public List<Virtualizer> getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<Virtualizer> getSuccess() {
return this.success;
}
- public getVirtualizers_result setSuccess(List<Virtualizer> success) {
+ public getVirtualizers_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<Virtualizer> success) {
this.success = success;
return this;
}
@@ -23007,45 +24740,47 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((List<Virtualizer>)value);
+ setSuccess((java.util.List<Virtualizer>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getVirtualizers_result)
return this.equals((getVirtualizers_result)that);
return false;
@@ -23054,6 +24789,8 @@ public class SatelliteServer {
public boolean equals(getVirtualizers_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -23069,14 +24806,13 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -23087,7 +24823,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -23100,21 +24836,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getVirtualizers_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getVirtualizers_result(");
boolean first = true;
sb.append("success:");
@@ -23141,7 +24880,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -23149,14 +24888,16 @@ public class SatelliteServer {
}
}
- private static class getVirtualizers_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getVirtualizers_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getVirtualizers_resultStandardScheme getScheme() {
return new getVirtualizers_resultStandardScheme();
}
}
- private static class getVirtualizers_resultStandardScheme extends StandardScheme<getVirtualizers_result> {
+ private static class getVirtualizers_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getVirtualizers_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getVirtualizers_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -23170,14 +24911,14 @@ public class SatelliteServer {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list250 = iprot.readListBegin();
- struct.success = new ArrayList<Virtualizer>(_list250.size);
- Virtualizer _elem251;
- for (int _i252 = 0; _i252 < _list250.size; ++_i252)
+ org.apache.thrift.protocol.TList _list330 = iprot.readListBegin();
+ struct.success = new java.util.ArrayList<Virtualizer>(_list330.size);
+ @org.apache.thrift.annotation.Nullable Virtualizer _elem331;
+ for (int _i332 = 0; _i332 < _list330.size; ++_i332)
{
- _elem251 = new Virtualizer();
- _elem251.read(iprot);
- struct.success.add(_elem251);
+ _elem331 = new Virtualizer();
+ _elem331.read(iprot);
+ struct.success.add(_elem331);
}
iprot.readListEnd();
}
@@ -23197,6 +24938,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getVirtualizers_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -23205,9 +24947,9 @@ public class SatelliteServer {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Virtualizer _iter253 : struct.success)
+ for (Virtualizer _iter333 : struct.success)
{
- _iter253.write(oprot);
+ _iter333.write(oprot);
}
oprot.writeListEnd();
}
@@ -23219,18 +24961,19 @@ public class SatelliteServer {
}
- private static class getVirtualizers_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getVirtualizers_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getVirtualizers_resultTupleScheme getScheme() {
return new getVirtualizers_resultTupleScheme();
}
}
- private static class getVirtualizers_resultTupleScheme extends TupleScheme<getVirtualizers_result> {
+ private static class getVirtualizers_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getVirtualizers_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -23238,9 +24981,9 @@ public class SatelliteServer {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (Virtualizer _iter254 : struct.success)
+ for (Virtualizer _iter334 : struct.success)
{
- _iter254.write(oprot);
+ _iter334.write(oprot);
}
}
}
@@ -23248,18 +24991,18 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getVirtualizers_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list255 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<Virtualizer>(_list255.size);
- Virtualizer _elem256;
- for (int _i257 = 0; _i257 < _list255.size; ++_i257)
+ org.apache.thrift.protocol.TList _list335 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.success = new java.util.ArrayList<Virtualizer>(_list335.size);
+ @org.apache.thrift.annotation.Nullable Virtualizer _elem336;
+ for (int _i337 = 0; _i337 < _list335.size; ++_i337)
{
- _elem256 = new Virtualizer();
- _elem256.read(iprot);
- struct.success.add(_elem256);
+ _elem336 = new Virtualizer();
+ _elem336.read(iprot);
+ struct.success.add(_elem336);
}
}
struct.setSuccessIsSet(true);
@@ -23267,27 +25010,28 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getAllOrganizations_args implements org.apache.thrift.TBase<getAllOrganizations_args, getAllOrganizations_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrganizations_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllOrganizations_args");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getAllOrganizations_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getAllOrganizations_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAllOrganizations_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAllOrganizations_argsTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -23295,6 +25039,7 @@ public class SatelliteServer {
/**
* 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) {
default:
@@ -23308,37 +25053,40 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllOrganizations_args.class, metaDataMap);
}
@@ -23351,6 +25099,7 @@ public class SatelliteServer {
public getAllOrganizations_args(getAllOrganizations_args other) {
}
+ @Override
public getAllOrganizations_args deepCopy() {
return new getAllOrganizations_args(this);
}
@@ -23359,32 +25108,34 @@ public class SatelliteServer {
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getAllOrganizations_args)
return this.equals((getAllOrganizations_args)that);
return false;
@@ -23393,15 +25144,17 @@ public class SatelliteServer {
public boolean equals(getAllOrganizations_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -23415,21 +25168,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getAllOrganizations_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getAllOrganizations_args(");
boolean first = true;
sb.append(")");
@@ -23449,7 +25206,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -23457,14 +25214,16 @@ public class SatelliteServer {
}
}
- private static class getAllOrganizations_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getAllOrganizations_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getAllOrganizations_argsStandardScheme getScheme() {
return new getAllOrganizations_argsStandardScheme();
}
}
- private static class getAllOrganizations_argsStandardScheme extends StandardScheme<getAllOrganizations_args> {
+ private static class getAllOrganizations_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getAllOrganizations_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getAllOrganizations_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -23486,6 +25245,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getAllOrganizations_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -23496,48 +25256,50 @@ public class SatelliteServer {
}
- private static class getAllOrganizations_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getAllOrganizations_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getAllOrganizations_argsTupleScheme getScheme() {
return new getAllOrganizations_argsTupleScheme();
}
}
- private static class getAllOrganizations_argsTupleScheme extends TupleScheme<getAllOrganizations_args> {
+ private static class getAllOrganizations_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAllOrganizations_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getAllOrganizations_result implements org.apache.thrift.TBase<getAllOrganizations_result, getAllOrganizations_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrganizations_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllOrganizations_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getAllOrganizations_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getAllOrganizations_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAllOrganizations_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAllOrganizations_resultTupleSchemeFactory();
- public List<Organization> success; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<Organization> success; // 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 {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -23545,6 +25307,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -23560,42 +25323,45 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", 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, Organization.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllOrganizations_result.class, metaDataMap);
}
@@ -23603,7 +25369,7 @@ public class SatelliteServer {
}
public getAllOrganizations_result(
- List<Organization> success)
+ java.util.List<Organization> success)
{
this();
this.success = success;
@@ -23614,7 +25380,7 @@ public class SatelliteServer {
*/
public getAllOrganizations_result(getAllOrganizations_result other) {
if (other.isSetSuccess()) {
- List<Organization> __this__success = new ArrayList<Organization>(other.success.size());
+ java.util.List<Organization> __this__success = new java.util.ArrayList<Organization>(other.success.size());
for (Organization other_element : other.success) {
__this__success.add(new Organization(other_element));
}
@@ -23622,6 +25388,7 @@ public class SatelliteServer {
}
}
+ @Override
public getAllOrganizations_result deepCopy() {
return new getAllOrganizations_result(this);
}
@@ -23635,22 +25402,24 @@ public class SatelliteServer {
return (this.success == null) ? 0 : this.success.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<Organization> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(Organization elem) {
if (this.success == null) {
- this.success = new ArrayList<Organization>();
+ this.success = new java.util.ArrayList<Organization>();
}
this.success.add(elem);
}
- public List<Organization> getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<Organization> getSuccess() {
return this.success;
}
- public getAllOrganizations_result setSuccess(List<Organization> success) {
+ public getAllOrganizations_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<Organization> success) {
this.success = success;
return this;
}
@@ -23670,45 +25439,47 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((List<Organization>)value);
+ setSuccess((java.util.List<Organization>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getAllOrganizations_result)
return this.equals((getAllOrganizations_result)that);
return false;
@@ -23717,6 +25488,8 @@ public class SatelliteServer {
public boolean equals(getAllOrganizations_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -23732,14 +25505,13 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -23750,7 +25522,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -23763,21 +25535,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getAllOrganizations_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getAllOrganizations_result(");
boolean first = true;
sb.append("success:");
@@ -23804,7 +25579,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -23812,14 +25587,16 @@ public class SatelliteServer {
}
}
- private static class getAllOrganizations_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getAllOrganizations_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getAllOrganizations_resultStandardScheme getScheme() {
return new getAllOrganizations_resultStandardScheme();
}
}
- private static class getAllOrganizations_resultStandardScheme extends StandardScheme<getAllOrganizations_result> {
+ private static class getAllOrganizations_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getAllOrganizations_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getAllOrganizations_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -23833,14 +25610,14 @@ public class SatelliteServer {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list258 = iprot.readListBegin();
- struct.success = new ArrayList<Organization>(_list258.size);
- Organization _elem259;
- for (int _i260 = 0; _i260 < _list258.size; ++_i260)
+ org.apache.thrift.protocol.TList _list338 = iprot.readListBegin();
+ struct.success = new java.util.ArrayList<Organization>(_list338.size);
+ @org.apache.thrift.annotation.Nullable Organization _elem339;
+ for (int _i340 = 0; _i340 < _list338.size; ++_i340)
{
- _elem259 = new Organization();
- _elem259.read(iprot);
- struct.success.add(_elem259);
+ _elem339 = new Organization();
+ _elem339.read(iprot);
+ struct.success.add(_elem339);
}
iprot.readListEnd();
}
@@ -23860,6 +25637,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getAllOrganizations_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -23868,9 +25646,9 @@ public class SatelliteServer {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Organization _iter261 : struct.success)
+ for (Organization _iter341 : struct.success)
{
- _iter261.write(oprot);
+ _iter341.write(oprot);
}
oprot.writeListEnd();
}
@@ -23882,18 +25660,19 @@ public class SatelliteServer {
}
- private static class getAllOrganizations_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getAllOrganizations_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getAllOrganizations_resultTupleScheme getScheme() {
return new getAllOrganizations_resultTupleScheme();
}
}
- private static class getAllOrganizations_resultTupleScheme extends TupleScheme<getAllOrganizations_result> {
+ private static class getAllOrganizations_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getAllOrganizations_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -23901,9 +25680,9 @@ public class SatelliteServer {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (Organization _iter262 : struct.success)
+ for (Organization _iter342 : struct.success)
{
- _iter262.write(oprot);
+ _iter342.write(oprot);
}
}
}
@@ -23911,18 +25690,18 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getAllOrganizations_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list263 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<Organization>(_list263.size);
- Organization _elem264;
- for (int _i265 = 0; _i265 < _list263.size; ++_i265)
+ org.apache.thrift.protocol.TList _list343 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.success = new java.util.ArrayList<Organization>(_list343.size);
+ @org.apache.thrift.annotation.Nullable Organization _elem344;
+ for (int _i345 = 0; _i345 < _list343.size; ++_i345)
{
- _elem264 = new Organization();
- _elem264.read(iprot);
- struct.success.add(_elem264);
+ _elem344 = new Organization();
+ _elem344.read(iprot);
+ struct.success.add(_elem344);
}
}
struct.setSuccessIsSet(true);
@@ -23930,27 +25709,28 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getLocations_args implements org.apache.thrift.TBase<getLocations_args, getLocations_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLocations_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLocations_args");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLocations_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLocations_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getLocations_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getLocations_argsTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -23958,6 +25738,7 @@ public class SatelliteServer {
/**
* 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) {
default:
@@ -23971,37 +25752,40 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLocations_args.class, metaDataMap);
}
@@ -24014,6 +25798,7 @@ public class SatelliteServer {
public getLocations_args(getLocations_args other) {
}
+ @Override
public getLocations_args deepCopy() {
return new getLocations_args(this);
}
@@ -24022,32 +25807,34 @@ public class SatelliteServer {
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getLocations_args)
return this.equals((getLocations_args)that);
return false;
@@ -24056,15 +25843,17 @@ public class SatelliteServer {
public boolean equals(getLocations_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -24078,21 +25867,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getLocations_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getLocations_args(");
boolean first = true;
sb.append(")");
@@ -24112,7 +25905,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -24120,14 +25913,16 @@ public class SatelliteServer {
}
}
- private static class getLocations_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getLocations_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getLocations_argsStandardScheme getScheme() {
return new getLocations_argsStandardScheme();
}
}
- private static class getLocations_argsStandardScheme extends StandardScheme<getLocations_args> {
+ private static class getLocations_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getLocations_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getLocations_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -24149,6 +25944,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getLocations_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -24159,48 +25955,50 @@ public class SatelliteServer {
}
- private static class getLocations_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getLocations_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getLocations_argsTupleScheme getScheme() {
return new getLocations_argsTupleScheme();
}
}
- private static class getLocations_argsTupleScheme extends TupleScheme<getLocations_args> {
+ private static class getLocations_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getLocations_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getLocations_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getLocations_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getLocations_result implements org.apache.thrift.TBase<getLocations_result, getLocations_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLocations_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLocations_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLocations_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLocations_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getLocations_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getLocations_resultTupleSchemeFactory();
- public List<Location> success; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<Location> success; // 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 {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -24208,6 +26006,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -24223,42 +26022,45 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", 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, Location.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLocations_result.class, metaDataMap);
}
@@ -24266,7 +26068,7 @@ public class SatelliteServer {
}
public getLocations_result(
- List<Location> success)
+ java.util.List<Location> success)
{
this();
this.success = success;
@@ -24277,7 +26079,7 @@ public class SatelliteServer {
*/
public getLocations_result(getLocations_result other) {
if (other.isSetSuccess()) {
- List<Location> __this__success = new ArrayList<Location>(other.success.size());
+ java.util.List<Location> __this__success = new java.util.ArrayList<Location>(other.success.size());
for (Location other_element : other.success) {
__this__success.add(new Location(other_element));
}
@@ -24285,6 +26087,7 @@ public class SatelliteServer {
}
}
+ @Override
public getLocations_result deepCopy() {
return new getLocations_result(this);
}
@@ -24298,22 +26101,24 @@ public class SatelliteServer {
return (this.success == null) ? 0 : this.success.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<Location> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(Location elem) {
if (this.success == null) {
- this.success = new ArrayList<Location>();
+ this.success = new java.util.ArrayList<Location>();
}
this.success.add(elem);
}
- public List<Location> getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<Location> getSuccess() {
return this.success;
}
- public getLocations_result setSuccess(List<Location> success) {
+ public getLocations_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<Location> success) {
this.success = success;
return this;
}
@@ -24333,45 +26138,47 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((List<Location>)value);
+ setSuccess((java.util.List<Location>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getLocations_result)
return this.equals((getLocations_result)that);
return false;
@@ -24380,6 +26187,8 @@ public class SatelliteServer {
public boolean equals(getLocations_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -24395,14 +26204,13 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -24413,7 +26221,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -24426,21 +26234,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getLocations_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getLocations_result(");
boolean first = true;
sb.append("success:");
@@ -24467,7 +26278,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -24475,14 +26286,16 @@ public class SatelliteServer {
}
}
- private static class getLocations_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getLocations_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getLocations_resultStandardScheme getScheme() {
return new getLocations_resultStandardScheme();
}
}
- private static class getLocations_resultStandardScheme extends StandardScheme<getLocations_result> {
+ private static class getLocations_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getLocations_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getLocations_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -24496,14 +26309,14 @@ public class SatelliteServer {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list266 = iprot.readListBegin();
- struct.success = new ArrayList<Location>(_list266.size);
- Location _elem267;
- for (int _i268 = 0; _i268 < _list266.size; ++_i268)
+ org.apache.thrift.protocol.TList _list346 = iprot.readListBegin();
+ struct.success = new java.util.ArrayList<Location>(_list346.size);
+ @org.apache.thrift.annotation.Nullable Location _elem347;
+ for (int _i348 = 0; _i348 < _list346.size; ++_i348)
{
- _elem267 = new Location();
- _elem267.read(iprot);
- struct.success.add(_elem267);
+ _elem347 = new Location();
+ _elem347.read(iprot);
+ struct.success.add(_elem347);
}
iprot.readListEnd();
}
@@ -24523,6 +26336,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getLocations_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -24531,9 +26345,9 @@ public class SatelliteServer {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Location _iter269 : struct.success)
+ for (Location _iter349 : struct.success)
{
- _iter269.write(oprot);
+ _iter349.write(oprot);
}
oprot.writeListEnd();
}
@@ -24545,18 +26359,19 @@ public class SatelliteServer {
}
- private static class getLocations_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getLocations_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getLocations_resultTupleScheme getScheme() {
return new getLocations_resultTupleScheme();
}
}
- private static class getLocations_resultTupleScheme extends TupleScheme<getLocations_result> {
+ private static class getLocations_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getLocations_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getLocations_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -24564,9 +26379,9 @@ public class SatelliteServer {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (Location _iter270 : struct.success)
+ for (Location _iter350 : struct.success)
{
- _iter270.write(oprot);
+ _iter350.write(oprot);
}
}
}
@@ -24574,18 +26389,18 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getLocations_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list271 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<Location>(_list271.size);
- Location _elem272;
- for (int _i273 = 0; _i273 < _list271.size; ++_i273)
+ org.apache.thrift.protocol.TList _list351 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.success = new java.util.ArrayList<Location>(_list351.size);
+ @org.apache.thrift.annotation.Nullable Location _elem352;
+ for (int _i353 = 0; _i353 < _list351.size; ++_i353)
{
- _elem272 = new Location();
- _elem272.read(iprot);
- struct.success.add(_elem272);
+ _elem352 = new Location();
+ _elem352.read(iprot);
+ struct.success.add(_elem352);
}
}
struct.setSuccessIsSet(true);
@@ -24593,27 +26408,28 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getStatus_args implements org.apache.thrift.TBase<getStatus_args, getStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getStatus_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getStatus_args");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getStatus_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getStatus_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getStatus_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getStatus_argsTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -24621,6 +26437,7 @@ public class SatelliteServer {
/**
* 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) {
default:
@@ -24634,37 +26451,40 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getStatus_args.class, metaDataMap);
}
@@ -24677,6 +26497,7 @@ public class SatelliteServer {
public getStatus_args(getStatus_args other) {
}
+ @Override
public getStatus_args deepCopy() {
return new getStatus_args(this);
}
@@ -24685,32 +26506,34 @@ public class SatelliteServer {
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getStatus_args)
return this.equals((getStatus_args)that);
return false;
@@ -24719,15 +26542,17 @@ public class SatelliteServer {
public boolean equals(getStatus_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -24741,21 +26566,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getStatus_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getStatus_args(");
boolean first = true;
sb.append(")");
@@ -24775,7 +26604,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -24783,14 +26612,16 @@ public class SatelliteServer {
}
}
- private static class getStatus_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getStatus_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getStatus_argsStandardScheme getScheme() {
return new getStatus_argsStandardScheme();
}
}
- private static class getStatus_argsStandardScheme extends StandardScheme<getStatus_args> {
+ private static class getStatus_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getStatus_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getStatus_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -24812,6 +26643,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getStatus_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -24822,48 +26654,50 @@ public class SatelliteServer {
}
- private static class getStatus_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getStatus_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getStatus_argsTupleScheme getScheme() {
return new getStatus_argsTupleScheme();
}
}
- private static class getStatus_argsTupleScheme extends TupleScheme<getStatus_args> {
+ private static class getStatus_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getStatus_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getStatus_args struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getStatus_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getStatus_result implements org.apache.thrift.TBase<getStatus_result, getStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getStatus_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getStatus_result");
private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getStatus_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getStatus_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getStatus_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getStatus_resultTupleSchemeFactory();
- public SatelliteStatus success; // required
+ public @org.apache.thrift.annotation.Nullable SatelliteStatus success; // 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 {
SUCCESS((short)0, "success");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -24871,6 +26705,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -24886,41 +26721,44 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SatelliteStatus.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getStatus_result.class, metaDataMap);
}
@@ -24943,6 +26781,7 @@ public class SatelliteServer {
}
}
+ @Override
public getStatus_result deepCopy() {
return new getStatus_result(this);
}
@@ -24952,11 +26791,12 @@ public class SatelliteServer {
this.success = null;
}
+ @org.apache.thrift.annotation.Nullable
public SatelliteStatus getSuccess() {
return this.success;
}
- public getStatus_result setSuccess(SatelliteStatus success) {
+ public getStatus_result setSuccess(@org.apache.thrift.annotation.Nullable SatelliteStatus success) {
this.success = success;
return this;
}
@@ -24976,7 +26816,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -24989,32 +26830,33 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SUCCESS:
return isSetSuccess();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getStatus_result)
return this.equals((getStatus_result)that);
return false;
@@ -25023,6 +26865,8 @@ public class SatelliteServer {
public boolean equals(getStatus_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -25038,14 +26882,13 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -25056,7 +26899,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -25069,21 +26912,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getStatus_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getStatus_result(");
boolean first = true;
sb.append("success:");
@@ -25113,7 +26959,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -25121,14 +26967,16 @@ public class SatelliteServer {
}
}
- private static class getStatus_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getStatus_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getStatus_resultStandardScheme getScheme() {
return new getStatus_resultStandardScheme();
}
}
- private static class getStatus_resultStandardScheme extends StandardScheme<getStatus_result> {
+ private static class getStatus_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getStatus_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getStatus_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -25159,6 +27007,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getStatus_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -25174,18 +27023,19 @@ public class SatelliteServer {
}
- private static class getStatus_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getStatus_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getStatus_resultTupleScheme getScheme() {
return new getStatus_resultTupleScheme();
}
}
- private static class getStatus_resultTupleScheme extends TupleScheme<getStatus_result> {
+ private static class getStatus_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getStatus_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getStatus_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -25197,8 +27047,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getStatus_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.success = new SatelliteStatus();
struct.success.read(iprot);
@@ -25207,8 +27057,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getImageList_args implements org.apache.thrift.TBase<getImageList_args, getImageList_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImageList_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageList_args");
@@ -25216,14 +27070,11 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField TAG_SEARCH_FIELD_DESC = new org.apache.thrift.protocol.TField("tagSearch", org.apache.thrift.protocol.TType.LIST, (short)2);
private static final org.apache.thrift.protocol.TField PAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("page", org.apache.thrift.protocol.TType.I32, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageList_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageList_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImageList_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImageList_argsTupleSchemeFactory();
- public String userToken; // required
- public List<String> tagSearch; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> tagSearch; // required
public int page; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -25232,10 +27083,10 @@ public class SatelliteServer {
TAG_SEARCH((short)2, "tagSearch"),
PAGE((short)3, "page");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -25243,6 +27094,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -25262,30 +27114,33 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -25293,9 +27148,9 @@ public class SatelliteServer {
// isset id assignments
private static final int __PAGE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.TAG_SEARCH, new org.apache.thrift.meta_data.FieldMetaData("tagSearch", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -25303,7 +27158,7 @@ public class SatelliteServer {
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.PAGE, new org.apache.thrift.meta_data.FieldMetaData("page", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageList_args.class, metaDataMap);
}
@@ -25311,8 +27166,8 @@ public class SatelliteServer {
}
public getImageList_args(
- String userToken,
- List<String> tagSearch,
+ java.lang.String userToken,
+ java.util.List<java.lang.String> tagSearch,
int page)
{
this();
@@ -25331,12 +27186,13 @@ public class SatelliteServer {
this.userToken = other.userToken;
}
if (other.isSetTagSearch()) {
- List<String> __this__tagSearch = new ArrayList<String>(other.tagSearch);
+ java.util.List<java.lang.String> __this__tagSearch = new java.util.ArrayList<java.lang.String>(other.tagSearch);
this.tagSearch = __this__tagSearch;
}
this.page = other.page;
}
+ @Override
public getImageList_args deepCopy() {
return new getImageList_args(this);
}
@@ -25349,11 +27205,12 @@ public class SatelliteServer {
this.page = 0;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public getImageList_args setUserToken(String userToken) {
+ public getImageList_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -25377,22 +27234,24 @@ public class SatelliteServer {
return (this.tagSearch == null) ? 0 : this.tagSearch.size();
}
- public java.util.Iterator<String> getTagSearchIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> getTagSearchIterator() {
return (this.tagSearch == null) ? null : this.tagSearch.iterator();
}
- public void addToTagSearch(String elem) {
+ public void addToTagSearch(java.lang.String elem) {
if (this.tagSearch == null) {
- this.tagSearch = new ArrayList<String>();
+ this.tagSearch = new java.util.ArrayList<java.lang.String>();
}
this.tagSearch.add(elem);
}
- public List<String> getTagSearch() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getTagSearch() {
return this.tagSearch;
}
- public getImageList_args setTagSearch(List<String> tagSearch) {
+ public getImageList_args setTagSearch(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> tagSearch) {
this.tagSearch = tagSearch;
return this;
}
@@ -25423,25 +27282,26 @@ public class SatelliteServer {
}
public void unsetPage() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID);
}
/** Returns true if field page is set (has been assigned a value) and false otherwise */
public boolean isSetPage() {
- return EncodingUtils.testBit(__isset_bitfield, __PAGE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PAGE_ISSET_ID);
}
public void setPageIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -25449,7 +27309,7 @@ public class SatelliteServer {
if (value == null) {
unsetTagSearch();
} else {
- setTagSearch((List<String>)value);
+ setTagSearch((java.util.List<java.lang.String>)value);
}
break;
@@ -25457,14 +27317,16 @@ public class SatelliteServer {
if (value == null) {
unsetPage();
} else {
- setPage((Integer)value);
+ setPage((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -25476,13 +27338,14 @@ public class SatelliteServer {
return getPage();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -25493,13 +27356,11 @@ public class SatelliteServer {
case PAGE:
return isSetPage();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getImageList_args)
return this.equals((getImageList_args)that);
return false;
@@ -25508,6 +27369,8 @@ public class SatelliteServer {
public boolean equals(getImageList_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -25541,24 +27404,19 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_tagSearch = true && (isSetTagSearch());
- list.add(present_tagSearch);
- if (present_tagSearch)
- list.add(tagSearch);
+ hashCode = hashCode * 8191 + ((isSetTagSearch()) ? 131071 : 524287);
+ if (isSetTagSearch())
+ hashCode = hashCode * 8191 + tagSearch.hashCode();
- boolean present_page = true;
- list.add(present_page);
- if (present_page)
- list.add(page);
+ hashCode = hashCode * 8191 + page;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -25569,7 +27427,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -25579,7 +27437,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTagSearch()).compareTo(other.isSetTagSearch());
+ lastComparison = java.lang.Boolean.compare(isSetTagSearch(), other.isSetTagSearch());
if (lastComparison != 0) {
return lastComparison;
}
@@ -25589,7 +27447,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPage()).compareTo(other.isSetPage());
+ lastComparison = java.lang.Boolean.compare(isSetPage(), other.isSetPage());
if (lastComparison != 0) {
return lastComparison;
}
@@ -25602,21 +27460,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImageList_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getImageList_args(");
boolean first = true;
sb.append("userToken:");
@@ -25655,7 +27517,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -25665,14 +27527,16 @@ public class SatelliteServer {
}
}
- private static class getImageList_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getImageList_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageList_argsStandardScheme getScheme() {
return new getImageList_argsStandardScheme();
}
}
- private static class getImageList_argsStandardScheme extends StandardScheme<getImageList_args> {
+ private static class getImageList_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getImageList_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getImageList_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -25694,13 +27558,13 @@ public class SatelliteServer {
case 2: // TAG_SEARCH
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list274 = iprot.readListBegin();
- struct.tagSearch = new ArrayList<String>(_list274.size);
- String _elem275;
- for (int _i276 = 0; _i276 < _list274.size; ++_i276)
+ org.apache.thrift.protocol.TList _list354 = iprot.readListBegin();
+ struct.tagSearch = new java.util.ArrayList<java.lang.String>(_list354.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem355;
+ for (int _i356 = 0; _i356 < _list354.size; ++_i356)
{
- _elem275 = iprot.readString();
- struct.tagSearch.add(_elem275);
+ _elem355 = iprot.readString();
+ struct.tagSearch.add(_elem355);
}
iprot.readListEnd();
}
@@ -25728,6 +27592,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getImageList_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -25741,9 +27606,9 @@ public class SatelliteServer {
oprot.writeFieldBegin(TAG_SEARCH_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.tagSearch.size()));
- for (String _iter277 : struct.tagSearch)
+ for (java.lang.String _iter357 : struct.tagSearch)
{
- oprot.writeString(_iter277);
+ oprot.writeString(_iter357);
}
oprot.writeListEnd();
}
@@ -25758,18 +27623,19 @@ public class SatelliteServer {
}
- private static class getImageList_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getImageList_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageList_argsTupleScheme getScheme() {
return new getImageList_argsTupleScheme();
}
}
- private static class getImageList_argsTupleScheme extends TupleScheme<getImageList_args> {
+ private static class getImageList_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getImageList_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getImageList_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -25786,9 +27652,9 @@ public class SatelliteServer {
if (struct.isSetTagSearch()) {
{
oprot.writeI32(struct.tagSearch.size());
- for (String _iter278 : struct.tagSearch)
+ for (java.lang.String _iter358 : struct.tagSearch)
{
- oprot.writeString(_iter278);
+ oprot.writeString(_iter358);
}
}
}
@@ -25799,21 +27665,21 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getImageList_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
}
if (incoming.get(1)) {
{
- org.apache.thrift.protocol.TList _list279 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.tagSearch = new ArrayList<String>(_list279.size);
- String _elem280;
- for (int _i281 = 0; _i281 < _list279.size; ++_i281)
+ org.apache.thrift.protocol.TList _list359 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.tagSearch = new java.util.ArrayList<java.lang.String>(_list359.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem360;
+ for (int _i361 = 0; _i361 < _list359.size; ++_i361)
{
- _elem280 = iprot.readString();
- struct.tagSearch.add(_elem280);
+ _elem360 = iprot.readString();
+ struct.tagSearch.add(_elem360);
}
}
struct.setTagSearchIsSet(true);
@@ -25825,8 +27691,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getImageList_result implements org.apache.thrift.TBase<getImageList_result, getImageList_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImageList_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageList_result");
@@ -25834,15 +27704,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageList_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageList_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImageList_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImageList_resultTupleSchemeFactory();
- public List<ImageSummaryRead> success; // required
- public TAuthorizationException authError; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<ImageSummaryRead> success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -25850,10 +27717,10 @@ public class SatelliteServer {
AUTH_ERROR((short)1, "authError"),
SERVER_ERROR((short)2, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -25861,6 +27728,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -25880,46 +27748,49 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", 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, ImageSummaryRead.class))));
tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageList_result.class, metaDataMap);
}
@@ -25927,7 +27798,7 @@ public class SatelliteServer {
}
public getImageList_result(
- List<ImageSummaryRead> success,
+ java.util.List<ImageSummaryRead> success,
TAuthorizationException authError,
TInvocationException serverError)
{
@@ -25942,7 +27813,7 @@ public class SatelliteServer {
*/
public getImageList_result(getImageList_result other) {
if (other.isSetSuccess()) {
- List<ImageSummaryRead> __this__success = new ArrayList<ImageSummaryRead>(other.success.size());
+ java.util.List<ImageSummaryRead> __this__success = new java.util.ArrayList<ImageSummaryRead>(other.success.size());
for (ImageSummaryRead other_element : other.success) {
__this__success.add(new ImageSummaryRead(other_element));
}
@@ -25956,6 +27827,7 @@ public class SatelliteServer {
}
}
+ @Override
public getImageList_result deepCopy() {
return new getImageList_result(this);
}
@@ -25971,22 +27843,24 @@ public class SatelliteServer {
return (this.success == null) ? 0 : this.success.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<ImageSummaryRead> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(ImageSummaryRead elem) {
if (this.success == null) {
- this.success = new ArrayList<ImageSummaryRead>();
+ this.success = new java.util.ArrayList<ImageSummaryRead>();
}
this.success.add(elem);
}
- public List<ImageSummaryRead> getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<ImageSummaryRead> getSuccess() {
return this.success;
}
- public getImageList_result setSuccess(List<ImageSummaryRead> success) {
+ public getImageList_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<ImageSummaryRead> success) {
this.success = success;
return this;
}
@@ -26006,11 +27880,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public getImageList_result setAuthError(TAuthorizationException authError) {
+ public getImageList_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -26030,11 +27905,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public getImageList_result setServerError(TInvocationException serverError) {
+ public getImageList_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -26054,13 +27930,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((List<ImageSummaryRead>)value);
+ setSuccess((java.util.List<ImageSummaryRead>)value);
}
break;
@@ -26083,7 +27960,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -26095,13 +27974,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -26112,13 +27992,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getImageList_result)
return this.equals((getImageList_result)that);
return false;
@@ -26127,6 +28005,8 @@ public class SatelliteServer {
public boolean equals(getImageList_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -26160,24 +28040,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -26188,7 +28065,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -26198,7 +28075,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -26208,7 +28085,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -26221,21 +28098,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImageList_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getImageList_result(");
boolean first = true;
sb.append("success:");
@@ -26278,7 +28158,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -26286,14 +28166,16 @@ public class SatelliteServer {
}
}
- private static class getImageList_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getImageList_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageList_resultStandardScheme getScheme() {
return new getImageList_resultStandardScheme();
}
}
- private static class getImageList_resultStandardScheme extends StandardScheme<getImageList_result> {
+ private static class getImageList_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getImageList_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getImageList_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -26307,14 +28189,14 @@ public class SatelliteServer {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list282 = iprot.readListBegin();
- struct.success = new ArrayList<ImageSummaryRead>(_list282.size);
- ImageSummaryRead _elem283;
- for (int _i284 = 0; _i284 < _list282.size; ++_i284)
+ org.apache.thrift.protocol.TList _list362 = iprot.readListBegin();
+ struct.success = new java.util.ArrayList<ImageSummaryRead>(_list362.size);
+ @org.apache.thrift.annotation.Nullable ImageSummaryRead _elem363;
+ for (int _i364 = 0; _i364 < _list362.size; ++_i364)
{
- _elem283 = new ImageSummaryRead();
- _elem283.read(iprot);
- struct.success.add(_elem283);
+ _elem363 = new ImageSummaryRead();
+ _elem363.read(iprot);
+ struct.success.add(_elem363);
}
iprot.readListEnd();
}
@@ -26352,6 +28234,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getImageList_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -26360,9 +28243,9 @@ public class SatelliteServer {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (ImageSummaryRead _iter285 : struct.success)
+ for (ImageSummaryRead _iter365 : struct.success)
{
- _iter285.write(oprot);
+ _iter365.write(oprot);
}
oprot.writeListEnd();
}
@@ -26384,18 +28267,19 @@ public class SatelliteServer {
}
- private static class getImageList_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getImageList_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageList_resultTupleScheme getScheme() {
return new getImageList_resultTupleScheme();
}
}
- private static class getImageList_resultTupleScheme extends TupleScheme<getImageList_result> {
+ private static class getImageList_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getImageList_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getImageList_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -26409,9 +28293,9 @@ public class SatelliteServer {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (ImageSummaryRead _iter286 : struct.success)
+ for (ImageSummaryRead _iter366 : struct.success)
{
- _iter286.write(oprot);
+ _iter366.write(oprot);
}
}
}
@@ -26425,18 +28309,18 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getImageList_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list287 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<ImageSummaryRead>(_list287.size);
- ImageSummaryRead _elem288;
- for (int _i289 = 0; _i289 < _list287.size; ++_i289)
+ org.apache.thrift.protocol.TList _list367 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.success = new java.util.ArrayList<ImageSummaryRead>(_list367.size);
+ @org.apache.thrift.annotation.Nullable ImageSummaryRead _elem368;
+ for (int _i369 = 0; _i369 < _list367.size; ++_i369)
{
- _elem288 = new ImageSummaryRead();
- _elem288.read(iprot);
- struct.success.add(_elem288);
+ _elem368 = new ImageSummaryRead();
+ _elem368.read(iprot);
+ struct.success.add(_elem368);
}
}
struct.setSuccessIsSet(true);
@@ -26454,32 +28338,33 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getImageDetails_args implements org.apache.thrift.TBase<getImageDetails_args, getImageDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImageDetails_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageDetails_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
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)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageDetails_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageDetails_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImageDetails_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImageDetails_argsTupleSchemeFactory();
- public String userToken; // required
- public String imageBaseId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageBaseId; // 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 {
USER_TOKEN((short)1, "userToken"),
IMAGE_BASE_ID((short)2, "imageBaseId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -26487,6 +28372,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -26504,43 +28390,46 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
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")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageDetails_args.class, metaDataMap);
}
@@ -26548,8 +28437,8 @@ public class SatelliteServer {
}
public getImageDetails_args(
- String userToken,
- String imageBaseId)
+ java.lang.String userToken,
+ java.lang.String imageBaseId)
{
this();
this.userToken = userToken;
@@ -26568,6 +28457,7 @@ public class SatelliteServer {
}
}
+ @Override
public getImageDetails_args deepCopy() {
return new getImageDetails_args(this);
}
@@ -26578,11 +28468,12 @@ public class SatelliteServer {
this.imageBaseId = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public getImageDetails_args setUserToken(String userToken) {
+ public getImageDetails_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -26602,11 +28493,12 @@ public class SatelliteServer {
}
}
- public String getImageBaseId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageBaseId() {
return this.imageBaseId;
}
- public getImageDetails_args setImageBaseId(String imageBaseId) {
+ public getImageDetails_args setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.String imageBaseId) {
this.imageBaseId = imageBaseId;
return this;
}
@@ -26626,13 +28518,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -26640,14 +28533,16 @@ public class SatelliteServer {
if (value == null) {
unsetImageBaseId();
} else {
- setImageBaseId((String)value);
+ setImageBaseId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -26656,13 +28551,14 @@ public class SatelliteServer {
return getImageBaseId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -26671,13 +28567,11 @@ public class SatelliteServer {
case IMAGE_BASE_ID:
return isSetImageBaseId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getImageDetails_args)
return this.equals((getImageDetails_args)that);
return false;
@@ -26686,6 +28580,8 @@ public class SatelliteServer {
public boolean equals(getImageDetails_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -26710,19 +28606,17 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_imageBaseId = true && (isSetImageBaseId());
- list.add(present_imageBaseId);
- if (present_imageBaseId)
- list.add(imageBaseId);
+ hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287);
+ if (isSetImageBaseId())
+ hashCode = hashCode * 8191 + imageBaseId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -26733,7 +28627,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -26743,7 +28637,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ lastComparison = java.lang.Boolean.compare(isSetImageBaseId(), other.isSetImageBaseId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -26756,21 +28650,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImageDetails_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getImageDetails_args(");
boolean first = true;
sb.append("userToken:");
@@ -26805,7 +28703,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -26813,14 +28711,16 @@ public class SatelliteServer {
}
}
- private static class getImageDetails_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getImageDetails_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageDetails_argsStandardScheme getScheme() {
return new getImageDetails_argsStandardScheme();
}
}
- private static class getImageDetails_argsStandardScheme extends StandardScheme<getImageDetails_args> {
+ private static class getImageDetails_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getImageDetails_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getImageDetails_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -26858,6 +28758,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getImageDetails_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -26878,18 +28779,19 @@ public class SatelliteServer {
}
- private static class getImageDetails_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getImageDetails_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageDetails_argsTupleScheme getScheme() {
return new getImageDetails_argsTupleScheme();
}
}
- private static class getImageDetails_argsTupleScheme extends TupleScheme<getImageDetails_args> {
+ private static class getImageDetails_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getImageDetails_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getImageDetails_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -26907,8 +28809,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getImageDetails_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -26920,8 +28822,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getImageDetails_result implements org.apache.thrift.TBase<getImageDetails_result, getImageDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImageDetails_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageDetails_result");
@@ -26930,16 +28836,13 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageDetails_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageDetails_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImageDetails_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImageDetails_resultTupleSchemeFactory();
- public ImageDetailsRead success; // required
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable ImageDetailsRead success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -26948,10 +28851,10 @@ public class SatelliteServer {
NOT_FOUND((short)2, "notFound"),
SERVER_ERROR((short)3, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -26959,6 +28862,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -26980,47 +28884,50 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageDetailsRead.class)));
tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageDetails_result.class, metaDataMap);
}
@@ -27058,6 +28965,7 @@ public class SatelliteServer {
}
}
+ @Override
public getImageDetails_result deepCopy() {
return new getImageDetails_result(this);
}
@@ -27070,11 +28978,12 @@ public class SatelliteServer {
this.serverError = null;
}
+ @org.apache.thrift.annotation.Nullable
public ImageDetailsRead getSuccess() {
return this.success;
}
- public getImageDetails_result setSuccess(ImageDetailsRead success) {
+ public getImageDetails_result setSuccess(@org.apache.thrift.annotation.Nullable ImageDetailsRead success) {
this.success = success;
return this;
}
@@ -27094,11 +29003,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public getImageDetails_result setAuthError(TAuthorizationException authError) {
+ public getImageDetails_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -27118,11 +29028,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public getImageDetails_result setNotFound(TNotFoundException notFound) {
+ public getImageDetails_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -27142,11 +29053,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public getImageDetails_result setServerError(TInvocationException serverError) {
+ public getImageDetails_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -27166,7 +29078,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -27203,7 +29116,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -27218,13 +29133,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -27237,13 +29153,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getImageDetails_result)
return this.equals((getImageDetails_result)that);
return false;
@@ -27252,6 +29166,8 @@ public class SatelliteServer {
public boolean equals(getImageDetails_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -27294,29 +29210,25 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -27327,7 +29239,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -27337,7 +29249,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -27347,7 +29259,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -27357,7 +29269,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -27370,21 +29282,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImageDetails_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getImageDetails_result(");
boolean first = true;
sb.append("success:");
@@ -27438,7 +29353,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -27446,14 +29361,16 @@ public class SatelliteServer {
}
}
- private static class getImageDetails_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getImageDetails_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageDetails_resultStandardScheme getScheme() {
return new getImageDetails_resultStandardScheme();
}
}
- private static class getImageDetails_resultStandardScheme extends StandardScheme<getImageDetails_result> {
+ private static class getImageDetails_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getImageDetails_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getImageDetails_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -27511,6 +29428,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getImageDetails_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -27541,18 +29459,19 @@ public class SatelliteServer {
}
- private static class getImageDetails_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getImageDetails_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageDetails_resultTupleScheme getScheme() {
return new getImageDetails_resultTupleScheme();
}
}
- private static class getImageDetails_resultTupleScheme extends TupleScheme<getImageDetails_result> {
+ private static class getImageDetails_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getImageDetails_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getImageDetails_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -27582,8 +29501,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getImageDetails_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.success = new ImageDetailsRead();
struct.success.read(iprot);
@@ -27607,32 +29526,33 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class createImage_args implements org.apache.thrift.TBase<createImage_args, createImage_args._Fields>, java.io.Serializable, Cloneable, Comparable<createImage_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createImage_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
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)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new createImage_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new createImage_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createImage_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createImage_argsTupleSchemeFactory();
- public String userToken; // required
- public String imageName; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageName; // 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 {
USER_TOKEN((short)1, "userToken"),
IMAGE_NAME((short)2, "imageName");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -27640,6 +29560,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -27657,43 +29578,46 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
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)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createImage_args.class, metaDataMap);
}
@@ -27701,8 +29625,8 @@ public class SatelliteServer {
}
public createImage_args(
- String userToken,
- String imageName)
+ java.lang.String userToken,
+ java.lang.String imageName)
{
this();
this.userToken = userToken;
@@ -27721,6 +29645,7 @@ public class SatelliteServer {
}
}
+ @Override
public createImage_args deepCopy() {
return new createImage_args(this);
}
@@ -27731,11 +29656,12 @@ public class SatelliteServer {
this.imageName = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public createImage_args setUserToken(String userToken) {
+ public createImage_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -27755,11 +29681,12 @@ public class SatelliteServer {
}
}
- public String getImageName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageName() {
return this.imageName;
}
- public createImage_args setImageName(String imageName) {
+ public createImage_args setImageName(@org.apache.thrift.annotation.Nullable java.lang.String imageName) {
this.imageName = imageName;
return this;
}
@@ -27779,13 +29706,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -27793,14 +29721,16 @@ public class SatelliteServer {
if (value == null) {
unsetImageName();
} else {
- setImageName((String)value);
+ setImageName((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -27809,13 +29739,14 @@ public class SatelliteServer {
return getImageName();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -27824,13 +29755,11 @@ public class SatelliteServer {
case IMAGE_NAME:
return isSetImageName();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof createImage_args)
return this.equals((createImage_args)that);
return false;
@@ -27839,6 +29768,8 @@ public class SatelliteServer {
public boolean equals(createImage_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -27863,19 +29794,17 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_imageName = true && (isSetImageName());
- list.add(present_imageName);
- if (present_imageName)
- list.add(imageName);
+ hashCode = hashCode * 8191 + ((isSetImageName()) ? 131071 : 524287);
+ if (isSetImageName())
+ hashCode = hashCode * 8191 + imageName.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -27886,7 +29815,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -27896,7 +29825,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageName()).compareTo(other.isSetImageName());
+ lastComparison = java.lang.Boolean.compare(isSetImageName(), other.isSetImageName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -27909,21 +29838,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("createImage_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("createImage_args(");
boolean first = true;
sb.append("userToken:");
@@ -27958,7 +29891,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -27966,14 +29899,16 @@ public class SatelliteServer {
}
}
- private static class createImage_argsStandardSchemeFactory implements SchemeFactory {
+ private static class createImage_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public createImage_argsStandardScheme getScheme() {
return new createImage_argsStandardScheme();
}
}
- private static class createImage_argsStandardScheme extends StandardScheme<createImage_args> {
+ private static class createImage_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<createImage_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, createImage_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -28011,6 +29946,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, createImage_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -28031,18 +29967,19 @@ public class SatelliteServer {
}
- private static class createImage_argsTupleSchemeFactory implements SchemeFactory {
+ private static class createImage_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public createImage_argsTupleScheme getScheme() {
return new createImage_argsTupleScheme();
}
}
- private static class createImage_argsTupleScheme extends TupleScheme<createImage_args> {
+ private static class createImage_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<createImage_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createImage_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -28060,8 +29997,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createImage_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -28073,8 +30010,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class createImage_result implements org.apache.thrift.TBase<createImage_result, createImage_result._Fields>, java.io.Serializable, Cloneable, Comparable<createImage_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createImage_result");
@@ -28082,15 +30023,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new createImage_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new createImage_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createImage_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createImage_resultTupleSchemeFactory();
- public String success; // required
- public TAuthorizationException authError; // required
- public TInvocationException error; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException error; // 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 {
@@ -28098,10 +30036,10 @@ public class SatelliteServer {
AUTH_ERROR((short)1, "authError"),
ERROR((short)2, "error");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -28109,6 +30047,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -28128,45 +30067,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createImage_result.class, metaDataMap);
}
@@ -28174,7 +30116,7 @@ public class SatelliteServer {
}
public createImage_result(
- String success,
+ java.lang.String success,
TAuthorizationException authError,
TInvocationException error)
{
@@ -28199,6 +30141,7 @@ public class SatelliteServer {
}
}
+ @Override
public createImage_result deepCopy() {
return new createImage_result(this);
}
@@ -28210,11 +30153,12 @@ public class SatelliteServer {
this.error = null;
}
- public String getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getSuccess() {
return this.success;
}
- public createImage_result setSuccess(String success) {
+ public createImage_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.String success) {
this.success = success;
return this;
}
@@ -28234,11 +30178,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public createImage_result setAuthError(TAuthorizationException authError) {
+ public createImage_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -28258,11 +30203,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getError() {
return this.error;
}
- public createImage_result setError(TInvocationException error) {
+ public createImage_result setError(@org.apache.thrift.annotation.Nullable TInvocationException error) {
this.error = error;
return this;
}
@@ -28282,13 +30228,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((String)value);
+ setSuccess((java.lang.String)value);
}
break;
@@ -28311,7 +30258,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -28323,13 +30272,14 @@ public class SatelliteServer {
return getError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -28340,13 +30290,11 @@ public class SatelliteServer {
case ERROR:
return isSetError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof createImage_result)
return this.equals((createImage_result)that);
return false;
@@ -28355,6 +30303,8 @@ public class SatelliteServer {
public boolean equals(createImage_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -28388,24 +30338,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_error = true && (isSetError());
- list.add(present_error);
- if (present_error)
- list.add(error);
+ hashCode = hashCode * 8191 + ((isSetError()) ? 131071 : 524287);
+ if (isSetError())
+ hashCode = hashCode * 8191 + error.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -28416,7 +30363,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -28426,7 +30373,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -28436,7 +30383,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetError()).compareTo(other.isSetError());
+ lastComparison = java.lang.Boolean.compare(isSetError(), other.isSetError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -28449,21 +30396,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("createImage_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("createImage_result(");
boolean first = true;
sb.append("success:");
@@ -28506,7 +30456,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -28514,14 +30464,16 @@ public class SatelliteServer {
}
}
- private static class createImage_resultStandardSchemeFactory implements SchemeFactory {
+ private static class createImage_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public createImage_resultStandardScheme getScheme() {
return new createImage_resultStandardScheme();
}
}
- private static class createImage_resultStandardScheme extends StandardScheme<createImage_result> {
+ private static class createImage_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<createImage_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, createImage_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -28569,6 +30521,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, createImage_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -28594,18 +30547,19 @@ public class SatelliteServer {
}
- private static class createImage_resultTupleSchemeFactory implements SchemeFactory {
+ private static class createImage_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public createImage_resultTupleScheme getScheme() {
return new createImage_resultTupleScheme();
}
}
- private static class createImage_resultTupleScheme extends TupleScheme<createImage_result> {
+ private static class createImage_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<createImage_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createImage_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -28629,8 +30583,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createImage_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
@@ -28648,8 +30602,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class updateImageBase_args implements org.apache.thrift.TBase<updateImageBase_args, updateImageBase_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateImageBase_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageBase_args");
@@ -28657,15 +30615,12 @@ public class SatelliteServer {
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)2);
private static final org.apache.thrift.protocol.TField IMAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("image", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new updateImageBase_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new updateImageBase_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateImageBase_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateImageBase_argsTupleSchemeFactory();
- public String userToken; // required
- public String imageBaseId; // required
- public ImageBaseWrite image; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageBaseId; // required
+ public @org.apache.thrift.annotation.Nullable ImageBaseWrite image; // 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 {
@@ -28673,10 +30628,10 @@ public class SatelliteServer {
IMAGE_BASE_ID((short)2, "imageBaseId"),
IMAGE((short)3, "image");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -28684,6 +30639,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -28703,45 +30659,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
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, new org.apache.thrift.meta_data.FieldMetaData("image", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageBaseWrite.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageBase_args.class, metaDataMap);
}
@@ -28749,8 +30708,8 @@ public class SatelliteServer {
}
public updateImageBase_args(
- String userToken,
- String imageBaseId,
+ java.lang.String userToken,
+ java.lang.String imageBaseId,
ImageBaseWrite image)
{
this();
@@ -28774,6 +30733,7 @@ public class SatelliteServer {
}
}
+ @Override
public updateImageBase_args deepCopy() {
return new updateImageBase_args(this);
}
@@ -28785,11 +30745,12 @@ public class SatelliteServer {
this.image = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public updateImageBase_args setUserToken(String userToken) {
+ public updateImageBase_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -28809,11 +30770,12 @@ public class SatelliteServer {
}
}
- public String getImageBaseId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageBaseId() {
return this.imageBaseId;
}
- public updateImageBase_args setImageBaseId(String imageBaseId) {
+ public updateImageBase_args setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.String imageBaseId) {
this.imageBaseId = imageBaseId;
return this;
}
@@ -28833,11 +30795,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public ImageBaseWrite getImage() {
return this.image;
}
- public updateImageBase_args setImage(ImageBaseWrite image) {
+ public updateImageBase_args setImage(@org.apache.thrift.annotation.Nullable ImageBaseWrite image) {
this.image = image;
return this;
}
@@ -28857,13 +30820,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -28871,7 +30835,7 @@ public class SatelliteServer {
if (value == null) {
unsetImageBaseId();
} else {
- setImageBaseId((String)value);
+ setImageBaseId((java.lang.String)value);
}
break;
@@ -28886,7 +30850,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -28898,13 +30864,14 @@ public class SatelliteServer {
return getImage();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -28915,13 +30882,11 @@ public class SatelliteServer {
case IMAGE:
return isSetImage();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof updateImageBase_args)
return this.equals((updateImageBase_args)that);
return false;
@@ -28930,6 +30895,8 @@ public class SatelliteServer {
public boolean equals(updateImageBase_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -28963,24 +30930,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_imageBaseId = true && (isSetImageBaseId());
- list.add(present_imageBaseId);
- if (present_imageBaseId)
- list.add(imageBaseId);
+ hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287);
+ if (isSetImageBaseId())
+ hashCode = hashCode * 8191 + imageBaseId.hashCode();
- boolean present_image = true && (isSetImage());
- list.add(present_image);
- if (present_image)
- list.add(image);
+ hashCode = hashCode * 8191 + ((isSetImage()) ? 131071 : 524287);
+ if (isSetImage())
+ hashCode = hashCode * 8191 + image.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -28991,7 +30955,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -29001,7 +30965,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ lastComparison = java.lang.Boolean.compare(isSetImageBaseId(), other.isSetImageBaseId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -29011,7 +30975,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImage()).compareTo(other.isSetImage());
+ lastComparison = java.lang.Boolean.compare(isSetImage(), other.isSetImage());
if (lastComparison != 0) {
return lastComparison;
}
@@ -29024,21 +30988,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("updateImageBase_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("updateImageBase_args(");
boolean first = true;
sb.append("userToken:");
@@ -29084,7 +31052,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -29092,14 +31060,16 @@ public class SatelliteServer {
}
}
- private static class updateImageBase_argsStandardSchemeFactory implements SchemeFactory {
+ private static class updateImageBase_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateImageBase_argsStandardScheme getScheme() {
return new updateImageBase_argsStandardScheme();
}
}
- private static class updateImageBase_argsStandardScheme extends StandardScheme<updateImageBase_args> {
+ private static class updateImageBase_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateImageBase_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageBase_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -29146,6 +31116,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, updateImageBase_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -29171,18 +31142,19 @@ public class SatelliteServer {
}
- private static class updateImageBase_argsTupleSchemeFactory implements SchemeFactory {
+ private static class updateImageBase_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateImageBase_argsTupleScheme getScheme() {
return new updateImageBase_argsTupleScheme();
}
}
- private static class updateImageBase_argsTupleScheme extends TupleScheme<updateImageBase_args> {
+ private static class updateImageBase_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateImageBase_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, updateImageBase_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -29206,8 +31178,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, updateImageBase_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -29224,8 +31196,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class updateImageBase_result implements org.apache.thrift.TBase<updateImageBase_result, updateImageBase_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateImageBase_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageBase_result");
@@ -29233,15 +31209,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField IMG_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("imgError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new updateImageBase_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new updateImageBase_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateImageBase_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateImageBase_resultTupleSchemeFactory();
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException imgError; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException imgError; // 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 {
@@ -29249,10 +31222,10 @@ public class SatelliteServer {
NOT_FOUND((short)2, "notFound"),
IMG_ERROR((short)3, "imgError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -29260,6 +31233,7 @@ public class SatelliteServer {
/**
* 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: // AUTH_ERROR
@@ -29279,45 +31253,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.IMG_ERROR, new org.apache.thrift.meta_data.FieldMetaData("imgError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageBase_result.class, metaDataMap);
}
@@ -29350,6 +31327,7 @@ public class SatelliteServer {
}
}
+ @Override
public updateImageBase_result deepCopy() {
return new updateImageBase_result(this);
}
@@ -29361,11 +31339,12 @@ public class SatelliteServer {
this.imgError = null;
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public updateImageBase_result setAuthError(TAuthorizationException authError) {
+ public updateImageBase_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -29385,11 +31364,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public updateImageBase_result setNotFound(TNotFoundException notFound) {
+ public updateImageBase_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -29409,11 +31389,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getImgError() {
return this.imgError;
}
- public updateImageBase_result setImgError(TInvocationException imgError) {
+ public updateImageBase_result setImgError(@org.apache.thrift.annotation.Nullable TInvocationException imgError) {
this.imgError = imgError;
return this;
}
@@ -29433,7 +31414,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case AUTH_ERROR:
if (value == null) {
@@ -29462,7 +31444,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTH_ERROR:
return getAuthError();
@@ -29474,13 +31458,14 @@ public class SatelliteServer {
return getImgError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -29491,13 +31476,11 @@ public class SatelliteServer {
case IMG_ERROR:
return isSetImgError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof updateImageBase_result)
return this.equals((updateImageBase_result)that);
return false;
@@ -29506,6 +31489,8 @@ public class SatelliteServer {
public boolean equals(updateImageBase_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_authError = true && this.isSetAuthError();
boolean that_present_authError = true && that.isSetAuthError();
@@ -29539,24 +31524,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_imgError = true && (isSetImgError());
- list.add(present_imgError);
- if (present_imgError)
- list.add(imgError);
+ hashCode = hashCode * 8191 + ((isSetImgError()) ? 131071 : 524287);
+ if (isSetImgError())
+ hashCode = hashCode * 8191 + imgError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -29567,7 +31549,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -29577,7 +31559,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -29587,7 +31569,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImgError()).compareTo(other.isSetImgError());
+ lastComparison = java.lang.Boolean.compare(isSetImgError(), other.isSetImgError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -29600,21 +31582,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("updateImageBase_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("updateImageBase_result(");
boolean first = true;
sb.append("authError:");
@@ -29657,7 +31642,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -29665,14 +31650,16 @@ public class SatelliteServer {
}
}
- private static class updateImageBase_resultStandardSchemeFactory implements SchemeFactory {
+ private static class updateImageBase_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateImageBase_resultStandardScheme getScheme() {
return new updateImageBase_resultStandardScheme();
}
}
- private static class updateImageBase_resultStandardScheme extends StandardScheme<updateImageBase_result> {
+ private static class updateImageBase_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateImageBase_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageBase_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -29721,6 +31708,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, updateImageBase_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -29746,18 +31734,19 @@ public class SatelliteServer {
}
- private static class updateImageBase_resultTupleSchemeFactory implements SchemeFactory {
+ private static class updateImageBase_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateImageBase_resultTupleScheme getScheme() {
return new updateImageBase_resultTupleScheme();
}
}
- private static class updateImageBase_resultTupleScheme extends TupleScheme<updateImageBase_result> {
+ private static class updateImageBase_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateImageBase_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, updateImageBase_result 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.isSetAuthError()) {
optionals.set(0);
}
@@ -29781,8 +31770,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, updateImageBase_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.authError = new TAuthorizationException();
struct.authError.read(iprot);
@@ -29801,8 +31790,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class updateImageVersion_args implements org.apache.thrift.TBase<updateImageVersion_args, updateImageVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateImageVersion_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageVersion_args");
@@ -29810,15 +31803,12 @@ public class SatelliteServer {
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_FIELD_DESC = new org.apache.thrift.protocol.TField("image", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new updateImageVersion_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new updateImageVersion_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateImageVersion_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateImageVersion_argsTupleSchemeFactory();
- public String userToken; // required
- public String imageVersionId; // required
- public ImageVersionWrite image; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageVersionId; // required
+ public @org.apache.thrift.annotation.Nullable ImageVersionWrite image; // 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 {
@@ -29826,10 +31816,10 @@ public class SatelliteServer {
IMAGE_VERSION_ID((short)2, "imageVersionId"),
IMAGE((short)3, "image");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -29837,6 +31827,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -29856,45 +31847,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
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, new org.apache.thrift.meta_data.FieldMetaData("image", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImageVersionWrite.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageVersion_args.class, metaDataMap);
}
@@ -29902,8 +31896,8 @@ public class SatelliteServer {
}
public updateImageVersion_args(
- String userToken,
- String imageVersionId,
+ java.lang.String userToken,
+ java.lang.String imageVersionId,
ImageVersionWrite image)
{
this();
@@ -29927,6 +31921,7 @@ public class SatelliteServer {
}
}
+ @Override
public updateImageVersion_args deepCopy() {
return new updateImageVersion_args(this);
}
@@ -29938,11 +31933,12 @@ public class SatelliteServer {
this.image = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public updateImageVersion_args setUserToken(String userToken) {
+ public updateImageVersion_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -29962,11 +31958,12 @@ public class SatelliteServer {
}
}
- public String getImageVersionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageVersionId() {
return this.imageVersionId;
}
- public updateImageVersion_args setImageVersionId(String imageVersionId) {
+ public updateImageVersion_args setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.String imageVersionId) {
this.imageVersionId = imageVersionId;
return this;
}
@@ -29986,11 +31983,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public ImageVersionWrite getImage() {
return this.image;
}
- public updateImageVersion_args setImage(ImageVersionWrite image) {
+ public updateImageVersion_args setImage(@org.apache.thrift.annotation.Nullable ImageVersionWrite image) {
this.image = image;
return this;
}
@@ -30010,13 +32008,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -30024,7 +32023,7 @@ public class SatelliteServer {
if (value == null) {
unsetImageVersionId();
} else {
- setImageVersionId((String)value);
+ setImageVersionId((java.lang.String)value);
}
break;
@@ -30039,7 +32038,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -30051,13 +32052,14 @@ public class SatelliteServer {
return getImage();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -30068,13 +32070,11 @@ public class SatelliteServer {
case IMAGE:
return isSetImage();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof updateImageVersion_args)
return this.equals((updateImageVersion_args)that);
return false;
@@ -30083,6 +32083,8 @@ public class SatelliteServer {
public boolean equals(updateImageVersion_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -30116,24 +32118,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_imageVersionId = true && (isSetImageVersionId());
- list.add(present_imageVersionId);
- if (present_imageVersionId)
- list.add(imageVersionId);
+ hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287);
+ if (isSetImageVersionId())
+ hashCode = hashCode * 8191 + imageVersionId.hashCode();
- boolean present_image = true && (isSetImage());
- list.add(present_image);
- if (present_image)
- list.add(image);
+ hashCode = hashCode * 8191 + ((isSetImage()) ? 131071 : 524287);
+ if (isSetImage())
+ hashCode = hashCode * 8191 + image.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -30144,7 +32143,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -30154,7 +32153,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ lastComparison = java.lang.Boolean.compare(isSetImageVersionId(), other.isSetImageVersionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -30164,7 +32163,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImage()).compareTo(other.isSetImage());
+ lastComparison = java.lang.Boolean.compare(isSetImage(), other.isSetImage());
if (lastComparison != 0) {
return lastComparison;
}
@@ -30177,21 +32176,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("updateImageVersion_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("updateImageVersion_args(");
boolean first = true;
sb.append("userToken:");
@@ -30237,7 +32240,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -30245,14 +32248,16 @@ public class SatelliteServer {
}
}
- private static class updateImageVersion_argsStandardSchemeFactory implements SchemeFactory {
+ private static class updateImageVersion_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateImageVersion_argsStandardScheme getScheme() {
return new updateImageVersion_argsStandardScheme();
}
}
- private static class updateImageVersion_argsStandardScheme extends StandardScheme<updateImageVersion_args> {
+ private static class updateImageVersion_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateImageVersion_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageVersion_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -30299,6 +32304,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, updateImageVersion_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -30324,18 +32330,19 @@ public class SatelliteServer {
}
- private static class updateImageVersion_argsTupleSchemeFactory implements SchemeFactory {
+ private static class updateImageVersion_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateImageVersion_argsTupleScheme getScheme() {
return new updateImageVersion_argsTupleScheme();
}
}
- private static class updateImageVersion_argsTupleScheme extends TupleScheme<updateImageVersion_args> {
+ private static class updateImageVersion_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateImageVersion_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, updateImageVersion_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -30359,8 +32366,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, updateImageVersion_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -30377,8 +32384,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class updateImageVersion_result implements org.apache.thrift.TBase<updateImageVersion_result, updateImageVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateImageVersion_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateImageVersion_result");
@@ -30386,15 +32397,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField IMG_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("imgError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new updateImageVersion_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new updateImageVersion_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateImageVersion_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateImageVersion_resultTupleSchemeFactory();
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException imgError; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException imgError; // 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 {
@@ -30402,10 +32410,10 @@ public class SatelliteServer {
NOT_FOUND((short)2, "notFound"),
IMG_ERROR((short)3, "imgError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -30413,6 +32421,7 @@ public class SatelliteServer {
/**
* 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: // AUTH_ERROR
@@ -30432,45 +32441,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.IMG_ERROR, new org.apache.thrift.meta_data.FieldMetaData("imgError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateImageVersion_result.class, metaDataMap);
}
@@ -30503,6 +32515,7 @@ public class SatelliteServer {
}
}
+ @Override
public updateImageVersion_result deepCopy() {
return new updateImageVersion_result(this);
}
@@ -30514,11 +32527,12 @@ public class SatelliteServer {
this.imgError = null;
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public updateImageVersion_result setAuthError(TAuthorizationException authError) {
+ public updateImageVersion_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -30538,11 +32552,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public updateImageVersion_result setNotFound(TNotFoundException notFound) {
+ public updateImageVersion_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -30562,11 +32577,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getImgError() {
return this.imgError;
}
- public updateImageVersion_result setImgError(TInvocationException imgError) {
+ public updateImageVersion_result setImgError(@org.apache.thrift.annotation.Nullable TInvocationException imgError) {
this.imgError = imgError;
return this;
}
@@ -30586,7 +32602,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case AUTH_ERROR:
if (value == null) {
@@ -30615,7 +32632,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTH_ERROR:
return getAuthError();
@@ -30627,13 +32646,14 @@ public class SatelliteServer {
return getImgError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -30644,13 +32664,11 @@ public class SatelliteServer {
case IMG_ERROR:
return isSetImgError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof updateImageVersion_result)
return this.equals((updateImageVersion_result)that);
return false;
@@ -30659,6 +32677,8 @@ public class SatelliteServer {
public boolean equals(updateImageVersion_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_authError = true && this.isSetAuthError();
boolean that_present_authError = true && that.isSetAuthError();
@@ -30692,24 +32712,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_imgError = true && (isSetImgError());
- list.add(present_imgError);
- if (present_imgError)
- list.add(imgError);
+ hashCode = hashCode * 8191 + ((isSetImgError()) ? 131071 : 524287);
+ if (isSetImgError())
+ hashCode = hashCode * 8191 + imgError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -30720,7 +32737,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -30730,7 +32747,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -30740,7 +32757,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImgError()).compareTo(other.isSetImgError());
+ lastComparison = java.lang.Boolean.compare(isSetImgError(), other.isSetImgError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -30753,21 +32770,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("updateImageVersion_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("updateImageVersion_result(");
boolean first = true;
sb.append("authError:");
@@ -30810,7 +32830,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -30818,14 +32838,16 @@ public class SatelliteServer {
}
}
- private static class updateImageVersion_resultStandardSchemeFactory implements SchemeFactory {
+ private static class updateImageVersion_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateImageVersion_resultStandardScheme getScheme() {
return new updateImageVersion_resultStandardScheme();
}
}
- private static class updateImageVersion_resultStandardScheme extends StandardScheme<updateImageVersion_result> {
+ private static class updateImageVersion_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateImageVersion_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, updateImageVersion_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -30874,6 +32896,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, updateImageVersion_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -30899,18 +32922,19 @@ public class SatelliteServer {
}
- private static class updateImageVersion_resultTupleSchemeFactory implements SchemeFactory {
+ private static class updateImageVersion_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateImageVersion_resultTupleScheme getScheme() {
return new updateImageVersion_resultTupleScheme();
}
}
- private static class updateImageVersion_resultTupleScheme extends TupleScheme<updateImageVersion_result> {
+ private static class updateImageVersion_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateImageVersion_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, updateImageVersion_result 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.isSetAuthError()) {
optionals.set(0);
}
@@ -30934,8 +32958,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, updateImageVersion_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.authError = new TAuthorizationException();
struct.authError.read(iprot);
@@ -30954,32 +32978,33 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class deleteImageVersion_args implements org.apache.thrift.TBase<deleteImageVersion_args, deleteImageVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteImageVersion_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteImageVersion_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new deleteImageVersion_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new deleteImageVersion_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteImageVersion_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteImageVersion_argsTupleSchemeFactory();
- public String userToken; // required
- public String imageVersionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageVersionId; // 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 {
USER_TOKEN((short)1, "userToken"),
IMAGE_VERSION_ID((short)2, "imageVersionId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -30987,6 +33012,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -31004,43 +33030,46 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
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")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageVersion_args.class, metaDataMap);
}
@@ -31048,8 +33077,8 @@ public class SatelliteServer {
}
public deleteImageVersion_args(
- String userToken,
- String imageVersionId)
+ java.lang.String userToken,
+ java.lang.String imageVersionId)
{
this();
this.userToken = userToken;
@@ -31068,6 +33097,7 @@ public class SatelliteServer {
}
}
+ @Override
public deleteImageVersion_args deepCopy() {
return new deleteImageVersion_args(this);
}
@@ -31078,11 +33108,12 @@ public class SatelliteServer {
this.imageVersionId = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public deleteImageVersion_args setUserToken(String userToken) {
+ public deleteImageVersion_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -31102,11 +33133,12 @@ public class SatelliteServer {
}
}
- public String getImageVersionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageVersionId() {
return this.imageVersionId;
}
- public deleteImageVersion_args setImageVersionId(String imageVersionId) {
+ public deleteImageVersion_args setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.String imageVersionId) {
this.imageVersionId = imageVersionId;
return this;
}
@@ -31126,13 +33158,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -31140,14 +33173,16 @@ public class SatelliteServer {
if (value == null) {
unsetImageVersionId();
} else {
- setImageVersionId((String)value);
+ setImageVersionId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -31156,13 +33191,14 @@ public class SatelliteServer {
return getImageVersionId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -31171,13 +33207,11 @@ public class SatelliteServer {
case IMAGE_VERSION_ID:
return isSetImageVersionId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof deleteImageVersion_args)
return this.equals((deleteImageVersion_args)that);
return false;
@@ -31186,6 +33220,8 @@ public class SatelliteServer {
public boolean equals(deleteImageVersion_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -31210,19 +33246,17 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_imageVersionId = true && (isSetImageVersionId());
- list.add(present_imageVersionId);
- if (present_imageVersionId)
- list.add(imageVersionId);
+ hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287);
+ if (isSetImageVersionId())
+ hashCode = hashCode * 8191 + imageVersionId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -31233,7 +33267,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -31243,7 +33277,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ lastComparison = java.lang.Boolean.compare(isSetImageVersionId(), other.isSetImageVersionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -31256,21 +33290,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("deleteImageVersion_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteImageVersion_args(");
boolean first = true;
sb.append("userToken:");
@@ -31305,7 +33343,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -31313,14 +33351,16 @@ public class SatelliteServer {
}
}
- private static class deleteImageVersion_argsStandardSchemeFactory implements SchemeFactory {
+ private static class deleteImageVersion_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public deleteImageVersion_argsStandardScheme getScheme() {
return new deleteImageVersion_argsStandardScheme();
}
}
- private static class deleteImageVersion_argsStandardScheme extends StandardScheme<deleteImageVersion_args> {
+ private static class deleteImageVersion_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<deleteImageVersion_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageVersion_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -31358,6 +33398,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, deleteImageVersion_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -31378,18 +33419,19 @@ public class SatelliteServer {
}
- private static class deleteImageVersion_argsTupleSchemeFactory implements SchemeFactory {
+ private static class deleteImageVersion_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public deleteImageVersion_argsTupleScheme getScheme() {
return new deleteImageVersion_argsTupleScheme();
}
}
- private static class deleteImageVersion_argsTupleScheme extends TupleScheme<deleteImageVersion_args> {
+ private static class deleteImageVersion_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<deleteImageVersion_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageVersion_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -31407,8 +33449,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteImageVersion_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -31420,8 +33462,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class deleteImageVersion_result implements org.apache.thrift.TBase<deleteImageVersion_result, deleteImageVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteImageVersion_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteImageVersion_result");
@@ -31429,15 +33475,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new deleteImageVersion_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new deleteImageVersion_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteImageVersion_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteImageVersion_resultTupleSchemeFactory();
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -31445,10 +33488,10 @@ public class SatelliteServer {
NOT_FOUND((short)2, "notFound"),
SERVER_ERROR((short)3, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -31456,6 +33499,7 @@ public class SatelliteServer {
/**
* 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: // AUTH_ERROR
@@ -31475,45 +33519,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageVersion_result.class, metaDataMap);
}
@@ -31546,6 +33593,7 @@ public class SatelliteServer {
}
}
+ @Override
public deleteImageVersion_result deepCopy() {
return new deleteImageVersion_result(this);
}
@@ -31557,11 +33605,12 @@ public class SatelliteServer {
this.serverError = null;
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public deleteImageVersion_result setAuthError(TAuthorizationException authError) {
+ public deleteImageVersion_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -31581,11 +33630,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public deleteImageVersion_result setNotFound(TNotFoundException notFound) {
+ public deleteImageVersion_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -31605,11 +33655,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public deleteImageVersion_result setServerError(TInvocationException serverError) {
+ public deleteImageVersion_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -31629,7 +33680,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case AUTH_ERROR:
if (value == null) {
@@ -31658,7 +33710,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTH_ERROR:
return getAuthError();
@@ -31670,13 +33724,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -31687,13 +33742,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof deleteImageVersion_result)
return this.equals((deleteImageVersion_result)that);
return false;
@@ -31702,6 +33755,8 @@ public class SatelliteServer {
public boolean equals(deleteImageVersion_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_authError = true && this.isSetAuthError();
boolean that_present_authError = true && that.isSetAuthError();
@@ -31735,24 +33790,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -31763,7 +33815,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -31773,7 +33825,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -31783,7 +33835,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -31796,21 +33848,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("deleteImageVersion_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteImageVersion_result(");
boolean first = true;
sb.append("authError:");
@@ -31853,7 +33908,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -31861,14 +33916,16 @@ public class SatelliteServer {
}
}
- private static class deleteImageVersion_resultStandardSchemeFactory implements SchemeFactory {
+ private static class deleteImageVersion_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public deleteImageVersion_resultStandardScheme getScheme() {
return new deleteImageVersion_resultStandardScheme();
}
}
- private static class deleteImageVersion_resultStandardScheme extends StandardScheme<deleteImageVersion_result> {
+ private static class deleteImageVersion_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<deleteImageVersion_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageVersion_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -31917,6 +33974,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, deleteImageVersion_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -31942,18 +34000,19 @@ public class SatelliteServer {
}
- private static class deleteImageVersion_resultTupleSchemeFactory implements SchemeFactory {
+ private static class deleteImageVersion_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public deleteImageVersion_resultTupleScheme getScheme() {
return new deleteImageVersion_resultTupleScheme();
}
}
- private static class deleteImageVersion_resultTupleScheme extends TupleScheme<deleteImageVersion_result> {
+ private static class deleteImageVersion_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<deleteImageVersion_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageVersion_result 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.isSetAuthError()) {
optionals.set(0);
}
@@ -31977,8 +34036,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteImageVersion_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.authError = new TAuthorizationException();
struct.authError.read(iprot);
@@ -31997,32 +34056,33 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class deleteImageBase_args implements org.apache.thrift.TBase<deleteImageBase_args, deleteImageBase_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteImageBase_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteImageBase_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
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)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new deleteImageBase_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new deleteImageBase_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteImageBase_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteImageBase_argsTupleSchemeFactory();
- public String userToken; // required
- public String imageBaseId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageBaseId; // 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 {
USER_TOKEN((short)1, "userToken"),
IMAGE_BASE_ID((short)2, "imageBaseId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -32030,6 +34090,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -32047,43 +34108,46 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
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")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageBase_args.class, metaDataMap);
}
@@ -32091,8 +34155,8 @@ public class SatelliteServer {
}
public deleteImageBase_args(
- String userToken,
- String imageBaseId)
+ java.lang.String userToken,
+ java.lang.String imageBaseId)
{
this();
this.userToken = userToken;
@@ -32111,6 +34175,7 @@ public class SatelliteServer {
}
}
+ @Override
public deleteImageBase_args deepCopy() {
return new deleteImageBase_args(this);
}
@@ -32121,11 +34186,12 @@ public class SatelliteServer {
this.imageBaseId = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public deleteImageBase_args setUserToken(String userToken) {
+ public deleteImageBase_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -32145,11 +34211,12 @@ public class SatelliteServer {
}
}
- public String getImageBaseId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageBaseId() {
return this.imageBaseId;
}
- public deleteImageBase_args setImageBaseId(String imageBaseId) {
+ public deleteImageBase_args setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.String imageBaseId) {
this.imageBaseId = imageBaseId;
return this;
}
@@ -32169,13 +34236,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -32183,14 +34251,16 @@ public class SatelliteServer {
if (value == null) {
unsetImageBaseId();
} else {
- setImageBaseId((String)value);
+ setImageBaseId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -32199,13 +34269,14 @@ public class SatelliteServer {
return getImageBaseId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -32214,13 +34285,11 @@ public class SatelliteServer {
case IMAGE_BASE_ID:
return isSetImageBaseId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof deleteImageBase_args)
return this.equals((deleteImageBase_args)that);
return false;
@@ -32229,6 +34298,8 @@ public class SatelliteServer {
public boolean equals(deleteImageBase_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -32253,19 +34324,17 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_imageBaseId = true && (isSetImageBaseId());
- list.add(present_imageBaseId);
- if (present_imageBaseId)
- list.add(imageBaseId);
+ hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287);
+ if (isSetImageBaseId())
+ hashCode = hashCode * 8191 + imageBaseId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -32276,7 +34345,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -32286,7 +34355,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ lastComparison = java.lang.Boolean.compare(isSetImageBaseId(), other.isSetImageBaseId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -32299,21 +34368,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("deleteImageBase_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteImageBase_args(");
boolean first = true;
sb.append("userToken:");
@@ -32348,7 +34421,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -32356,14 +34429,16 @@ public class SatelliteServer {
}
}
- private static class deleteImageBase_argsStandardSchemeFactory implements SchemeFactory {
+ private static class deleteImageBase_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public deleteImageBase_argsStandardScheme getScheme() {
return new deleteImageBase_argsStandardScheme();
}
}
- private static class deleteImageBase_argsStandardScheme extends StandardScheme<deleteImageBase_args> {
+ private static class deleteImageBase_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<deleteImageBase_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageBase_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -32401,6 +34476,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, deleteImageBase_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -32421,18 +34497,19 @@ public class SatelliteServer {
}
- private static class deleteImageBase_argsTupleSchemeFactory implements SchemeFactory {
+ private static class deleteImageBase_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public deleteImageBase_argsTupleScheme getScheme() {
return new deleteImageBase_argsTupleScheme();
}
}
- private static class deleteImageBase_argsTupleScheme extends TupleScheme<deleteImageBase_args> {
+ private static class deleteImageBase_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<deleteImageBase_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageBase_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -32450,8 +34527,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteImageBase_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -32463,8 +34540,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class deleteImageBase_result implements org.apache.thrift.TBase<deleteImageBase_result, deleteImageBase_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteImageBase_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteImageBase_result");
@@ -32472,15 +34553,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new deleteImageBase_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new deleteImageBase_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteImageBase_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteImageBase_resultTupleSchemeFactory();
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -32488,10 +34566,10 @@ public class SatelliteServer {
NOT_FOUND((short)2, "notFound"),
SERVER_ERROR((short)3, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -32499,6 +34577,7 @@ public class SatelliteServer {
/**
* 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: // AUTH_ERROR
@@ -32518,45 +34597,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteImageBase_result.class, metaDataMap);
}
@@ -32589,6 +34671,7 @@ public class SatelliteServer {
}
}
+ @Override
public deleteImageBase_result deepCopy() {
return new deleteImageBase_result(this);
}
@@ -32600,11 +34683,12 @@ public class SatelliteServer {
this.serverError = null;
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public deleteImageBase_result setAuthError(TAuthorizationException authError) {
+ public deleteImageBase_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -32624,11 +34708,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public deleteImageBase_result setNotFound(TNotFoundException notFound) {
+ public deleteImageBase_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -32648,11 +34733,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public deleteImageBase_result setServerError(TInvocationException serverError) {
+ public deleteImageBase_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -32672,7 +34758,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case AUTH_ERROR:
if (value == null) {
@@ -32701,7 +34788,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTH_ERROR:
return getAuthError();
@@ -32713,13 +34802,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -32730,13 +34820,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof deleteImageBase_result)
return this.equals((deleteImageBase_result)that);
return false;
@@ -32745,6 +34833,8 @@ public class SatelliteServer {
public boolean equals(deleteImageBase_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_authError = true && this.isSetAuthError();
boolean that_present_authError = true && that.isSetAuthError();
@@ -32778,24 +34868,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -32806,7 +34893,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -32816,7 +34903,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -32826,7 +34913,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -32839,21 +34926,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("deleteImageBase_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteImageBase_result(");
boolean first = true;
sb.append("authError:");
@@ -32896,7 +34986,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -32904,14 +34994,16 @@ public class SatelliteServer {
}
}
- private static class deleteImageBase_resultStandardSchemeFactory implements SchemeFactory {
+ private static class deleteImageBase_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public deleteImageBase_resultStandardScheme getScheme() {
return new deleteImageBase_resultStandardScheme();
}
}
- private static class deleteImageBase_resultStandardScheme extends StandardScheme<deleteImageBase_result> {
+ private static class deleteImageBase_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<deleteImageBase_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteImageBase_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -32960,6 +35052,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, deleteImageBase_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -32985,18 +35078,19 @@ public class SatelliteServer {
}
- private static class deleteImageBase_resultTupleSchemeFactory implements SchemeFactory {
+ private static class deleteImageBase_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public deleteImageBase_resultTupleScheme getScheme() {
return new deleteImageBase_resultTupleScheme();
}
}
- private static class deleteImageBase_resultTupleScheme extends TupleScheme<deleteImageBase_result> {
+ private static class deleteImageBase_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<deleteImageBase_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteImageBase_result 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.isSetAuthError()) {
optionals.set(0);
}
@@ -33020,8 +35114,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteImageBase_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.authError = new TAuthorizationException();
struct.authError.read(iprot);
@@ -33040,8 +35134,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class writeImagePermissions_args implements org.apache.thrift.TBase<writeImagePermissions_args, writeImagePermissions_args._Fields>, java.io.Serializable, Cloneable, Comparable<writeImagePermissions_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeImagePermissions_args");
@@ -33049,15 +35147,12 @@ public class SatelliteServer {
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)2);
private static final org.apache.thrift.protocol.TField PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("permissions", org.apache.thrift.protocol.TType.MAP, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new writeImagePermissions_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new writeImagePermissions_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new writeImagePermissions_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new writeImagePermissions_argsTupleSchemeFactory();
- public String userToken; // required
- public String imageBaseId; // required
- public Map<String,ImagePermissions> permissions; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageBaseId; // required
+ public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,ImagePermissions> permissions; // 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 {
@@ -33065,10 +35160,10 @@ public class SatelliteServer {
IMAGE_BASE_ID((short)2, "imageBaseId"),
PERMISSIONS((short)3, "permissions");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -33076,6 +35171,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -33095,38 +35191,41 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.IMAGE_BASE_ID, new org.apache.thrift.meta_data.FieldMetaData("imageBaseId", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -33135,7 +35234,7 @@ public class SatelliteServer {
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"),
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePermissions.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeImagePermissions_args.class, metaDataMap);
}
@@ -33143,9 +35242,9 @@ public class SatelliteServer {
}
public writeImagePermissions_args(
- String userToken,
- String imageBaseId,
- Map<String,ImagePermissions> permissions)
+ java.lang.String userToken,
+ java.lang.String imageBaseId,
+ java.util.Map<java.lang.String,ImagePermissions> permissions)
{
this();
this.userToken = userToken;
@@ -33164,13 +35263,13 @@ public class SatelliteServer {
this.imageBaseId = other.imageBaseId;
}
if (other.isSetPermissions()) {
- Map<String,ImagePermissions> __this__permissions = new HashMap<String,ImagePermissions>(other.permissions.size());
- for (Map.Entry<String, ImagePermissions> other_element : other.permissions.entrySet()) {
+ java.util.Map<java.lang.String,ImagePermissions> __this__permissions = new java.util.HashMap<java.lang.String,ImagePermissions>(other.permissions.size());
+ for (java.util.Map.Entry<java.lang.String, ImagePermissions> other_element : other.permissions.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
ImagePermissions other_element_value = other_element.getValue();
- String __this__permissions_copy_key = other_element_key;
+ java.lang.String __this__permissions_copy_key = other_element_key;
ImagePermissions __this__permissions_copy_value = new ImagePermissions(other_element_value);
@@ -33180,6 +35279,7 @@ public class SatelliteServer {
}
}
+ @Override
public writeImagePermissions_args deepCopy() {
return new writeImagePermissions_args(this);
}
@@ -33191,11 +35291,12 @@ public class SatelliteServer {
this.permissions = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public writeImagePermissions_args setUserToken(String userToken) {
+ public writeImagePermissions_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -33215,11 +35316,12 @@ public class SatelliteServer {
}
}
- public String getImageBaseId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageBaseId() {
return this.imageBaseId;
}
- public writeImagePermissions_args setImageBaseId(String imageBaseId) {
+ public writeImagePermissions_args setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.String imageBaseId) {
this.imageBaseId = imageBaseId;
return this;
}
@@ -33243,18 +35345,19 @@ public class SatelliteServer {
return (this.permissions == null) ? 0 : this.permissions.size();
}
- public void putToPermissions(String key, ImagePermissions val) {
+ public void putToPermissions(java.lang.String key, ImagePermissions val) {
if (this.permissions == null) {
- this.permissions = new HashMap<String,ImagePermissions>();
+ this.permissions = new java.util.HashMap<java.lang.String,ImagePermissions>();
}
this.permissions.put(key, val);
}
- public Map<String,ImagePermissions> getPermissions() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Map<java.lang.String,ImagePermissions> getPermissions() {
return this.permissions;
}
- public writeImagePermissions_args setPermissions(Map<String,ImagePermissions> permissions) {
+ public writeImagePermissions_args setPermissions(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,ImagePermissions> permissions) {
this.permissions = permissions;
return this;
}
@@ -33274,13 +35377,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -33288,7 +35392,7 @@ public class SatelliteServer {
if (value == null) {
unsetImageBaseId();
} else {
- setImageBaseId((String)value);
+ setImageBaseId((java.lang.String)value);
}
break;
@@ -33296,14 +35400,16 @@ public class SatelliteServer {
if (value == null) {
unsetPermissions();
} else {
- setPermissions((Map<String,ImagePermissions>)value);
+ setPermissions((java.util.Map<java.lang.String,ImagePermissions>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -33315,13 +35421,14 @@ public class SatelliteServer {
return getPermissions();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -33332,13 +35439,11 @@ public class SatelliteServer {
case PERMISSIONS:
return isSetPermissions();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof writeImagePermissions_args)
return this.equals((writeImagePermissions_args)that);
return false;
@@ -33347,6 +35452,8 @@ public class SatelliteServer {
public boolean equals(writeImagePermissions_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -33380,24 +35487,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_imageBaseId = true && (isSetImageBaseId());
- list.add(present_imageBaseId);
- if (present_imageBaseId)
- list.add(imageBaseId);
+ hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287);
+ if (isSetImageBaseId())
+ hashCode = hashCode * 8191 + imageBaseId.hashCode();
- boolean present_permissions = true && (isSetPermissions());
- list.add(present_permissions);
- if (present_permissions)
- list.add(permissions);
+ hashCode = hashCode * 8191 + ((isSetPermissions()) ? 131071 : 524287);
+ if (isSetPermissions())
+ hashCode = hashCode * 8191 + permissions.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -33408,7 +35512,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -33418,7 +35522,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ lastComparison = java.lang.Boolean.compare(isSetImageBaseId(), other.isSetImageBaseId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -33428,7 +35532,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPermissions()).compareTo(other.isSetPermissions());
+ lastComparison = java.lang.Boolean.compare(isSetPermissions(), other.isSetPermissions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -33441,21 +35545,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("writeImagePermissions_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("writeImagePermissions_args(");
boolean first = true;
sb.append("userToken:");
@@ -33498,7 +35606,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -33506,14 +35614,16 @@ public class SatelliteServer {
}
}
- private static class writeImagePermissions_argsStandardSchemeFactory implements SchemeFactory {
+ private static class writeImagePermissions_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public writeImagePermissions_argsStandardScheme getScheme() {
return new writeImagePermissions_argsStandardScheme();
}
}
- private static class writeImagePermissions_argsStandardScheme extends StandardScheme<writeImagePermissions_args> {
+ private static class writeImagePermissions_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<writeImagePermissions_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, writeImagePermissions_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -33543,16 +35653,16 @@ public class SatelliteServer {
case 3: // PERMISSIONS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
- org.apache.thrift.protocol.TMap _map290 = iprot.readMapBegin();
- struct.permissions = new HashMap<String,ImagePermissions>(2*_map290.size);
- String _key291;
- ImagePermissions _val292;
- for (int _i293 = 0; _i293 < _map290.size; ++_i293)
+ org.apache.thrift.protocol.TMap _map370 = iprot.readMapBegin();
+ struct.permissions = new java.util.HashMap<java.lang.String,ImagePermissions>(2*_map370.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key371;
+ @org.apache.thrift.annotation.Nullable ImagePermissions _val372;
+ for (int _i373 = 0; _i373 < _map370.size; ++_i373)
{
- _key291 = iprot.readString();
- _val292 = new ImagePermissions();
- _val292.read(iprot);
- struct.permissions.put(_key291, _val292);
+ _key371 = iprot.readString();
+ _val372 = new ImagePermissions();
+ _val372.read(iprot);
+ struct.permissions.put(_key371, _val372);
}
iprot.readMapEnd();
}
@@ -33572,6 +35682,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, writeImagePermissions_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -33590,10 +35701,10 @@ public class SatelliteServer {
oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.permissions.size()));
- for (Map.Entry<String, ImagePermissions> _iter294 : struct.permissions.entrySet())
+ for (java.util.Map.Entry<java.lang.String, ImagePermissions> _iter374 : struct.permissions.entrySet())
{
- oprot.writeString(_iter294.getKey());
- _iter294.getValue().write(oprot);
+ oprot.writeString(_iter374.getKey());
+ _iter374.getValue().write(oprot);
}
oprot.writeMapEnd();
}
@@ -33605,18 +35716,19 @@ public class SatelliteServer {
}
- private static class writeImagePermissions_argsTupleSchemeFactory implements SchemeFactory {
+ private static class writeImagePermissions_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public writeImagePermissions_argsTupleScheme getScheme() {
return new writeImagePermissions_argsTupleScheme();
}
}
- private static class writeImagePermissions_argsTupleScheme extends TupleScheme<writeImagePermissions_args> {
+ private static class writeImagePermissions_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<writeImagePermissions_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -33636,10 +35748,10 @@ public class SatelliteServer {
if (struct.isSetPermissions()) {
{
oprot.writeI32(struct.permissions.size());
- for (Map.Entry<String, ImagePermissions> _iter295 : struct.permissions.entrySet())
+ for (java.util.Map.Entry<java.lang.String, ImagePermissions> _iter375 : struct.permissions.entrySet())
{
- oprot.writeString(_iter295.getKey());
- _iter295.getValue().write(oprot);
+ oprot.writeString(_iter375.getKey());
+ _iter375.getValue().write(oprot);
}
}
}
@@ -33647,8 +35759,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -33659,16 +35771,16 @@ public class SatelliteServer {
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TMap _map296 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.permissions = new HashMap<String,ImagePermissions>(2*_map296.size);
- String _key297;
- ImagePermissions _val298;
- for (int _i299 = 0; _i299 < _map296.size; ++_i299)
+ org.apache.thrift.protocol.TMap _map376 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT);
+ struct.permissions = new java.util.HashMap<java.lang.String,ImagePermissions>(2*_map376.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key377;
+ @org.apache.thrift.annotation.Nullable ImagePermissions _val378;
+ for (int _i379 = 0; _i379 < _map376.size; ++_i379)
{
- _key297 = iprot.readString();
- _val298 = new ImagePermissions();
- _val298.read(iprot);
- struct.permissions.put(_key297, _val298);
+ _key377 = iprot.readString();
+ _val378 = new ImagePermissions();
+ _val378.read(iprot);
+ struct.permissions.put(_key377, _val378);
}
}
struct.setPermissionsIsSet(true);
@@ -33676,8 +35788,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class writeImagePermissions_result implements org.apache.thrift.TBase<writeImagePermissions_result, writeImagePermissions_result._Fields>, java.io.Serializable, Cloneable, Comparable<writeImagePermissions_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeImagePermissions_result");
@@ -33685,15 +35801,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new writeImagePermissions_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new writeImagePermissions_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new writeImagePermissions_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new writeImagePermissions_resultTupleSchemeFactory();
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -33701,10 +35814,10 @@ public class SatelliteServer {
NOT_FOUND((short)2, "notFound"),
SERVER_ERROR((short)3, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -33712,6 +35825,7 @@ public class SatelliteServer {
/**
* 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: // AUTH_ERROR
@@ -33731,45 +35845,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeImagePermissions_result.class, metaDataMap);
}
@@ -33802,6 +35919,7 @@ public class SatelliteServer {
}
}
+ @Override
public writeImagePermissions_result deepCopy() {
return new writeImagePermissions_result(this);
}
@@ -33813,11 +35931,12 @@ public class SatelliteServer {
this.serverError = null;
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public writeImagePermissions_result setAuthError(TAuthorizationException authError) {
+ public writeImagePermissions_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -33837,11 +35956,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public writeImagePermissions_result setNotFound(TNotFoundException notFound) {
+ public writeImagePermissions_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -33861,11 +35981,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public writeImagePermissions_result setServerError(TInvocationException serverError) {
+ public writeImagePermissions_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -33885,7 +36006,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case AUTH_ERROR:
if (value == null) {
@@ -33914,7 +36036,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTH_ERROR:
return getAuthError();
@@ -33926,13 +36050,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -33943,13 +36068,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof writeImagePermissions_result)
return this.equals((writeImagePermissions_result)that);
return false;
@@ -33958,6 +36081,8 @@ public class SatelliteServer {
public boolean equals(writeImagePermissions_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_authError = true && this.isSetAuthError();
boolean that_present_authError = true && that.isSetAuthError();
@@ -33991,24 +36116,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -34019,7 +36141,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -34029,7 +36151,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -34039,7 +36161,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -34052,21 +36174,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("writeImagePermissions_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("writeImagePermissions_result(");
boolean first = true;
sb.append("authError:");
@@ -34109,7 +36234,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -34117,14 +36242,16 @@ public class SatelliteServer {
}
}
- private static class writeImagePermissions_resultStandardSchemeFactory implements SchemeFactory {
+ private static class writeImagePermissions_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public writeImagePermissions_resultStandardScheme getScheme() {
return new writeImagePermissions_resultStandardScheme();
}
}
- private static class writeImagePermissions_resultStandardScheme extends StandardScheme<writeImagePermissions_result> {
+ private static class writeImagePermissions_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<writeImagePermissions_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, writeImagePermissions_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -34173,6 +36300,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, writeImagePermissions_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -34198,18 +36326,19 @@ public class SatelliteServer {
}
- private static class writeImagePermissions_resultTupleSchemeFactory implements SchemeFactory {
+ private static class writeImagePermissions_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public writeImagePermissions_resultTupleScheme getScheme() {
return new writeImagePermissions_resultTupleScheme();
}
}
- private static class writeImagePermissions_resultTupleScheme extends TupleScheme<writeImagePermissions_result> {
+ private static class writeImagePermissions_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<writeImagePermissions_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_result 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.isSetAuthError()) {
optionals.set(0);
}
@@ -34233,8 +36362,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, writeImagePermissions_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.authError = new TAuthorizationException();
struct.authError.read(iprot);
@@ -34253,32 +36382,33 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getImagePermissions_args implements org.apache.thrift.TBase<getImagePermissions_args, getImagePermissions_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImagePermissions_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImagePermissions_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
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)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImagePermissions_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImagePermissions_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImagePermissions_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImagePermissions_argsTupleSchemeFactory();
- public String userToken; // required
- public String imageBaseId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageBaseId; // 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 {
USER_TOKEN((short)1, "userToken"),
IMAGE_BASE_ID((short)2, "imageBaseId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -34286,6 +36416,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -34303,43 +36434,46 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
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")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImagePermissions_args.class, metaDataMap);
}
@@ -34347,8 +36481,8 @@ public class SatelliteServer {
}
public getImagePermissions_args(
- String userToken,
- String imageBaseId)
+ java.lang.String userToken,
+ java.lang.String imageBaseId)
{
this();
this.userToken = userToken;
@@ -34367,6 +36501,7 @@ public class SatelliteServer {
}
}
+ @Override
public getImagePermissions_args deepCopy() {
return new getImagePermissions_args(this);
}
@@ -34377,11 +36512,12 @@ public class SatelliteServer {
this.imageBaseId = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public getImagePermissions_args setUserToken(String userToken) {
+ public getImagePermissions_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -34401,11 +36537,12 @@ public class SatelliteServer {
}
}
- public String getImageBaseId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageBaseId() {
return this.imageBaseId;
}
- public getImagePermissions_args setImageBaseId(String imageBaseId) {
+ public getImagePermissions_args setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.String imageBaseId) {
this.imageBaseId = imageBaseId;
return this;
}
@@ -34425,13 +36562,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -34439,14 +36577,16 @@ public class SatelliteServer {
if (value == null) {
unsetImageBaseId();
} else {
- setImageBaseId((String)value);
+ setImageBaseId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -34455,13 +36595,14 @@ public class SatelliteServer {
return getImageBaseId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -34470,13 +36611,11 @@ public class SatelliteServer {
case IMAGE_BASE_ID:
return isSetImageBaseId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getImagePermissions_args)
return this.equals((getImagePermissions_args)that);
return false;
@@ -34485,6 +36624,8 @@ public class SatelliteServer {
public boolean equals(getImagePermissions_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -34509,19 +36650,17 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_imageBaseId = true && (isSetImageBaseId());
- list.add(present_imageBaseId);
- if (present_imageBaseId)
- list.add(imageBaseId);
+ hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287);
+ if (isSetImageBaseId())
+ hashCode = hashCode * 8191 + imageBaseId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -34532,7 +36671,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -34542,7 +36681,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ lastComparison = java.lang.Boolean.compare(isSetImageBaseId(), other.isSetImageBaseId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -34555,21 +36694,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImagePermissions_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getImagePermissions_args(");
boolean first = true;
sb.append("userToken:");
@@ -34604,7 +36747,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -34612,14 +36755,16 @@ public class SatelliteServer {
}
}
- private static class getImagePermissions_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getImagePermissions_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImagePermissions_argsStandardScheme getScheme() {
return new getImagePermissions_argsStandardScheme();
}
}
- private static class getImagePermissions_argsStandardScheme extends StandardScheme<getImagePermissions_args> {
+ private static class getImagePermissions_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getImagePermissions_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getImagePermissions_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -34657,6 +36802,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getImagePermissions_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -34677,18 +36823,19 @@ public class SatelliteServer {
}
- private static class getImagePermissions_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getImagePermissions_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImagePermissions_argsTupleScheme getScheme() {
return new getImagePermissions_argsTupleScheme();
}
}
- private static class getImagePermissions_argsTupleScheme extends TupleScheme<getImagePermissions_args> {
+ private static class getImagePermissions_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getImagePermissions_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getImagePermissions_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -34706,8 +36853,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getImagePermissions_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -34719,8 +36866,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getImagePermissions_result implements org.apache.thrift.TBase<getImagePermissions_result, getImagePermissions_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImagePermissions_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImagePermissions_result");
@@ -34729,16 +36880,13 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImagePermissions_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImagePermissions_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImagePermissions_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImagePermissions_resultTupleSchemeFactory();
- public Map<String,ImagePermissions> success; // required
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,ImagePermissions> success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -34747,10 +36895,10 @@ public class SatelliteServer {
NOT_FOUND((short)2, "notFound"),
SERVER_ERROR((short)3, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -34758,6 +36906,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -34779,49 +36928,52 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"),
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ImagePermissions.class))));
tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImagePermissions_result.class, metaDataMap);
}
@@ -34829,7 +36981,7 @@ public class SatelliteServer {
}
public getImagePermissions_result(
- Map<String,ImagePermissions> success,
+ java.util.Map<java.lang.String,ImagePermissions> success,
TAuthorizationException authError,
TNotFoundException notFound,
TInvocationException serverError)
@@ -34846,13 +36998,13 @@ public class SatelliteServer {
*/
public getImagePermissions_result(getImagePermissions_result other) {
if (other.isSetSuccess()) {
- Map<String,ImagePermissions> __this__success = new HashMap<String,ImagePermissions>(other.success.size());
- for (Map.Entry<String, ImagePermissions> other_element : other.success.entrySet()) {
+ java.util.Map<java.lang.String,ImagePermissions> __this__success = new java.util.HashMap<java.lang.String,ImagePermissions>(other.success.size());
+ for (java.util.Map.Entry<java.lang.String, ImagePermissions> other_element : other.success.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
ImagePermissions other_element_value = other_element.getValue();
- String __this__success_copy_key = other_element_key;
+ java.lang.String __this__success_copy_key = other_element_key;
ImagePermissions __this__success_copy_value = new ImagePermissions(other_element_value);
@@ -34871,6 +37023,7 @@ public class SatelliteServer {
}
}
+ @Override
public getImagePermissions_result deepCopy() {
return new getImagePermissions_result(this);
}
@@ -34887,18 +37040,19 @@ public class SatelliteServer {
return (this.success == null) ? 0 : this.success.size();
}
- public void putToSuccess(String key, ImagePermissions val) {
+ public void putToSuccess(java.lang.String key, ImagePermissions val) {
if (this.success == null) {
- this.success = new HashMap<String,ImagePermissions>();
+ this.success = new java.util.HashMap<java.lang.String,ImagePermissions>();
}
this.success.put(key, val);
}
- public Map<String,ImagePermissions> getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Map<java.lang.String,ImagePermissions> getSuccess() {
return this.success;
}
- public getImagePermissions_result setSuccess(Map<String,ImagePermissions> success) {
+ public getImagePermissions_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,ImagePermissions> success) {
this.success = success;
return this;
}
@@ -34918,11 +37072,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public getImagePermissions_result setAuthError(TAuthorizationException authError) {
+ public getImagePermissions_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -34942,11 +37097,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public getImagePermissions_result setNotFound(TNotFoundException notFound) {
+ public getImagePermissions_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -34966,11 +37122,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public getImagePermissions_result setServerError(TInvocationException serverError) {
+ public getImagePermissions_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -34990,13 +37147,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((Map<String,ImagePermissions>)value);
+ setSuccess((java.util.Map<java.lang.String,ImagePermissions>)value);
}
break;
@@ -35027,7 +37185,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -35042,13 +37202,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -35061,13 +37222,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getImagePermissions_result)
return this.equals((getImagePermissions_result)that);
return false;
@@ -35076,6 +37235,8 @@ public class SatelliteServer {
public boolean equals(getImagePermissions_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -35118,29 +37279,25 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -35151,7 +37308,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -35161,7 +37318,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -35171,7 +37328,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -35181,7 +37338,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -35194,21 +37351,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImagePermissions_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getImagePermissions_result(");
boolean first = true;
sb.append("success:");
@@ -35259,7 +37419,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -35267,14 +37427,16 @@ public class SatelliteServer {
}
}
- private static class getImagePermissions_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getImagePermissions_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImagePermissions_resultStandardScheme getScheme() {
return new getImagePermissions_resultStandardScheme();
}
}
- private static class getImagePermissions_resultStandardScheme extends StandardScheme<getImagePermissions_result> {
+ private static class getImagePermissions_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getImagePermissions_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getImagePermissions_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -35288,16 +37450,16 @@ public class SatelliteServer {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
- org.apache.thrift.protocol.TMap _map300 = iprot.readMapBegin();
- struct.success = new HashMap<String,ImagePermissions>(2*_map300.size);
- String _key301;
- ImagePermissions _val302;
- for (int _i303 = 0; _i303 < _map300.size; ++_i303)
+ org.apache.thrift.protocol.TMap _map380 = iprot.readMapBegin();
+ struct.success = new java.util.HashMap<java.lang.String,ImagePermissions>(2*_map380.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key381;
+ @org.apache.thrift.annotation.Nullable ImagePermissions _val382;
+ for (int _i383 = 0; _i383 < _map380.size; ++_i383)
{
- _key301 = iprot.readString();
- _val302 = new ImagePermissions();
- _val302.read(iprot);
- struct.success.put(_key301, _val302);
+ _key381 = iprot.readString();
+ _val382 = new ImagePermissions();
+ _val382.read(iprot);
+ struct.success.put(_key381, _val382);
}
iprot.readMapEnd();
}
@@ -35344,6 +37506,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getImagePermissions_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -35352,10 +37515,10 @@ public class SatelliteServer {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Map.Entry<String, ImagePermissions> _iter304 : struct.success.entrySet())
+ for (java.util.Map.Entry<java.lang.String, ImagePermissions> _iter384 : struct.success.entrySet())
{
- oprot.writeString(_iter304.getKey());
- _iter304.getValue().write(oprot);
+ oprot.writeString(_iter384.getKey());
+ _iter384.getValue().write(oprot);
}
oprot.writeMapEnd();
}
@@ -35382,18 +37545,19 @@ public class SatelliteServer {
}
- private static class getImagePermissions_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getImagePermissions_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImagePermissions_resultTupleScheme getScheme() {
return new getImagePermissions_resultTupleScheme();
}
}
- private static class getImagePermissions_resultTupleScheme extends TupleScheme<getImagePermissions_result> {
+ private static class getImagePermissions_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getImagePermissions_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getImagePermissions_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -35410,10 +37574,10 @@ public class SatelliteServer {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (Map.Entry<String, ImagePermissions> _iter305 : struct.success.entrySet())
+ for (java.util.Map.Entry<java.lang.String, ImagePermissions> _iter385 : struct.success.entrySet())
{
- oprot.writeString(_iter305.getKey());
- _iter305.getValue().write(oprot);
+ oprot.writeString(_iter385.getKey());
+ _iter385.getValue().write(oprot);
}
}
}
@@ -35430,20 +37594,20 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getImagePermissions_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TMap _map306 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new HashMap<String,ImagePermissions>(2*_map306.size);
- String _key307;
- ImagePermissions _val308;
- for (int _i309 = 0; _i309 < _map306.size; ++_i309)
+ org.apache.thrift.protocol.TMap _map386 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT);
+ struct.success = new java.util.HashMap<java.lang.String,ImagePermissions>(2*_map386.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key387;
+ @org.apache.thrift.annotation.Nullable ImagePermissions _val388;
+ for (int _i389 = 0; _i389 < _map386.size; ++_i389)
{
- _key307 = iprot.readString();
- _val308 = new ImagePermissions();
- _val308.read(iprot);
- struct.success.put(_key307, _val308);
+ _key387 = iprot.readString();
+ _val388 = new ImagePermissions();
+ _val388.read(iprot);
+ struct.success.put(_key387, _val388);
}
}
struct.setSuccessIsSet(true);
@@ -35466,8 +37630,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class setImageOwner_args implements org.apache.thrift.TBase<setImageOwner_args, setImageOwner_args._Fields>, java.io.Serializable, Cloneable, Comparable<setImageOwner_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setImageOwner_args");
@@ -35475,15 +37643,12 @@ public class SatelliteServer {
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)2);
private static final org.apache.thrift.protocol.TField NEW_OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("newOwnerId", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setImageOwner_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setImageOwner_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setImageOwner_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setImageOwner_argsTupleSchemeFactory();
- public String userToken; // required
- public String imageBaseId; // required
- public String newOwnerId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageBaseId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String newOwnerId; // 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 {
@@ -35491,10 +37656,10 @@ public class SatelliteServer {
IMAGE_BASE_ID((short)2, "imageBaseId"),
NEW_OWNER_ID((short)3, "newOwnerId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -35502,6 +37667,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -35521,45 +37687,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
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.NEW_OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("newOwnerId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setImageOwner_args.class, metaDataMap);
}
@@ -35567,9 +37736,9 @@ public class SatelliteServer {
}
public setImageOwner_args(
- String userToken,
- String imageBaseId,
- String newOwnerId)
+ java.lang.String userToken,
+ java.lang.String imageBaseId,
+ java.lang.String newOwnerId)
{
this();
this.userToken = userToken;
@@ -35592,6 +37761,7 @@ public class SatelliteServer {
}
}
+ @Override
public setImageOwner_args deepCopy() {
return new setImageOwner_args(this);
}
@@ -35603,11 +37773,12 @@ public class SatelliteServer {
this.newOwnerId = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public setImageOwner_args setUserToken(String userToken) {
+ public setImageOwner_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -35627,11 +37798,12 @@ public class SatelliteServer {
}
}
- public String getImageBaseId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageBaseId() {
return this.imageBaseId;
}
- public setImageOwner_args setImageBaseId(String imageBaseId) {
+ public setImageOwner_args setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.String imageBaseId) {
this.imageBaseId = imageBaseId;
return this;
}
@@ -35651,11 +37823,12 @@ public class SatelliteServer {
}
}
- public String getNewOwnerId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getNewOwnerId() {
return this.newOwnerId;
}
- public setImageOwner_args setNewOwnerId(String newOwnerId) {
+ public setImageOwner_args setNewOwnerId(@org.apache.thrift.annotation.Nullable java.lang.String newOwnerId) {
this.newOwnerId = newOwnerId;
return this;
}
@@ -35675,13 +37848,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -35689,7 +37863,7 @@ public class SatelliteServer {
if (value == null) {
unsetImageBaseId();
} else {
- setImageBaseId((String)value);
+ setImageBaseId((java.lang.String)value);
}
break;
@@ -35697,14 +37871,16 @@ public class SatelliteServer {
if (value == null) {
unsetNewOwnerId();
} else {
- setNewOwnerId((String)value);
+ setNewOwnerId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -35716,13 +37892,14 @@ public class SatelliteServer {
return getNewOwnerId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -35733,13 +37910,11 @@ public class SatelliteServer {
case NEW_OWNER_ID:
return isSetNewOwnerId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof setImageOwner_args)
return this.equals((setImageOwner_args)that);
return false;
@@ -35748,6 +37923,8 @@ public class SatelliteServer {
public boolean equals(setImageOwner_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -35781,24 +37958,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_imageBaseId = true && (isSetImageBaseId());
- list.add(present_imageBaseId);
- if (present_imageBaseId)
- list.add(imageBaseId);
+ hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287);
+ if (isSetImageBaseId())
+ hashCode = hashCode * 8191 + imageBaseId.hashCode();
- boolean present_newOwnerId = true && (isSetNewOwnerId());
- list.add(present_newOwnerId);
- if (present_newOwnerId)
- list.add(newOwnerId);
+ hashCode = hashCode * 8191 + ((isSetNewOwnerId()) ? 131071 : 524287);
+ if (isSetNewOwnerId())
+ hashCode = hashCode * 8191 + newOwnerId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -35809,7 +37983,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -35819,7 +37993,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ lastComparison = java.lang.Boolean.compare(isSetImageBaseId(), other.isSetImageBaseId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -35829,7 +38003,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNewOwnerId()).compareTo(other.isSetNewOwnerId());
+ lastComparison = java.lang.Boolean.compare(isSetNewOwnerId(), other.isSetNewOwnerId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -35842,21 +38016,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("setImageOwner_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("setImageOwner_args(");
boolean first = true;
sb.append("userToken:");
@@ -35899,7 +38077,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -35907,14 +38085,16 @@ public class SatelliteServer {
}
}
- private static class setImageOwner_argsStandardSchemeFactory implements SchemeFactory {
+ private static class setImageOwner_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setImageOwner_argsStandardScheme getScheme() {
return new setImageOwner_argsStandardScheme();
}
}
- private static class setImageOwner_argsStandardScheme extends StandardScheme<setImageOwner_args> {
+ private static class setImageOwner_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<setImageOwner_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, setImageOwner_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -35960,6 +38140,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, setImageOwner_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -35985,18 +38166,19 @@ public class SatelliteServer {
}
- private static class setImageOwner_argsTupleSchemeFactory implements SchemeFactory {
+ private static class setImageOwner_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setImageOwner_argsTupleScheme getScheme() {
return new setImageOwner_argsTupleScheme();
}
}
- private static class setImageOwner_argsTupleScheme extends TupleScheme<setImageOwner_args> {
+ private static class setImageOwner_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<setImageOwner_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, setImageOwner_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -36020,8 +38202,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, setImageOwner_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -36037,8 +38219,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class setImageOwner_result implements org.apache.thrift.TBase<setImageOwner_result, setImageOwner_result._Fields>, java.io.Serializable, Cloneable, Comparable<setImageOwner_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setImageOwner_result");
@@ -36046,15 +38232,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setImageOwner_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setImageOwner_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setImageOwner_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setImageOwner_resultTupleSchemeFactory();
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -36062,10 +38245,10 @@ public class SatelliteServer {
NOT_FOUND((short)2, "notFound"),
SERVER_ERROR((short)3, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -36073,6 +38256,7 @@ public class SatelliteServer {
/**
* 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: // AUTH_ERROR
@@ -36092,45 +38276,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setImageOwner_result.class, metaDataMap);
}
@@ -36163,6 +38350,7 @@ public class SatelliteServer {
}
}
+ @Override
public setImageOwner_result deepCopy() {
return new setImageOwner_result(this);
}
@@ -36174,11 +38362,12 @@ public class SatelliteServer {
this.serverError = null;
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public setImageOwner_result setAuthError(TAuthorizationException authError) {
+ public setImageOwner_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -36198,11 +38387,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public setImageOwner_result setNotFound(TNotFoundException notFound) {
+ public setImageOwner_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -36222,11 +38412,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public setImageOwner_result setServerError(TInvocationException serverError) {
+ public setImageOwner_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -36246,7 +38437,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case AUTH_ERROR:
if (value == null) {
@@ -36275,7 +38467,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTH_ERROR:
return getAuthError();
@@ -36287,13 +38481,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -36304,13 +38499,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof setImageOwner_result)
return this.equals((setImageOwner_result)that);
return false;
@@ -36319,6 +38512,8 @@ public class SatelliteServer {
public boolean equals(setImageOwner_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_authError = true && this.isSetAuthError();
boolean that_present_authError = true && that.isSetAuthError();
@@ -36352,24 +38547,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -36380,7 +38572,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -36390,7 +38582,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -36400,7 +38592,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -36413,21 +38605,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("setImageOwner_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("setImageOwner_result(");
boolean first = true;
sb.append("authError:");
@@ -36470,7 +38665,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -36478,14 +38673,16 @@ public class SatelliteServer {
}
}
- private static class setImageOwner_resultStandardSchemeFactory implements SchemeFactory {
+ private static class setImageOwner_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setImageOwner_resultStandardScheme getScheme() {
return new setImageOwner_resultStandardScheme();
}
}
- private static class setImageOwner_resultStandardScheme extends StandardScheme<setImageOwner_result> {
+ private static class setImageOwner_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<setImageOwner_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, setImageOwner_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -36534,6 +38731,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, setImageOwner_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -36559,18 +38757,19 @@ public class SatelliteServer {
}
- private static class setImageOwner_resultTupleSchemeFactory implements SchemeFactory {
+ private static class setImageOwner_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setImageOwner_resultTupleScheme getScheme() {
return new setImageOwner_resultTupleScheme();
}
}
- private static class setImageOwner_resultTupleScheme extends TupleScheme<setImageOwner_result> {
+ private static class setImageOwner_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<setImageOwner_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, setImageOwner_result 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.isSetAuthError()) {
optionals.set(0);
}
@@ -36594,8 +38793,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, setImageOwner_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.authError = new TAuthorizationException();
struct.authError.read(iprot);
@@ -36614,8 +38813,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class setImageVersionExpiry_args implements org.apache.thrift.TBase<setImageVersionExpiry_args, setImageVersionExpiry_args._Fields>, java.io.Serializable, Cloneable, Comparable<setImageVersionExpiry_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setImageVersionExpiry_args");
@@ -36623,14 +38826,11 @@ public class SatelliteServer {
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)2);
private static final org.apache.thrift.protocol.TField EXPIRE_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("expireTime", org.apache.thrift.protocol.TType.I64, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setImageVersionExpiry_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setImageVersionExpiry_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setImageVersionExpiry_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setImageVersionExpiry_argsTupleSchemeFactory();
- public String userToken; // required
- public String imageBaseId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageBaseId; // required
public long expireTime; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -36639,10 +38839,10 @@ public class SatelliteServer {
IMAGE_BASE_ID((short)2, "imageBaseId"),
EXPIRE_TIME((short)3, "expireTime");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -36650,6 +38850,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -36669,30 +38870,33 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -36700,16 +38904,16 @@ public class SatelliteServer {
// isset id assignments
private static final int __EXPIRETIME_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
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.EXPIRE_TIME, new org.apache.thrift.meta_data.FieldMetaData("expireTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setImageVersionExpiry_args.class, metaDataMap);
}
@@ -36717,8 +38921,8 @@ public class SatelliteServer {
}
public setImageVersionExpiry_args(
- String userToken,
- String imageBaseId,
+ java.lang.String userToken,
+ java.lang.String imageBaseId,
long expireTime)
{
this();
@@ -36742,6 +38946,7 @@ public class SatelliteServer {
this.expireTime = other.expireTime;
}
+ @Override
public setImageVersionExpiry_args deepCopy() {
return new setImageVersionExpiry_args(this);
}
@@ -36754,11 +38959,12 @@ public class SatelliteServer {
this.expireTime = 0;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public setImageVersionExpiry_args setUserToken(String userToken) {
+ public setImageVersionExpiry_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -36778,11 +38984,12 @@ public class SatelliteServer {
}
}
- public String getImageBaseId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageBaseId() {
return this.imageBaseId;
}
- public setImageVersionExpiry_args setImageBaseId(String imageBaseId) {
+ public setImageVersionExpiry_args setImageBaseId(@org.apache.thrift.annotation.Nullable java.lang.String imageBaseId) {
this.imageBaseId = imageBaseId;
return this;
}
@@ -36813,25 +39020,26 @@ public class SatelliteServer {
}
public void unsetExpireTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXPIRETIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EXPIRETIME_ISSET_ID);
}
/** Returns true if field expireTime is set (has been assigned a value) and false otherwise */
public boolean isSetExpireTime() {
- return EncodingUtils.testBit(__isset_bitfield, __EXPIRETIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EXPIRETIME_ISSET_ID);
}
public void setExpireTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXPIRETIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EXPIRETIME_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -36839,7 +39047,7 @@ public class SatelliteServer {
if (value == null) {
unsetImageBaseId();
} else {
- setImageBaseId((String)value);
+ setImageBaseId((java.lang.String)value);
}
break;
@@ -36847,14 +39055,16 @@ public class SatelliteServer {
if (value == null) {
unsetExpireTime();
} else {
- setExpireTime((Long)value);
+ setExpireTime((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -36866,13 +39076,14 @@ public class SatelliteServer {
return getExpireTime();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -36883,13 +39094,11 @@ public class SatelliteServer {
case EXPIRE_TIME:
return isSetExpireTime();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof setImageVersionExpiry_args)
return this.equals((setImageVersionExpiry_args)that);
return false;
@@ -36898,6 +39107,8 @@ public class SatelliteServer {
public boolean equals(setImageVersionExpiry_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -36931,24 +39142,19 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_imageBaseId = true && (isSetImageBaseId());
- list.add(present_imageBaseId);
- if (present_imageBaseId)
- list.add(imageBaseId);
+ hashCode = hashCode * 8191 + ((isSetImageBaseId()) ? 131071 : 524287);
+ if (isSetImageBaseId())
+ hashCode = hashCode * 8191 + imageBaseId.hashCode();
- boolean present_expireTime = true;
- list.add(present_expireTime);
- if (present_expireTime)
- list.add(expireTime);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(expireTime);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -36959,7 +39165,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -36969,7 +39175,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageBaseId()).compareTo(other.isSetImageBaseId());
+ lastComparison = java.lang.Boolean.compare(isSetImageBaseId(), other.isSetImageBaseId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -36979,7 +39185,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetExpireTime()).compareTo(other.isSetExpireTime());
+ lastComparison = java.lang.Boolean.compare(isSetExpireTime(), other.isSetExpireTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -36992,21 +39198,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("setImageVersionExpiry_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("setImageVersionExpiry_args(");
boolean first = true;
sb.append("userToken:");
@@ -37045,7 +39255,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -37055,14 +39265,16 @@ public class SatelliteServer {
}
}
- private static class setImageVersionExpiry_argsStandardSchemeFactory implements SchemeFactory {
+ private static class setImageVersionExpiry_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setImageVersionExpiry_argsStandardScheme getScheme() {
return new setImageVersionExpiry_argsStandardScheme();
}
}
- private static class setImageVersionExpiry_argsStandardScheme extends StandardScheme<setImageVersionExpiry_args> {
+ private static class setImageVersionExpiry_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<setImageVersionExpiry_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, setImageVersionExpiry_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -37108,6 +39320,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, setImageVersionExpiry_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -37131,18 +39344,19 @@ public class SatelliteServer {
}
- private static class setImageVersionExpiry_argsTupleSchemeFactory implements SchemeFactory {
+ private static class setImageVersionExpiry_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setImageVersionExpiry_argsTupleScheme getScheme() {
return new setImageVersionExpiry_argsTupleScheme();
}
}
- private static class setImageVersionExpiry_argsTupleScheme extends TupleScheme<setImageVersionExpiry_args> {
+ private static class setImageVersionExpiry_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<setImageVersionExpiry_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, setImageVersionExpiry_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -37166,8 +39380,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, setImageVersionExpiry_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -37183,8 +39397,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class setImageVersionExpiry_result implements org.apache.thrift.TBase<setImageVersionExpiry_result, setImageVersionExpiry_result._Fields>, java.io.Serializable, Cloneable, Comparable<setImageVersionExpiry_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setImageVersionExpiry_result");
@@ -37193,16 +39411,13 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField DATE_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("dateError", org.apache.thrift.protocol.TType.STRUCT, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setImageVersionExpiry_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setImageVersionExpiry_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setImageVersionExpiry_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setImageVersionExpiry_resultTupleSchemeFactory();
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException serverError; // required
- public TInvalidDateParam dateError; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable TInvalidDateParam dateError; // 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 {
@@ -37211,10 +39426,10 @@ public class SatelliteServer {
SERVER_ERROR((short)3, "serverError"),
DATE_ERROR((short)4, "dateError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -37222,6 +39437,7 @@ public class SatelliteServer {
/**
* 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: // AUTH_ERROR
@@ -37243,47 +39459,50 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
tmpMap.put(_Fields.DATE_ERROR, new org.apache.thrift.meta_data.FieldMetaData("dateError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidDateParam.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setImageVersionExpiry_result.class, metaDataMap);
}
@@ -37321,6 +39540,7 @@ public class SatelliteServer {
}
}
+ @Override
public setImageVersionExpiry_result deepCopy() {
return new setImageVersionExpiry_result(this);
}
@@ -37333,11 +39553,12 @@ public class SatelliteServer {
this.dateError = null;
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public setImageVersionExpiry_result setAuthError(TAuthorizationException authError) {
+ public setImageVersionExpiry_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -37357,11 +39578,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public setImageVersionExpiry_result setNotFound(TNotFoundException notFound) {
+ public setImageVersionExpiry_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -37381,11 +39603,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public setImageVersionExpiry_result setServerError(TInvocationException serverError) {
+ public setImageVersionExpiry_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -37405,11 +39628,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvalidDateParam getDateError() {
return this.dateError;
}
- public setImageVersionExpiry_result setDateError(TInvalidDateParam dateError) {
+ public setImageVersionExpiry_result setDateError(@org.apache.thrift.annotation.Nullable TInvalidDateParam dateError) {
this.dateError = dateError;
return this;
}
@@ -37429,7 +39653,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case AUTH_ERROR:
if (value == null) {
@@ -37466,7 +39691,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTH_ERROR:
return getAuthError();
@@ -37481,13 +39708,14 @@ public class SatelliteServer {
return getDateError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -37500,13 +39728,11 @@ public class SatelliteServer {
case DATE_ERROR:
return isSetDateError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof setImageVersionExpiry_result)
return this.equals((setImageVersionExpiry_result)that);
return false;
@@ -37515,6 +39741,8 @@ public class SatelliteServer {
public boolean equals(setImageVersionExpiry_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_authError = true && this.isSetAuthError();
boolean that_present_authError = true && that.isSetAuthError();
@@ -37557,29 +39785,25 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- boolean present_dateError = true && (isSetDateError());
- list.add(present_dateError);
- if (present_dateError)
- list.add(dateError);
+ hashCode = hashCode * 8191 + ((isSetDateError()) ? 131071 : 524287);
+ if (isSetDateError())
+ hashCode = hashCode * 8191 + dateError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -37590,7 +39814,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -37600,7 +39824,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -37610,7 +39834,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -37620,7 +39844,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDateError()).compareTo(other.isSetDateError());
+ lastComparison = java.lang.Boolean.compare(isSetDateError(), other.isSetDateError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -37633,21 +39857,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("setImageVersionExpiry_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("setImageVersionExpiry_result(");
boolean first = true;
sb.append("authError:");
@@ -37698,7 +39925,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -37706,14 +39933,16 @@ public class SatelliteServer {
}
}
- private static class setImageVersionExpiry_resultStandardSchemeFactory implements SchemeFactory {
+ private static class setImageVersionExpiry_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setImageVersionExpiry_resultStandardScheme getScheme() {
return new setImageVersionExpiry_resultStandardScheme();
}
}
- private static class setImageVersionExpiry_resultStandardScheme extends StandardScheme<setImageVersionExpiry_result> {
+ private static class setImageVersionExpiry_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<setImageVersionExpiry_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, setImageVersionExpiry_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -37771,6 +40000,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, setImageVersionExpiry_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -37801,18 +40031,19 @@ public class SatelliteServer {
}
- private static class setImageVersionExpiry_resultTupleSchemeFactory implements SchemeFactory {
+ private static class setImageVersionExpiry_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setImageVersionExpiry_resultTupleScheme getScheme() {
return new setImageVersionExpiry_resultTupleScheme();
}
}
- private static class setImageVersionExpiry_resultTupleScheme extends TupleScheme<setImageVersionExpiry_result> {
+ private static class setImageVersionExpiry_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<setImageVersionExpiry_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, setImageVersionExpiry_result 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.isSetAuthError()) {
optionals.set(0);
}
@@ -37842,8 +40073,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, setImageVersionExpiry_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.authError = new TAuthorizationException();
struct.authError.read(iprot);
@@ -37867,32 +40098,33 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getImageVersionVirtConfig_args implements org.apache.thrift.TBase<getImageVersionVirtConfig_args, getImageVersionVirtConfig_args._Fields>, java.io.Serializable, Cloneable, Comparable<getImageVersionVirtConfig_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageVersionVirtConfig_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageVersionVirtConfig_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageVersionVirtConfig_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImageVersionVirtConfig_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImageVersionVirtConfig_argsTupleSchemeFactory();
- public String userToken; // required
- public String imageVersionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageVersionId; // 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 {
USER_TOKEN((short)1, "userToken"),
IMAGE_VERSION_ID((short)2, "imageVersionId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -37900,6 +40132,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -37917,43 +40150,46 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
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")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageVersionVirtConfig_args.class, metaDataMap);
}
@@ -37961,8 +40197,8 @@ public class SatelliteServer {
}
public getImageVersionVirtConfig_args(
- String userToken,
- String imageVersionId)
+ java.lang.String userToken,
+ java.lang.String imageVersionId)
{
this();
this.userToken = userToken;
@@ -37981,6 +40217,7 @@ public class SatelliteServer {
}
}
+ @Override
public getImageVersionVirtConfig_args deepCopy() {
return new getImageVersionVirtConfig_args(this);
}
@@ -37991,11 +40228,12 @@ public class SatelliteServer {
this.imageVersionId = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public getImageVersionVirtConfig_args setUserToken(String userToken) {
+ public getImageVersionVirtConfig_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -38015,11 +40253,12 @@ public class SatelliteServer {
}
}
- public String getImageVersionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageVersionId() {
return this.imageVersionId;
}
- public getImageVersionVirtConfig_args setImageVersionId(String imageVersionId) {
+ public getImageVersionVirtConfig_args setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.String imageVersionId) {
this.imageVersionId = imageVersionId;
return this;
}
@@ -38039,13 +40278,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -38053,14 +40293,16 @@ public class SatelliteServer {
if (value == null) {
unsetImageVersionId();
} else {
- setImageVersionId((String)value);
+ setImageVersionId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -38069,13 +40311,14 @@ public class SatelliteServer {
return getImageVersionId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -38084,13 +40327,11 @@ public class SatelliteServer {
case IMAGE_VERSION_ID:
return isSetImageVersionId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getImageVersionVirtConfig_args)
return this.equals((getImageVersionVirtConfig_args)that);
return false;
@@ -38099,6 +40340,8 @@ public class SatelliteServer {
public boolean equals(getImageVersionVirtConfig_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -38123,19 +40366,17 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_imageVersionId = true && (isSetImageVersionId());
- list.add(present_imageVersionId);
- if (present_imageVersionId)
- list.add(imageVersionId);
+ hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287);
+ if (isSetImageVersionId())
+ hashCode = hashCode * 8191 + imageVersionId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -38146,7 +40387,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -38156,7 +40397,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ lastComparison = java.lang.Boolean.compare(isSetImageVersionId(), other.isSetImageVersionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -38169,21 +40410,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImageVersionVirtConfig_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getImageVersionVirtConfig_args(");
boolean first = true;
sb.append("userToken:");
@@ -38218,7 +40463,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -38226,14 +40471,16 @@ public class SatelliteServer {
}
}
- private static class getImageVersionVirtConfig_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getImageVersionVirtConfig_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageVersionVirtConfig_argsStandardScheme getScheme() {
return new getImageVersionVirtConfig_argsStandardScheme();
}
}
- private static class getImageVersionVirtConfig_argsStandardScheme extends StandardScheme<getImageVersionVirtConfig_args> {
+ private static class getImageVersionVirtConfig_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getImageVersionVirtConfig_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getImageVersionVirtConfig_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -38271,6 +40518,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getImageVersionVirtConfig_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -38291,18 +40539,19 @@ public class SatelliteServer {
}
- private static class getImageVersionVirtConfig_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getImageVersionVirtConfig_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageVersionVirtConfig_argsTupleScheme getScheme() {
return new getImageVersionVirtConfig_argsTupleScheme();
}
}
- private static class getImageVersionVirtConfig_argsTupleScheme extends TupleScheme<getImageVersionVirtConfig_args> {
+ private static class getImageVersionVirtConfig_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getImageVersionVirtConfig_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getImageVersionVirtConfig_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -38320,8 +40569,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getImageVersionVirtConfig_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -38333,8 +40582,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getImageVersionVirtConfig_result implements org.apache.thrift.TBase<getImageVersionVirtConfig_result, getImageVersionVirtConfig_result._Fields>, java.io.Serializable, Cloneable, Comparable<getImageVersionVirtConfig_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getImageVersionVirtConfig_result");
@@ -38343,16 +40596,13 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getImageVersionVirtConfig_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getImageVersionVirtConfig_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getImageVersionVirtConfig_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getImageVersionVirtConfig_resultTupleSchemeFactory();
- public ByteBuffer success; // required
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -38361,10 +40611,10 @@ public class SatelliteServer {
NOT_FOUND((short)2, "notFound"),
SERVER_ERROR((short)3, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -38372,6 +40622,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -38393,47 +40644,50 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getImageVersionVirtConfig_result.class, metaDataMap);
}
@@ -38441,7 +40695,7 @@ public class SatelliteServer {
}
public getImageVersionVirtConfig_result(
- ByteBuffer success,
+ java.nio.ByteBuffer success,
TAuthorizationException authError,
TNotFoundException notFound,
TInvocationException serverError)
@@ -38471,6 +40725,7 @@ public class SatelliteServer {
}
}
+ @Override
public getImageVersionVirtConfig_result deepCopy() {
return new getImageVersionVirtConfig_result(this);
}
@@ -38488,16 +40743,16 @@ public class SatelliteServer {
return success == null ? null : success.array();
}
- public ByteBuffer bufferForSuccess() {
+ public java.nio.ByteBuffer bufferForSuccess() {
return org.apache.thrift.TBaseHelper.copyBinary(success);
}
public getImageVersionVirtConfig_result setSuccess(byte[] success) {
- this.success = success == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(success, success.length));
+ this.success = success == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(success.clone());
return this;
}
- public getImageVersionVirtConfig_result setSuccess(ByteBuffer success) {
+ public getImageVersionVirtConfig_result setSuccess(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer success) {
this.success = org.apache.thrift.TBaseHelper.copyBinary(success);
return this;
}
@@ -38517,11 +40772,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public getImageVersionVirtConfig_result setAuthError(TAuthorizationException authError) {
+ public getImageVersionVirtConfig_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -38541,11 +40797,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public getImageVersionVirtConfig_result setNotFound(TNotFoundException notFound) {
+ public getImageVersionVirtConfig_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -38565,11 +40822,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public getImageVersionVirtConfig_result setServerError(TInvocationException serverError) {
+ public getImageVersionVirtConfig_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -38589,13 +40847,18 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setSuccess((byte[])value);
+ } else {
+ setSuccess((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -38626,7 +40889,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -38641,13 +40906,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -38660,13 +40926,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getImageVersionVirtConfig_result)
return this.equals((getImageVersionVirtConfig_result)that);
return false;
@@ -38675,6 +40939,8 @@ public class SatelliteServer {
public boolean equals(getImageVersionVirtConfig_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -38717,29 +40983,25 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -38750,7 +41012,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -38760,7 +41022,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -38770,7 +41032,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -38780,7 +41042,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -38793,21 +41055,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getImageVersionVirtConfig_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getImageVersionVirtConfig_result(");
boolean first = true;
sb.append("success:");
@@ -38858,7 +41123,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -38866,14 +41131,16 @@ public class SatelliteServer {
}
}
- private static class getImageVersionVirtConfig_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getImageVersionVirtConfig_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageVersionVirtConfig_resultStandardScheme getScheme() {
return new getImageVersionVirtConfig_resultStandardScheme();
}
}
- private static class getImageVersionVirtConfig_resultStandardScheme extends StandardScheme<getImageVersionVirtConfig_result> {
+ private static class getImageVersionVirtConfig_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getImageVersionVirtConfig_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getImageVersionVirtConfig_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -38930,6 +41197,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getImageVersionVirtConfig_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -38960,18 +41228,19 @@ public class SatelliteServer {
}
- private static class getImageVersionVirtConfig_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getImageVersionVirtConfig_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getImageVersionVirtConfig_resultTupleScheme getScheme() {
return new getImageVersionVirtConfig_resultTupleScheme();
}
}
- private static class getImageVersionVirtConfig_resultTupleScheme extends TupleScheme<getImageVersionVirtConfig_result> {
+ private static class getImageVersionVirtConfig_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getImageVersionVirtConfig_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getImageVersionVirtConfig_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -39001,8 +41270,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getImageVersionVirtConfig_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.success = iprot.readBinary();
struct.setSuccessIsSet(true);
@@ -39025,8 +41294,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class setImageVersionVirtConfig_args implements org.apache.thrift.TBase<setImageVersionVirtConfig_args, setImageVersionVirtConfig_args._Fields>, java.io.Serializable, Cloneable, Comparable<setImageVersionVirtConfig_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setImageVersionVirtConfig_args");
@@ -39034,15 +41307,12 @@ public class SatelliteServer {
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 META_FIELD_DESC = new org.apache.thrift.protocol.TField("meta", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setImageVersionVirtConfig_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setImageVersionVirtConfig_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setImageVersionVirtConfig_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setImageVersionVirtConfig_argsTupleSchemeFactory();
- public String userToken; // required
- public String imageVersionId; // required
- public ByteBuffer meta; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageVersionId; // required
+ public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer meta; // 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 {
@@ -39050,10 +41320,10 @@ public class SatelliteServer {
IMAGE_VERSION_ID((short)2, "imageVersionId"),
META((short)3, "meta");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -39061,6 +41331,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -39080,45 +41351,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
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.META, new org.apache.thrift.meta_data.FieldMetaData("meta", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setImageVersionVirtConfig_args.class, metaDataMap);
}
@@ -39126,9 +41400,9 @@ public class SatelliteServer {
}
public setImageVersionVirtConfig_args(
- String userToken,
- String imageVersionId,
- ByteBuffer meta)
+ java.lang.String userToken,
+ java.lang.String imageVersionId,
+ java.nio.ByteBuffer meta)
{
this();
this.userToken = userToken;
@@ -39151,6 +41425,7 @@ public class SatelliteServer {
}
}
+ @Override
public setImageVersionVirtConfig_args deepCopy() {
return new setImageVersionVirtConfig_args(this);
}
@@ -39162,11 +41437,12 @@ public class SatelliteServer {
this.meta = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public setImageVersionVirtConfig_args setUserToken(String userToken) {
+ public setImageVersionVirtConfig_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -39186,11 +41462,12 @@ public class SatelliteServer {
}
}
- public String getImageVersionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageVersionId() {
return this.imageVersionId;
}
- public setImageVersionVirtConfig_args setImageVersionId(String imageVersionId) {
+ public setImageVersionVirtConfig_args setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.String imageVersionId) {
this.imageVersionId = imageVersionId;
return this;
}
@@ -39215,16 +41492,16 @@ public class SatelliteServer {
return meta == null ? null : meta.array();
}
- public ByteBuffer bufferForMeta() {
+ public java.nio.ByteBuffer bufferForMeta() {
return org.apache.thrift.TBaseHelper.copyBinary(meta);
}
public setImageVersionVirtConfig_args setMeta(byte[] meta) {
- this.meta = meta == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(meta, meta.length));
+ this.meta = meta == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(meta.clone());
return this;
}
- public setImageVersionVirtConfig_args setMeta(ByteBuffer meta) {
+ public setImageVersionVirtConfig_args setMeta(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer meta) {
this.meta = org.apache.thrift.TBaseHelper.copyBinary(meta);
return this;
}
@@ -39244,13 +41521,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -39258,7 +41536,7 @@ public class SatelliteServer {
if (value == null) {
unsetImageVersionId();
} else {
- setImageVersionId((String)value);
+ setImageVersionId((java.lang.String)value);
}
break;
@@ -39266,14 +41544,20 @@ public class SatelliteServer {
if (value == null) {
unsetMeta();
} else {
- setMeta((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setMeta((byte[])value);
+ } else {
+ setMeta((java.nio.ByteBuffer)value);
+ }
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -39285,13 +41569,14 @@ public class SatelliteServer {
return getMeta();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -39302,13 +41587,11 @@ public class SatelliteServer {
case META:
return isSetMeta();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof setImageVersionVirtConfig_args)
return this.equals((setImageVersionVirtConfig_args)that);
return false;
@@ -39317,6 +41600,8 @@ public class SatelliteServer {
public boolean equals(setImageVersionVirtConfig_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -39350,24 +41635,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_imageVersionId = true && (isSetImageVersionId());
- list.add(present_imageVersionId);
- if (present_imageVersionId)
- list.add(imageVersionId);
+ hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287);
+ if (isSetImageVersionId())
+ hashCode = hashCode * 8191 + imageVersionId.hashCode();
- boolean present_meta = true && (isSetMeta());
- list.add(present_meta);
- if (present_meta)
- list.add(meta);
+ hashCode = hashCode * 8191 + ((isSetMeta()) ? 131071 : 524287);
+ if (isSetMeta())
+ hashCode = hashCode * 8191 + meta.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -39378,7 +41660,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -39388,7 +41670,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ lastComparison = java.lang.Boolean.compare(isSetImageVersionId(), other.isSetImageVersionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -39398,7 +41680,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMeta()).compareTo(other.isSetMeta());
+ lastComparison = java.lang.Boolean.compare(isSetMeta(), other.isSetMeta());
if (lastComparison != 0) {
return lastComparison;
}
@@ -39411,21 +41693,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("setImageVersionVirtConfig_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("setImageVersionVirtConfig_args(");
boolean first = true;
sb.append("userToken:");
@@ -39468,7 +41754,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -39476,14 +41762,16 @@ public class SatelliteServer {
}
}
- private static class setImageVersionVirtConfig_argsStandardSchemeFactory implements SchemeFactory {
+ private static class setImageVersionVirtConfig_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setImageVersionVirtConfig_argsStandardScheme getScheme() {
return new setImageVersionVirtConfig_argsStandardScheme();
}
}
- private static class setImageVersionVirtConfig_argsStandardScheme extends StandardScheme<setImageVersionVirtConfig_args> {
+ private static class setImageVersionVirtConfig_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<setImageVersionVirtConfig_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, setImageVersionVirtConfig_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -39529,6 +41817,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, setImageVersionVirtConfig_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -39554,18 +41843,19 @@ public class SatelliteServer {
}
- private static class setImageVersionVirtConfig_argsTupleSchemeFactory implements SchemeFactory {
+ private static class setImageVersionVirtConfig_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setImageVersionVirtConfig_argsTupleScheme getScheme() {
return new setImageVersionVirtConfig_argsTupleScheme();
}
}
- private static class setImageVersionVirtConfig_argsTupleScheme extends TupleScheme<setImageVersionVirtConfig_args> {
+ private static class setImageVersionVirtConfig_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<setImageVersionVirtConfig_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, setImageVersionVirtConfig_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -39589,8 +41879,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, setImageVersionVirtConfig_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -39606,8 +41896,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class setImageVersionVirtConfig_result implements org.apache.thrift.TBase<setImageVersionVirtConfig_result, setImageVersionVirtConfig_result._Fields>, java.io.Serializable, Cloneable, Comparable<setImageVersionVirtConfig_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setImageVersionVirtConfig_result");
@@ -39615,15 +41909,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setImageVersionVirtConfig_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setImageVersionVirtConfig_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setImageVersionVirtConfig_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setImageVersionVirtConfig_resultTupleSchemeFactory();
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -39631,10 +41922,10 @@ public class SatelliteServer {
NOT_FOUND((short)2, "notFound"),
SERVER_ERROR((short)3, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -39642,6 +41933,7 @@ public class SatelliteServer {
/**
* 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: // AUTH_ERROR
@@ -39661,45 +41953,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setImageVersionVirtConfig_result.class, metaDataMap);
}
@@ -39732,6 +42027,7 @@ public class SatelliteServer {
}
}
+ @Override
public setImageVersionVirtConfig_result deepCopy() {
return new setImageVersionVirtConfig_result(this);
}
@@ -39743,11 +42039,12 @@ public class SatelliteServer {
this.serverError = null;
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public setImageVersionVirtConfig_result setAuthError(TAuthorizationException authError) {
+ public setImageVersionVirtConfig_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -39767,11 +42064,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public setImageVersionVirtConfig_result setNotFound(TNotFoundException notFound) {
+ public setImageVersionVirtConfig_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -39791,11 +42089,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public setImageVersionVirtConfig_result setServerError(TInvocationException serverError) {
+ public setImageVersionVirtConfig_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -39815,7 +42114,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case AUTH_ERROR:
if (value == null) {
@@ -39844,7 +42144,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTH_ERROR:
return getAuthError();
@@ -39856,13 +42158,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -39873,13 +42176,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof setImageVersionVirtConfig_result)
return this.equals((setImageVersionVirtConfig_result)that);
return false;
@@ -39888,6 +42189,8 @@ public class SatelliteServer {
public boolean equals(setImageVersionVirtConfig_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_authError = true && this.isSetAuthError();
boolean that_present_authError = true && that.isSetAuthError();
@@ -39921,24 +42224,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -39949,7 +42249,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -39959,7 +42259,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -39969,7 +42269,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -39982,21 +42282,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("setImageVersionVirtConfig_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("setImageVersionVirtConfig_result(");
boolean first = true;
sb.append("authError:");
@@ -40039,7 +42342,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -40047,14 +42350,16 @@ public class SatelliteServer {
}
}
- private static class setImageVersionVirtConfig_resultStandardSchemeFactory implements SchemeFactory {
+ private static class setImageVersionVirtConfig_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setImageVersionVirtConfig_resultStandardScheme getScheme() {
return new setImageVersionVirtConfig_resultStandardScheme();
}
}
- private static class setImageVersionVirtConfig_resultStandardScheme extends StandardScheme<setImageVersionVirtConfig_result> {
+ private static class setImageVersionVirtConfig_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<setImageVersionVirtConfig_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, setImageVersionVirtConfig_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -40103,6 +42408,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, setImageVersionVirtConfig_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -40128,18 +42434,19 @@ public class SatelliteServer {
}
- private static class setImageVersionVirtConfig_resultTupleSchemeFactory implements SchemeFactory {
+ private static class setImageVersionVirtConfig_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setImageVersionVirtConfig_resultTupleScheme getScheme() {
return new setImageVersionVirtConfig_resultTupleScheme();
}
}
- private static class setImageVersionVirtConfig_resultTupleScheme extends TupleScheme<setImageVersionVirtConfig_result> {
+ private static class setImageVersionVirtConfig_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<setImageVersionVirtConfig_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, setImageVersionVirtConfig_result 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.isSetAuthError()) {
optionals.set(0);
}
@@ -40163,8 +42470,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, setImageVersionVirtConfig_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.authError = new TAuthorizationException();
struct.authError.read(iprot);
@@ -40183,32 +42490,33 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class requestImageReplication_args implements org.apache.thrift.TBase<requestImageReplication_args, requestImageReplication_args._Fields>, java.io.Serializable, Cloneable, Comparable<requestImageReplication_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestImageReplication_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new requestImageReplication_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new requestImageReplication_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new requestImageReplication_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new requestImageReplication_argsTupleSchemeFactory();
- public String userToken; // required
- public String imageVersionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageVersionId; // 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 {
USER_TOKEN((short)1, "userToken"),
IMAGE_VERSION_ID((short)2, "imageVersionId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -40216,6 +42524,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -40233,43 +42542,46 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
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")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestImageReplication_args.class, metaDataMap);
}
@@ -40277,8 +42589,8 @@ public class SatelliteServer {
}
public requestImageReplication_args(
- String userToken,
- String imageVersionId)
+ java.lang.String userToken,
+ java.lang.String imageVersionId)
{
this();
this.userToken = userToken;
@@ -40297,6 +42609,7 @@ public class SatelliteServer {
}
}
+ @Override
public requestImageReplication_args deepCopy() {
return new requestImageReplication_args(this);
}
@@ -40307,11 +42620,12 @@ public class SatelliteServer {
this.imageVersionId = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public requestImageReplication_args setUserToken(String userToken) {
+ public requestImageReplication_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -40331,11 +42645,12 @@ public class SatelliteServer {
}
}
- public String getImageVersionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageVersionId() {
return this.imageVersionId;
}
- public requestImageReplication_args setImageVersionId(String imageVersionId) {
+ public requestImageReplication_args setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.String imageVersionId) {
this.imageVersionId = imageVersionId;
return this;
}
@@ -40355,13 +42670,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -40369,14 +42685,16 @@ public class SatelliteServer {
if (value == null) {
unsetImageVersionId();
} else {
- setImageVersionId((String)value);
+ setImageVersionId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -40385,13 +42703,14 @@ public class SatelliteServer {
return getImageVersionId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -40400,13 +42719,11 @@ public class SatelliteServer {
case IMAGE_VERSION_ID:
return isSetImageVersionId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof requestImageReplication_args)
return this.equals((requestImageReplication_args)that);
return false;
@@ -40415,6 +42732,8 @@ public class SatelliteServer {
public boolean equals(requestImageReplication_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -40439,19 +42758,17 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_imageVersionId = true && (isSetImageVersionId());
- list.add(present_imageVersionId);
- if (present_imageVersionId)
- list.add(imageVersionId);
+ hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287);
+ if (isSetImageVersionId())
+ hashCode = hashCode * 8191 + imageVersionId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -40462,7 +42779,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -40472,7 +42789,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ lastComparison = java.lang.Boolean.compare(isSetImageVersionId(), other.isSetImageVersionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -40485,21 +42802,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("requestImageReplication_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("requestImageReplication_args(");
boolean first = true;
sb.append("userToken:");
@@ -40534,7 +42855,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -40542,14 +42863,16 @@ public class SatelliteServer {
}
}
- private static class requestImageReplication_argsStandardSchemeFactory implements SchemeFactory {
+ private static class requestImageReplication_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public requestImageReplication_argsStandardScheme getScheme() {
return new requestImageReplication_argsStandardScheme();
}
}
- private static class requestImageReplication_argsStandardScheme extends StandardScheme<requestImageReplication_args> {
+ private static class requestImageReplication_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<requestImageReplication_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, requestImageReplication_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -40587,6 +42910,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, requestImageReplication_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -40607,18 +42931,19 @@ public class SatelliteServer {
}
- private static class requestImageReplication_argsTupleSchemeFactory implements SchemeFactory {
+ private static class requestImageReplication_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public requestImageReplication_argsTupleScheme getScheme() {
return new requestImageReplication_argsTupleScheme();
}
}
- private static class requestImageReplication_argsTupleScheme extends TupleScheme<requestImageReplication_args> {
+ private static class requestImageReplication_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<requestImageReplication_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, requestImageReplication_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -40636,8 +42961,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, requestImageReplication_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -40649,8 +42974,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class requestImageReplication_result implements org.apache.thrift.TBase<requestImageReplication_result, requestImageReplication_result._Fields>, java.io.Serializable, Cloneable, Comparable<requestImageReplication_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("requestImageReplication_result");
@@ -40659,16 +42988,13 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new requestImageReplication_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new requestImageReplication_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new requestImageReplication_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new requestImageReplication_resultTupleSchemeFactory();
- public String success; // required
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -40677,10 +43003,10 @@ public class SatelliteServer {
NOT_FOUND((short)2, "notFound"),
SERVER_ERROR((short)3, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -40688,6 +43014,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -40709,47 +43036,50 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(requestImageReplication_result.class, metaDataMap);
}
@@ -40757,7 +43087,7 @@ public class SatelliteServer {
}
public requestImageReplication_result(
- String success,
+ java.lang.String success,
TAuthorizationException authError,
TNotFoundException notFound,
TInvocationException serverError)
@@ -40787,6 +43117,7 @@ public class SatelliteServer {
}
}
+ @Override
public requestImageReplication_result deepCopy() {
return new requestImageReplication_result(this);
}
@@ -40799,11 +43130,12 @@ public class SatelliteServer {
this.serverError = null;
}
- public String getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getSuccess() {
return this.success;
}
- public requestImageReplication_result setSuccess(String success) {
+ public requestImageReplication_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.String success) {
this.success = success;
return this;
}
@@ -40823,11 +43155,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public requestImageReplication_result setAuthError(TAuthorizationException authError) {
+ public requestImageReplication_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -40847,11 +43180,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public requestImageReplication_result setNotFound(TNotFoundException notFound) {
+ public requestImageReplication_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -40871,11 +43205,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public requestImageReplication_result setServerError(TInvocationException serverError) {
+ public requestImageReplication_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -40895,13 +43230,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((String)value);
+ setSuccess((java.lang.String)value);
}
break;
@@ -40932,7 +43268,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -40947,13 +43285,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -40966,13 +43305,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof requestImageReplication_result)
return this.equals((requestImageReplication_result)that);
return false;
@@ -40981,6 +43318,8 @@ public class SatelliteServer {
public boolean equals(requestImageReplication_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -41023,29 +43362,25 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -41056,7 +43391,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -41066,7 +43401,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -41076,7 +43411,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -41086,7 +43421,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -41099,21 +43434,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("requestImageReplication_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("requestImageReplication_result(");
boolean first = true;
sb.append("success:");
@@ -41164,7 +43502,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -41172,14 +43510,16 @@ public class SatelliteServer {
}
}
- private static class requestImageReplication_resultStandardSchemeFactory implements SchemeFactory {
+ private static class requestImageReplication_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public requestImageReplication_resultStandardScheme getScheme() {
return new requestImageReplication_resultStandardScheme();
}
}
- private static class requestImageReplication_resultStandardScheme extends StandardScheme<requestImageReplication_result> {
+ private static class requestImageReplication_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<requestImageReplication_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, requestImageReplication_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -41236,6 +43576,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, requestImageReplication_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -41266,18 +43607,19 @@ public class SatelliteServer {
}
- private static class requestImageReplication_resultTupleSchemeFactory implements SchemeFactory {
+ private static class requestImageReplication_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public requestImageReplication_resultTupleScheme getScheme() {
return new requestImageReplication_resultTupleScheme();
}
}
- private static class requestImageReplication_resultTupleScheme extends TupleScheme<requestImageReplication_result> {
+ private static class requestImageReplication_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<requestImageReplication_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, requestImageReplication_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -41307,8 +43649,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, requestImageReplication_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
@@ -41331,32 +43673,33 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class publishImageVersion_args implements org.apache.thrift.TBase<publishImageVersion_args, publishImageVersion_args._Fields>, java.io.Serializable, Cloneable, Comparable<publishImageVersion_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("publishImageVersion_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new publishImageVersion_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new publishImageVersion_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new publishImageVersion_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new publishImageVersion_argsTupleSchemeFactory();
- public String userToken; // required
- public String imageVersionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String imageVersionId; // 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 {
USER_TOKEN((short)1, "userToken"),
IMAGE_VERSION_ID((short)2, "imageVersionId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -41364,6 +43707,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -41381,43 +43725,46 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
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")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(publishImageVersion_args.class, metaDataMap);
}
@@ -41425,8 +43772,8 @@ public class SatelliteServer {
}
public publishImageVersion_args(
- String userToken,
- String imageVersionId)
+ java.lang.String userToken,
+ java.lang.String imageVersionId)
{
this();
this.userToken = userToken;
@@ -41445,6 +43792,7 @@ public class SatelliteServer {
}
}
+ @Override
public publishImageVersion_args deepCopy() {
return new publishImageVersion_args(this);
}
@@ -41455,11 +43803,12 @@ public class SatelliteServer {
this.imageVersionId = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public publishImageVersion_args setUserToken(String userToken) {
+ public publishImageVersion_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -41479,11 +43828,12 @@ public class SatelliteServer {
}
}
- public String getImageVersionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getImageVersionId() {
return this.imageVersionId;
}
- public publishImageVersion_args setImageVersionId(String imageVersionId) {
+ public publishImageVersion_args setImageVersionId(@org.apache.thrift.annotation.Nullable java.lang.String imageVersionId) {
this.imageVersionId = imageVersionId;
return this;
}
@@ -41503,13 +43853,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -41517,14 +43868,16 @@ public class SatelliteServer {
if (value == null) {
unsetImageVersionId();
} else {
- setImageVersionId((String)value);
+ setImageVersionId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -41533,13 +43886,14 @@ public class SatelliteServer {
return getImageVersionId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -41548,13 +43902,11 @@ public class SatelliteServer {
case IMAGE_VERSION_ID:
return isSetImageVersionId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof publishImageVersion_args)
return this.equals((publishImageVersion_args)that);
return false;
@@ -41563,6 +43915,8 @@ public class SatelliteServer {
public boolean equals(publishImageVersion_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -41587,19 +43941,17 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_imageVersionId = true && (isSetImageVersionId());
- list.add(present_imageVersionId);
- if (present_imageVersionId)
- list.add(imageVersionId);
+ hashCode = hashCode * 8191 + ((isSetImageVersionId()) ? 131071 : 524287);
+ if (isSetImageVersionId())
+ hashCode = hashCode * 8191 + imageVersionId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -41610,7 +43962,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -41620,7 +43972,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetImageVersionId()).compareTo(other.isSetImageVersionId());
+ lastComparison = java.lang.Boolean.compare(isSetImageVersionId(), other.isSetImageVersionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -41633,21 +43985,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("publishImageVersion_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("publishImageVersion_args(");
boolean first = true;
sb.append("userToken:");
@@ -41682,7 +44038,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -41690,14 +44046,16 @@ public class SatelliteServer {
}
}
- private static class publishImageVersion_argsStandardSchemeFactory implements SchemeFactory {
+ private static class publishImageVersion_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public publishImageVersion_argsStandardScheme getScheme() {
return new publishImageVersion_argsStandardScheme();
}
}
- private static class publishImageVersion_argsStandardScheme extends StandardScheme<publishImageVersion_args> {
+ private static class publishImageVersion_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<publishImageVersion_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, publishImageVersion_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -41735,6 +44093,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, publishImageVersion_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -41755,18 +44114,19 @@ public class SatelliteServer {
}
- private static class publishImageVersion_argsTupleSchemeFactory implements SchemeFactory {
+ private static class publishImageVersion_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public publishImageVersion_argsTupleScheme getScheme() {
return new publishImageVersion_argsTupleScheme();
}
}
- private static class publishImageVersion_argsTupleScheme extends TupleScheme<publishImageVersion_args> {
+ private static class publishImageVersion_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<publishImageVersion_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, publishImageVersion_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -41784,8 +44144,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, publishImageVersion_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -41797,8 +44157,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class publishImageVersion_result implements org.apache.thrift.TBase<publishImageVersion_result, publishImageVersion_result._Fields>, java.io.Serializable, Cloneable, Comparable<publishImageVersion_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("publishImageVersion_result");
@@ -41808,17 +44172,14 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField TRE_FIELD_DESC = new org.apache.thrift.protocol.TField("tre", org.apache.thrift.protocol.TType.STRUCT, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new publishImageVersion_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new publishImageVersion_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new publishImageVersion_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new publishImageVersion_resultTupleSchemeFactory();
- public String success; // required
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException serverError; // required
- public TTransferRejectedException tre; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable TTransferRejectedException tre; // 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 {
@@ -41828,10 +44189,10 @@ public class SatelliteServer {
SERVER_ERROR((short)3, "serverError"),
TRE((short)4, "tre");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -41839,6 +44200,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -41862,49 +44224,52 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
tmpMap.put(_Fields.TRE, new org.apache.thrift.meta_data.FieldMetaData("tre", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TTransferRejectedException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(publishImageVersion_result.class, metaDataMap);
}
@@ -41912,7 +44277,7 @@ public class SatelliteServer {
}
public publishImageVersion_result(
- String success,
+ java.lang.String success,
TAuthorizationException authError,
TNotFoundException notFound,
TInvocationException serverError,
@@ -41947,6 +44312,7 @@ public class SatelliteServer {
}
}
+ @Override
public publishImageVersion_result deepCopy() {
return new publishImageVersion_result(this);
}
@@ -41960,11 +44326,12 @@ public class SatelliteServer {
this.tre = null;
}
- public String getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getSuccess() {
return this.success;
}
- public publishImageVersion_result setSuccess(String success) {
+ public publishImageVersion_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.String success) {
this.success = success;
return this;
}
@@ -41984,11 +44351,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public publishImageVersion_result setAuthError(TAuthorizationException authError) {
+ public publishImageVersion_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -42008,11 +44376,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public publishImageVersion_result setNotFound(TNotFoundException notFound) {
+ public publishImageVersion_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -42032,11 +44401,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public publishImageVersion_result setServerError(TInvocationException serverError) {
+ public publishImageVersion_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -42056,11 +44426,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TTransferRejectedException getTre() {
return this.tre;
}
- public publishImageVersion_result setTre(TTransferRejectedException tre) {
+ public publishImageVersion_result setTre(@org.apache.thrift.annotation.Nullable TTransferRejectedException tre) {
this.tre = tre;
return this;
}
@@ -42080,13 +44451,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((String)value);
+ setSuccess((java.lang.String)value);
}
break;
@@ -42125,7 +44497,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -42143,13 +44517,14 @@ public class SatelliteServer {
return getTre();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -42164,13 +44539,11 @@ public class SatelliteServer {
case TRE:
return isSetTre();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof publishImageVersion_result)
return this.equals((publishImageVersion_result)that);
return false;
@@ -42179,6 +44552,8 @@ public class SatelliteServer {
public boolean equals(publishImageVersion_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -42230,34 +44605,29 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- boolean present_tre = true && (isSetTre());
- list.add(present_tre);
- if (present_tre)
- list.add(tre);
+ hashCode = hashCode * 8191 + ((isSetTre()) ? 131071 : 524287);
+ if (isSetTre())
+ hashCode = hashCode * 8191 + tre.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -42268,7 +44638,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -42278,7 +44648,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -42288,7 +44658,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -42298,7 +44668,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -42308,7 +44678,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTre()).compareTo(other.isSetTre());
+ lastComparison = java.lang.Boolean.compare(isSetTre(), other.isSetTre());
if (lastComparison != 0) {
return lastComparison;
}
@@ -42321,21 +44691,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("publishImageVersion_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("publishImageVersion_result(");
boolean first = true;
sb.append("success:");
@@ -42394,7 +44767,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -42402,14 +44775,16 @@ public class SatelliteServer {
}
}
- private static class publishImageVersion_resultStandardSchemeFactory implements SchemeFactory {
+ private static class publishImageVersion_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public publishImageVersion_resultStandardScheme getScheme() {
return new publishImageVersion_resultStandardScheme();
}
}
- private static class publishImageVersion_resultStandardScheme extends StandardScheme<publishImageVersion_result> {
+ private static class publishImageVersion_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<publishImageVersion_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, publishImageVersion_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -42475,6 +44850,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, publishImageVersion_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -42510,18 +44886,19 @@ public class SatelliteServer {
}
- private static class publishImageVersion_resultTupleSchemeFactory implements SchemeFactory {
+ private static class publishImageVersion_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public publishImageVersion_resultTupleScheme getScheme() {
return new publishImageVersion_resultTupleScheme();
}
}
- private static class publishImageVersion_resultTupleScheme extends TupleScheme<publishImageVersion_result> {
+ private static class publishImageVersion_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<publishImageVersion_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, publishImageVersion_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -42557,8 +44934,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, publishImageVersion_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
@@ -42586,32 +44963,33 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class createLecture_args implements org.apache.thrift.TBase<createLecture_args, createLecture_args._Fields>, java.io.Serializable, Cloneable, Comparable<createLecture_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createLecture_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField LECTURE_FIELD_DESC = new org.apache.thrift.protocol.TField("lecture", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new createLecture_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new createLecture_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createLecture_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createLecture_argsTupleSchemeFactory();
- public String userToken; // required
- public LectureWrite lecture; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable LectureWrite lecture; // 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 {
USER_TOKEN((short)1, "userToken"),
LECTURE((short)2, "lecture");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -42619,6 +44997,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -42636,43 +45015,46 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.LECTURE, new org.apache.thrift.meta_data.FieldMetaData("lecture", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LectureWrite.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createLecture_args.class, metaDataMap);
}
@@ -42680,7 +45062,7 @@ public class SatelliteServer {
}
public createLecture_args(
- String userToken,
+ java.lang.String userToken,
LectureWrite lecture)
{
this();
@@ -42700,6 +45082,7 @@ public class SatelliteServer {
}
}
+ @Override
public createLecture_args deepCopy() {
return new createLecture_args(this);
}
@@ -42710,11 +45093,12 @@ public class SatelliteServer {
this.lecture = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public createLecture_args setUserToken(String userToken) {
+ public createLecture_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -42734,11 +45118,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public LectureWrite getLecture() {
return this.lecture;
}
- public createLecture_args setLecture(LectureWrite lecture) {
+ public createLecture_args setLecture(@org.apache.thrift.annotation.Nullable LectureWrite lecture) {
this.lecture = lecture;
return this;
}
@@ -42758,13 +45143,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -42779,7 +45165,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -42788,13 +45176,14 @@ public class SatelliteServer {
return getLecture();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -42803,13 +45192,11 @@ public class SatelliteServer {
case LECTURE:
return isSetLecture();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof createLecture_args)
return this.equals((createLecture_args)that);
return false;
@@ -42818,6 +45205,8 @@ public class SatelliteServer {
public boolean equals(createLecture_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -42842,19 +45231,17 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_lecture = true && (isSetLecture());
- list.add(present_lecture);
- if (present_lecture)
- list.add(lecture);
+ hashCode = hashCode * 8191 + ((isSetLecture()) ? 131071 : 524287);
+ if (isSetLecture())
+ hashCode = hashCode * 8191 + lecture.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -42865,7 +45252,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -42875,7 +45262,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLecture()).compareTo(other.isSetLecture());
+ lastComparison = java.lang.Boolean.compare(isSetLecture(), other.isSetLecture());
if (lastComparison != 0) {
return lastComparison;
}
@@ -42888,21 +45275,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("createLecture_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("createLecture_args(");
boolean first = true;
sb.append("userToken:");
@@ -42940,7 +45331,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -42948,14 +45339,16 @@ public class SatelliteServer {
}
}
- private static class createLecture_argsStandardSchemeFactory implements SchemeFactory {
+ private static class createLecture_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public createLecture_argsStandardScheme getScheme() {
return new createLecture_argsStandardScheme();
}
}
- private static class createLecture_argsStandardScheme extends StandardScheme<createLecture_args> {
+ private static class createLecture_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<createLecture_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, createLecture_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -42994,6 +45387,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, createLecture_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -43014,18 +45408,19 @@ public class SatelliteServer {
}
- private static class createLecture_argsTupleSchemeFactory implements SchemeFactory {
+ private static class createLecture_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public createLecture_argsTupleScheme getScheme() {
return new createLecture_argsTupleScheme();
}
}
- private static class createLecture_argsTupleScheme extends TupleScheme<createLecture_args> {
+ private static class createLecture_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<createLecture_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createLecture_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -43043,8 +45438,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createLecture_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -43057,8 +45452,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class createLecture_result implements org.apache.thrift.TBase<createLecture_result, createLecture_result._Fields>, java.io.Serializable, Cloneable, Comparable<createLecture_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createLecture_result");
@@ -43068,17 +45467,14 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField DATE_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("dateError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new createLecture_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new createLecture_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new createLecture_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new createLecture_resultTupleSchemeFactory();
- public String success; // required
- public TAuthorizationException authError; // required
- public TInvocationException serverError; // required
- public TInvalidDateParam dateError; // required
- public TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable TInvalidDateParam dateError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // 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 {
@@ -43088,10 +45484,10 @@ public class SatelliteServer {
DATE_ERROR((short)3, "dateError"),
NOT_FOUND((short)4, "notFound");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -43099,6 +45495,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -43122,49 +45519,52 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
tmpMap.put(_Fields.DATE_ERROR, new org.apache.thrift.meta_data.FieldMetaData("dateError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidDateParam.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createLecture_result.class, metaDataMap);
}
@@ -43172,7 +45572,7 @@ public class SatelliteServer {
}
public createLecture_result(
- String success,
+ java.lang.String success,
TAuthorizationException authError,
TInvocationException serverError,
TInvalidDateParam dateError,
@@ -43207,6 +45607,7 @@ public class SatelliteServer {
}
}
+ @Override
public createLecture_result deepCopy() {
return new createLecture_result(this);
}
@@ -43220,11 +45621,12 @@ public class SatelliteServer {
this.notFound = null;
}
- public String getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getSuccess() {
return this.success;
}
- public createLecture_result setSuccess(String success) {
+ public createLecture_result setSuccess(@org.apache.thrift.annotation.Nullable java.lang.String success) {
this.success = success;
return this;
}
@@ -43244,11 +45646,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public createLecture_result setAuthError(TAuthorizationException authError) {
+ public createLecture_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -43268,11 +45671,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public createLecture_result setServerError(TInvocationException serverError) {
+ public createLecture_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -43292,11 +45696,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvalidDateParam getDateError() {
return this.dateError;
}
- public createLecture_result setDateError(TInvalidDateParam dateError) {
+ public createLecture_result setDateError(@org.apache.thrift.annotation.Nullable TInvalidDateParam dateError) {
this.dateError = dateError;
return this;
}
@@ -43316,11 +45721,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public createLecture_result setNotFound(TNotFoundException notFound) {
+ public createLecture_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -43340,13 +45746,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((String)value);
+ setSuccess((java.lang.String)value);
}
break;
@@ -43385,7 +45792,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -43403,13 +45812,14 @@ public class SatelliteServer {
return getNotFound();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -43424,13 +45834,11 @@ public class SatelliteServer {
case NOT_FOUND:
return isSetNotFound();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof createLecture_result)
return this.equals((createLecture_result)that);
return false;
@@ -43439,6 +45847,8 @@ public class SatelliteServer {
public boolean equals(createLecture_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -43490,34 +45900,29 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- boolean present_dateError = true && (isSetDateError());
- list.add(present_dateError);
- if (present_dateError)
- list.add(dateError);
+ hashCode = hashCode * 8191 + ((isSetDateError()) ? 131071 : 524287);
+ if (isSetDateError())
+ hashCode = hashCode * 8191 + dateError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -43528,7 +45933,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -43538,7 +45943,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -43548,7 +45953,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -43558,7 +45963,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDateError()).compareTo(other.isSetDateError());
+ lastComparison = java.lang.Boolean.compare(isSetDateError(), other.isSetDateError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -43568,7 +45973,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -43581,21 +45986,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("createLecture_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("createLecture_result(");
boolean first = true;
sb.append("success:");
@@ -43654,7 +46062,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -43662,14 +46070,16 @@ public class SatelliteServer {
}
}
- private static class createLecture_resultStandardSchemeFactory implements SchemeFactory {
+ private static class createLecture_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public createLecture_resultStandardScheme getScheme() {
return new createLecture_resultStandardScheme();
}
}
- private static class createLecture_resultStandardScheme extends StandardScheme<createLecture_result> {
+ private static class createLecture_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<createLecture_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, createLecture_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -43735,6 +46145,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, createLecture_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -43770,18 +46181,19 @@ public class SatelliteServer {
}
- private static class createLecture_resultTupleSchemeFactory implements SchemeFactory {
+ private static class createLecture_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public createLecture_resultTupleScheme getScheme() {
return new createLecture_resultTupleScheme();
}
}
- private static class createLecture_resultTupleScheme extends TupleScheme<createLecture_result> {
+ private static class createLecture_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<createLecture_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, createLecture_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -43817,8 +46229,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, createLecture_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.success = iprot.readString();
struct.setSuccessIsSet(true);
@@ -43846,8 +46258,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class updateLecture_args implements org.apache.thrift.TBase<updateLecture_args, updateLecture_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateLecture_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateLecture_args");
@@ -43855,15 +46271,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField LECTURE_FIELD_DESC = new org.apache.thrift.protocol.TField("lecture", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new updateLecture_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new updateLecture_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateLecture_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateLecture_argsTupleSchemeFactory();
- public String userToken; // required
- public String lectureId; // required
- public LectureWrite lecture; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String lectureId; // required
+ public @org.apache.thrift.annotation.Nullable LectureWrite lecture; // 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 {
@@ -43871,10 +46284,10 @@ public class SatelliteServer {
LECTURE_ID((short)2, "lectureId"),
LECTURE((short)3, "lecture");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -43882,6 +46295,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -43901,45 +46315,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
tmpMap.put(_Fields.LECTURE, new org.apache.thrift.meta_data.FieldMetaData("lecture", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LectureWrite.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateLecture_args.class, metaDataMap);
}
@@ -43947,8 +46364,8 @@ public class SatelliteServer {
}
public updateLecture_args(
- String userToken,
- String lectureId,
+ java.lang.String userToken,
+ java.lang.String lectureId,
LectureWrite lecture)
{
this();
@@ -43972,6 +46389,7 @@ public class SatelliteServer {
}
}
+ @Override
public updateLecture_args deepCopy() {
return new updateLecture_args(this);
}
@@ -43983,11 +46401,12 @@ public class SatelliteServer {
this.lecture = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public updateLecture_args setUserToken(String userToken) {
+ public updateLecture_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -44007,11 +46426,12 @@ public class SatelliteServer {
}
}
- public String getLectureId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getLectureId() {
return this.lectureId;
}
- public updateLecture_args setLectureId(String lectureId) {
+ public updateLecture_args setLectureId(@org.apache.thrift.annotation.Nullable java.lang.String lectureId) {
this.lectureId = lectureId;
return this;
}
@@ -44031,11 +46451,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public LectureWrite getLecture() {
return this.lecture;
}
- public updateLecture_args setLecture(LectureWrite lecture) {
+ public updateLecture_args setLecture(@org.apache.thrift.annotation.Nullable LectureWrite lecture) {
this.lecture = lecture;
return this;
}
@@ -44055,13 +46476,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -44069,7 +46491,7 @@ public class SatelliteServer {
if (value == null) {
unsetLectureId();
} else {
- setLectureId((String)value);
+ setLectureId((java.lang.String)value);
}
break;
@@ -44084,7 +46506,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -44096,13 +46520,14 @@ public class SatelliteServer {
return getLecture();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -44113,13 +46538,11 @@ public class SatelliteServer {
case LECTURE:
return isSetLecture();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof updateLecture_args)
return this.equals((updateLecture_args)that);
return false;
@@ -44128,6 +46551,8 @@ public class SatelliteServer {
public boolean equals(updateLecture_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -44161,24 +46586,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_lectureId = true && (isSetLectureId());
- list.add(present_lectureId);
- if (present_lectureId)
- list.add(lectureId);
+ hashCode = hashCode * 8191 + ((isSetLectureId()) ? 131071 : 524287);
+ if (isSetLectureId())
+ hashCode = hashCode * 8191 + lectureId.hashCode();
- boolean present_lecture = true && (isSetLecture());
- list.add(present_lecture);
- if (present_lecture)
- list.add(lecture);
+ hashCode = hashCode * 8191 + ((isSetLecture()) ? 131071 : 524287);
+ if (isSetLecture())
+ hashCode = hashCode * 8191 + lecture.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -44189,7 +46611,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -44199,7 +46621,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId());
+ lastComparison = java.lang.Boolean.compare(isSetLectureId(), other.isSetLectureId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -44209,7 +46631,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLecture()).compareTo(other.isSetLecture());
+ lastComparison = java.lang.Boolean.compare(isSetLecture(), other.isSetLecture());
if (lastComparison != 0) {
return lastComparison;
}
@@ -44222,21 +46644,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("updateLecture_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("updateLecture_args(");
boolean first = true;
sb.append("userToken:");
@@ -44282,7 +46708,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -44290,14 +46716,16 @@ public class SatelliteServer {
}
}
- private static class updateLecture_argsStandardSchemeFactory implements SchemeFactory {
+ private static class updateLecture_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateLecture_argsStandardScheme getScheme() {
return new updateLecture_argsStandardScheme();
}
}
- private static class updateLecture_argsStandardScheme extends StandardScheme<updateLecture_args> {
+ private static class updateLecture_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateLecture_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, updateLecture_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -44344,6 +46772,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, updateLecture_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -44369,18 +46798,19 @@ public class SatelliteServer {
}
- private static class updateLecture_argsTupleSchemeFactory implements SchemeFactory {
+ private static class updateLecture_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateLecture_argsTupleScheme getScheme() {
return new updateLecture_argsTupleScheme();
}
}
- private static class updateLecture_argsTupleScheme extends TupleScheme<updateLecture_args> {
+ private static class updateLecture_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateLecture_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, updateLecture_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -44404,8 +46834,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, updateLecture_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -44422,8 +46852,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class updateLecture_result implements org.apache.thrift.TBase<updateLecture_result, updateLecture_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateLecture_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateLecture_result");
@@ -44432,16 +46866,13 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
private static final org.apache.thrift.protocol.TField DATE_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("dateError", org.apache.thrift.protocol.TType.STRUCT, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new updateLecture_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new updateLecture_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new updateLecture_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new updateLecture_resultTupleSchemeFactory();
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException serverError; // required
- public TInvalidDateParam dateError; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable TInvalidDateParam dateError; // 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 {
@@ -44450,10 +46881,10 @@ public class SatelliteServer {
SERVER_ERROR((short)3, "serverError"),
DATE_ERROR((short)4, "dateError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -44461,6 +46892,7 @@ public class SatelliteServer {
/**
* 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: // AUTH_ERROR
@@ -44482,47 +46914,50 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
tmpMap.put(_Fields.DATE_ERROR, new org.apache.thrift.meta_data.FieldMetaData("dateError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvalidDateParam.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateLecture_result.class, metaDataMap);
}
@@ -44560,6 +46995,7 @@ public class SatelliteServer {
}
}
+ @Override
public updateLecture_result deepCopy() {
return new updateLecture_result(this);
}
@@ -44572,11 +47008,12 @@ public class SatelliteServer {
this.dateError = null;
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public updateLecture_result setAuthError(TAuthorizationException authError) {
+ public updateLecture_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -44596,11 +47033,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public updateLecture_result setNotFound(TNotFoundException notFound) {
+ public updateLecture_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -44620,11 +47058,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public updateLecture_result setServerError(TInvocationException serverError) {
+ public updateLecture_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -44644,11 +47083,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvalidDateParam getDateError() {
return this.dateError;
}
- public updateLecture_result setDateError(TInvalidDateParam dateError) {
+ public updateLecture_result setDateError(@org.apache.thrift.annotation.Nullable TInvalidDateParam dateError) {
this.dateError = dateError;
return this;
}
@@ -44668,7 +47108,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case AUTH_ERROR:
if (value == null) {
@@ -44705,7 +47146,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTH_ERROR:
return getAuthError();
@@ -44720,13 +47163,14 @@ public class SatelliteServer {
return getDateError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -44739,13 +47183,11 @@ public class SatelliteServer {
case DATE_ERROR:
return isSetDateError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof updateLecture_result)
return this.equals((updateLecture_result)that);
return false;
@@ -44754,6 +47196,8 @@ public class SatelliteServer {
public boolean equals(updateLecture_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_authError = true && this.isSetAuthError();
boolean that_present_authError = true && that.isSetAuthError();
@@ -44796,29 +47240,25 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- boolean present_dateError = true && (isSetDateError());
- list.add(present_dateError);
- if (present_dateError)
- list.add(dateError);
+ hashCode = hashCode * 8191 + ((isSetDateError()) ? 131071 : 524287);
+ if (isSetDateError())
+ hashCode = hashCode * 8191 + dateError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -44829,7 +47269,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -44839,7 +47279,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -44849,7 +47289,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -44859,7 +47299,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDateError()).compareTo(other.isSetDateError());
+ lastComparison = java.lang.Boolean.compare(isSetDateError(), other.isSetDateError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -44872,21 +47312,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("updateLecture_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("updateLecture_result(");
boolean first = true;
sb.append("authError:");
@@ -44937,7 +47380,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -44945,14 +47388,16 @@ public class SatelliteServer {
}
}
- private static class updateLecture_resultStandardSchemeFactory implements SchemeFactory {
+ private static class updateLecture_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateLecture_resultStandardScheme getScheme() {
return new updateLecture_resultStandardScheme();
}
}
- private static class updateLecture_resultStandardScheme extends StandardScheme<updateLecture_result> {
+ private static class updateLecture_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<updateLecture_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, updateLecture_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -45010,6 +47455,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, updateLecture_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -45040,18 +47486,19 @@ public class SatelliteServer {
}
- private static class updateLecture_resultTupleSchemeFactory implements SchemeFactory {
+ private static class updateLecture_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public updateLecture_resultTupleScheme getScheme() {
return new updateLecture_resultTupleScheme();
}
}
- private static class updateLecture_resultTupleScheme extends TupleScheme<updateLecture_result> {
+ private static class updateLecture_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<updateLecture_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, updateLecture_result 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.isSetAuthError()) {
optionals.set(0);
}
@@ -45081,8 +47528,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, updateLecture_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.authError = new TAuthorizationException();
struct.authError.read(iprot);
@@ -45106,21 +47553,22 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getLectureList_args implements org.apache.thrift.TBase<getLectureList_args, getLectureList_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureList_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureList_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField PAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("page", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLectureList_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLectureList_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getLectureList_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getLectureList_argsTupleSchemeFactory();
- public String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
public int page; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
@@ -45128,10 +47576,10 @@ public class SatelliteServer {
USER_TOKEN((short)1, "userToken"),
PAGE((short)2, "page");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -45139,6 +47587,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -45156,30 +47605,33 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -45187,14 +47639,14 @@ public class SatelliteServer {
// isset id assignments
private static final int __PAGE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.PAGE, new org.apache.thrift.meta_data.FieldMetaData("page", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_args.class, metaDataMap);
}
@@ -45202,7 +47654,7 @@ public class SatelliteServer {
}
public getLectureList_args(
- String userToken,
+ java.lang.String userToken,
int page)
{
this();
@@ -45222,6 +47674,7 @@ public class SatelliteServer {
this.page = other.page;
}
+ @Override
public getLectureList_args deepCopy() {
return new getLectureList_args(this);
}
@@ -45233,11 +47686,12 @@ public class SatelliteServer {
this.page = 0;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public getLectureList_args setUserToken(String userToken) {
+ public getLectureList_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -45268,25 +47722,26 @@ public class SatelliteServer {
}
public void unsetPage() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PAGE_ISSET_ID);
}
/** Returns true if field page is set (has been assigned a value) and false otherwise */
public boolean isSetPage() {
- return EncodingUtils.testBit(__isset_bitfield, __PAGE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PAGE_ISSET_ID);
}
public void setPageIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PAGE_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -45294,14 +47749,16 @@ public class SatelliteServer {
if (value == null) {
unsetPage();
} else {
- setPage((Integer)value);
+ setPage((java.lang.Integer)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -45310,13 +47767,14 @@ public class SatelliteServer {
return getPage();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -45325,13 +47783,11 @@ public class SatelliteServer {
case PAGE:
return isSetPage();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getLectureList_args)
return this.equals((getLectureList_args)that);
return false;
@@ -45340,6 +47796,8 @@ public class SatelliteServer {
public boolean equals(getLectureList_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -45364,19 +47822,15 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_page = true;
- list.add(present_page);
- if (present_page)
- list.add(page);
+ hashCode = hashCode * 8191 + page;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -45387,7 +47841,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -45397,7 +47851,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPage()).compareTo(other.isSetPage());
+ lastComparison = java.lang.Boolean.compare(isSetPage(), other.isSetPage());
if (lastComparison != 0) {
return lastComparison;
}
@@ -45410,21 +47864,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getLectureList_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getLectureList_args(");
boolean first = true;
sb.append("userToken:");
@@ -45455,7 +47913,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -45465,14 +47923,16 @@ public class SatelliteServer {
}
}
- private static class getLectureList_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getLectureList_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getLectureList_argsStandardScheme getScheme() {
return new getLectureList_argsStandardScheme();
}
}
- private static class getLectureList_argsStandardScheme extends StandardScheme<getLectureList_args> {
+ private static class getLectureList_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getLectureList_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureList_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -45510,6 +47970,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureList_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -45528,18 +47989,19 @@ public class SatelliteServer {
}
- private static class getLectureList_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getLectureList_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getLectureList_argsTupleScheme getScheme() {
return new getLectureList_argsTupleScheme();
}
}
- private static class getLectureList_argsTupleScheme extends TupleScheme<getLectureList_args> {
+ private static class getLectureList_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getLectureList_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -45557,8 +48019,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -45570,8 +48032,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getLectureList_result implements org.apache.thrift.TBase<getLectureList_result, getLectureList_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureList_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureList_result");
@@ -45579,15 +48045,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLectureList_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLectureList_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getLectureList_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getLectureList_resultTupleSchemeFactory();
- public List<LectureSummary> success; // required
- public TAuthorizationException authError; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<LectureSummary> success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -45595,10 +48058,10 @@ public class SatelliteServer {
AUTH_ERROR((short)1, "authError"),
SERVER_ERROR((short)2, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -45606,6 +48069,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -45625,46 +48089,49 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", 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, LectureSummary.class))));
tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureList_result.class, metaDataMap);
}
@@ -45672,7 +48139,7 @@ public class SatelliteServer {
}
public getLectureList_result(
- List<LectureSummary> success,
+ java.util.List<LectureSummary> success,
TAuthorizationException authError,
TInvocationException serverError)
{
@@ -45687,7 +48154,7 @@ public class SatelliteServer {
*/
public getLectureList_result(getLectureList_result other) {
if (other.isSetSuccess()) {
- List<LectureSummary> __this__success = new ArrayList<LectureSummary>(other.success.size());
+ java.util.List<LectureSummary> __this__success = new java.util.ArrayList<LectureSummary>(other.success.size());
for (LectureSummary other_element : other.success) {
__this__success.add(new LectureSummary(other_element));
}
@@ -45701,6 +48168,7 @@ public class SatelliteServer {
}
}
+ @Override
public getLectureList_result deepCopy() {
return new getLectureList_result(this);
}
@@ -45716,22 +48184,24 @@ public class SatelliteServer {
return (this.success == null) ? 0 : this.success.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<LectureSummary> getSuccessIterator() {
return (this.success == null) ? null : this.success.iterator();
}
public void addToSuccess(LectureSummary elem) {
if (this.success == null) {
- this.success = new ArrayList<LectureSummary>();
+ this.success = new java.util.ArrayList<LectureSummary>();
}
this.success.add(elem);
}
- public List<LectureSummary> getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<LectureSummary> getSuccess() {
return this.success;
}
- public getLectureList_result setSuccess(List<LectureSummary> success) {
+ public getLectureList_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.List<LectureSummary> success) {
this.success = success;
return this;
}
@@ -45751,11 +48221,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public getLectureList_result setAuthError(TAuthorizationException authError) {
+ public getLectureList_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -45775,11 +48246,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public getLectureList_result setServerError(TInvocationException serverError) {
+ public getLectureList_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -45799,13 +48271,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((List<LectureSummary>)value);
+ setSuccess((java.util.List<LectureSummary>)value);
}
break;
@@ -45828,7 +48301,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -45840,13 +48315,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -45857,13 +48333,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getLectureList_result)
return this.equals((getLectureList_result)that);
return false;
@@ -45872,6 +48346,8 @@ public class SatelliteServer {
public boolean equals(getLectureList_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -45905,24 +48381,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -45933,7 +48406,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -45943,7 +48416,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -45953,7 +48426,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -45966,21 +48439,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getLectureList_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getLectureList_result(");
boolean first = true;
sb.append("success:");
@@ -46023,7 +48499,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -46031,14 +48507,16 @@ public class SatelliteServer {
}
}
- private static class getLectureList_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getLectureList_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getLectureList_resultStandardScheme getScheme() {
return new getLectureList_resultStandardScheme();
}
}
- private static class getLectureList_resultStandardScheme extends StandardScheme<getLectureList_result> {
+ private static class getLectureList_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getLectureList_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureList_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -46052,14 +48530,14 @@ public class SatelliteServer {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list310 = iprot.readListBegin();
- struct.success = new ArrayList<LectureSummary>(_list310.size);
- LectureSummary _elem311;
- for (int _i312 = 0; _i312 < _list310.size; ++_i312)
+ org.apache.thrift.protocol.TList _list390 = iprot.readListBegin();
+ struct.success = new java.util.ArrayList<LectureSummary>(_list390.size);
+ @org.apache.thrift.annotation.Nullable LectureSummary _elem391;
+ for (int _i392 = 0; _i392 < _list390.size; ++_i392)
{
- _elem311 = new LectureSummary();
- _elem311.read(iprot);
- struct.success.add(_elem311);
+ _elem391 = new LectureSummary();
+ _elem391.read(iprot);
+ struct.success.add(_elem391);
}
iprot.readListEnd();
}
@@ -46097,6 +48575,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureList_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -46105,9 +48584,9 @@ public class SatelliteServer {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (LectureSummary _iter313 : struct.success)
+ for (LectureSummary _iter393 : struct.success)
{
- _iter313.write(oprot);
+ _iter393.write(oprot);
}
oprot.writeListEnd();
}
@@ -46129,18 +48608,19 @@ public class SatelliteServer {
}
- private static class getLectureList_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getLectureList_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getLectureList_resultTupleScheme getScheme() {
return new getLectureList_resultTupleScheme();
}
}
- private static class getLectureList_resultTupleScheme extends TupleScheme<getLectureList_result> {
+ private static class getLectureList_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getLectureList_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getLectureList_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -46154,9 +48634,9 @@ public class SatelliteServer {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (LectureSummary _iter314 : struct.success)
+ for (LectureSummary _iter394 : struct.success)
{
- _iter314.write(oprot);
+ _iter394.write(oprot);
}
}
}
@@ -46170,18 +48650,18 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getLectureList_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list315 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new ArrayList<LectureSummary>(_list315.size);
- LectureSummary _elem316;
- for (int _i317 = 0; _i317 < _list315.size; ++_i317)
+ org.apache.thrift.protocol.TList _list395 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.success = new java.util.ArrayList<LectureSummary>(_list395.size);
+ @org.apache.thrift.annotation.Nullable LectureSummary _elem396;
+ for (int _i397 = 0; _i397 < _list395.size; ++_i397)
{
- _elem316 = new LectureSummary();
- _elem316.read(iprot);
- struct.success.add(_elem316);
+ _elem396 = new LectureSummary();
+ _elem396.read(iprot);
+ struct.success.add(_elem396);
}
}
struct.setSuccessIsSet(true);
@@ -46199,32 +48679,33 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getLectureDetails_args implements org.apache.thrift.TBase<getLectureDetails_args, getLectureDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureDetails_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureDetails_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLectureDetails_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLectureDetails_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getLectureDetails_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getLectureDetails_argsTupleSchemeFactory();
- public String userToken; // required
- public String lectureId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String lectureId; // 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 {
USER_TOKEN((short)1, "userToken"),
LECTURE_ID((short)2, "lectureId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -46232,6 +48713,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -46249,43 +48731,46 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureDetails_args.class, metaDataMap);
}
@@ -46293,8 +48778,8 @@ public class SatelliteServer {
}
public getLectureDetails_args(
- String userToken,
- String lectureId)
+ java.lang.String userToken,
+ java.lang.String lectureId)
{
this();
this.userToken = userToken;
@@ -46313,6 +48798,7 @@ public class SatelliteServer {
}
}
+ @Override
public getLectureDetails_args deepCopy() {
return new getLectureDetails_args(this);
}
@@ -46323,11 +48809,12 @@ public class SatelliteServer {
this.lectureId = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public getLectureDetails_args setUserToken(String userToken) {
+ public getLectureDetails_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -46347,11 +48834,12 @@ public class SatelliteServer {
}
}
- public String getLectureId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getLectureId() {
return this.lectureId;
}
- public getLectureDetails_args setLectureId(String lectureId) {
+ public getLectureDetails_args setLectureId(@org.apache.thrift.annotation.Nullable java.lang.String lectureId) {
this.lectureId = lectureId;
return this;
}
@@ -46371,13 +48859,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -46385,14 +48874,16 @@ public class SatelliteServer {
if (value == null) {
unsetLectureId();
} else {
- setLectureId((String)value);
+ setLectureId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -46401,13 +48892,14 @@ public class SatelliteServer {
return getLectureId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -46416,13 +48908,11 @@ public class SatelliteServer {
case LECTURE_ID:
return isSetLectureId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getLectureDetails_args)
return this.equals((getLectureDetails_args)that);
return false;
@@ -46431,6 +48921,8 @@ public class SatelliteServer {
public boolean equals(getLectureDetails_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -46455,19 +48947,17 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_lectureId = true && (isSetLectureId());
- list.add(present_lectureId);
- if (present_lectureId)
- list.add(lectureId);
+ hashCode = hashCode * 8191 + ((isSetLectureId()) ? 131071 : 524287);
+ if (isSetLectureId())
+ hashCode = hashCode * 8191 + lectureId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -46478,7 +48968,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -46488,7 +48978,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId());
+ lastComparison = java.lang.Boolean.compare(isSetLectureId(), other.isSetLectureId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -46501,21 +48991,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getLectureDetails_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getLectureDetails_args(");
boolean first = true;
sb.append("userToken:");
@@ -46550,7 +49044,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -46558,14 +49052,16 @@ public class SatelliteServer {
}
}
- private static class getLectureDetails_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getLectureDetails_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getLectureDetails_argsStandardScheme getScheme() {
return new getLectureDetails_argsStandardScheme();
}
}
- private static class getLectureDetails_argsStandardScheme extends StandardScheme<getLectureDetails_args> {
+ private static class getLectureDetails_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getLectureDetails_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureDetails_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -46603,6 +49099,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureDetails_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -46623,18 +49120,19 @@ public class SatelliteServer {
}
- private static class getLectureDetails_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getLectureDetails_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getLectureDetails_argsTupleScheme getScheme() {
return new getLectureDetails_argsTupleScheme();
}
}
- private static class getLectureDetails_argsTupleScheme extends TupleScheme<getLectureDetails_args> {
+ private static class getLectureDetails_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getLectureDetails_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -46652,8 +49150,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -46665,8 +49163,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getLectureDetails_result implements org.apache.thrift.TBase<getLectureDetails_result, getLectureDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLectureDetails_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLectureDetails_result");
@@ -46675,16 +49177,13 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLectureDetails_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLectureDetails_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getLectureDetails_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getLectureDetails_resultTupleSchemeFactory();
- public LectureRead success; // required
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable LectureRead success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -46693,10 +49192,10 @@ public class SatelliteServer {
NOT_FOUND((short)2, "notFound"),
SERVER_ERROR((short)3, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -46704,6 +49203,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -46725,47 +49225,50 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LectureRead.class)));
tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLectureDetails_result.class, metaDataMap);
}
@@ -46803,6 +49306,7 @@ public class SatelliteServer {
}
}
+ @Override
public getLectureDetails_result deepCopy() {
return new getLectureDetails_result(this);
}
@@ -46815,11 +49319,12 @@ public class SatelliteServer {
this.serverError = null;
}
+ @org.apache.thrift.annotation.Nullable
public LectureRead getSuccess() {
return this.success;
}
- public getLectureDetails_result setSuccess(LectureRead success) {
+ public getLectureDetails_result setSuccess(@org.apache.thrift.annotation.Nullable LectureRead success) {
this.success = success;
return this;
}
@@ -46839,11 +49344,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public getLectureDetails_result setAuthError(TAuthorizationException authError) {
+ public getLectureDetails_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -46863,11 +49369,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public getLectureDetails_result setNotFound(TNotFoundException notFound) {
+ public getLectureDetails_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -46887,11 +49394,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public getLectureDetails_result setServerError(TInvocationException serverError) {
+ public getLectureDetails_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -46911,7 +49419,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -46948,7 +49457,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -46963,13 +49474,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -46982,13 +49494,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getLectureDetails_result)
return this.equals((getLectureDetails_result)that);
return false;
@@ -46997,6 +49507,8 @@ public class SatelliteServer {
public boolean equals(getLectureDetails_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -47039,29 +49551,25 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -47072,7 +49580,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -47082,7 +49590,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -47092,7 +49600,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -47102,7 +49610,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -47115,21 +49623,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getLectureDetails_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getLectureDetails_result(");
boolean first = true;
sb.append("success:");
@@ -47183,7 +49694,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -47191,14 +49702,16 @@ public class SatelliteServer {
}
}
- private static class getLectureDetails_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getLectureDetails_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getLectureDetails_resultStandardScheme getScheme() {
return new getLectureDetails_resultStandardScheme();
}
}
- private static class getLectureDetails_resultStandardScheme extends StandardScheme<getLectureDetails_result> {
+ private static class getLectureDetails_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getLectureDetails_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getLectureDetails_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -47256,6 +49769,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getLectureDetails_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -47286,18 +49800,19 @@ public class SatelliteServer {
}
- private static class getLectureDetails_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getLectureDetails_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getLectureDetails_resultTupleScheme getScheme() {
return new getLectureDetails_resultTupleScheme();
}
}
- private static class getLectureDetails_resultTupleScheme extends TupleScheme<getLectureDetails_result> {
+ private static class getLectureDetails_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getLectureDetails_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -47327,8 +49842,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getLectureDetails_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.success = new LectureRead();
struct.success.read(iprot);
@@ -47352,32 +49867,33 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class deleteLecture_args implements org.apache.thrift.TBase<deleteLecture_args, deleteLecture_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteLecture_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteLecture_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new deleteLecture_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new deleteLecture_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteLecture_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteLecture_argsTupleSchemeFactory();
- public String userToken; // required
- public String lectureId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String lectureId; // 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 {
USER_TOKEN((short)1, "userToken"),
LECTURE_ID((short)2, "lectureId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -47385,6 +49901,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -47402,43 +49919,46 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteLecture_args.class, metaDataMap);
}
@@ -47446,8 +49966,8 @@ public class SatelliteServer {
}
public deleteLecture_args(
- String userToken,
- String lectureId)
+ java.lang.String userToken,
+ java.lang.String lectureId)
{
this();
this.userToken = userToken;
@@ -47466,6 +49986,7 @@ public class SatelliteServer {
}
}
+ @Override
public deleteLecture_args deepCopy() {
return new deleteLecture_args(this);
}
@@ -47476,11 +49997,12 @@ public class SatelliteServer {
this.lectureId = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public deleteLecture_args setUserToken(String userToken) {
+ public deleteLecture_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -47500,11 +50022,12 @@ public class SatelliteServer {
}
}
- public String getLectureId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getLectureId() {
return this.lectureId;
}
- public deleteLecture_args setLectureId(String lectureId) {
+ public deleteLecture_args setLectureId(@org.apache.thrift.annotation.Nullable java.lang.String lectureId) {
this.lectureId = lectureId;
return this;
}
@@ -47524,13 +50047,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -47538,14 +50062,16 @@ public class SatelliteServer {
if (value == null) {
unsetLectureId();
} else {
- setLectureId((String)value);
+ setLectureId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -47554,13 +50080,14 @@ public class SatelliteServer {
return getLectureId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -47569,13 +50096,11 @@ public class SatelliteServer {
case LECTURE_ID:
return isSetLectureId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof deleteLecture_args)
return this.equals((deleteLecture_args)that);
return false;
@@ -47584,6 +50109,8 @@ public class SatelliteServer {
public boolean equals(deleteLecture_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -47608,19 +50135,17 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_lectureId = true && (isSetLectureId());
- list.add(present_lectureId);
- if (present_lectureId)
- list.add(lectureId);
+ hashCode = hashCode * 8191 + ((isSetLectureId()) ? 131071 : 524287);
+ if (isSetLectureId())
+ hashCode = hashCode * 8191 + lectureId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -47631,7 +50156,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -47641,7 +50166,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId());
+ lastComparison = java.lang.Boolean.compare(isSetLectureId(), other.isSetLectureId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -47654,21 +50179,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("deleteLecture_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteLecture_args(");
boolean first = true;
sb.append("userToken:");
@@ -47703,7 +50232,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -47711,14 +50240,16 @@ public class SatelliteServer {
}
}
- private static class deleteLecture_argsStandardSchemeFactory implements SchemeFactory {
+ private static class deleteLecture_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public deleteLecture_argsStandardScheme getScheme() {
return new deleteLecture_argsStandardScheme();
}
}
- private static class deleteLecture_argsStandardScheme extends StandardScheme<deleteLecture_args> {
+ private static class deleteLecture_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<deleteLecture_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteLecture_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -47756,6 +50287,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, deleteLecture_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -47776,18 +50308,19 @@ public class SatelliteServer {
}
- private static class deleteLecture_argsTupleSchemeFactory implements SchemeFactory {
+ private static class deleteLecture_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public deleteLecture_argsTupleScheme getScheme() {
return new deleteLecture_argsTupleScheme();
}
}
- private static class deleteLecture_argsTupleScheme extends TupleScheme<deleteLecture_args> {
+ private static class deleteLecture_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<deleteLecture_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteLecture_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -47805,8 +50338,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteLecture_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -47818,8 +50351,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class deleteLecture_result implements org.apache.thrift.TBase<deleteLecture_result, deleteLecture_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteLecture_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteLecture_result");
@@ -47827,15 +50364,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new deleteLecture_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new deleteLecture_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new deleteLecture_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new deleteLecture_resultTupleSchemeFactory();
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -47843,10 +50377,10 @@ public class SatelliteServer {
NOT_FOUND((short)2, "notFound"),
SERVER_ERROR((short)3, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -47854,6 +50388,7 @@ public class SatelliteServer {
/**
* 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: // AUTH_ERROR
@@ -47873,45 +50408,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteLecture_result.class, metaDataMap);
}
@@ -47944,6 +50482,7 @@ public class SatelliteServer {
}
}
+ @Override
public deleteLecture_result deepCopy() {
return new deleteLecture_result(this);
}
@@ -47955,11 +50494,12 @@ public class SatelliteServer {
this.serverError = null;
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public deleteLecture_result setAuthError(TAuthorizationException authError) {
+ public deleteLecture_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -47979,11 +50519,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public deleteLecture_result setNotFound(TNotFoundException notFound) {
+ public deleteLecture_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -48003,11 +50544,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public deleteLecture_result setServerError(TInvocationException serverError) {
+ public deleteLecture_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -48027,7 +50569,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case AUTH_ERROR:
if (value == null) {
@@ -48056,7 +50599,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTH_ERROR:
return getAuthError();
@@ -48068,13 +50613,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -48085,13 +50631,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof deleteLecture_result)
return this.equals((deleteLecture_result)that);
return false;
@@ -48100,6 +50644,8 @@ public class SatelliteServer {
public boolean equals(deleteLecture_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_authError = true && this.isSetAuthError();
boolean that_present_authError = true && that.isSetAuthError();
@@ -48133,24 +50679,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -48161,7 +50704,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -48171,7 +50714,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -48181,7 +50724,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -48194,21 +50737,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("deleteLecture_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("deleteLecture_result(");
boolean first = true;
sb.append("authError:");
@@ -48251,7 +50797,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -48259,14 +50805,16 @@ public class SatelliteServer {
}
}
- private static class deleteLecture_resultStandardSchemeFactory implements SchemeFactory {
+ private static class deleteLecture_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public deleteLecture_resultStandardScheme getScheme() {
return new deleteLecture_resultStandardScheme();
}
}
- private static class deleteLecture_resultStandardScheme extends StandardScheme<deleteLecture_result> {
+ private static class deleteLecture_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<deleteLecture_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, deleteLecture_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -48315,6 +50863,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, deleteLecture_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -48340,18 +50889,19 @@ public class SatelliteServer {
}
- private static class deleteLecture_resultTupleSchemeFactory implements SchemeFactory {
+ private static class deleteLecture_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public deleteLecture_resultTupleScheme getScheme() {
return new deleteLecture_resultTupleScheme();
}
}
- private static class deleteLecture_resultTupleScheme extends TupleScheme<deleteLecture_result> {
+ private static class deleteLecture_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<deleteLecture_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, deleteLecture_result 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.isSetAuthError()) {
optionals.set(0);
}
@@ -48375,8 +50925,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, deleteLecture_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.authError = new TAuthorizationException();
struct.authError.read(iprot);
@@ -48395,8 +50945,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class writeLecturePermissions_args implements org.apache.thrift.TBase<writeLecturePermissions_args, writeLecturePermissions_args._Fields>, java.io.Serializable, Cloneable, Comparable<writeLecturePermissions_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeLecturePermissions_args");
@@ -48404,15 +50958,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField PERMISSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("permissions", org.apache.thrift.protocol.TType.MAP, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new writeLecturePermissions_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new writeLecturePermissions_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new writeLecturePermissions_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new writeLecturePermissions_argsTupleSchemeFactory();
- public String userToken; // required
- public String lectureId; // required
- public Map<String,LecturePermissions> permissions; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String lectureId; // required
+ public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,LecturePermissions> permissions; // 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 {
@@ -48420,10 +50971,10 @@ public class SatelliteServer {
LECTURE_ID((short)2, "lectureId"),
PERMISSIONS((short)3, "permissions");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -48431,6 +50982,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -48450,38 +51002,41 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -48490,7 +51045,7 @@ public class SatelliteServer {
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"),
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LecturePermissions.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeLecturePermissions_args.class, metaDataMap);
}
@@ -48498,9 +51053,9 @@ public class SatelliteServer {
}
public writeLecturePermissions_args(
- String userToken,
- String lectureId,
- Map<String,LecturePermissions> permissions)
+ java.lang.String userToken,
+ java.lang.String lectureId,
+ java.util.Map<java.lang.String,LecturePermissions> permissions)
{
this();
this.userToken = userToken;
@@ -48519,13 +51074,13 @@ public class SatelliteServer {
this.lectureId = other.lectureId;
}
if (other.isSetPermissions()) {
- Map<String,LecturePermissions> __this__permissions = new HashMap<String,LecturePermissions>(other.permissions.size());
- for (Map.Entry<String, LecturePermissions> other_element : other.permissions.entrySet()) {
+ java.util.Map<java.lang.String,LecturePermissions> __this__permissions = new java.util.HashMap<java.lang.String,LecturePermissions>(other.permissions.size());
+ for (java.util.Map.Entry<java.lang.String, LecturePermissions> other_element : other.permissions.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
LecturePermissions other_element_value = other_element.getValue();
- String __this__permissions_copy_key = other_element_key;
+ java.lang.String __this__permissions_copy_key = other_element_key;
LecturePermissions __this__permissions_copy_value = new LecturePermissions(other_element_value);
@@ -48535,6 +51090,7 @@ public class SatelliteServer {
}
}
+ @Override
public writeLecturePermissions_args deepCopy() {
return new writeLecturePermissions_args(this);
}
@@ -48546,11 +51102,12 @@ public class SatelliteServer {
this.permissions = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public writeLecturePermissions_args setUserToken(String userToken) {
+ public writeLecturePermissions_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -48570,11 +51127,12 @@ public class SatelliteServer {
}
}
- public String getLectureId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getLectureId() {
return this.lectureId;
}
- public writeLecturePermissions_args setLectureId(String lectureId) {
+ public writeLecturePermissions_args setLectureId(@org.apache.thrift.annotation.Nullable java.lang.String lectureId) {
this.lectureId = lectureId;
return this;
}
@@ -48598,18 +51156,19 @@ public class SatelliteServer {
return (this.permissions == null) ? 0 : this.permissions.size();
}
- public void putToPermissions(String key, LecturePermissions val) {
+ public void putToPermissions(java.lang.String key, LecturePermissions val) {
if (this.permissions == null) {
- this.permissions = new HashMap<String,LecturePermissions>();
+ this.permissions = new java.util.HashMap<java.lang.String,LecturePermissions>();
}
this.permissions.put(key, val);
}
- public Map<String,LecturePermissions> getPermissions() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Map<java.lang.String,LecturePermissions> getPermissions() {
return this.permissions;
}
- public writeLecturePermissions_args setPermissions(Map<String,LecturePermissions> permissions) {
+ public writeLecturePermissions_args setPermissions(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,LecturePermissions> permissions) {
this.permissions = permissions;
return this;
}
@@ -48629,13 +51188,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -48643,7 +51203,7 @@ public class SatelliteServer {
if (value == null) {
unsetLectureId();
} else {
- setLectureId((String)value);
+ setLectureId((java.lang.String)value);
}
break;
@@ -48651,14 +51211,16 @@ public class SatelliteServer {
if (value == null) {
unsetPermissions();
} else {
- setPermissions((Map<String,LecturePermissions>)value);
+ setPermissions((java.util.Map<java.lang.String,LecturePermissions>)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -48670,13 +51232,14 @@ public class SatelliteServer {
return getPermissions();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -48687,13 +51250,11 @@ public class SatelliteServer {
case PERMISSIONS:
return isSetPermissions();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof writeLecturePermissions_args)
return this.equals((writeLecturePermissions_args)that);
return false;
@@ -48702,6 +51263,8 @@ public class SatelliteServer {
public boolean equals(writeLecturePermissions_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -48735,24 +51298,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_lectureId = true && (isSetLectureId());
- list.add(present_lectureId);
- if (present_lectureId)
- list.add(lectureId);
+ hashCode = hashCode * 8191 + ((isSetLectureId()) ? 131071 : 524287);
+ if (isSetLectureId())
+ hashCode = hashCode * 8191 + lectureId.hashCode();
- boolean present_permissions = true && (isSetPermissions());
- list.add(present_permissions);
- if (present_permissions)
- list.add(permissions);
+ hashCode = hashCode * 8191 + ((isSetPermissions()) ? 131071 : 524287);
+ if (isSetPermissions())
+ hashCode = hashCode * 8191 + permissions.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -48763,7 +51323,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -48773,7 +51333,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId());
+ lastComparison = java.lang.Boolean.compare(isSetLectureId(), other.isSetLectureId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -48783,7 +51343,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPermissions()).compareTo(other.isSetPermissions());
+ lastComparison = java.lang.Boolean.compare(isSetPermissions(), other.isSetPermissions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -48796,21 +51356,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("writeLecturePermissions_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("writeLecturePermissions_args(");
boolean first = true;
sb.append("userToken:");
@@ -48853,7 +51417,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -48861,14 +51425,16 @@ public class SatelliteServer {
}
}
- private static class writeLecturePermissions_argsStandardSchemeFactory implements SchemeFactory {
+ private static class writeLecturePermissions_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public writeLecturePermissions_argsStandardScheme getScheme() {
return new writeLecturePermissions_argsStandardScheme();
}
}
- private static class writeLecturePermissions_argsStandardScheme extends StandardScheme<writeLecturePermissions_args> {
+ private static class writeLecturePermissions_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<writeLecturePermissions_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, writeLecturePermissions_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -48898,16 +51464,16 @@ public class SatelliteServer {
case 3: // PERMISSIONS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
- org.apache.thrift.protocol.TMap _map318 = iprot.readMapBegin();
- struct.permissions = new HashMap<String,LecturePermissions>(2*_map318.size);
- String _key319;
- LecturePermissions _val320;
- for (int _i321 = 0; _i321 < _map318.size; ++_i321)
+ org.apache.thrift.protocol.TMap _map398 = iprot.readMapBegin();
+ struct.permissions = new java.util.HashMap<java.lang.String,LecturePermissions>(2*_map398.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key399;
+ @org.apache.thrift.annotation.Nullable LecturePermissions _val400;
+ for (int _i401 = 0; _i401 < _map398.size; ++_i401)
{
- _key319 = iprot.readString();
- _val320 = new LecturePermissions();
- _val320.read(iprot);
- struct.permissions.put(_key319, _val320);
+ _key399 = iprot.readString();
+ _val400 = new LecturePermissions();
+ _val400.read(iprot);
+ struct.permissions.put(_key399, _val400);
}
iprot.readMapEnd();
}
@@ -48927,6 +51493,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, writeLecturePermissions_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -48945,10 +51512,10 @@ public class SatelliteServer {
oprot.writeFieldBegin(PERMISSIONS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.permissions.size()));
- for (Map.Entry<String, LecturePermissions> _iter322 : struct.permissions.entrySet())
+ for (java.util.Map.Entry<java.lang.String, LecturePermissions> _iter402 : struct.permissions.entrySet())
{
- oprot.writeString(_iter322.getKey());
- _iter322.getValue().write(oprot);
+ oprot.writeString(_iter402.getKey());
+ _iter402.getValue().write(oprot);
}
oprot.writeMapEnd();
}
@@ -48960,18 +51527,19 @@ public class SatelliteServer {
}
- private static class writeLecturePermissions_argsTupleSchemeFactory implements SchemeFactory {
+ private static class writeLecturePermissions_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public writeLecturePermissions_argsTupleScheme getScheme() {
return new writeLecturePermissions_argsTupleScheme();
}
}
- private static class writeLecturePermissions_argsTupleScheme extends TupleScheme<writeLecturePermissions_args> {
+ private static class writeLecturePermissions_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<writeLecturePermissions_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -48991,10 +51559,10 @@ public class SatelliteServer {
if (struct.isSetPermissions()) {
{
oprot.writeI32(struct.permissions.size());
- for (Map.Entry<String, LecturePermissions> _iter323 : struct.permissions.entrySet())
+ for (java.util.Map.Entry<java.lang.String, LecturePermissions> _iter403 : struct.permissions.entrySet())
{
- oprot.writeString(_iter323.getKey());
- _iter323.getValue().write(oprot);
+ oprot.writeString(_iter403.getKey());
+ _iter403.getValue().write(oprot);
}
}
}
@@ -49002,8 +51570,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -49014,16 +51582,16 @@ public class SatelliteServer {
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TMap _map324 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.permissions = new HashMap<String,LecturePermissions>(2*_map324.size);
- String _key325;
- LecturePermissions _val326;
- for (int _i327 = 0; _i327 < _map324.size; ++_i327)
+ org.apache.thrift.protocol.TMap _map404 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT);
+ struct.permissions = new java.util.HashMap<java.lang.String,LecturePermissions>(2*_map404.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key405;
+ @org.apache.thrift.annotation.Nullable LecturePermissions _val406;
+ for (int _i407 = 0; _i407 < _map404.size; ++_i407)
{
- _key325 = iprot.readString();
- _val326 = new LecturePermissions();
- _val326.read(iprot);
- struct.permissions.put(_key325, _val326);
+ _key405 = iprot.readString();
+ _val406 = new LecturePermissions();
+ _val406.read(iprot);
+ struct.permissions.put(_key405, _val406);
}
}
struct.setPermissionsIsSet(true);
@@ -49031,8 +51599,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class writeLecturePermissions_result implements org.apache.thrift.TBase<writeLecturePermissions_result, writeLecturePermissions_result._Fields>, java.io.Serializable, Cloneable, Comparable<writeLecturePermissions_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("writeLecturePermissions_result");
@@ -49040,15 +51612,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new writeLecturePermissions_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new writeLecturePermissions_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new writeLecturePermissions_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new writeLecturePermissions_resultTupleSchemeFactory();
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -49056,10 +51625,10 @@ public class SatelliteServer {
NOT_FOUND((short)2, "notFound"),
SERVER_ERROR((short)3, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -49067,6 +51636,7 @@ public class SatelliteServer {
/**
* 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: // AUTH_ERROR
@@ -49086,45 +51656,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(writeLecturePermissions_result.class, metaDataMap);
}
@@ -49157,6 +51730,7 @@ public class SatelliteServer {
}
}
+ @Override
public writeLecturePermissions_result deepCopy() {
return new writeLecturePermissions_result(this);
}
@@ -49168,11 +51742,12 @@ public class SatelliteServer {
this.serverError = null;
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public writeLecturePermissions_result setAuthError(TAuthorizationException authError) {
+ public writeLecturePermissions_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -49192,11 +51767,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public writeLecturePermissions_result setNotFound(TNotFoundException notFound) {
+ public writeLecturePermissions_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -49216,11 +51792,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public writeLecturePermissions_result setServerError(TInvocationException serverError) {
+ public writeLecturePermissions_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -49240,7 +51817,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case AUTH_ERROR:
if (value == null) {
@@ -49269,7 +51847,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTH_ERROR:
return getAuthError();
@@ -49281,13 +51861,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -49298,13 +51879,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof writeLecturePermissions_result)
return this.equals((writeLecturePermissions_result)that);
return false;
@@ -49313,6 +51892,8 @@ public class SatelliteServer {
public boolean equals(writeLecturePermissions_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_authError = true && this.isSetAuthError();
boolean that_present_authError = true && that.isSetAuthError();
@@ -49346,24 +51927,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -49374,7 +51952,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -49384,7 +51962,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -49394,7 +51972,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -49407,21 +51985,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("writeLecturePermissions_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("writeLecturePermissions_result(");
boolean first = true;
sb.append("authError:");
@@ -49464,7 +52045,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -49472,14 +52053,16 @@ public class SatelliteServer {
}
}
- private static class writeLecturePermissions_resultStandardSchemeFactory implements SchemeFactory {
+ private static class writeLecturePermissions_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public writeLecturePermissions_resultStandardScheme getScheme() {
return new writeLecturePermissions_resultStandardScheme();
}
}
- private static class writeLecturePermissions_resultStandardScheme extends StandardScheme<writeLecturePermissions_result> {
+ private static class writeLecturePermissions_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<writeLecturePermissions_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, writeLecturePermissions_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -49528,6 +52111,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, writeLecturePermissions_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -49553,18 +52137,19 @@ public class SatelliteServer {
}
- private static class writeLecturePermissions_resultTupleSchemeFactory implements SchemeFactory {
+ private static class writeLecturePermissions_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public writeLecturePermissions_resultTupleScheme getScheme() {
return new writeLecturePermissions_resultTupleScheme();
}
}
- private static class writeLecturePermissions_resultTupleScheme extends TupleScheme<writeLecturePermissions_result> {
+ private static class writeLecturePermissions_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<writeLecturePermissions_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_result 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.isSetAuthError()) {
optionals.set(0);
}
@@ -49588,8 +52173,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, writeLecturePermissions_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.authError = new TAuthorizationException();
struct.authError.read(iprot);
@@ -49608,32 +52193,33 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getLecturePermissions_args implements org.apache.thrift.TBase<getLecturePermissions_args, getLecturePermissions_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLecturePermissions_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLecturePermissions_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLecturePermissions_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLecturePermissions_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getLecturePermissions_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getLecturePermissions_argsTupleSchemeFactory();
- public String userToken; // required
- public String lectureId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String lectureId; // 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 {
USER_TOKEN((short)1, "userToken"),
LECTURE_ID((short)2, "lectureId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -49641,6 +52227,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -49658,43 +52245,46 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLecturePermissions_args.class, metaDataMap);
}
@@ -49702,8 +52292,8 @@ public class SatelliteServer {
}
public getLecturePermissions_args(
- String userToken,
- String lectureId)
+ java.lang.String userToken,
+ java.lang.String lectureId)
{
this();
this.userToken = userToken;
@@ -49722,6 +52312,7 @@ public class SatelliteServer {
}
}
+ @Override
public getLecturePermissions_args deepCopy() {
return new getLecturePermissions_args(this);
}
@@ -49732,11 +52323,12 @@ public class SatelliteServer {
this.lectureId = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public getLecturePermissions_args setUserToken(String userToken) {
+ public getLecturePermissions_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -49756,11 +52348,12 @@ public class SatelliteServer {
}
}
- public String getLectureId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getLectureId() {
return this.lectureId;
}
- public getLecturePermissions_args setLectureId(String lectureId) {
+ public getLecturePermissions_args setLectureId(@org.apache.thrift.annotation.Nullable java.lang.String lectureId) {
this.lectureId = lectureId;
return this;
}
@@ -49780,13 +52373,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -49794,14 +52388,16 @@ public class SatelliteServer {
if (value == null) {
unsetLectureId();
} else {
- setLectureId((String)value);
+ setLectureId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -49810,13 +52406,14 @@ public class SatelliteServer {
return getLectureId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -49825,13 +52422,11 @@ public class SatelliteServer {
case LECTURE_ID:
return isSetLectureId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getLecturePermissions_args)
return this.equals((getLecturePermissions_args)that);
return false;
@@ -49840,6 +52435,8 @@ public class SatelliteServer {
public boolean equals(getLecturePermissions_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -49864,19 +52461,17 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_lectureId = true && (isSetLectureId());
- list.add(present_lectureId);
- if (present_lectureId)
- list.add(lectureId);
+ hashCode = hashCode * 8191 + ((isSetLectureId()) ? 131071 : 524287);
+ if (isSetLectureId())
+ hashCode = hashCode * 8191 + lectureId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -49887,7 +52482,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -49897,7 +52492,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId());
+ lastComparison = java.lang.Boolean.compare(isSetLectureId(), other.isSetLectureId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -49910,21 +52505,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getLecturePermissions_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getLecturePermissions_args(");
boolean first = true;
sb.append("userToken:");
@@ -49959,7 +52558,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -49967,14 +52566,16 @@ public class SatelliteServer {
}
}
- private static class getLecturePermissions_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getLecturePermissions_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getLecturePermissions_argsStandardScheme getScheme() {
return new getLecturePermissions_argsStandardScheme();
}
}
- private static class getLecturePermissions_argsStandardScheme extends StandardScheme<getLecturePermissions_args> {
+ private static class getLecturePermissions_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getLecturePermissions_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getLecturePermissions_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -50012,6 +52613,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getLecturePermissions_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -50032,18 +52634,19 @@ public class SatelliteServer {
}
- private static class getLecturePermissions_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getLecturePermissions_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getLecturePermissions_argsTupleScheme getScheme() {
return new getLecturePermissions_argsTupleScheme();
}
}
- private static class getLecturePermissions_argsTupleScheme extends TupleScheme<getLecturePermissions_args> {
+ private static class getLecturePermissions_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getLecturePermissions_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -50061,8 +52664,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -50074,8 +52677,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getLecturePermissions_result implements org.apache.thrift.TBase<getLecturePermissions_result, getLecturePermissions_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLecturePermissions_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLecturePermissions_result");
@@ -50084,16 +52691,13 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getLecturePermissions_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getLecturePermissions_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getLecturePermissions_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getLecturePermissions_resultTupleSchemeFactory();
- public Map<String,LecturePermissions> success; // required
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,LecturePermissions> success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -50102,10 +52706,10 @@ public class SatelliteServer {
NOT_FOUND((short)2, "notFound"),
SERVER_ERROR((short)3, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -50113,6 +52717,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -50134,49 +52739,52 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID"),
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, LecturePermissions.class))));
tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLecturePermissions_result.class, metaDataMap);
}
@@ -50184,7 +52792,7 @@ public class SatelliteServer {
}
public getLecturePermissions_result(
- Map<String,LecturePermissions> success,
+ java.util.Map<java.lang.String,LecturePermissions> success,
TAuthorizationException authError,
TNotFoundException notFound,
TInvocationException serverError)
@@ -50201,13 +52809,13 @@ public class SatelliteServer {
*/
public getLecturePermissions_result(getLecturePermissions_result other) {
if (other.isSetSuccess()) {
- Map<String,LecturePermissions> __this__success = new HashMap<String,LecturePermissions>(other.success.size());
- for (Map.Entry<String, LecturePermissions> other_element : other.success.entrySet()) {
+ java.util.Map<java.lang.String,LecturePermissions> __this__success = new java.util.HashMap<java.lang.String,LecturePermissions>(other.success.size());
+ for (java.util.Map.Entry<java.lang.String, LecturePermissions> other_element : other.success.entrySet()) {
- String other_element_key = other_element.getKey();
+ java.lang.String other_element_key = other_element.getKey();
LecturePermissions other_element_value = other_element.getValue();
- String __this__success_copy_key = other_element_key;
+ java.lang.String __this__success_copy_key = other_element_key;
LecturePermissions __this__success_copy_value = new LecturePermissions(other_element_value);
@@ -50226,6 +52834,7 @@ public class SatelliteServer {
}
}
+ @Override
public getLecturePermissions_result deepCopy() {
return new getLecturePermissions_result(this);
}
@@ -50242,18 +52851,19 @@ public class SatelliteServer {
return (this.success == null) ? 0 : this.success.size();
}
- public void putToSuccess(String key, LecturePermissions val) {
+ public void putToSuccess(java.lang.String key, LecturePermissions val) {
if (this.success == null) {
- this.success = new HashMap<String,LecturePermissions>();
+ this.success = new java.util.HashMap<java.lang.String,LecturePermissions>();
}
this.success.put(key, val);
}
- public Map<String,LecturePermissions> getSuccess() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Map<java.lang.String,LecturePermissions> getSuccess() {
return this.success;
}
- public getLecturePermissions_result setSuccess(Map<String,LecturePermissions> success) {
+ public getLecturePermissions_result setSuccess(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,LecturePermissions> success) {
this.success = success;
return this;
}
@@ -50273,11 +52883,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public getLecturePermissions_result setAuthError(TAuthorizationException authError) {
+ public getLecturePermissions_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -50297,11 +52908,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public getLecturePermissions_result setNotFound(TNotFoundException notFound) {
+ public getLecturePermissions_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -50321,11 +52933,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public getLecturePermissions_result setServerError(TInvocationException serverError) {
+ public getLecturePermissions_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -50345,13 +52958,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
unsetSuccess();
} else {
- setSuccess((Map<String,LecturePermissions>)value);
+ setSuccess((java.util.Map<java.lang.String,LecturePermissions>)value);
}
break;
@@ -50382,7 +52996,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -50397,13 +53013,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -50416,13 +53033,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getLecturePermissions_result)
return this.equals((getLecturePermissions_result)that);
return false;
@@ -50431,6 +53046,8 @@ public class SatelliteServer {
public boolean equals(getLecturePermissions_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -50473,29 +53090,25 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -50506,7 +53119,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -50516,7 +53129,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -50526,7 +53139,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -50536,7 +53149,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -50549,21 +53162,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getLecturePermissions_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getLecturePermissions_result(");
boolean first = true;
sb.append("success:");
@@ -50614,7 +53230,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -50622,14 +53238,16 @@ public class SatelliteServer {
}
}
- private static class getLecturePermissions_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getLecturePermissions_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getLecturePermissions_resultStandardScheme getScheme() {
return new getLecturePermissions_resultStandardScheme();
}
}
- private static class getLecturePermissions_resultStandardScheme extends StandardScheme<getLecturePermissions_result> {
+ private static class getLecturePermissions_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getLecturePermissions_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getLecturePermissions_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -50643,16 +53261,16 @@ public class SatelliteServer {
case 0: // SUCCESS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
- org.apache.thrift.protocol.TMap _map328 = iprot.readMapBegin();
- struct.success = new HashMap<String,LecturePermissions>(2*_map328.size);
- String _key329;
- LecturePermissions _val330;
- for (int _i331 = 0; _i331 < _map328.size; ++_i331)
+ org.apache.thrift.protocol.TMap _map408 = iprot.readMapBegin();
+ struct.success = new java.util.HashMap<java.lang.String,LecturePermissions>(2*_map408.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key409;
+ @org.apache.thrift.annotation.Nullable LecturePermissions _val410;
+ for (int _i411 = 0; _i411 < _map408.size; ++_i411)
{
- _key329 = iprot.readString();
- _val330 = new LecturePermissions();
- _val330.read(iprot);
- struct.success.put(_key329, _val330);
+ _key409 = iprot.readString();
+ _val410 = new LecturePermissions();
+ _val410.read(iprot);
+ struct.success.put(_key409, _val410);
}
iprot.readMapEnd();
}
@@ -50699,6 +53317,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getLecturePermissions_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -50707,10 +53326,10 @@ public class SatelliteServer {
oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, struct.success.size()));
- for (Map.Entry<String, LecturePermissions> _iter332 : struct.success.entrySet())
+ for (java.util.Map.Entry<java.lang.String, LecturePermissions> _iter412 : struct.success.entrySet())
{
- oprot.writeString(_iter332.getKey());
- _iter332.getValue().write(oprot);
+ oprot.writeString(_iter412.getKey());
+ _iter412.getValue().write(oprot);
}
oprot.writeMapEnd();
}
@@ -50737,18 +53356,19 @@ public class SatelliteServer {
}
- private static class getLecturePermissions_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getLecturePermissions_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getLecturePermissions_resultTupleScheme getScheme() {
return new getLecturePermissions_resultTupleScheme();
}
}
- private static class getLecturePermissions_resultTupleScheme extends TupleScheme<getLecturePermissions_result> {
+ private static class getLecturePermissions_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getLecturePermissions_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -50765,10 +53385,10 @@ public class SatelliteServer {
if (struct.isSetSuccess()) {
{
oprot.writeI32(struct.success.size());
- for (Map.Entry<String, LecturePermissions> _iter333 : struct.success.entrySet())
+ for (java.util.Map.Entry<java.lang.String, LecturePermissions> _iter413 : struct.success.entrySet())
{
- oprot.writeString(_iter333.getKey());
- _iter333.getValue().write(oprot);
+ oprot.writeString(_iter413.getKey());
+ _iter413.getValue().write(oprot);
}
}
}
@@ -50785,20 +53405,20 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getLecturePermissions_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(4);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TMap _map334 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.success = new HashMap<String,LecturePermissions>(2*_map334.size);
- String _key335;
- LecturePermissions _val336;
- for (int _i337 = 0; _i337 < _map334.size; ++_i337)
+ org.apache.thrift.protocol.TMap _map414 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRUCT);
+ struct.success = new java.util.HashMap<java.lang.String,LecturePermissions>(2*_map414.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key415;
+ @org.apache.thrift.annotation.Nullable LecturePermissions _val416;
+ for (int _i417 = 0; _i417 < _map414.size; ++_i417)
{
- _key335 = iprot.readString();
- _val336 = new LecturePermissions();
- _val336.read(iprot);
- struct.success.put(_key335, _val336);
+ _key415 = iprot.readString();
+ _val416 = new LecturePermissions();
+ _val416.read(iprot);
+ struct.success.put(_key415, _val416);
}
}
struct.setSuccessIsSet(true);
@@ -50821,8 +53441,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class setLectureOwner_args implements org.apache.thrift.TBase<setLectureOwner_args, setLectureOwner_args._Fields>, java.io.Serializable, Cloneable, Comparable<setLectureOwner_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setLectureOwner_args");
@@ -50830,15 +53454,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField LECTURE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("lectureId", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField NEW_OWNER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("newOwnerId", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setLectureOwner_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setLectureOwner_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setLectureOwner_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setLectureOwner_argsTupleSchemeFactory();
- public String userToken; // required
- public String lectureId; // required
- public String newOwnerId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String lectureId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String newOwnerId; // 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 {
@@ -50846,10 +53467,10 @@ public class SatelliteServer {
LECTURE_ID((short)2, "lectureId"),
NEW_OWNER_ID((short)3, "newOwnerId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -50857,6 +53478,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -50876,45 +53498,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.LECTURE_ID, new org.apache.thrift.meta_data.FieldMetaData("lectureId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
tmpMap.put(_Fields.NEW_OWNER_ID, new org.apache.thrift.meta_data.FieldMetaData("newOwnerId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "UUID")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setLectureOwner_args.class, metaDataMap);
}
@@ -50922,9 +53547,9 @@ public class SatelliteServer {
}
public setLectureOwner_args(
- String userToken,
- String lectureId,
- String newOwnerId)
+ java.lang.String userToken,
+ java.lang.String lectureId,
+ java.lang.String newOwnerId)
{
this();
this.userToken = userToken;
@@ -50947,6 +53572,7 @@ public class SatelliteServer {
}
}
+ @Override
public setLectureOwner_args deepCopy() {
return new setLectureOwner_args(this);
}
@@ -50958,11 +53584,12 @@ public class SatelliteServer {
this.newOwnerId = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public setLectureOwner_args setUserToken(String userToken) {
+ public setLectureOwner_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -50982,11 +53609,12 @@ public class SatelliteServer {
}
}
- public String getLectureId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getLectureId() {
return this.lectureId;
}
- public setLectureOwner_args setLectureId(String lectureId) {
+ public setLectureOwner_args setLectureId(@org.apache.thrift.annotation.Nullable java.lang.String lectureId) {
this.lectureId = lectureId;
return this;
}
@@ -51006,11 +53634,12 @@ public class SatelliteServer {
}
}
- public String getNewOwnerId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getNewOwnerId() {
return this.newOwnerId;
}
- public setLectureOwner_args setNewOwnerId(String newOwnerId) {
+ public setLectureOwner_args setNewOwnerId(@org.apache.thrift.annotation.Nullable java.lang.String newOwnerId) {
this.newOwnerId = newOwnerId;
return this;
}
@@ -51030,13 +53659,14 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
@@ -51044,7 +53674,7 @@ public class SatelliteServer {
if (value == null) {
unsetLectureId();
} else {
- setLectureId((String)value);
+ setLectureId((java.lang.String)value);
}
break;
@@ -51052,14 +53682,16 @@ public class SatelliteServer {
if (value == null) {
unsetNewOwnerId();
} else {
- setNewOwnerId((String)value);
+ setNewOwnerId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
@@ -51071,13 +53703,14 @@ public class SatelliteServer {
return getNewOwnerId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -51088,13 +53721,11 @@ public class SatelliteServer {
case NEW_OWNER_ID:
return isSetNewOwnerId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof setLectureOwner_args)
return this.equals((setLectureOwner_args)that);
return false;
@@ -51103,6 +53734,8 @@ public class SatelliteServer {
public boolean equals(setLectureOwner_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -51136,24 +53769,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- boolean present_lectureId = true && (isSetLectureId());
- list.add(present_lectureId);
- if (present_lectureId)
- list.add(lectureId);
+ hashCode = hashCode * 8191 + ((isSetLectureId()) ? 131071 : 524287);
+ if (isSetLectureId())
+ hashCode = hashCode * 8191 + lectureId.hashCode();
- boolean present_newOwnerId = true && (isSetNewOwnerId());
- list.add(present_newOwnerId);
- if (present_newOwnerId)
- list.add(newOwnerId);
+ hashCode = hashCode * 8191 + ((isSetNewOwnerId()) ? 131071 : 524287);
+ if (isSetNewOwnerId())
+ hashCode = hashCode * 8191 + newOwnerId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -51164,7 +53794,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -51174,7 +53804,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLectureId()).compareTo(other.isSetLectureId());
+ lastComparison = java.lang.Boolean.compare(isSetLectureId(), other.isSetLectureId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -51184,7 +53814,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNewOwnerId()).compareTo(other.isSetNewOwnerId());
+ lastComparison = java.lang.Boolean.compare(isSetNewOwnerId(), other.isSetNewOwnerId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -51197,21 +53827,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("setLectureOwner_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("setLectureOwner_args(");
boolean first = true;
sb.append("userToken:");
@@ -51254,7 +53888,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -51262,14 +53896,16 @@ public class SatelliteServer {
}
}
- private static class setLectureOwner_argsStandardSchemeFactory implements SchemeFactory {
+ private static class setLectureOwner_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setLectureOwner_argsStandardScheme getScheme() {
return new setLectureOwner_argsStandardScheme();
}
}
- private static class setLectureOwner_argsStandardScheme extends StandardScheme<setLectureOwner_args> {
+ private static class setLectureOwner_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<setLectureOwner_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, setLectureOwner_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -51315,6 +53951,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, setLectureOwner_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -51340,18 +53977,19 @@ public class SatelliteServer {
}
- private static class setLectureOwner_argsTupleSchemeFactory implements SchemeFactory {
+ private static class setLectureOwner_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setLectureOwner_argsTupleScheme getScheme() {
return new setLectureOwner_argsTupleScheme();
}
}
- private static class setLectureOwner_argsTupleScheme extends TupleScheme<setLectureOwner_args> {
+ private static class setLectureOwner_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<setLectureOwner_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, setLectureOwner_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -51375,8 +54013,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, setLectureOwner_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -51392,8 +54030,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class setLectureOwner_result implements org.apache.thrift.TBase<setLectureOwner_result, setLectureOwner_result._Fields>, java.io.Serializable, Cloneable, Comparable<setLectureOwner_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("setLectureOwner_result");
@@ -51401,15 +54043,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField NOT_FOUND_FIELD_DESC = new org.apache.thrift.protocol.TField("notFound", org.apache.thrift.protocol.TType.STRUCT, (short)2);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new setLectureOwner_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new setLectureOwner_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setLectureOwner_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setLectureOwner_resultTupleSchemeFactory();
- public TAuthorizationException authError; // required
- public TNotFoundException notFound; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TNotFoundException notFound; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -51417,10 +54056,10 @@ public class SatelliteServer {
NOT_FOUND((short)2, "notFound"),
SERVER_ERROR((short)3, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -51428,6 +54067,7 @@ public class SatelliteServer {
/**
* 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: // AUTH_ERROR
@@ -51447,45 +54087,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.NOT_FOUND, new org.apache.thrift.meta_data.FieldMetaData("notFound", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TNotFoundException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setLectureOwner_result.class, metaDataMap);
}
@@ -51518,6 +54161,7 @@ public class SatelliteServer {
}
}
+ @Override
public setLectureOwner_result deepCopy() {
return new setLectureOwner_result(this);
}
@@ -51529,11 +54173,12 @@ public class SatelliteServer {
this.serverError = null;
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public setLectureOwner_result setAuthError(TAuthorizationException authError) {
+ public setLectureOwner_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -51553,11 +54198,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TNotFoundException getNotFound() {
return this.notFound;
}
- public setLectureOwner_result setNotFound(TNotFoundException notFound) {
+ public setLectureOwner_result setNotFound(@org.apache.thrift.annotation.Nullable TNotFoundException notFound) {
this.notFound = notFound;
return this;
}
@@ -51577,11 +54223,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public setLectureOwner_result setServerError(TInvocationException serverError) {
+ public setLectureOwner_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -51601,7 +54248,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case AUTH_ERROR:
if (value == null) {
@@ -51630,7 +54278,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AUTH_ERROR:
return getAuthError();
@@ -51642,13 +54292,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -51659,13 +54310,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof setLectureOwner_result)
return this.equals((setLectureOwner_result)that);
return false;
@@ -51674,6 +54323,8 @@ public class SatelliteServer {
public boolean equals(setLectureOwner_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_authError = true && this.isSetAuthError();
boolean that_present_authError = true && that.isSetAuthError();
@@ -51707,24 +54358,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_notFound = true && (isSetNotFound());
- list.add(present_notFound);
- if (present_notFound)
- list.add(notFound);
+ hashCode = hashCode * 8191 + ((isSetNotFound()) ? 131071 : 524287);
+ if (isSetNotFound())
+ hashCode = hashCode * 8191 + notFound.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -51735,7 +54383,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -51745,7 +54393,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNotFound()).compareTo(other.isSetNotFound());
+ lastComparison = java.lang.Boolean.compare(isSetNotFound(), other.isSetNotFound());
if (lastComparison != 0) {
return lastComparison;
}
@@ -51755,7 +54403,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -51768,21 +54416,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("setLectureOwner_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("setLectureOwner_result(");
boolean first = true;
sb.append("authError:");
@@ -51825,7 +54476,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -51833,14 +54484,16 @@ public class SatelliteServer {
}
}
- private static class setLectureOwner_resultStandardSchemeFactory implements SchemeFactory {
+ private static class setLectureOwner_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setLectureOwner_resultStandardScheme getScheme() {
return new setLectureOwner_resultStandardScheme();
}
}
- private static class setLectureOwner_resultStandardScheme extends StandardScheme<setLectureOwner_result> {
+ private static class setLectureOwner_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<setLectureOwner_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, setLectureOwner_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -51889,6 +54542,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, setLectureOwner_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -51914,18 +54568,19 @@ public class SatelliteServer {
}
- private static class setLectureOwner_resultTupleSchemeFactory implements SchemeFactory {
+ private static class setLectureOwner_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public setLectureOwner_resultTupleScheme getScheme() {
return new setLectureOwner_resultTupleScheme();
}
}
- private static class setLectureOwner_resultTupleScheme extends TupleScheme<setLectureOwner_result> {
+ private static class setLectureOwner_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<setLectureOwner_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, setLectureOwner_result 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.isSetAuthError()) {
optionals.set(0);
}
@@ -51949,8 +54604,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, setLectureOwner_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.authError = new TAuthorizationException();
struct.authError.read(iprot);
@@ -51969,29 +54624,30 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getPredefinedData_args implements org.apache.thrift.TBase<getPredefinedData_args, getPredefinedData_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPredefinedData_args> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPredefinedData_args");
private static final org.apache.thrift.protocol.TField USER_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("userToken", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getPredefinedData_argsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getPredefinedData_argsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getPredefinedData_argsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getPredefinedData_argsTupleSchemeFactory();
- public String userToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userToken; // 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 {
USER_TOKEN((short)1, "userToken");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -51999,6 +54655,7 @@ public class SatelliteServer {
/**
* 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: // USER_TOKEN
@@ -52014,41 +54671,44 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("userToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPredefinedData_args.class, metaDataMap);
}
@@ -52056,7 +54716,7 @@ public class SatelliteServer {
}
public getPredefinedData_args(
- String userToken)
+ java.lang.String userToken)
{
this();
this.userToken = userToken;
@@ -52071,6 +54731,7 @@ public class SatelliteServer {
}
}
+ @Override
public getPredefinedData_args deepCopy() {
return new getPredefinedData_args(this);
}
@@ -52080,11 +54741,12 @@ public class SatelliteServer {
this.userToken = null;
}
- public String getUserToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserToken() {
return this.userToken;
}
- public getPredefinedData_args setUserToken(String userToken) {
+ public getPredefinedData_args setUserToken(@org.apache.thrift.annotation.Nullable java.lang.String userToken) {
this.userToken = userToken;
return this;
}
@@ -52104,45 +54766,47 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_TOKEN:
if (value == null) {
unsetUserToken();
} else {
- setUserToken((String)value);
+ setUserToken((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_TOKEN:
return getUserToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case USER_TOKEN:
return isSetUserToken();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getPredefinedData_args)
return this.equals((getPredefinedData_args)that);
return false;
@@ -52151,6 +54815,8 @@ public class SatelliteServer {
public boolean equals(getPredefinedData_args that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userToken = true && this.isSetUserToken();
boolean that_present_userToken = true && that.isSetUserToken();
@@ -52166,14 +54832,13 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userToken = true && (isSetUserToken());
- list.add(present_userToken);
- if (present_userToken)
- list.add(userToken);
+ hashCode = hashCode * 8191 + ((isSetUserToken()) ? 131071 : 524287);
+ if (isSetUserToken())
+ hashCode = hashCode * 8191 + userToken.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -52184,7 +54849,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserToken()).compareTo(other.isSetUserToken());
+ lastComparison = java.lang.Boolean.compare(isSetUserToken(), other.isSetUserToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -52197,21 +54862,25 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).read(iprot, this);
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getPredefinedData_args(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getPredefinedData_args(");
boolean first = true;
sb.append("userToken:");
@@ -52238,7 +54907,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -52246,14 +54915,16 @@ public class SatelliteServer {
}
}
- private static class getPredefinedData_argsStandardSchemeFactory implements SchemeFactory {
+ private static class getPredefinedData_argsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getPredefinedData_argsStandardScheme getScheme() {
return new getPredefinedData_argsStandardScheme();
}
}
- private static class getPredefinedData_argsStandardScheme extends StandardScheme<getPredefinedData_args> {
+ private static class getPredefinedData_argsStandardScheme extends org.apache.thrift.scheme.StandardScheme<getPredefinedData_args> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getPredefinedData_args struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -52283,6 +54954,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getPredefinedData_args struct) throws org.apache.thrift.TException {
struct.validate();
@@ -52298,18 +54970,19 @@ public class SatelliteServer {
}
- private static class getPredefinedData_argsTupleSchemeFactory implements SchemeFactory {
+ private static class getPredefinedData_argsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getPredefinedData_argsTupleScheme getScheme() {
return new getPredefinedData_argsTupleScheme();
}
}
- private static class getPredefinedData_argsTupleScheme extends TupleScheme<getPredefinedData_args> {
+ private static class getPredefinedData_argsTupleScheme extends org.apache.thrift.scheme.TupleScheme<getPredefinedData_args> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getPredefinedData_args 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.isSetUserToken()) {
optionals.set(0);
}
@@ -52321,8 +54994,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getPredefinedData_args struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.userToken = iprot.readString();
struct.setUserTokenIsSet(true);
@@ -52330,8 +55003,12 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
+ @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
public static class getPredefinedData_result implements org.apache.thrift.TBase<getPredefinedData_result, getPredefinedData_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPredefinedData_result> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPredefinedData_result");
@@ -52339,15 +55016,12 @@ public class SatelliteServer {
private static final org.apache.thrift.protocol.TField AUTH_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("authError", org.apache.thrift.protocol.TType.STRUCT, (short)1);
private static final org.apache.thrift.protocol.TField SERVER_ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("serverError", org.apache.thrift.protocol.TType.STRUCT, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new getPredefinedData_resultStandardSchemeFactory());
- schemes.put(TupleScheme.class, new getPredefinedData_resultTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getPredefinedData_resultStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getPredefinedData_resultTupleSchemeFactory();
- public PredefinedData success; // required
- public TAuthorizationException authError; // required
- public TInvocationException serverError; // required
+ public @org.apache.thrift.annotation.Nullable PredefinedData success; // required
+ public @org.apache.thrift.annotation.Nullable TAuthorizationException authError; // required
+ public @org.apache.thrift.annotation.Nullable TInvocationException serverError; // 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 {
@@ -52355,10 +55029,10 @@ public class SatelliteServer {
AUTH_ERROR((short)1, "authError"),
SERVER_ERROR((short)2, "serverError");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -52366,6 +55040,7 @@ public class SatelliteServer {
/**
* 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 0: // SUCCESS
@@ -52385,45 +55060,48 @@ public class SatelliteServer {
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
+ @Override
public short getThriftFieldId() {
return _thriftId;
}
- public String getFieldName() {
+ @Override
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PredefinedData.class)));
tmpMap.put(_Fields.AUTH_ERROR, new org.apache.thrift.meta_data.FieldMetaData("authError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAuthorizationException.class)));
tmpMap.put(_Fields.SERVER_ERROR, new org.apache.thrift.meta_data.FieldMetaData("serverError", org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TInvocationException.class)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPredefinedData_result.class, metaDataMap);
}
@@ -52456,6 +55134,7 @@ public class SatelliteServer {
}
}
+ @Override
public getPredefinedData_result deepCopy() {
return new getPredefinedData_result(this);
}
@@ -52467,11 +55146,12 @@ public class SatelliteServer {
this.serverError = null;
}
+ @org.apache.thrift.annotation.Nullable
public PredefinedData getSuccess() {
return this.success;
}
- public getPredefinedData_result setSuccess(PredefinedData success) {
+ public getPredefinedData_result setSuccess(@org.apache.thrift.annotation.Nullable PredefinedData success) {
this.success = success;
return this;
}
@@ -52491,11 +55171,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TAuthorizationException getAuthError() {
return this.authError;
}
- public getPredefinedData_result setAuthError(TAuthorizationException authError) {
+ public getPredefinedData_result setAuthError(@org.apache.thrift.annotation.Nullable TAuthorizationException authError) {
this.authError = authError;
return this;
}
@@ -52515,11 +55196,12 @@ public class SatelliteServer {
}
}
+ @org.apache.thrift.annotation.Nullable
public TInvocationException getServerError() {
return this.serverError;
}
- public getPredefinedData_result setServerError(TInvocationException serverError) {
+ public getPredefinedData_result setServerError(@org.apache.thrift.annotation.Nullable TInvocationException serverError) {
this.serverError = serverError;
return this;
}
@@ -52539,7 +55221,8 @@ public class SatelliteServer {
}
}
- public void setFieldValue(_Fields field, Object value) {
+ @Override
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SUCCESS:
if (value == null) {
@@ -52568,7 +55251,9 @@ public class SatelliteServer {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ @Override
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SUCCESS:
return getSuccess();
@@ -52580,13 +55265,14 @@ public class SatelliteServer {
return getServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ @Override
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -52597,13 +55283,11 @@ public class SatelliteServer {
case SERVER_ERROR:
return isSetServerError();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof getPredefinedData_result)
return this.equals((getPredefinedData_result)that);
return false;
@@ -52612,6 +55296,8 @@ public class SatelliteServer {
public boolean equals(getPredefinedData_result that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_success = true && this.isSetSuccess();
boolean that_present_success = true && that.isSetSuccess();
@@ -52645,24 +55331,21 @@ public class SatelliteServer {
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_success = true && (isSetSuccess());
- list.add(present_success);
- if (present_success)
- list.add(success);
+ hashCode = hashCode * 8191 + ((isSetSuccess()) ? 131071 : 524287);
+ if (isSetSuccess())
+ hashCode = hashCode * 8191 + success.hashCode();
- boolean present_authError = true && (isSetAuthError());
- list.add(present_authError);
- if (present_authError)
- list.add(authError);
+ hashCode = hashCode * 8191 + ((isSetAuthError()) ? 131071 : 524287);
+ if (isSetAuthError())
+ hashCode = hashCode * 8191 + authError.hashCode();
- boolean present_serverError = true && (isSetServerError());
- list.add(present_serverError);
- if (present_serverError)
- list.add(serverError);
+ hashCode = hashCode * 8191 + ((isSetServerError()) ? 131071 : 524287);
+ if (isSetServerError())
+ hashCode = hashCode * 8191 + serverError.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -52673,7 +55356,7 @@ public class SatelliteServer {
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+ lastComparison = java.lang.Boolean.compare(isSetSuccess(), other.isSetSuccess());
if (lastComparison != 0) {
return lastComparison;
}
@@ -52683,7 +55366,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthError()).compareTo(other.isSetAuthError());
+ lastComparison = java.lang.Boolean.compare(isSetAuthError(), other.isSetAuthError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -52693,7 +55376,7 @@ public class SatelliteServer {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerError()).compareTo(other.isSetServerError());
+ lastComparison = java.lang.Boolean.compare(isSetServerError(), other.isSetServerError());
if (lastComparison != 0) {
return lastComparison;
}
@@ -52706,21 +55389,24 @@ public class SatelliteServer {
return 0;
}
+ @org.apache.thrift.annotation.Nullable
+ @Override
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("getPredefinedData_result(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("getPredefinedData_result(");
boolean first = true;
sb.append("success:");
@@ -52766,7 +55452,7 @@ public class SatelliteServer {
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -52774,14 +55460,16 @@ public class SatelliteServer {
}
}
- private static class getPredefinedData_resultStandardSchemeFactory implements SchemeFactory {
+ private static class getPredefinedData_resultStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getPredefinedData_resultStandardScheme getScheme() {
return new getPredefinedData_resultStandardScheme();
}
}
- private static class getPredefinedData_resultStandardScheme extends StandardScheme<getPredefinedData_result> {
+ private static class getPredefinedData_resultStandardScheme extends org.apache.thrift.scheme.StandardScheme<getPredefinedData_result> {
+ @Override
public void read(org.apache.thrift.protocol.TProtocol iprot, getPredefinedData_result struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
@@ -52830,6 +55518,7 @@ public class SatelliteServer {
struct.validate();
}
+ @Override
public void write(org.apache.thrift.protocol.TProtocol oprot, getPredefinedData_result struct) throws org.apache.thrift.TException {
struct.validate();
@@ -52855,18 +55544,19 @@ public class SatelliteServer {
}
- private static class getPredefinedData_resultTupleSchemeFactory implements SchemeFactory {
+ private static class getPredefinedData_resultTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ @Override
public getPredefinedData_resultTupleScheme getScheme() {
return new getPredefinedData_resultTupleScheme();
}
}
- private static class getPredefinedData_resultTupleScheme extends TupleScheme<getPredefinedData_result> {
+ private static class getPredefinedData_resultTupleScheme extends org.apache.thrift.scheme.TupleScheme<getPredefinedData_result> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, getPredefinedData_result 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.isSetSuccess()) {
optionals.set(0);
}
@@ -52890,8 +55580,8 @@ public class SatelliteServer {
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, getPredefinedData_result struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.success = new PredefinedData();
struct.success.read(iprot);
@@ -52910,6 +55600,9 @@ public class SatelliteServer {
}
}
+ 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();
+ }
}
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteStatus.java b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteStatus.java
index dc94988..59f675e 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteStatus.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteStatus.java
@@ -1,51 +1,21 @@
/**
- * 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 SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus, SatelliteStatus._Fields>, java.io.Serializable, Cloneable, Comparable<SatelliteStatus> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SatelliteStatus");
private static final org.apache.thrift.protocol.TField AVAILABLE_STORAGE_BYTES_FIELD_DESC = new org.apache.thrift.protocol.TField("availableStorageBytes", org.apache.thrift.protocol.TType.I64, (short)1);
private static final org.apache.thrift.protocol.TField SERVER_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("serverTime", org.apache.thrift.protocol.TType.I64, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SatelliteStatusStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SatelliteStatusTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SatelliteStatusStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SatelliteStatusTupleSchemeFactory();
public long availableStorageBytes; // required
public long serverTime; // required
@@ -55,10 +25,10 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
AVAILABLE_STORAGE_BYTES((short)1, "availableStorageBytes"),
SERVER_TIME((short)2, "serverTime");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -66,6 +36,7 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
/**
* 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: // AVAILABLE_STORAGE_BYTES
@@ -83,21 +54,22 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -106,7 +78,7 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -115,14 +87,14 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
private static final int __AVAILABLESTORAGEBYTES_ISSET_ID = 0;
private static final int __SERVERTIME_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.AVAILABLE_STORAGE_BYTES, new org.apache.thrift.meta_data.FieldMetaData("availableStorageBytes", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
tmpMap.put(_Fields.SERVER_TIME, new org.apache.thrift.meta_data.FieldMetaData("serverTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64 , "UnixTimestamp")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SatelliteStatus.class, metaDataMap);
}
@@ -172,16 +144,16 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
}
public void unsetAvailableStorageBytes() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __AVAILABLESTORAGEBYTES_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __AVAILABLESTORAGEBYTES_ISSET_ID);
}
/** Returns true if field availableStorageBytes is set (has been assigned a value) and false otherwise */
public boolean isSetAvailableStorageBytes() {
- return EncodingUtils.testBit(__isset_bitfield, __AVAILABLESTORAGEBYTES_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __AVAILABLESTORAGEBYTES_ISSET_ID);
}
public void setAvailableStorageBytesIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __AVAILABLESTORAGEBYTES_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __AVAILABLESTORAGEBYTES_ISSET_ID, value);
}
public long getServerTime() {
@@ -195,25 +167,25 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
}
public void unsetServerTime() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SERVERTIME_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SERVERTIME_ISSET_ID);
}
/** Returns true if field serverTime is set (has been assigned a value) and false otherwise */
public boolean isSetServerTime() {
- return EncodingUtils.testBit(__isset_bitfield, __SERVERTIME_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SERVERTIME_ISSET_ID);
}
public void setServerTimeIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SERVERTIME_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SERVERTIME_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case AVAILABLE_STORAGE_BYTES:
if (value == null) {
unsetAvailableStorageBytes();
} else {
- setAvailableStorageBytes((Long)value);
+ setAvailableStorageBytes((java.lang.Long)value);
}
break;
@@ -221,14 +193,15 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
if (value == null) {
unsetServerTime();
} else {
- setServerTime((Long)value);
+ setServerTime((java.lang.Long)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case AVAILABLE_STORAGE_BYTES:
return getAvailableStorageBytes();
@@ -237,13 +210,13 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
return getServerTime();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -252,13 +225,11 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
case SERVER_TIME:
return isSetServerTime();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof SatelliteStatus)
return this.equals((SatelliteStatus)that);
return false;
@@ -267,6 +238,8 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
public boolean equals(SatelliteStatus that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_availableStorageBytes = true;
boolean that_present_availableStorageBytes = true;
@@ -291,19 +264,13 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_availableStorageBytes = true;
- list.add(present_availableStorageBytes);
- if (present_availableStorageBytes)
- list.add(availableStorageBytes);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(availableStorageBytes);
- boolean present_serverTime = true;
- list.add(present_serverTime);
- if (present_serverTime)
- list.add(serverTime);
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(serverTime);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -314,7 +281,7 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAvailableStorageBytes()).compareTo(other.isSetAvailableStorageBytes());
+ lastComparison = java.lang.Boolean.compare(isSetAvailableStorageBytes(), other.isSetAvailableStorageBytes());
if (lastComparison != 0) {
return lastComparison;
}
@@ -324,7 +291,7 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerTime()).compareTo(other.isSetServerTime());
+ lastComparison = java.lang.Boolean.compare(isSetServerTime(), other.isSetServerTime());
if (lastComparison != 0) {
return lastComparison;
}
@@ -337,21 +304,22 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SatelliteStatus(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("SatelliteStatus(");
boolean first = true;
sb.append("availableStorageBytes:");
@@ -378,7 +346,7 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -388,13 +356,13 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
}
}
- private static class SatelliteStatusStandardSchemeFactory implements SchemeFactory {
+ private static class SatelliteStatusStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SatelliteStatusStandardScheme getScheme() {
return new SatelliteStatusStandardScheme();
}
}
- private static class SatelliteStatusStandardScheme extends StandardScheme<SatelliteStatus> {
+ private static class SatelliteStatusStandardScheme extends org.apache.thrift.scheme.StandardScheme<SatelliteStatus> {
public void read(org.apache.thrift.protocol.TProtocol iprot, SatelliteStatus struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -449,18 +417,18 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
}
- private static class SatelliteStatusTupleSchemeFactory implements SchemeFactory {
+ private static class SatelliteStatusTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SatelliteStatusTupleScheme getScheme() {
return new SatelliteStatusTupleScheme();
}
}
- private static class SatelliteStatusTupleScheme extends TupleScheme<SatelliteStatus> {
+ private static class SatelliteStatusTupleScheme extends org.apache.thrift.scheme.TupleScheme<SatelliteStatus> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SatelliteStatus 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.isSetAvailableStorageBytes()) {
optionals.set(0);
}
@@ -478,8 +446,8 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SatelliteStatus struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.availableStorageBytes = iprot.readI64();
struct.setAvailableStorageBytesIsSet(true);
@@ -491,5 +459,8 @@ public class SatelliteStatus implements org.apache.thrift.TBase<SatelliteStatus,
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteUserConfig.java b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteUserConfig.java
index c8c4247..30c683b 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteUserConfig.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/SatelliteUserConfig.java
@@ -1,50 +1,20 @@
/**
- * 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 SatelliteUserConfig implements org.apache.thrift.TBase<SatelliteUserConfig, SatelliteUserConfig._Fields>, java.io.Serializable, Cloneable, Comparable<SatelliteUserConfig> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SatelliteUserConfig");
private static final org.apache.thrift.protocol.TField EMAIL_NOTIFICATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("emailNotifications", org.apache.thrift.protocol.TType.BOOL, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SatelliteUserConfigStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SatelliteUserConfigTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SatelliteUserConfigStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SatelliteUserConfigTupleSchemeFactory();
public boolean emailNotifications; // required
@@ -52,10 +22,10 @@ public class SatelliteUserConfig implements org.apache.thrift.TBase<SatelliteUse
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
EMAIL_NOTIFICATIONS((short)1, "emailNotifications");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -63,6 +33,7 @@ public class SatelliteUserConfig implements org.apache.thrift.TBase<SatelliteUse
/**
* 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: // EMAIL_NOTIFICATIONS
@@ -78,21 +49,22 @@ public class SatelliteUserConfig implements org.apache.thrift.TBase<SatelliteUse
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -101,7 +73,7 @@ public class SatelliteUserConfig implements org.apache.thrift.TBase<SatelliteUse
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -109,12 +81,12 @@ public class SatelliteUserConfig implements org.apache.thrift.TBase<SatelliteUse
// isset id assignments
private static final int __EMAILNOTIFICATIONS_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.EMAIL_NOTIFICATIONS, new org.apache.thrift.meta_data.FieldMetaData("emailNotifications", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SatelliteUserConfig.class, metaDataMap);
}
@@ -158,57 +130,56 @@ public class SatelliteUserConfig implements org.apache.thrift.TBase<SatelliteUse
}
public void unsetEmailNotifications() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EMAILNOTIFICATIONS_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __EMAILNOTIFICATIONS_ISSET_ID);
}
/** Returns true if field emailNotifications is set (has been assigned a value) and false otherwise */
public boolean isSetEmailNotifications() {
- return EncodingUtils.testBit(__isset_bitfield, __EMAILNOTIFICATIONS_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __EMAILNOTIFICATIONS_ISSET_ID);
}
public void setEmailNotificationsIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EMAILNOTIFICATIONS_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __EMAILNOTIFICATIONS_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case EMAIL_NOTIFICATIONS:
if (value == null) {
unsetEmailNotifications();
} else {
- setEmailNotifications((Boolean)value);
+ setEmailNotifications((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case EMAIL_NOTIFICATIONS:
return isEmailNotifications();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case EMAIL_NOTIFICATIONS:
return isSetEmailNotifications();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof SatelliteUserConfig)
return this.equals((SatelliteUserConfig)that);
return false;
@@ -217,6 +188,8 @@ public class SatelliteUserConfig implements org.apache.thrift.TBase<SatelliteUse
public boolean equals(SatelliteUserConfig that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_emailNotifications = true;
boolean that_present_emailNotifications = true;
@@ -232,14 +205,11 @@ public class SatelliteUserConfig implements org.apache.thrift.TBase<SatelliteUse
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_emailNotifications = true;
- list.add(present_emailNotifications);
- if (present_emailNotifications)
- list.add(emailNotifications);
+ hashCode = hashCode * 8191 + ((emailNotifications) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -250,7 +220,7 @@ public class SatelliteUserConfig implements org.apache.thrift.TBase<SatelliteUse
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetEmailNotifications()).compareTo(other.isSetEmailNotifications());
+ lastComparison = java.lang.Boolean.compare(isSetEmailNotifications(), other.isSetEmailNotifications());
if (lastComparison != 0) {
return lastComparison;
}
@@ -263,21 +233,22 @@ public class SatelliteUserConfig implements org.apache.thrift.TBase<SatelliteUse
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SatelliteUserConfig(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("SatelliteUserConfig(");
boolean first = true;
sb.append("emailNotifications:");
@@ -300,7 +271,7 @@ public class SatelliteUserConfig implements org.apache.thrift.TBase<SatelliteUse
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -310,13 +281,13 @@ public class SatelliteUserConfig implements org.apache.thrift.TBase<SatelliteUse
}
}
- private static class SatelliteUserConfigStandardSchemeFactory implements SchemeFactory {
+ private static class SatelliteUserConfigStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SatelliteUserConfigStandardScheme getScheme() {
return new SatelliteUserConfigStandardScheme();
}
}
- private static class SatelliteUserConfigStandardScheme extends StandardScheme<SatelliteUserConfig> {
+ private static class SatelliteUserConfigStandardScheme extends org.apache.thrift.scheme.StandardScheme<SatelliteUserConfig> {
public void read(org.apache.thrift.protocol.TProtocol iprot, SatelliteUserConfig struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -360,18 +331,18 @@ public class SatelliteUserConfig implements org.apache.thrift.TBase<SatelliteUse
}
- private static class SatelliteUserConfigTupleSchemeFactory implements SchemeFactory {
+ private static class SatelliteUserConfigTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SatelliteUserConfigTupleScheme getScheme() {
return new SatelliteUserConfigTupleScheme();
}
}
- private static class SatelliteUserConfigTupleScheme extends TupleScheme<SatelliteUserConfig> {
+ private static class SatelliteUserConfigTupleScheme extends org.apache.thrift.scheme.TupleScheme<SatelliteUserConfig> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SatelliteUserConfig 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.isSetEmailNotifications()) {
optionals.set(0);
}
@@ -383,8 +354,8 @@ public class SatelliteUserConfig implements org.apache.thrift.TBase<SatelliteUse
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SatelliteUserConfig struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.emailNotifications = iprot.readBool();
struct.setEmailNotificationsIsSet(true);
@@ -392,5 +363,8 @@ public class SatelliteUserConfig implements org.apache.thrift.TBase<SatelliteUse
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ServerSessionData.java b/src/main/java/org/openslx/bwlp/thrift/iface/ServerSessionData.java
index 5e45328..71b5b2f 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/ServerSessionData.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ServerSessionData.java
@@ -1,61 +1,31 @@
/**
- * 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 ServerSessionData implements org.apache.thrift.TBase<ServerSessionData, ServerSessionData._Fields>, java.io.Serializable, Cloneable, Comparable<ServerSessionData> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ServerSessionData");
private static final org.apache.thrift.protocol.TField SESSION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sessionId", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new ServerSessionDataStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ServerSessionDataTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ServerSessionDataStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ServerSessionDataTupleSchemeFactory();
- public String sessionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String sessionId; // 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 {
SESSION_ID((short)1, "sessionId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -63,6 +33,7 @@ public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionD
/**
* 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: // SESSION_ID
@@ -78,21 +49,22 @@ public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionD
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -101,18 +73,18 @@ public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionD
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ServerSessionData.class, metaDataMap);
}
@@ -120,7 +92,7 @@ public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionD
}
public ServerSessionData(
- String sessionId)
+ java.lang.String sessionId)
{
this();
this.sessionId = sessionId;
@@ -144,11 +116,12 @@ public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionD
this.sessionId = null;
}
- public String getSessionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getSessionId() {
return this.sessionId;
}
- public ServerSessionData setSessionId(String sessionId) {
+ public ServerSessionData setSessionId(@org.apache.thrift.annotation.Nullable java.lang.String sessionId) {
this.sessionId = sessionId;
return this;
}
@@ -168,45 +141,44 @@ public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionD
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SESSION_ID:
if (value == null) {
unsetSessionId();
} else {
- setSessionId((String)value);
+ setSessionId((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_ID:
return getSessionId();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SESSION_ID:
return isSetSessionId();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof ServerSessionData)
return this.equals((ServerSessionData)that);
return false;
@@ -215,6 +187,8 @@ public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionD
public boolean equals(ServerSessionData that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_sessionId = true && this.isSetSessionId();
boolean that_present_sessionId = true && that.isSetSessionId();
@@ -230,14 +204,13 @@ public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionD
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_sessionId = true && (isSetSessionId());
- list.add(present_sessionId);
- if (present_sessionId)
- list.add(sessionId);
+ hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287);
+ if (isSetSessionId())
+ hashCode = hashCode * 8191 + sessionId.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -248,7 +221,7 @@ public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionD
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
+ lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -261,21 +234,22 @@ public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionD
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("ServerSessionData(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("ServerSessionData(");
boolean first = true;
sb.append("sessionId:");
@@ -302,7 +276,7 @@ public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionD
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -310,13 +284,13 @@ public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionD
}
}
- private static class ServerSessionDataStandardSchemeFactory implements SchemeFactory {
+ private static class ServerSessionDataStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ServerSessionDataStandardScheme getScheme() {
return new ServerSessionDataStandardScheme();
}
}
- private static class ServerSessionDataStandardScheme extends StandardScheme<ServerSessionData> {
+ private static class ServerSessionDataStandardScheme extends org.apache.thrift.scheme.StandardScheme<ServerSessionData> {
public void read(org.apache.thrift.protocol.TProtocol iprot, ServerSessionData struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -362,18 +336,18 @@ public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionD
}
- private static class ServerSessionDataTupleSchemeFactory implements SchemeFactory {
+ private static class ServerSessionDataTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ServerSessionDataTupleScheme getScheme() {
return new ServerSessionDataTupleScheme();
}
}
- private static class ServerSessionDataTupleScheme extends TupleScheme<ServerSessionData> {
+ private static class ServerSessionDataTupleScheme extends org.apache.thrift.scheme.TupleScheme<ServerSessionData> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, ServerSessionData 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.isSetSessionId()) {
optionals.set(0);
}
@@ -385,8 +359,8 @@ public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionD
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, ServerSessionData struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.sessionId = iprot.readString();
struct.setSessionIdIsSet(true);
@@ -394,5 +368,8 @@ public class ServerSessionData implements org.apache.thrift.TBase<ServerSessionD
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/SessionData.java b/src/main/java/org/openslx/bwlp/thrift/iface/SessionData.java
index 838b5d2..151f04e 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/SessionData.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/SessionData.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 SessionData implements org.apache.thrift.TBase<SessionData, SessionData._Fields>, java.io.Serializable, Cloneable, Comparable<SessionData> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SessionData");
@@ -42,15 +15,12 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
private static final org.apache.thrift.protocol.TField AUTH_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authToken", org.apache.thrift.protocol.TType.STRING, (short)2);
private static final org.apache.thrift.protocol.TField SERVER_ADDRESS_FIELD_DESC = new org.apache.thrift.protocol.TField("serverAddress", org.apache.thrift.protocol.TType.STRING, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new SessionDataStandardSchemeFactory());
- schemes.put(TupleScheme.class, new SessionDataTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new SessionDataStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new SessionDataTupleSchemeFactory();
- public String sessionId; // required
- public String authToken; // required
- public String serverAddress; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String sessionId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String authToken; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String serverAddress; // 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 {
@@ -58,10 +28,10 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
AUTH_TOKEN((short)2, "authToken"),
SERVER_ADDRESS((short)3, "serverAddress");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -69,6 +39,7 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
/**
* 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: // SESSION_ID
@@ -88,21 +59,22 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -111,22 +83,22 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.AUTH_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authToken", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.SERVER_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("serverAddress", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SessionData.class, metaDataMap);
}
@@ -134,9 +106,9 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
}
public SessionData(
- String sessionId,
- String authToken,
- String serverAddress)
+ java.lang.String sessionId,
+ java.lang.String authToken,
+ java.lang.String serverAddress)
{
this();
this.sessionId = sessionId;
@@ -170,11 +142,12 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
this.serverAddress = null;
}
- public String getSessionId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getSessionId() {
return this.sessionId;
}
- public SessionData setSessionId(String sessionId) {
+ public SessionData setSessionId(@org.apache.thrift.annotation.Nullable java.lang.String sessionId) {
this.sessionId = sessionId;
return this;
}
@@ -194,11 +167,12 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
}
}
- public String getAuthToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getAuthToken() {
return this.authToken;
}
- public SessionData setAuthToken(String authToken) {
+ public SessionData setAuthToken(@org.apache.thrift.annotation.Nullable java.lang.String authToken) {
this.authToken = authToken;
return this;
}
@@ -218,11 +192,12 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
}
}
- public String getServerAddress() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getServerAddress() {
return this.serverAddress;
}
- public SessionData setServerAddress(String serverAddress) {
+ public SessionData setServerAddress(@org.apache.thrift.annotation.Nullable java.lang.String serverAddress) {
this.serverAddress = serverAddress;
return this;
}
@@ -242,13 +217,13 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SESSION_ID:
if (value == null) {
unsetSessionId();
} else {
- setSessionId((String)value);
+ setSessionId((java.lang.String)value);
}
break;
@@ -256,7 +231,7 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
if (value == null) {
unsetAuthToken();
} else {
- setAuthToken((String)value);
+ setAuthToken((java.lang.String)value);
}
break;
@@ -264,14 +239,15 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
if (value == null) {
unsetServerAddress();
} else {
- setServerAddress((String)value);
+ setServerAddress((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SESSION_ID:
return getSessionId();
@@ -283,13 +259,13 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
return getServerAddress();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -300,13 +276,11 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
case SERVER_ADDRESS:
return isSetServerAddress();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof SessionData)
return this.equals((SessionData)that);
return false;
@@ -315,6 +289,8 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
public boolean equals(SessionData that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_sessionId = true && this.isSetSessionId();
boolean that_present_sessionId = true && that.isSetSessionId();
@@ -348,24 +324,21 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_sessionId = true && (isSetSessionId());
- list.add(present_sessionId);
- if (present_sessionId)
- list.add(sessionId);
+ hashCode = hashCode * 8191 + ((isSetSessionId()) ? 131071 : 524287);
+ if (isSetSessionId())
+ hashCode = hashCode * 8191 + sessionId.hashCode();
- boolean present_authToken = true && (isSetAuthToken());
- list.add(present_authToken);
- if (present_authToken)
- list.add(authToken);
+ hashCode = hashCode * 8191 + ((isSetAuthToken()) ? 131071 : 524287);
+ if (isSetAuthToken())
+ hashCode = hashCode * 8191 + authToken.hashCode();
- boolean present_serverAddress = true && (isSetServerAddress());
- list.add(present_serverAddress);
- if (present_serverAddress)
- list.add(serverAddress);
+ hashCode = hashCode * 8191 + ((isSetServerAddress()) ? 131071 : 524287);
+ if (isSetServerAddress())
+ hashCode = hashCode * 8191 + serverAddress.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -376,7 +349,7 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(other.isSetSessionId());
+ lastComparison = java.lang.Boolean.compare(isSetSessionId(), other.isSetSessionId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -386,7 +359,7 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAuthToken()).compareTo(other.isSetAuthToken());
+ lastComparison = java.lang.Boolean.compare(isSetAuthToken(), other.isSetAuthToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -396,7 +369,7 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetServerAddress()).compareTo(other.isSetServerAddress());
+ lastComparison = java.lang.Boolean.compare(isSetServerAddress(), other.isSetServerAddress());
if (lastComparison != 0) {
return lastComparison;
}
@@ -409,21 +382,22 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("SessionData(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("SessionData(");
boolean first = true;
sb.append("sessionId:");
@@ -466,7 +440,7 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -474,13 +448,13 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
}
}
- private static class SessionDataStandardSchemeFactory implements SchemeFactory {
+ private static class SessionDataStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SessionDataStandardScheme getScheme() {
return new SessionDataStandardScheme();
}
}
- private static class SessionDataStandardScheme extends StandardScheme<SessionData> {
+ private static class SessionDataStandardScheme extends org.apache.thrift.scheme.StandardScheme<SessionData> {
public void read(org.apache.thrift.protocol.TProtocol iprot, SessionData struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -552,18 +526,18 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
}
- private static class SessionDataTupleSchemeFactory implements SchemeFactory {
+ private static class SessionDataTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public SessionDataTupleScheme getScheme() {
return new SessionDataTupleScheme();
}
}
- private static class SessionDataTupleScheme extends TupleScheme<SessionData> {
+ private static class SessionDataTupleScheme extends org.apache.thrift.scheme.TupleScheme<SessionData> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, SessionData 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.isSetSessionId()) {
optionals.set(0);
}
@@ -587,8 +561,8 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, SessionData struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.sessionId = iprot.readString();
struct.setSessionIdIsSet(true);
@@ -604,5 +578,8 @@ public class SessionData implements org.apache.thrift.TBase<SessionData, Session
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/ShareMode.java b/src/main/java/org/openslx/bwlp/thrift/iface/ShareMode.java
index 3774f9d..c57583a 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/ShareMode.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/ShareMode.java
@@ -1,5 +1,5 @@
/**
- * 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
@@ -7,10 +7,7 @@
package org.openslx.bwlp.thrift.iface;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public enum ShareMode implements org.apache.thrift.TEnum {
LOCAL(0),
PUBLISH(1),
@@ -34,6 +31,7 @@ public enum ShareMode implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static ShareMode findByValue(int value) {
switch (value) {
case 0:
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/SscMode.java b/src/main/java/org/openslx/bwlp/thrift/iface/SscMode.java
index dae1b41..01a0c5c 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/SscMode.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/SscMode.java
@@ -1,5 +1,5 @@
/**
- * 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
@@ -7,10 +7,7 @@
package org.openslx.bwlp.thrift.iface;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public enum SscMode implements org.apache.thrift.TEnum {
OFF(0),
ON(1),
@@ -34,6 +31,7 @@ public enum SscMode implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static SscMode findByValue(int value) {
switch (value) {
case 0:
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/TAuthorizationException.java b/src/main/java/org/openslx/bwlp/thrift/iface/TAuthorizationException.java
index 91cce5a..5351640 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/TAuthorizationException.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/TAuthorizationException.java
@@ -1,58 +1,28 @@
/**
- * 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")
-public class TAuthorizationException extends TException implements org.apache.thrift.TBase<TAuthorizationException, TAuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<TAuthorizationException> {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
+public class TAuthorizationException extends org.apache.thrift.TException implements org.apache.thrift.TBase<TAuthorizationException, TAuthorizationException._Fields>, java.io.Serializable, Cloneable, Comparable<TAuthorizationException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TAuthorizationException");
private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TAuthorizationExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TAuthorizationExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TAuthorizationExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TAuthorizationExceptionTupleSchemeFactory();
/**
*
* @see AuthorizationError
*/
- public AuthorizationError number; // required
- public String message; // required
+ public @org.apache.thrift.annotation.Nullable AuthorizationError number; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String message; // 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 {
@@ -63,10 +33,10 @@ public class TAuthorizationException extends TException implements org.apache.th
NUMBER((short)1, "number"),
MESSAGE((short)2, "message");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -74,6 +44,7 @@ public class TAuthorizationException extends TException implements org.apache.th
/**
* 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: // NUMBER
@@ -91,21 +62,22 @@ public class TAuthorizationException extends TException implements org.apache.th
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -114,20 +86,20 @@ public class TAuthorizationException extends TException implements org.apache.th
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.NUMBER, new org.apache.thrift.meta_data.FieldMetaData("number", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, AuthorizationError.class)));
tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TAuthorizationException.class, metaDataMap);
}
@@ -136,7 +108,7 @@ public class TAuthorizationException extends TException implements org.apache.th
public TAuthorizationException(
AuthorizationError number,
- String message)
+ java.lang.String message)
{
this();
this.number = number;
@@ -169,6 +141,7 @@ public class TAuthorizationException extends TException implements org.apache.th
*
* @see AuthorizationError
*/
+ @org.apache.thrift.annotation.Nullable
public AuthorizationError getNumber() {
return this.number;
}
@@ -177,7 +150,7 @@ public class TAuthorizationException extends TException implements org.apache.th
*
* @see AuthorizationError
*/
- public TAuthorizationException setNumber(AuthorizationError number) {
+ public TAuthorizationException setNumber(@org.apache.thrift.annotation.Nullable AuthorizationError number) {
this.number = number;
return this;
}
@@ -197,11 +170,12 @@ public class TAuthorizationException extends TException implements org.apache.th
}
}
- public String getMessage() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getMessage() {
return this.message;
}
- public TAuthorizationException setMessage(String message) {
+ public TAuthorizationException setMessage(@org.apache.thrift.annotation.Nullable java.lang.String message) {
this.message = message;
return this;
}
@@ -221,7 +195,7 @@ public class TAuthorizationException extends TException implements org.apache.th
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case NUMBER:
if (value == null) {
@@ -235,14 +209,15 @@ public class TAuthorizationException extends TException implements org.apache.th
if (value == null) {
unsetMessage();
} else {
- setMessage((String)value);
+ setMessage((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NUMBER:
return getNumber();
@@ -251,13 +226,13 @@ public class TAuthorizationException extends TException implements org.apache.th
return getMessage();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -266,13 +241,11 @@ public class TAuthorizationException extends TException implements org.apache.th
case MESSAGE:
return isSetMessage();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof TAuthorizationException)
return this.equals((TAuthorizationException)that);
return false;
@@ -281,6 +254,8 @@ public class TAuthorizationException extends TException implements org.apache.th
public boolean equals(TAuthorizationException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_number = true && this.isSetNumber();
boolean that_present_number = true && that.isSetNumber();
@@ -305,19 +280,17 @@ public class TAuthorizationException extends TException implements org.apache.th
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_number = true && (isSetNumber());
- list.add(present_number);
- if (present_number)
- list.add(number.getValue());
+ hashCode = hashCode * 8191 + ((isSetNumber()) ? 131071 : 524287);
+ if (isSetNumber())
+ hashCode = hashCode * 8191 + number.getValue();
- boolean present_message = true && (isSetMessage());
- list.add(present_message);
- if (present_message)
- list.add(message);
+ hashCode = hashCode * 8191 + ((isSetMessage()) ? 131071 : 524287);
+ if (isSetMessage())
+ hashCode = hashCode * 8191 + message.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -328,7 +301,7 @@ public class TAuthorizationException extends TException implements org.apache.th
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber());
+ lastComparison = java.lang.Boolean.compare(isSetNumber(), other.isSetNumber());
if (lastComparison != 0) {
return lastComparison;
}
@@ -338,7 +311,7 @@ public class TAuthorizationException extends TException implements org.apache.th
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ lastComparison = java.lang.Boolean.compare(isSetMessage(), other.isSetMessage());
if (lastComparison != 0) {
return lastComparison;
}
@@ -351,21 +324,22 @@ public class TAuthorizationException extends TException implements org.apache.th
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TAuthorizationException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TAuthorizationException(");
boolean first = true;
sb.append("number:");
@@ -400,7 +374,7 @@ public class TAuthorizationException extends TException implements org.apache.th
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -408,13 +382,13 @@ public class TAuthorizationException extends TException implements org.apache.th
}
}
- private static class TAuthorizationExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class TAuthorizationExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TAuthorizationExceptionStandardScheme getScheme() {
return new TAuthorizationExceptionStandardScheme();
}
}
- private static class TAuthorizationExceptionStandardScheme extends StandardScheme<TAuthorizationException> {
+ private static class TAuthorizationExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TAuthorizationException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TAuthorizationException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -473,18 +447,18 @@ public class TAuthorizationException extends TException implements org.apache.th
}
- private static class TAuthorizationExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class TAuthorizationExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TAuthorizationExceptionTupleScheme getScheme() {
return new TAuthorizationExceptionTupleScheme();
}
}
- private static class TAuthorizationExceptionTupleScheme extends TupleScheme<TAuthorizationException> {
+ private static class TAuthorizationExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TAuthorizationException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TAuthorizationException 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.isSetNumber()) {
optionals.set(0);
}
@@ -502,8 +476,8 @@ public class TAuthorizationException extends TException implements org.apache.th
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TAuthorizationException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.number = org.openslx.bwlp.thrift.iface.AuthorizationError.findByValue(iprot.readI32());
struct.setNumberIsSet(true);
@@ -515,5 +489,8 @@ public class TAuthorizationException extends TException implements org.apache.th
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/TInvalidDateParam.java b/src/main/java/org/openslx/bwlp/thrift/iface/TInvalidDateParam.java
index 4e01fbb..a168994 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/TInvalidDateParam.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/TInvalidDateParam.java
@@ -1,58 +1,28 @@
/**
- * 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")
-public class TInvalidDateParam extends TException implements org.apache.thrift.TBase<TInvalidDateParam, TInvalidDateParam._Fields>, java.io.Serializable, Cloneable, Comparable<TInvalidDateParam> {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
+public class TInvalidDateParam extends org.apache.thrift.TException implements org.apache.thrift.TBase<TInvalidDateParam, TInvalidDateParam._Fields>, java.io.Serializable, Cloneable, Comparable<TInvalidDateParam> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TInvalidDateParam");
private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TInvalidDateParamStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TInvalidDateParamTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TInvalidDateParamStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TInvalidDateParamTupleSchemeFactory();
/**
*
* @see DateParamError
*/
- public DateParamError number; // required
- public String message; // required
+ public @org.apache.thrift.annotation.Nullable DateParamError number; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String message; // 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 {
@@ -63,10 +33,10 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
NUMBER((short)1, "number"),
MESSAGE((short)2, "message");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -74,6 +44,7 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
/**
* 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: // NUMBER
@@ -91,21 +62,22 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -114,20 +86,20 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.NUMBER, new org.apache.thrift.meta_data.FieldMetaData("number", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, DateParamError.class)));
tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TInvalidDateParam.class, metaDataMap);
}
@@ -136,7 +108,7 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
public TInvalidDateParam(
DateParamError number,
- String message)
+ java.lang.String message)
{
this();
this.number = number;
@@ -169,6 +141,7 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
*
* @see DateParamError
*/
+ @org.apache.thrift.annotation.Nullable
public DateParamError getNumber() {
return this.number;
}
@@ -177,7 +150,7 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
*
* @see DateParamError
*/
- public TInvalidDateParam setNumber(DateParamError number) {
+ public TInvalidDateParam setNumber(@org.apache.thrift.annotation.Nullable DateParamError number) {
this.number = number;
return this;
}
@@ -197,11 +170,12 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
}
}
- public String getMessage() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getMessage() {
return this.message;
}
- public TInvalidDateParam setMessage(String message) {
+ public TInvalidDateParam setMessage(@org.apache.thrift.annotation.Nullable java.lang.String message) {
this.message = message;
return this;
}
@@ -221,7 +195,7 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case NUMBER:
if (value == null) {
@@ -235,14 +209,15 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
if (value == null) {
unsetMessage();
} else {
- setMessage((String)value);
+ setMessage((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NUMBER:
return getNumber();
@@ -251,13 +226,13 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
return getMessage();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -266,13 +241,11 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
case MESSAGE:
return isSetMessage();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof TInvalidDateParam)
return this.equals((TInvalidDateParam)that);
return false;
@@ -281,6 +254,8 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
public boolean equals(TInvalidDateParam that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_number = true && this.isSetNumber();
boolean that_present_number = true && that.isSetNumber();
@@ -305,19 +280,17 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_number = true && (isSetNumber());
- list.add(present_number);
- if (present_number)
- list.add(number.getValue());
+ hashCode = hashCode * 8191 + ((isSetNumber()) ? 131071 : 524287);
+ if (isSetNumber())
+ hashCode = hashCode * 8191 + number.getValue();
- boolean present_message = true && (isSetMessage());
- list.add(present_message);
- if (present_message)
- list.add(message);
+ hashCode = hashCode * 8191 + ((isSetMessage()) ? 131071 : 524287);
+ if (isSetMessage())
+ hashCode = hashCode * 8191 + message.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -328,7 +301,7 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber());
+ lastComparison = java.lang.Boolean.compare(isSetNumber(), other.isSetNumber());
if (lastComparison != 0) {
return lastComparison;
}
@@ -338,7 +311,7 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ lastComparison = java.lang.Boolean.compare(isSetMessage(), other.isSetMessage());
if (lastComparison != 0) {
return lastComparison;
}
@@ -351,21 +324,22 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TInvalidDateParam(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TInvalidDateParam(");
boolean first = true;
sb.append("number:");
@@ -400,7 +374,7 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -408,13 +382,13 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
}
}
- private static class TInvalidDateParamStandardSchemeFactory implements SchemeFactory {
+ private static class TInvalidDateParamStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TInvalidDateParamStandardScheme getScheme() {
return new TInvalidDateParamStandardScheme();
}
}
- private static class TInvalidDateParamStandardScheme extends StandardScheme<TInvalidDateParam> {
+ private static class TInvalidDateParamStandardScheme extends org.apache.thrift.scheme.StandardScheme<TInvalidDateParam> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TInvalidDateParam struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -473,18 +447,18 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
}
- private static class TInvalidDateParamTupleSchemeFactory implements SchemeFactory {
+ private static class TInvalidDateParamTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TInvalidDateParamTupleScheme getScheme() {
return new TInvalidDateParamTupleScheme();
}
}
- private static class TInvalidDateParamTupleScheme extends TupleScheme<TInvalidDateParam> {
+ private static class TInvalidDateParamTupleScheme extends org.apache.thrift.scheme.TupleScheme<TInvalidDateParam> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TInvalidDateParam 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.isSetNumber()) {
optionals.set(0);
}
@@ -502,8 +476,8 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TInvalidDateParam struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.number = org.openslx.bwlp.thrift.iface.DateParamError.findByValue(iprot.readI32());
struct.setNumberIsSet(true);
@@ -515,5 +489,8 @@ public class TInvalidDateParam extends TException implements org.apache.thrift.T
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/TInvalidTokenException.java b/src/main/java/org/openslx/bwlp/thrift/iface/TInvalidTokenException.java
index 0893444..cd8b66d 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/TInvalidTokenException.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/TInvalidTokenException.java
@@ -1,59 +1,29 @@
/**
- * 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")
-public class TInvalidTokenException extends TException implements org.apache.thrift.TBase<TInvalidTokenException, TInvalidTokenException._Fields>, java.io.Serializable, Cloneable, Comparable<TInvalidTokenException> {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
+public class TInvalidTokenException extends org.apache.thrift.TException implements org.apache.thrift.TBase<TInvalidTokenException, TInvalidTokenException._Fields>, java.io.Serializable, Cloneable, Comparable<TInvalidTokenException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TInvalidTokenException");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TInvalidTokenExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TInvalidTokenExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TInvalidTokenExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TInvalidTokenExceptionTupleSchemeFactory();
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -61,6 +31,7 @@ public class TInvalidTokenException extends TException implements org.apache.thr
/**
* 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) {
default:
@@ -74,21 +45,22 @@ public class TInvalidTokenException extends TException implements org.apache.thr
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -97,14 +69,14 @@ public class TInvalidTokenException extends TException implements org.apache.thr
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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);
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TInvalidTokenException.class, metaDataMap);
}
@@ -125,32 +97,31 @@ public class TInvalidTokenException extends TException implements org.apache.thr
public void clear() {
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof TInvalidTokenException)
return this.equals((TInvalidTokenException)that);
return false;
@@ -159,15 +130,17 @@ public class TInvalidTokenException extends TException implements org.apache.thr
public boolean equals(TInvalidTokenException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
return true;
}
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -181,21 +154,22 @@ public class TInvalidTokenException extends TException implements org.apache.thr
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TInvalidTokenException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TInvalidTokenException(");
boolean first = true;
sb.append(")");
@@ -215,7 +189,7 @@ public class TInvalidTokenException extends TException implements org.apache.thr
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -223,13 +197,13 @@ public class TInvalidTokenException extends TException implements org.apache.thr
}
}
- private static class TInvalidTokenExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class TInvalidTokenExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TInvalidTokenExceptionStandardScheme getScheme() {
return new TInvalidTokenExceptionStandardScheme();
}
}
- private static class TInvalidTokenExceptionStandardScheme extends StandardScheme<TInvalidTokenException> {
+ private static class TInvalidTokenExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TInvalidTokenException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TInvalidTokenException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -262,24 +236,27 @@ public class TInvalidTokenException extends TException implements org.apache.thr
}
- private static class TInvalidTokenExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class TInvalidTokenExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TInvalidTokenExceptionTupleScheme getScheme() {
return new TInvalidTokenExceptionTupleScheme();
}
}
- private static class TInvalidTokenExceptionTupleScheme extends TupleScheme<TInvalidTokenException> {
+ private static class TInvalidTokenExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TInvalidTokenException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TInvalidTokenException struct) throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TInvalidTokenException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/TInvocationException.java b/src/main/java/org/openslx/bwlp/thrift/iface/TInvocationException.java
index 3ea824b..da821f1 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/TInvocationException.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/TInvocationException.java
@@ -1,58 +1,28 @@
/**
- * 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")
-public class TInvocationException extends TException implements org.apache.thrift.TBase<TInvocationException, TInvocationException._Fields>, java.io.Serializable, Cloneable, Comparable<TInvocationException> {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
+public class TInvocationException extends org.apache.thrift.TException implements org.apache.thrift.TBase<TInvocationException, TInvocationException._Fields>, java.io.Serializable, Cloneable, Comparable<TInvocationException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TInvocationException");
private static final org.apache.thrift.protocol.TField NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("number", org.apache.thrift.protocol.TType.I32, (short)1);
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TInvocationExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TInvocationExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TInvocationExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TInvocationExceptionTupleSchemeFactory();
/**
*
* @see InvocationError
*/
- public InvocationError number; // required
- public String message; // required
+ public @org.apache.thrift.annotation.Nullable InvocationError number; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String message; // 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 {
@@ -63,10 +33,10 @@ public class TInvocationException extends TException implements org.apache.thrif
NUMBER((short)1, "number"),
MESSAGE((short)2, "message");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -74,6 +44,7 @@ public class TInvocationException extends TException implements org.apache.thrif
/**
* 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: // NUMBER
@@ -91,21 +62,22 @@ public class TInvocationException extends TException implements org.apache.thrif
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -114,20 +86,20 @@ public class TInvocationException extends TException implements org.apache.thrif
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.NUMBER, new org.apache.thrift.meta_data.FieldMetaData("number", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, InvocationError.class)));
tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TInvocationException.class, metaDataMap);
}
@@ -136,7 +108,7 @@ public class TInvocationException extends TException implements org.apache.thrif
public TInvocationException(
InvocationError number,
- String message)
+ java.lang.String message)
{
this();
this.number = number;
@@ -169,6 +141,7 @@ public class TInvocationException extends TException implements org.apache.thrif
*
* @see InvocationError
*/
+ @org.apache.thrift.annotation.Nullable
public InvocationError getNumber() {
return this.number;
}
@@ -177,7 +150,7 @@ public class TInvocationException extends TException implements org.apache.thrif
*
* @see InvocationError
*/
- public TInvocationException setNumber(InvocationError number) {
+ public TInvocationException setNumber(@org.apache.thrift.annotation.Nullable InvocationError number) {
this.number = number;
return this;
}
@@ -197,11 +170,12 @@ public class TInvocationException extends TException implements org.apache.thrif
}
}
- public String getMessage() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getMessage() {
return this.message;
}
- public TInvocationException setMessage(String message) {
+ public TInvocationException setMessage(@org.apache.thrift.annotation.Nullable java.lang.String message) {
this.message = message;
return this;
}
@@ -221,7 +195,7 @@ public class TInvocationException extends TException implements org.apache.thrif
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case NUMBER:
if (value == null) {
@@ -235,14 +209,15 @@ public class TInvocationException extends TException implements org.apache.thrif
if (value == null) {
unsetMessage();
} else {
- setMessage((String)value);
+ setMessage((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case NUMBER:
return getNumber();
@@ -251,13 +226,13 @@ public class TInvocationException extends TException implements org.apache.thrif
return getMessage();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -266,13 +241,11 @@ public class TInvocationException extends TException implements org.apache.thrif
case MESSAGE:
return isSetMessage();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof TInvocationException)
return this.equals((TInvocationException)that);
return false;
@@ -281,6 +254,8 @@ public class TInvocationException extends TException implements org.apache.thrif
public boolean equals(TInvocationException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_number = true && this.isSetNumber();
boolean that_present_number = true && that.isSetNumber();
@@ -305,19 +280,17 @@ public class TInvocationException extends TException implements org.apache.thrif
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_number = true && (isSetNumber());
- list.add(present_number);
- if (present_number)
- list.add(number.getValue());
+ hashCode = hashCode * 8191 + ((isSetNumber()) ? 131071 : 524287);
+ if (isSetNumber())
+ hashCode = hashCode * 8191 + number.getValue();
- boolean present_message = true && (isSetMessage());
- list.add(present_message);
- if (present_message)
- list.add(message);
+ hashCode = hashCode * 8191 + ((isSetMessage()) ? 131071 : 524287);
+ if (isSetMessage())
+ hashCode = hashCode * 8191 + message.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -328,7 +301,7 @@ public class TInvocationException extends TException implements org.apache.thrif
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetNumber()).compareTo(other.isSetNumber());
+ lastComparison = java.lang.Boolean.compare(isSetNumber(), other.isSetNumber());
if (lastComparison != 0) {
return lastComparison;
}
@@ -338,7 +311,7 @@ public class TInvocationException extends TException implements org.apache.thrif
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ lastComparison = java.lang.Boolean.compare(isSetMessage(), other.isSetMessage());
if (lastComparison != 0) {
return lastComparison;
}
@@ -351,21 +324,22 @@ public class TInvocationException extends TException implements org.apache.thrif
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TInvocationException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TInvocationException(");
boolean first = true;
sb.append("number:");
@@ -400,7 +374,7 @@ public class TInvocationException extends TException implements org.apache.thrif
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -408,13 +382,13 @@ public class TInvocationException extends TException implements org.apache.thrif
}
}
- private static class TInvocationExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class TInvocationExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TInvocationExceptionStandardScheme getScheme() {
return new TInvocationExceptionStandardScheme();
}
}
- private static class TInvocationExceptionStandardScheme extends StandardScheme<TInvocationException> {
+ private static class TInvocationExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TInvocationException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TInvocationException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -473,18 +447,18 @@ public class TInvocationException extends TException implements org.apache.thrif
}
- private static class TInvocationExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class TInvocationExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TInvocationExceptionTupleScheme getScheme() {
return new TInvocationExceptionTupleScheme();
}
}
- private static class TInvocationExceptionTupleScheme extends TupleScheme<TInvocationException> {
+ private static class TInvocationExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TInvocationException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TInvocationException 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.isSetNumber()) {
optionals.set(0);
}
@@ -502,8 +476,8 @@ public class TInvocationException extends TException implements org.apache.thrif
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TInvocationException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.number = org.openslx.bwlp.thrift.iface.InvocationError.findByValue(iprot.readI32());
struct.setNumberIsSet(true);
@@ -515,5 +489,8 @@ public class TInvocationException extends TException implements org.apache.thrif
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/TNotFoundException.java b/src/main/java/org/openslx/bwlp/thrift/iface/TNotFoundException.java
index 46776e8..b9ae5eb 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/TNotFoundException.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/TNotFoundException.java
@@ -1,61 +1,31 @@
/**
- * 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")
-public class TNotFoundException extends TException implements org.apache.thrift.TBase<TNotFoundException, TNotFoundException._Fields>, java.io.Serializable, Cloneable, Comparable<TNotFoundException> {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
+public class TNotFoundException extends org.apache.thrift.TException implements org.apache.thrift.TBase<TNotFoundException, TNotFoundException._Fields>, java.io.Serializable, Cloneable, Comparable<TNotFoundException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TNotFoundException");
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TNotFoundExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TNotFoundExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TNotFoundExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TNotFoundExceptionTupleSchemeFactory();
- public String message; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String message; // 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 {
MESSAGE((short)1, "message");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -63,6 +33,7 @@ public class TNotFoundException extends TException implements org.apache.thrift.
/**
* 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: // MESSAGE
@@ -78,21 +49,22 @@ public class TNotFoundException extends TException implements org.apache.thrift.
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -101,18 +73,18 @@ public class TNotFoundException extends TException implements org.apache.thrift.
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TNotFoundException.class, metaDataMap);
}
@@ -120,7 +92,7 @@ public class TNotFoundException extends TException implements org.apache.thrift.
}
public TNotFoundException(
- String message)
+ java.lang.String message)
{
this();
this.message = message;
@@ -144,11 +116,12 @@ public class TNotFoundException extends TException implements org.apache.thrift.
this.message = null;
}
- public String getMessage() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getMessage() {
return this.message;
}
- public TNotFoundException setMessage(String message) {
+ public TNotFoundException setMessage(@org.apache.thrift.annotation.Nullable java.lang.String message) {
this.message = message;
return this;
}
@@ -168,45 +141,44 @@ public class TNotFoundException extends TException implements org.apache.thrift.
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case MESSAGE:
if (value == null) {
unsetMessage();
} else {
- setMessage((String)value);
+ setMessage((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MESSAGE:
return getMessage();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MESSAGE:
return isSetMessage();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof TNotFoundException)
return this.equals((TNotFoundException)that);
return false;
@@ -215,6 +187,8 @@ public class TNotFoundException extends TException implements org.apache.thrift.
public boolean equals(TNotFoundException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_message = true && this.isSetMessage();
boolean that_present_message = true && that.isSetMessage();
@@ -230,14 +204,13 @@ public class TNotFoundException extends TException implements org.apache.thrift.
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_message = true && (isSetMessage());
- list.add(present_message);
- if (present_message)
- list.add(message);
+ hashCode = hashCode * 8191 + ((isSetMessage()) ? 131071 : 524287);
+ if (isSetMessage())
+ hashCode = hashCode * 8191 + message.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -248,7 +221,7 @@ public class TNotFoundException extends TException implements org.apache.thrift.
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ lastComparison = java.lang.Boolean.compare(isSetMessage(), other.isSetMessage());
if (lastComparison != 0) {
return lastComparison;
}
@@ -261,21 +234,22 @@ public class TNotFoundException extends TException implements org.apache.thrift.
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TNotFoundException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TNotFoundException(");
boolean first = true;
sb.append("message:");
@@ -302,7 +276,7 @@ public class TNotFoundException extends TException implements org.apache.thrift.
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -310,13 +284,13 @@ public class TNotFoundException extends TException implements org.apache.thrift.
}
}
- private static class TNotFoundExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class TNotFoundExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TNotFoundExceptionStandardScheme getScheme() {
return new TNotFoundExceptionStandardScheme();
}
}
- private static class TNotFoundExceptionStandardScheme extends StandardScheme<TNotFoundException> {
+ private static class TNotFoundExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TNotFoundException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TNotFoundException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -362,18 +336,18 @@ public class TNotFoundException extends TException implements org.apache.thrift.
}
- private static class TNotFoundExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class TNotFoundExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TNotFoundExceptionTupleScheme getScheme() {
return new TNotFoundExceptionTupleScheme();
}
}
- private static class TNotFoundExceptionTupleScheme extends TupleScheme<TNotFoundException> {
+ private static class TNotFoundExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TNotFoundException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TNotFoundException 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.isSetMessage()) {
optionals.set(0);
}
@@ -385,8 +359,8 @@ public class TNotFoundException extends TException implements org.apache.thrift.
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TNotFoundException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.message = iprot.readString();
struct.setMessageIsSet(true);
@@ -394,5 +368,8 @@ public class TNotFoundException extends TException implements org.apache.thrift.
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/TTransferRejectedException.java b/src/main/java/org/openslx/bwlp/thrift/iface/TTransferRejectedException.java
index 4ff27b2..441bc8d 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/TTransferRejectedException.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/TTransferRejectedException.java
@@ -1,61 +1,31 @@
/**
- * 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")
-public class TTransferRejectedException extends TException implements org.apache.thrift.TBase<TTransferRejectedException, TTransferRejectedException._Fields>, java.io.Serializable, Cloneable, Comparable<TTransferRejectedException> {
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
+public class TTransferRejectedException extends org.apache.thrift.TException implements org.apache.thrift.TBase<TTransferRejectedException, TTransferRejectedException._Fields>, java.io.Serializable, Cloneable, Comparable<TTransferRejectedException> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TTransferRejectedException");
private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TTransferRejectedExceptionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TTransferRejectedExceptionTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TTransferRejectedExceptionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TTransferRejectedExceptionTupleSchemeFactory();
- public String message; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String message; // 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 {
MESSAGE((short)1, "message");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -63,6 +33,7 @@ public class TTransferRejectedException extends TException implements org.apache
/**
* 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: // MESSAGE
@@ -78,21 +49,22 @@ public class TTransferRejectedException extends TException implements org.apache
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -101,18 +73,18 @@ public class TTransferRejectedException extends TException implements org.apache
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TTransferRejectedException.class, metaDataMap);
}
@@ -120,7 +92,7 @@ public class TTransferRejectedException extends TException implements org.apache
}
public TTransferRejectedException(
- String message)
+ java.lang.String message)
{
this();
this.message = message;
@@ -144,11 +116,12 @@ public class TTransferRejectedException extends TException implements org.apache
this.message = null;
}
- public String getMessage() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getMessage() {
return this.message;
}
- public TTransferRejectedException setMessage(String message) {
+ public TTransferRejectedException setMessage(@org.apache.thrift.annotation.Nullable java.lang.String message) {
this.message = message;
return this;
}
@@ -168,45 +141,44 @@ public class TTransferRejectedException extends TException implements org.apache
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case MESSAGE:
if (value == null) {
unsetMessage();
} else {
- setMessage((String)value);
+ setMessage((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case MESSAGE:
return getMessage();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case MESSAGE:
return isSetMessage();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof TTransferRejectedException)
return this.equals((TTransferRejectedException)that);
return false;
@@ -215,6 +187,8 @@ public class TTransferRejectedException extends TException implements org.apache
public boolean equals(TTransferRejectedException that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_message = true && this.isSetMessage();
boolean that_present_message = true && that.isSetMessage();
@@ -230,14 +204,13 @@ public class TTransferRejectedException extends TException implements org.apache
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_message = true && (isSetMessage());
- list.add(present_message);
- if (present_message)
- list.add(message);
+ hashCode = hashCode * 8191 + ((isSetMessage()) ? 131071 : 524287);
+ if (isSetMessage())
+ hashCode = hashCode * 8191 + message.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -248,7 +221,7 @@ public class TTransferRejectedException extends TException implements org.apache
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetMessage()).compareTo(other.isSetMessage());
+ lastComparison = java.lang.Boolean.compare(isSetMessage(), other.isSetMessage());
if (lastComparison != 0) {
return lastComparison;
}
@@ -261,21 +234,22 @@ public class TTransferRejectedException extends TException implements org.apache
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TTransferRejectedException(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TTransferRejectedException(");
boolean first = true;
sb.append("message:");
@@ -302,7 +276,7 @@ public class TTransferRejectedException extends TException implements org.apache
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -310,13 +284,13 @@ public class TTransferRejectedException extends TException implements org.apache
}
}
- private static class TTransferRejectedExceptionStandardSchemeFactory implements SchemeFactory {
+ private static class TTransferRejectedExceptionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TTransferRejectedExceptionStandardScheme getScheme() {
return new TTransferRejectedExceptionStandardScheme();
}
}
- private static class TTransferRejectedExceptionStandardScheme extends StandardScheme<TTransferRejectedException> {
+ private static class TTransferRejectedExceptionStandardScheme extends org.apache.thrift.scheme.StandardScheme<TTransferRejectedException> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TTransferRejectedException struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -362,18 +336,18 @@ public class TTransferRejectedException extends TException implements org.apache
}
- private static class TTransferRejectedExceptionTupleSchemeFactory implements SchemeFactory {
+ private static class TTransferRejectedExceptionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TTransferRejectedExceptionTupleScheme getScheme() {
return new TTransferRejectedExceptionTupleScheme();
}
}
- private static class TTransferRejectedExceptionTupleScheme extends TupleScheme<TTransferRejectedException> {
+ private static class TTransferRejectedExceptionTupleScheme extends org.apache.thrift.scheme.TupleScheme<TTransferRejectedException> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TTransferRejectedException 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.isSetMessage()) {
optionals.set(0);
}
@@ -385,8 +359,8 @@ public class TTransferRejectedException extends TException implements org.apache
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TTransferRejectedException struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.message = iprot.readString();
struct.setMessageIsSet(true);
@@ -394,5 +368,8 @@ public class TTransferRejectedException extends TException implements org.apache
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/TransferInformation.java b/src/main/java/org/openslx/bwlp/thrift/iface/TransferInformation.java
index 40d5680..692d3df 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/TransferInformation.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/TransferInformation.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 = "2017-09-06")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public class TransferInformation implements org.apache.thrift.TBase<TransferInformation, TransferInformation._Fields>, java.io.Serializable, Cloneable, Comparable<TransferInformation> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TransferInformation");
@@ -44,17 +17,14 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
private static final org.apache.thrift.protocol.TField BLOCK_HASHES_FIELD_DESC = new org.apache.thrift.protocol.TField("blockHashes", org.apache.thrift.protocol.TType.LIST, (short)4);
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)5);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TransferInformationStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TransferInformationTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TransferInformationStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TransferInformationTupleSchemeFactory();
- public String token; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String token; // required
public int plainPort; // required
public int sslPort; // required
- public List<ByteBuffer> blockHashes; // optional
- public ByteBuffer machineDescription; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> blockHashes; // optional
+ public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer machineDescription; // 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 {
@@ -64,10 +34,10 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
BLOCK_HASHES((short)4, "blockHashes"),
MACHINE_DESCRIPTION((short)5, "machineDescription");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -75,6 +45,7 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
/**
* 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: // TOKEN
@@ -98,21 +69,22 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -121,7 +93,7 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -131,9 +103,9 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
private static final int __SSLPORT_ISSET_ID = 1;
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.BLOCK_HASHES,_Fields.MACHINE_DESCRIPTION};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.TOKEN, new org.apache.thrift.meta_data.FieldMetaData("token", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , "Token")));
tmpMap.put(_Fields.PLAIN_PORT, new org.apache.thrift.meta_data.FieldMetaData("plainPort", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -145,7 +117,7 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true))));
tmpMap.put(_Fields.MACHINE_DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("machineDescription", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TransferInformation.class, metaDataMap);
}
@@ -153,7 +125,7 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
}
public TransferInformation(
- String token,
+ java.lang.String token,
int plainPort,
int sslPort)
{
@@ -176,7 +148,7 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
this.plainPort = other.plainPort;
this.sslPort = other.sslPort;
if (other.isSetBlockHashes()) {
- List<ByteBuffer> __this__blockHashes = new ArrayList<ByteBuffer>(other.blockHashes);
+ java.util.List<java.nio.ByteBuffer> __this__blockHashes = new java.util.ArrayList<java.nio.ByteBuffer>(other.blockHashes);
this.blockHashes = __this__blockHashes;
}
if (other.isSetMachineDescription()) {
@@ -199,11 +171,12 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
this.machineDescription = null;
}
- public String getToken() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getToken() {
return this.token;
}
- public TransferInformation setToken(String token) {
+ public TransferInformation setToken(@org.apache.thrift.annotation.Nullable java.lang.String token) {
this.token = token;
return this;
}
@@ -234,16 +207,16 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
}
public void unsetPlainPort() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __PLAINPORT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PLAINPORT_ISSET_ID);
}
/** Returns true if field plainPort is set (has been assigned a value) and false otherwise */
public boolean isSetPlainPort() {
- return EncodingUtils.testBit(__isset_bitfield, __PLAINPORT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PLAINPORT_ISSET_ID);
}
public void setPlainPortIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __PLAINPORT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PLAINPORT_ISSET_ID, value);
}
public int getSslPort() {
@@ -257,38 +230,40 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
}
public void unsetSslPort() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SSLPORT_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SSLPORT_ISSET_ID);
}
/** Returns true if field sslPort is set (has been assigned a value) and false otherwise */
public boolean isSetSslPort() {
- return EncodingUtils.testBit(__isset_bitfield, __SSLPORT_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SSLPORT_ISSET_ID);
}
public void setSslPortIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SSLPORT_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SSLPORT_ISSET_ID, value);
}
public int getBlockHashesSize() {
return (this.blockHashes == null) ? 0 : this.blockHashes.size();
}
- public java.util.Iterator<ByteBuffer> getBlockHashesIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.nio.ByteBuffer> getBlockHashesIterator() {
return (this.blockHashes == null) ? null : this.blockHashes.iterator();
}
- public void addToBlockHashes(ByteBuffer elem) {
+ public void addToBlockHashes(java.nio.ByteBuffer elem) {
if (this.blockHashes == null) {
- this.blockHashes = new ArrayList<ByteBuffer>();
+ this.blockHashes = new java.util.ArrayList<java.nio.ByteBuffer>();
}
this.blockHashes.add(elem);
}
- public List<ByteBuffer> getBlockHashes() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.nio.ByteBuffer> getBlockHashes() {
return this.blockHashes;
}
- public TransferInformation setBlockHashes(List<ByteBuffer> blockHashes) {
+ public TransferInformation setBlockHashes(@org.apache.thrift.annotation.Nullable java.util.List<java.nio.ByteBuffer> blockHashes) {
this.blockHashes = blockHashes;
return this;
}
@@ -313,16 +288,16 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
return machineDescription == null ? null : machineDescription.array();
}
- public ByteBuffer bufferForMachineDescription() {
+ public java.nio.ByteBuffer bufferForMachineDescription() {
return org.apache.thrift.TBaseHelper.copyBinary(machineDescription);
}
public TransferInformation setMachineDescription(byte[] machineDescription) {
- this.machineDescription = machineDescription == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(machineDescription, machineDescription.length));
+ this.machineDescription = machineDescription == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(machineDescription.clone());
return this;
}
- public TransferInformation setMachineDescription(ByteBuffer machineDescription) {
+ public TransferInformation setMachineDescription(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer machineDescription) {
this.machineDescription = org.apache.thrift.TBaseHelper.copyBinary(machineDescription);
return this;
}
@@ -342,13 +317,13 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case TOKEN:
if (value == null) {
unsetToken();
} else {
- setToken((String)value);
+ setToken((java.lang.String)value);
}
break;
@@ -356,7 +331,7 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
if (value == null) {
unsetPlainPort();
} else {
- setPlainPort((Integer)value);
+ setPlainPort((java.lang.Integer)value);
}
break;
@@ -364,7 +339,7 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
if (value == null) {
unsetSslPort();
} else {
- setSslPort((Integer)value);
+ setSslPort((java.lang.Integer)value);
}
break;
@@ -372,7 +347,7 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
if (value == null) {
unsetBlockHashes();
} else {
- setBlockHashes((List<ByteBuffer>)value);
+ setBlockHashes((java.util.List<java.nio.ByteBuffer>)value);
}
break;
@@ -380,14 +355,19 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
if (value == null) {
unsetMachineDescription();
} else {
- setMachineDescription((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setMachineDescription((byte[])value);
+ } else {
+ setMachineDescription((java.nio.ByteBuffer)value);
+ }
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case TOKEN:
return getToken();
@@ -405,13 +385,13 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
return getMachineDescription();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -426,13 +406,11 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
case MACHINE_DESCRIPTION:
return isSetMachineDescription();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof TransferInformation)
return this.equals((TransferInformation)that);
return false;
@@ -441,6 +419,8 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
public boolean equals(TransferInformation that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_token = true && this.isSetToken();
boolean that_present_token = true && that.isSetToken();
@@ -492,34 +472,25 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_token = true && (isSetToken());
- list.add(present_token);
- if (present_token)
- list.add(token);
+ hashCode = hashCode * 8191 + ((isSetToken()) ? 131071 : 524287);
+ if (isSetToken())
+ hashCode = hashCode * 8191 + token.hashCode();
- boolean present_plainPort = true;
- list.add(present_plainPort);
- if (present_plainPort)
- list.add(plainPort);
+ hashCode = hashCode * 8191 + plainPort;
- boolean present_sslPort = true;
- list.add(present_sslPort);
- if (present_sslPort)
- list.add(sslPort);
+ hashCode = hashCode * 8191 + sslPort;
- boolean present_blockHashes = true && (isSetBlockHashes());
- list.add(present_blockHashes);
- if (present_blockHashes)
- list.add(blockHashes);
+ hashCode = hashCode * 8191 + ((isSetBlockHashes()) ? 131071 : 524287);
+ if (isSetBlockHashes())
+ hashCode = hashCode * 8191 + blockHashes.hashCode();
- boolean present_machineDescription = true && (isSetMachineDescription());
- list.add(present_machineDescription);
- if (present_machineDescription)
- list.add(machineDescription);
+ hashCode = hashCode * 8191 + ((isSetMachineDescription()) ? 131071 : 524287);
+ if (isSetMachineDescription())
+ hashCode = hashCode * 8191 + machineDescription.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -530,7 +501,7 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetToken()).compareTo(other.isSetToken());
+ lastComparison = java.lang.Boolean.compare(isSetToken(), other.isSetToken());
if (lastComparison != 0) {
return lastComparison;
}
@@ -540,7 +511,7 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPlainPort()).compareTo(other.isSetPlainPort());
+ lastComparison = java.lang.Boolean.compare(isSetPlainPort(), other.isSetPlainPort());
if (lastComparison != 0) {
return lastComparison;
}
@@ -550,7 +521,7 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSslPort()).compareTo(other.isSetSslPort());
+ lastComparison = java.lang.Boolean.compare(isSetSslPort(), other.isSetSslPort());
if (lastComparison != 0) {
return lastComparison;
}
@@ -560,7 +531,7 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetBlockHashes()).compareTo(other.isSetBlockHashes());
+ lastComparison = java.lang.Boolean.compare(isSetBlockHashes(), other.isSetBlockHashes());
if (lastComparison != 0) {
return lastComparison;
}
@@ -570,7 +541,7 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetMachineDescription()).compareTo(other.isSetMachineDescription());
+ lastComparison = java.lang.Boolean.compare(isSetMachineDescription(), other.isSetMachineDescription());
if (lastComparison != 0) {
return lastComparison;
}
@@ -583,21 +554,22 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TransferInformation(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TransferInformation(");
boolean first = true;
sb.append("token:");
@@ -652,7 +624,7 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -662,13 +634,13 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
}
}
- private static class TransferInformationStandardSchemeFactory implements SchemeFactory {
+ private static class TransferInformationStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TransferInformationStandardScheme getScheme() {
return new TransferInformationStandardScheme();
}
}
- private static class TransferInformationStandardScheme extends StandardScheme<TransferInformation> {
+ private static class TransferInformationStandardScheme extends org.apache.thrift.scheme.StandardScheme<TransferInformation> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TransferInformation struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -707,13 +679,13 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
case 4: // BLOCK_HASHES
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list178 = iprot.readListBegin();
- struct.blockHashes = new ArrayList<ByteBuffer>(_list178.size);
- ByteBuffer _elem179;
- for (int _i180 = 0; _i180 < _list178.size; ++_i180)
+ org.apache.thrift.protocol.TList _list290 = iprot.readListBegin();
+ struct.blockHashes = new java.util.ArrayList<java.nio.ByteBuffer>(_list290.size);
+ @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem291;
+ for (int _i292 = 0; _i292 < _list290.size; ++_i292)
{
- _elem179 = iprot.readBinary();
- struct.blockHashes.add(_elem179);
+ _elem291 = iprot.readBinary();
+ struct.blockHashes.add(_elem291);
}
iprot.readListEnd();
}
@@ -761,9 +733,9 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
oprot.writeFieldBegin(BLOCK_HASHES_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.blockHashes.size()));
- for (ByteBuffer _iter181 : struct.blockHashes)
+ for (java.nio.ByteBuffer _iter293 : struct.blockHashes)
{
- oprot.writeBinary(_iter181);
+ oprot.writeBinary(_iter293);
}
oprot.writeListEnd();
}
@@ -783,18 +755,18 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
}
- private static class TransferInformationTupleSchemeFactory implements SchemeFactory {
+ private static class TransferInformationTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TransferInformationTupleScheme getScheme() {
return new TransferInformationTupleScheme();
}
}
- private static class TransferInformationTupleScheme extends TupleScheme<TransferInformation> {
+ private static class TransferInformationTupleScheme extends org.apache.thrift.scheme.TupleScheme<TransferInformation> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TransferInformation 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.isSetToken()) {
optionals.set(0);
}
@@ -823,9 +795,9 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
if (struct.isSetBlockHashes()) {
{
oprot.writeI32(struct.blockHashes.size());
- for (ByteBuffer _iter182 : struct.blockHashes)
+ for (java.nio.ByteBuffer _iter294 : struct.blockHashes)
{
- oprot.writeBinary(_iter182);
+ oprot.writeBinary(_iter294);
}
}
}
@@ -836,8 +808,8 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TransferInformation struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(5);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
struct.token = iprot.readString();
struct.setTokenIsSet(true);
@@ -852,13 +824,13 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
}
if (incoming.get(3)) {
{
- org.apache.thrift.protocol.TList _list183 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.blockHashes = new ArrayList<ByteBuffer>(_list183.size);
- ByteBuffer _elem184;
- for (int _i185 = 0; _i185 < _list183.size; ++_i185)
+ org.apache.thrift.protocol.TList _list295 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
+ struct.blockHashes = new java.util.ArrayList<java.nio.ByteBuffer>(_list295.size);
+ @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer _elem296;
+ for (int _i297 = 0; _i297 < _list295.size; ++_i297)
{
- _elem184 = iprot.readBinary();
- struct.blockHashes.add(_elem184);
+ _elem296 = iprot.readBinary();
+ struct.blockHashes.add(_elem296);
}
}
struct.setBlockHashesIsSet(true);
@@ -870,5 +842,8 @@ public class TransferInformation implements org.apache.thrift.TBase<TransferInfo
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/TransferState.java b/src/main/java/org/openslx/bwlp/thrift/iface/TransferState.java
index 972c6c0..80301e6 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/TransferState.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/TransferState.java
@@ -1,5 +1,5 @@
/**
- * 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
@@ -7,10 +7,7 @@
package org.openslx.bwlp.thrift.iface;
-import java.util.Map;
-import java.util.HashMap;
-import org.apache.thrift.TEnum;
-
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public enum TransferState implements org.apache.thrift.TEnum {
IDLE(0),
WORKING(1),
@@ -34,6 +31,7 @@ public enum TransferState implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static TransferState findByValue(int value) {
switch (value) {
case 0:
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/TransferStatus.java b/src/main/java/org/openslx/bwlp/thrift/iface/TransferStatus.java
index 986e27d..c643e34 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/TransferStatus.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/TransferStatus.java
@@ -1,58 +1,28 @@
/**
- * 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 TransferStatus implements org.apache.thrift.TBase<TransferStatus, TransferStatus._Fields>, java.io.Serializable, Cloneable, Comparable<TransferStatus> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TransferStatus");
private static final org.apache.thrift.protocol.TField BLOCK_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("blockStatus", org.apache.thrift.protocol.TType.STRING, (short)1);
private static final org.apache.thrift.protocol.TField STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("state", org.apache.thrift.protocol.TType.I32, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new TransferStatusStandardSchemeFactory());
- schemes.put(TupleScheme.class, new TransferStatusTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TransferStatusStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TransferStatusTupleSchemeFactory();
- public ByteBuffer blockStatus; // required
+ public @org.apache.thrift.annotation.Nullable java.nio.ByteBuffer blockStatus; // required
/**
*
* @see TransferState
*/
- public TransferState state; // required
+ public @org.apache.thrift.annotation.Nullable TransferState state; // 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 {
@@ -63,10 +33,10 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
*/
STATE((short)2, "state");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -74,6 +44,7 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
/**
* 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: // BLOCK_STATUS
@@ -91,21 +62,22 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -114,20 +86,20 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.BLOCK_STATUS, new org.apache.thrift.meta_data.FieldMetaData("blockStatus", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING , true)));
tmpMap.put(_Fields.STATE, new org.apache.thrift.meta_data.FieldMetaData("state", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, TransferState.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TransferStatus.class, metaDataMap);
}
@@ -135,7 +107,7 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
}
public TransferStatus(
- ByteBuffer blockStatus,
+ java.nio.ByteBuffer blockStatus,
TransferState state)
{
this();
@@ -170,16 +142,16 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
return blockStatus == null ? null : blockStatus.array();
}
- public ByteBuffer bufferForBlockStatus() {
+ public java.nio.ByteBuffer bufferForBlockStatus() {
return org.apache.thrift.TBaseHelper.copyBinary(blockStatus);
}
public TransferStatus setBlockStatus(byte[] blockStatus) {
- this.blockStatus = blockStatus == null ? (ByteBuffer)null : ByteBuffer.wrap(Arrays.copyOf(blockStatus, blockStatus.length));
+ this.blockStatus = blockStatus == null ? (java.nio.ByteBuffer)null : java.nio.ByteBuffer.wrap(blockStatus.clone());
return this;
}
- public TransferStatus setBlockStatus(ByteBuffer blockStatus) {
+ public TransferStatus setBlockStatus(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer blockStatus) {
this.blockStatus = org.apache.thrift.TBaseHelper.copyBinary(blockStatus);
return this;
}
@@ -203,6 +175,7 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
*
* @see TransferState
*/
+ @org.apache.thrift.annotation.Nullable
public TransferState getState() {
return this.state;
}
@@ -211,7 +184,7 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
*
* @see TransferState
*/
- public TransferStatus setState(TransferState state) {
+ public TransferStatus setState(@org.apache.thrift.annotation.Nullable TransferState state) {
this.state = state;
return this;
}
@@ -231,13 +204,17 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case BLOCK_STATUS:
if (value == null) {
unsetBlockStatus();
} else {
- setBlockStatus((ByteBuffer)value);
+ if (value instanceof byte[]) {
+ setBlockStatus((byte[])value);
+ } else {
+ setBlockStatus((java.nio.ByteBuffer)value);
+ }
}
break;
@@ -252,7 +229,8 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case BLOCK_STATUS:
return getBlockStatus();
@@ -261,13 +239,13 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
return getState();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -276,13 +254,11 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
case STATE:
return isSetState();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof TransferStatus)
return this.equals((TransferStatus)that);
return false;
@@ -291,6 +267,8 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
public boolean equals(TransferStatus that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_blockStatus = true && this.isSetBlockStatus();
boolean that_present_blockStatus = true && that.isSetBlockStatus();
@@ -315,19 +293,17 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_blockStatus = true && (isSetBlockStatus());
- list.add(present_blockStatus);
- if (present_blockStatus)
- list.add(blockStatus);
+ hashCode = hashCode * 8191 + ((isSetBlockStatus()) ? 131071 : 524287);
+ if (isSetBlockStatus())
+ hashCode = hashCode * 8191 + blockStatus.hashCode();
- boolean present_state = true && (isSetState());
- list.add(present_state);
- if (present_state)
- list.add(state.getValue());
+ hashCode = hashCode * 8191 + ((isSetState()) ? 131071 : 524287);
+ if (isSetState())
+ hashCode = hashCode * 8191 + state.getValue();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -338,7 +314,7 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetBlockStatus()).compareTo(other.isSetBlockStatus());
+ lastComparison = java.lang.Boolean.compare(isSetBlockStatus(), other.isSetBlockStatus());
if (lastComparison != 0) {
return lastComparison;
}
@@ -348,7 +324,7 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetState()).compareTo(other.isSetState());
+ lastComparison = java.lang.Boolean.compare(isSetState(), other.isSetState());
if (lastComparison != 0) {
return lastComparison;
}
@@ -361,21 +337,22 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("TransferStatus(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("TransferStatus(");
boolean first = true;
sb.append("blockStatus:");
@@ -410,7 +387,7 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -418,13 +395,13 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
}
}
- private static class TransferStatusStandardSchemeFactory implements SchemeFactory {
+ private static class TransferStatusStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TransferStatusStandardScheme getScheme() {
return new TransferStatusStandardScheme();
}
}
- private static class TransferStatusStandardScheme extends StandardScheme<TransferStatus> {
+ private static class TransferStatusStandardScheme extends org.apache.thrift.scheme.StandardScheme<TransferStatus> {
public void read(org.apache.thrift.protocol.TProtocol iprot, TransferStatus struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -483,18 +460,18 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
}
- private static class TransferStatusTupleSchemeFactory implements SchemeFactory {
+ private static class TransferStatusTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public TransferStatusTupleScheme getScheme() {
return new TransferStatusTupleScheme();
}
}
- private static class TransferStatusTupleScheme extends TupleScheme<TransferStatus> {
+ private static class TransferStatusTupleScheme extends org.apache.thrift.scheme.TupleScheme<TransferStatus> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, TransferStatus 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.isSetBlockStatus()) {
optionals.set(0);
}
@@ -512,8 +489,8 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, TransferStatus struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.blockStatus = iprot.readBinary();
struct.setBlockStatusIsSet(true);
@@ -525,5 +502,8 @@ public class TransferStatus implements org.apache.thrift.TBase<TransferStatus, T
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/UploadOptions.java b/src/main/java/org/openslx/bwlp/thrift/iface/UploadOptions.java
index 3a36fce..5d80c14 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/UploadOptions.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/UploadOptions.java
@@ -1,50 +1,20 @@
/**
- * 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 = "2018-05-11")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2021-12-17")
public class UploadOptions implements org.apache.thrift.TBase<UploadOptions, UploadOptions._Fields>, java.io.Serializable, Cloneable, Comparable<UploadOptions> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UploadOptions");
private static final org.apache.thrift.protocol.TField SERVER_SIDE_COPYING_FIELD_DESC = new org.apache.thrift.protocol.TField("serverSideCopying", org.apache.thrift.protocol.TType.BOOL, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new UploadOptionsStandardSchemeFactory());
- schemes.put(TupleScheme.class, new UploadOptionsTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new UploadOptionsStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new UploadOptionsTupleSchemeFactory();
public boolean serverSideCopying; // required
@@ -52,10 +22,10 @@ public class UploadOptions implements org.apache.thrift.TBase<UploadOptions, Upl
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
SERVER_SIDE_COPYING((short)1, "serverSideCopying");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -63,6 +33,7 @@ public class UploadOptions implements org.apache.thrift.TBase<UploadOptions, Upl
/**
* 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: // SERVER_SIDE_COPYING
@@ -78,21 +49,22 @@ public class UploadOptions implements org.apache.thrift.TBase<UploadOptions, Upl
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -101,7 +73,7 @@ public class UploadOptions implements org.apache.thrift.TBase<UploadOptions, Upl
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -109,12 +81,12 @@ public class UploadOptions implements org.apache.thrift.TBase<UploadOptions, Upl
// isset id assignments
private static final int __SERVERSIDECOPYING_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.SERVER_SIDE_COPYING, new org.apache.thrift.meta_data.FieldMetaData("serverSideCopying", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UploadOptions.class, metaDataMap);
}
@@ -158,57 +130,56 @@ public class UploadOptions implements org.apache.thrift.TBase<UploadOptions, Upl
}
public void unsetServerSideCopying() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SERVERSIDECOPYING_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SERVERSIDECOPYING_ISSET_ID);
}
/** Returns true if field serverSideCopying is set (has been assigned a value) and false otherwise */
public boolean isSetServerSideCopying() {
- return EncodingUtils.testBit(__isset_bitfield, __SERVERSIDECOPYING_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SERVERSIDECOPYING_ISSET_ID);
}
public void setServerSideCopyingIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SERVERSIDECOPYING_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SERVERSIDECOPYING_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case SERVER_SIDE_COPYING:
if (value == null) {
unsetServerSideCopying();
} else {
- setServerSideCopying((Boolean)value);
+ setServerSideCopying((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case SERVER_SIDE_COPYING:
return isServerSideCopying();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
case SERVER_SIDE_COPYING:
return isSetServerSideCopying();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof UploadOptions)
return this.equals((UploadOptions)that);
return false;
@@ -217,6 +188,8 @@ public class UploadOptions implements org.apache.thrift.TBase<UploadOptions, Upl
public boolean equals(UploadOptions that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_serverSideCopying = true;
boolean that_present_serverSideCopying = true;
@@ -232,14 +205,11 @@ public class UploadOptions implements org.apache.thrift.TBase<UploadOptions, Upl
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_serverSideCopying = true;
- list.add(present_serverSideCopying);
- if (present_serverSideCopying)
- list.add(serverSideCopying);
+ hashCode = hashCode * 8191 + ((serverSideCopying) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -250,7 +220,7 @@ public class UploadOptions implements org.apache.thrift.TBase<UploadOptions, Upl
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetServerSideCopying()).compareTo(other.isSetServerSideCopying());
+ lastComparison = java.lang.Boolean.compare(isSetServerSideCopying(), other.isSetServerSideCopying());
if (lastComparison != 0) {
return lastComparison;
}
@@ -263,21 +233,22 @@ public class UploadOptions implements org.apache.thrift.TBase<UploadOptions, Upl
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("UploadOptions(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("UploadOptions(");
boolean first = true;
sb.append("serverSideCopying:");
@@ -300,7 +271,7 @@ public class UploadOptions implements org.apache.thrift.TBase<UploadOptions, Upl
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -310,13 +281,13 @@ public class UploadOptions implements org.apache.thrift.TBase<UploadOptions, Upl
}
}
- private static class UploadOptionsStandardSchemeFactory implements SchemeFactory {
+ private static class UploadOptionsStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public UploadOptionsStandardScheme getScheme() {
return new UploadOptionsStandardScheme();
}
}
- private static class UploadOptionsStandardScheme extends StandardScheme<UploadOptions> {
+ private static class UploadOptionsStandardScheme extends org.apache.thrift.scheme.StandardScheme<UploadOptions> {
public void read(org.apache.thrift.protocol.TProtocol iprot, UploadOptions struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -360,18 +331,18 @@ public class UploadOptions implements org.apache.thrift.TBase<UploadOptions, Upl
}
- private static class UploadOptionsTupleSchemeFactory implements SchemeFactory {
+ private static class UploadOptionsTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public UploadOptionsTupleScheme getScheme() {
return new UploadOptionsTupleScheme();
}
}
- private static class UploadOptionsTupleScheme extends TupleScheme<UploadOptions> {
+ private static class UploadOptionsTupleScheme extends org.apache.thrift.scheme.TupleScheme<UploadOptions> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, UploadOptions 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.isSetServerSideCopying()) {
optionals.set(0);
}
@@ -383,8 +354,8 @@ public class UploadOptions implements org.apache.thrift.TBase<UploadOptions, Upl
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, UploadOptions struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.serverSideCopying = iprot.readBool();
struct.setServerSideCopyingIsSet(true);
@@ -392,5 +363,8 @@ public class UploadOptions implements org.apache.thrift.TBase<UploadOptions, Upl
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/UserInfo.java b/src/main/java/org/openslx/bwlp/thrift/iface/UserInfo.java
index ced8149..04a0f3c 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/UserInfo.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/UserInfo.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 UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fields>, java.io.Serializable, Cloneable, Comparable<UserInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserInfo");
@@ -45,22 +18,19 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
private static final org.apache.thrift.protocol.TField ORGANIZATION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("organizationId", org.apache.thrift.protocol.TType.STRING, (short)5);
private static final org.apache.thrift.protocol.TField ROLE_FIELD_DESC = new org.apache.thrift.protocol.TField("role", org.apache.thrift.protocol.TType.I32, (short)6);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new UserInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new UserInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new UserInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new UserInfoTupleSchemeFactory();
- public String userId; // required
- public String firstName; // required
- public String lastName; // required
- public String eMail; // required
- public String organizationId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String userId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String firstName; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String lastName; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String eMail; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String organizationId; // required
/**
*
* @see Role
*/
- public Role role; // optional
+ public @org.apache.thrift.annotation.Nullable Role role; // 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 {
@@ -75,10 +45,10 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
*/
ROLE((short)6, "role");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -86,6 +56,7 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
/**
* 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: // USER_ID
@@ -111,21 +82,22 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -134,16 +106,16 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.ROLE};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.FIRST_NAME, new org.apache.thrift.meta_data.FieldMetaData("firstName", org.apache.thrift.TFieldRequirementType.DEFAULT,
@@ -156,7 +128,7 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.ROLE, new org.apache.thrift.meta_data.FieldMetaData("role", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, Role.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(UserInfo.class, metaDataMap);
}
@@ -164,11 +136,11 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
}
public UserInfo(
- String userId,
- String firstName,
- String lastName,
- String eMail,
- String organizationId)
+ java.lang.String userId,
+ java.lang.String firstName,
+ java.lang.String lastName,
+ java.lang.String eMail,
+ java.lang.String organizationId)
{
this();
this.userId = userId;
@@ -216,11 +188,12 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
this.role = null;
}
- public String getUserId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getUserId() {
return this.userId;
}
- public UserInfo setUserId(String userId) {
+ public UserInfo setUserId(@org.apache.thrift.annotation.Nullable java.lang.String userId) {
this.userId = userId;
return this;
}
@@ -240,11 +213,12 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
}
}
- public String getFirstName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getFirstName() {
return this.firstName;
}
- public UserInfo setFirstName(String firstName) {
+ public UserInfo setFirstName(@org.apache.thrift.annotation.Nullable java.lang.String firstName) {
this.firstName = firstName;
return this;
}
@@ -264,11 +238,12 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
}
}
- public String getLastName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getLastName() {
return this.lastName;
}
- public UserInfo setLastName(String lastName) {
+ public UserInfo setLastName(@org.apache.thrift.annotation.Nullable java.lang.String lastName) {
this.lastName = lastName;
return this;
}
@@ -288,11 +263,12 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
}
}
- public String getEMail() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getEMail() {
return this.eMail;
}
- public UserInfo setEMail(String eMail) {
+ public UserInfo setEMail(@org.apache.thrift.annotation.Nullable java.lang.String eMail) {
this.eMail = eMail;
return this;
}
@@ -312,11 +288,12 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
}
}
- public String getOrganizationId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getOrganizationId() {
return this.organizationId;
}
- public UserInfo setOrganizationId(String organizationId) {
+ public UserInfo setOrganizationId(@org.apache.thrift.annotation.Nullable java.lang.String organizationId) {
this.organizationId = organizationId;
return this;
}
@@ -340,6 +317,7 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
*
* @see Role
*/
+ @org.apache.thrift.annotation.Nullable
public Role getRole() {
return this.role;
}
@@ -348,7 +326,7 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
*
* @see Role
*/
- public UserInfo setRole(Role role) {
+ public UserInfo setRole(@org.apache.thrift.annotation.Nullable Role role) {
this.role = role;
return this;
}
@@ -368,13 +346,13 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER_ID:
if (value == null) {
unsetUserId();
} else {
- setUserId((String)value);
+ setUserId((java.lang.String)value);
}
break;
@@ -382,7 +360,7 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
if (value == null) {
unsetFirstName();
} else {
- setFirstName((String)value);
+ setFirstName((java.lang.String)value);
}
break;
@@ -390,7 +368,7 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
if (value == null) {
unsetLastName();
} else {
- setLastName((String)value);
+ setLastName((java.lang.String)value);
}
break;
@@ -398,7 +376,7 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
if (value == null) {
unsetEMail();
} else {
- setEMail((String)value);
+ setEMail((java.lang.String)value);
}
break;
@@ -406,7 +384,7 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
if (value == null) {
unsetOrganizationId();
} else {
- setOrganizationId((String)value);
+ setOrganizationId((java.lang.String)value);
}
break;
@@ -421,7 +399,8 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER_ID:
return getUserId();
@@ -442,13 +421,13 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
return getRole();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -465,13 +444,11 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
case ROLE:
return isSetRole();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof UserInfo)
return this.equals((UserInfo)that);
return false;
@@ -480,6 +457,8 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
public boolean equals(UserInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_userId = true && this.isSetUserId();
boolean that_present_userId = true && that.isSetUserId();
@@ -540,39 +519,33 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_userId = true && (isSetUserId());
- list.add(present_userId);
- if (present_userId)
- list.add(userId);
+ hashCode = hashCode * 8191 + ((isSetUserId()) ? 131071 : 524287);
+ if (isSetUserId())
+ hashCode = hashCode * 8191 + userId.hashCode();
- boolean present_firstName = true && (isSetFirstName());
- list.add(present_firstName);
- if (present_firstName)
- list.add(firstName);
+ hashCode = hashCode * 8191 + ((isSetFirstName()) ? 131071 : 524287);
+ if (isSetFirstName())
+ hashCode = hashCode * 8191 + firstName.hashCode();
- boolean present_lastName = true && (isSetLastName());
- list.add(present_lastName);
- if (present_lastName)
- list.add(lastName);
+ hashCode = hashCode * 8191 + ((isSetLastName()) ? 131071 : 524287);
+ if (isSetLastName())
+ hashCode = hashCode * 8191 + lastName.hashCode();
- boolean present_eMail = true && (isSetEMail());
- list.add(present_eMail);
- if (present_eMail)
- list.add(eMail);
+ hashCode = hashCode * 8191 + ((isSetEMail()) ? 131071 : 524287);
+ if (isSetEMail())
+ hashCode = hashCode * 8191 + eMail.hashCode();
- boolean present_organizationId = true && (isSetOrganizationId());
- list.add(present_organizationId);
- if (present_organizationId)
- list.add(organizationId);
+ hashCode = hashCode * 8191 + ((isSetOrganizationId()) ? 131071 : 524287);
+ if (isSetOrganizationId())
+ hashCode = hashCode * 8191 + organizationId.hashCode();
- boolean present_role = true && (isSetRole());
- list.add(present_role);
- if (present_role)
- list.add(role.getValue());
+ hashCode = hashCode * 8191 + ((isSetRole()) ? 131071 : 524287);
+ if (isSetRole())
+ hashCode = hashCode * 8191 + role.getValue();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -583,7 +556,7 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUserId()).compareTo(other.isSetUserId());
+ lastComparison = java.lang.Boolean.compare(isSetUserId(), other.isSetUserId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -593,7 +566,7 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFirstName()).compareTo(other.isSetFirstName());
+ lastComparison = java.lang.Boolean.compare(isSetFirstName(), other.isSetFirstName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -603,7 +576,7 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLastName()).compareTo(other.isSetLastName());
+ lastComparison = java.lang.Boolean.compare(isSetLastName(), other.isSetLastName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -613,7 +586,7 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetEMail()).compareTo(other.isSetEMail());
+ lastComparison = java.lang.Boolean.compare(isSetEMail(), other.isSetEMail());
if (lastComparison != 0) {
return lastComparison;
}
@@ -623,7 +596,7 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOrganizationId()).compareTo(other.isSetOrganizationId());
+ lastComparison = java.lang.Boolean.compare(isSetOrganizationId(), other.isSetOrganizationId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -633,7 +606,7 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetRole()).compareTo(other.isSetRole());
+ lastComparison = java.lang.Boolean.compare(isSetRole(), other.isSetRole());
if (lastComparison != 0) {
return lastComparison;
}
@@ -646,21 +619,22 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("UserInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("UserInfo(");
boolean first = true;
sb.append("userId:");
@@ -729,7 +703,7 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -737,13 +711,13 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
}
}
- private static class UserInfoStandardSchemeFactory implements SchemeFactory {
+ private static class UserInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public UserInfoStandardScheme getScheme() {
return new UserInfoStandardScheme();
}
}
- private static class UserInfoStandardScheme extends StandardScheme<UserInfo> {
+ private static class UserInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<UserInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, UserInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -856,18 +830,18 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
}
- private static class UserInfoTupleSchemeFactory implements SchemeFactory {
+ private static class UserInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public UserInfoTupleScheme getScheme() {
return new UserInfoTupleScheme();
}
}
- private static class UserInfoTupleScheme extends TupleScheme<UserInfo> {
+ private static class UserInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<UserInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, UserInfo 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.isSetUserId()) {
optionals.set(0);
}
@@ -909,8 +883,8 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, UserInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(6);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(6);
if (incoming.get(0)) {
struct.userId = iprot.readString();
struct.setUserIdIsSet(true);
@@ -938,5 +912,8 @@ public class UserInfo implements org.apache.thrift.TBase<UserInfo, UserInfo._Fie
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/Virtualizer.java b/src/main/java/org/openslx/bwlp/thrift/iface/Virtualizer.java
index 8cf4d13..a35e827 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/Virtualizer.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/Virtualizer.java
@@ -1,64 +1,34 @@
/**
- * 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 Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtualizer._Fields>, java.io.Serializable, Cloneable, Comparable<Virtualizer> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Virtualizer");
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)1);
private static final org.apache.thrift.protocol.TField VIRT_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("virtName", org.apache.thrift.protocol.TType.STRING, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new VirtualizerStandardSchemeFactory());
- schemes.put(TupleScheme.class, new VirtualizerTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new VirtualizerStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new VirtualizerTupleSchemeFactory();
- public String virtId; // required
- public String virtName; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String virtId; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String virtName; // 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 {
VIRT_ID((short)1, "virtId"),
VIRT_NAME((short)2, "virtName");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -66,6 +36,7 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
/**
* 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: // VIRT_ID
@@ -83,21 +54,22 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -106,20 +78,20 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.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.VIRT_NAME, new org.apache.thrift.meta_data.FieldMetaData("virtName", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Virtualizer.class, metaDataMap);
}
@@ -127,8 +99,8 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
}
public Virtualizer(
- String virtId,
- String virtName)
+ java.lang.String virtId,
+ java.lang.String virtName)
{
this();
this.virtId = virtId;
@@ -157,11 +129,12 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
this.virtName = null;
}
- public String getVirtId() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getVirtId() {
return this.virtId;
}
- public Virtualizer setVirtId(String virtId) {
+ public Virtualizer setVirtId(@org.apache.thrift.annotation.Nullable java.lang.String virtId) {
this.virtId = virtId;
return this;
}
@@ -181,11 +154,12 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
}
}
- public String getVirtName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getVirtName() {
return this.virtName;
}
- public Virtualizer setVirtName(String virtName) {
+ public Virtualizer setVirtName(@org.apache.thrift.annotation.Nullable java.lang.String virtName) {
this.virtName = virtName;
return this;
}
@@ -205,13 +179,13 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case VIRT_ID:
if (value == null) {
unsetVirtId();
} else {
- setVirtId((String)value);
+ setVirtId((java.lang.String)value);
}
break;
@@ -219,14 +193,15 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
if (value == null) {
unsetVirtName();
} else {
- setVirtName((String)value);
+ setVirtName((java.lang.String)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case VIRT_ID:
return getVirtId();
@@ -235,13 +210,13 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
return getVirtName();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -250,13 +225,11 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
case VIRT_NAME:
return isSetVirtName();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof Virtualizer)
return this.equals((Virtualizer)that);
return false;
@@ -265,6 +238,8 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
public boolean equals(Virtualizer that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_virtId = true && this.isSetVirtId();
boolean that_present_virtId = true && that.isSetVirtId();
@@ -289,19 +264,17 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_virtId = true && (isSetVirtId());
- list.add(present_virtId);
- if (present_virtId)
- list.add(virtId);
+ hashCode = hashCode * 8191 + ((isSetVirtId()) ? 131071 : 524287);
+ if (isSetVirtId())
+ hashCode = hashCode * 8191 + virtId.hashCode();
- boolean present_virtName = true && (isSetVirtName());
- list.add(present_virtName);
- if (present_virtName)
- list.add(virtName);
+ hashCode = hashCode * 8191 + ((isSetVirtName()) ? 131071 : 524287);
+ if (isSetVirtName())
+ hashCode = hashCode * 8191 + virtName.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -312,7 +285,7 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetVirtId()).compareTo(other.isSetVirtId());
+ lastComparison = java.lang.Boolean.compare(isSetVirtId(), other.isSetVirtId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -322,7 +295,7 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetVirtName()).compareTo(other.isSetVirtName());
+ lastComparison = java.lang.Boolean.compare(isSetVirtName(), other.isSetVirtName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -335,21 +308,22 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("Virtualizer(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("Virtualizer(");
boolean first = true;
sb.append("virtId:");
@@ -384,7 +358,7 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -392,13 +366,13 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
}
}
- private static class VirtualizerStandardSchemeFactory implements SchemeFactory {
+ private static class VirtualizerStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public VirtualizerStandardScheme getScheme() {
return new VirtualizerStandardScheme();
}
}
- private static class VirtualizerStandardScheme extends StandardScheme<Virtualizer> {
+ private static class VirtualizerStandardScheme extends org.apache.thrift.scheme.StandardScheme<Virtualizer> {
public void read(org.apache.thrift.protocol.TProtocol iprot, Virtualizer struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -457,18 +431,18 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
}
- private static class VirtualizerTupleSchemeFactory implements SchemeFactory {
+ private static class VirtualizerTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public VirtualizerTupleScheme getScheme() {
return new VirtualizerTupleScheme();
}
}
- private static class VirtualizerTupleScheme extends TupleScheme<Virtualizer> {
+ private static class VirtualizerTupleScheme extends org.apache.thrift.scheme.TupleScheme<Virtualizer> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, Virtualizer 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.isSetVirtId()) {
optionals.set(0);
}
@@ -486,8 +460,8 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, Virtualizer struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(2);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
struct.virtId = iprot.readString();
struct.setVirtIdIsSet(true);
@@ -499,5 +473,8 @@ public class Virtualizer implements org.apache.thrift.TBase<Virtualizer, Virtual
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/bwlp/thrift/iface/WhoamiInfo.java b/src/main/java/org/openslx/bwlp/thrift/iface/WhoamiInfo.java
index ad22344..9b45c29 100644
--- a/src/main/java/org/openslx/bwlp/thrift/iface/WhoamiInfo.java
+++ b/src/main/java/org/openslx/bwlp/thrift/iface/WhoamiInfo.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 WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInfo._Fields>, java.io.Serializable, Cloneable, Comparable<WhoamiInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("WhoamiInfo");
@@ -42,13 +15,10 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
private static final org.apache.thrift.protocol.TField IS_SUPER_USER_FIELD_DESC = new org.apache.thrift.protocol.TField("isSuperUser", org.apache.thrift.protocol.TType.BOOL, (short)2);
private static final org.apache.thrift.protocol.TField CAN_LIST_IMAGES_FIELD_DESC = new org.apache.thrift.protocol.TField("canListImages", org.apache.thrift.protocol.TType.BOOL, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
- static {
- schemes.put(StandardScheme.class, new WhoamiInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new WhoamiInfoTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new WhoamiInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new WhoamiInfoTupleSchemeFactory();
- public UserInfo user; // required
+ public @org.apache.thrift.annotation.Nullable UserInfo user; // required
public boolean isSuperUser; // required
public boolean canListImages; // required
@@ -58,10 +28,10 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
IS_SUPER_USER((short)2, "isSuperUser"),
CAN_LIST_IMAGES((short)3, "canListImages");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -69,6 +39,7 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
/**
* 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: // USER
@@ -88,21 +59,22 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -111,7 +83,7 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -120,16 +92,16 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
private static final int __ISSUPERUSER_ISSET_ID = 0;
private static final int __CANLISTIMAGES_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> 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.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, UserInfo.class)));
tmpMap.put(_Fields.IS_SUPER_USER, new org.apache.thrift.meta_data.FieldMetaData("isSuperUser", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.CAN_LIST_IMAGES, new org.apache.thrift.meta_data.FieldMetaData("canListImages", org.apache.thrift.TFieldRequirementType.DEFAULT,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(WhoamiInfo.class, metaDataMap);
}
@@ -174,11 +146,12 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
this.canListImages = false;
}
+ @org.apache.thrift.annotation.Nullable
public UserInfo getUser() {
return this.user;
}
- public WhoamiInfo setUser(UserInfo user) {
+ public WhoamiInfo setUser(@org.apache.thrift.annotation.Nullable UserInfo user) {
this.user = user;
return this;
}
@@ -209,16 +182,16 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
}
public void unsetIsSuperUser() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISSUPERUSER_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISSUPERUSER_ISSET_ID);
}
/** Returns true if field isSuperUser is set (has been assigned a value) and false otherwise */
public boolean isSetIsSuperUser() {
- return EncodingUtils.testBit(__isset_bitfield, __ISSUPERUSER_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISSUPERUSER_ISSET_ID);
}
public void setIsSuperUserIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISSUPERUSER_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISSUPERUSER_ISSET_ID, value);
}
public boolean isCanListImages() {
@@ -232,19 +205,19 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
}
public void unsetCanListImages() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __CANLISTIMAGES_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __CANLISTIMAGES_ISSET_ID);
}
/** Returns true if field canListImages is set (has been assigned a value) and false otherwise */
public boolean isSetCanListImages() {
- return EncodingUtils.testBit(__isset_bitfield, __CANLISTIMAGES_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __CANLISTIMAGES_ISSET_ID);
}
public void setCanListImagesIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __CANLISTIMAGES_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __CANLISTIMAGES_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
case USER:
if (value == null) {
@@ -258,7 +231,7 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
if (value == null) {
unsetIsSuperUser();
} else {
- setIsSuperUser((Boolean)value);
+ setIsSuperUser((java.lang.Boolean)value);
}
break;
@@ -266,14 +239,15 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
if (value == null) {
unsetCanListImages();
} else {
- setCanListImages((Boolean)value);
+ setCanListImages((java.lang.Boolean)value);
}
break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
case USER:
return getUser();
@@ -285,13 +259,13 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
return isCanListImages();
}
- throw new IllegalStateException();
+ 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 IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
@@ -302,13 +276,11 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
case CAN_LIST_IMAGES:
return isSetCanListImages();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null)
- return false;
+ public boolean equals(java.lang.Object that) {
if (that instanceof WhoamiInfo)
return this.equals((WhoamiInfo)that);
return false;
@@ -317,6 +289,8 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
public boolean equals(WhoamiInfo that) {
if (that == null)
return false;
+ if (this == that)
+ return true;
boolean this_present_user = true && this.isSetUser();
boolean that_present_user = true && that.isSetUser();
@@ -350,24 +324,17 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_user = true && (isSetUser());
- list.add(present_user);
- if (present_user)
- list.add(user);
+ hashCode = hashCode * 8191 + ((isSetUser()) ? 131071 : 524287);
+ if (isSetUser())
+ hashCode = hashCode * 8191 + user.hashCode();
- boolean present_isSuperUser = true;
- list.add(present_isSuperUser);
- if (present_isSuperUser)
- list.add(isSuperUser);
+ hashCode = hashCode * 8191 + ((isSuperUser) ? 131071 : 524287);
- boolean present_canListImages = true;
- list.add(present_canListImages);
- if (present_canListImages)
- list.add(canListImages);
+ hashCode = hashCode * 8191 + ((canListImages) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -378,7 +345,7 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser());
+ lastComparison = java.lang.Boolean.compare(isSetUser(), other.isSetUser());
if (lastComparison != 0) {
return lastComparison;
}
@@ -388,7 +355,7 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsSuperUser()).compareTo(other.isSetIsSuperUser());
+ lastComparison = java.lang.Boolean.compare(isSetIsSuperUser(), other.isSetIsSuperUser());
if (lastComparison != 0) {
return lastComparison;
}
@@ -398,7 +365,7 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetCanListImages()).compareTo(other.isSetCanListImages());
+ lastComparison = java.lang.Boolean.compare(isSetCanListImages(), other.isSetCanListImages());
if (lastComparison != 0) {
return lastComparison;
}
@@ -411,21 +378,22 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
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 {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ scheme(iprot).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);
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("WhoamiInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("WhoamiInfo(");
boolean first = true;
sb.append("user:");
@@ -463,7 +431,7 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ 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;
@@ -473,13 +441,13 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
}
}
- private static class WhoamiInfoStandardSchemeFactory implements SchemeFactory {
+ private static class WhoamiInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WhoamiInfoStandardScheme getScheme() {
return new WhoamiInfoStandardScheme();
}
}
- private static class WhoamiInfoStandardScheme extends StandardScheme<WhoamiInfo> {
+ private static class WhoamiInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<WhoamiInfo> {
public void read(org.apache.thrift.protocol.TProtocol iprot, WhoamiInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
@@ -548,18 +516,18 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
}
- private static class WhoamiInfoTupleSchemeFactory implements SchemeFactory {
+ private static class WhoamiInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public WhoamiInfoTupleScheme getScheme() {
return new WhoamiInfoTupleScheme();
}
}
- private static class WhoamiInfoTupleScheme extends TupleScheme<WhoamiInfo> {
+ private static class WhoamiInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<WhoamiInfo> {
@Override
public void write(org.apache.thrift.protocol.TProtocol prot, WhoamiInfo 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.isSetUser()) {
optionals.set(0);
}
@@ -583,8 +551,8 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, WhoamiInfo struct) throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.user = new UserInfo();
struct.user.read(iprot);
@@ -601,5 +569,8 @@ public class WhoamiInfo implements org.apache.thrift.TBase<WhoamiInfo, WhoamiInf
}
}
+ 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();
+ }
}
diff --git a/src/main/java/org/openslx/encryption/AsymEncryptionHandler.java b/src/main/java/org/openslx/encryption/AsymEncryptionHandler.java
index 98109f2..8c074ca 100644
--- a/src/main/java/org/openslx/encryption/AsymEncryptionHandler.java
+++ b/src/main/java/org/openslx/encryption/AsymEncryptionHandler.java
@@ -13,11 +13,12 @@ import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
public class AsymEncryptionHandler
{
- private static final Logger LOG = Logger.getLogger( AsymEncryptionHandler.class );
+ private static final Logger LOG = LogManager.getLogger( AsymEncryptionHandler.class );
private final Key key;
diff --git a/src/main/java/org/openslx/encryption/AsymKeyHolder.java b/src/main/java/org/openslx/encryption/AsymKeyHolder.java
index 6469f30..f0762bd 100644
--- a/src/main/java/org/openslx/encryption/AsymKeyHolder.java
+++ b/src/main/java/org/openslx/encryption/AsymKeyHolder.java
@@ -13,11 +13,12 @@ import java.security.spec.InvalidKeySpecException;
import java.security.spec.RSAPrivateKeySpec;
import java.security.spec.RSAPublicKeySpec;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
public class AsymKeyHolder
{
- private static final Logger LOG = Logger.getLogger( AsymKeyHolder.class );
+ private static final Logger LOG = LogManager.getLogger( AsymKeyHolder.class );
private static RSAPrivateKey privKey = null;
private static RSAPublicKey pubKey = null;
diff --git a/src/main/java/org/openslx/filetransfer/ClassTest.java b/src/main/java/org/openslx/filetransfer/ClassTest.java
index 9d5bc82..04dc40d 100644
--- a/src/main/java/org/openslx/filetransfer/ClassTest.java
+++ b/src/main/java/org/openslx/filetransfer/ClassTest.java
@@ -28,8 +28,8 @@ import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
-import org.apache.log4j.BasicConfigurator;
-import org.slf4j.LoggerFactory;
+import org.apache.logging.log4j.core.config.Configurator;
+import org.apache.logging.log4j.core.config.DefaultConfiguration;
public class ClassTest
{
@@ -39,15 +39,10 @@ public class ClassTest
private static String inFile;
private static String outFile;
- static {
- // This is a temporary workaround for this annoying log4j error msg.
- // Initializing the logger before anything else is done.
- BasicConfigurator.configure();
- LoggerFactory.getLogger( "ROOT" );
- }
-
public static void main( String[] args ) throws Exception
{
+ Configurator.initialize(new DefaultConfiguration());
+
if ( args.length != 4 ) {
System.out.println( "Need 4 argument: <keystore> <passphrase> <infile> <outfile>" );
System.exit( 1 );
diff --git a/src/main/java/org/openslx/filetransfer/Downloader.java b/src/main/java/org/openslx/filetransfer/Downloader.java
index 50162fc..5aff94b 100644
--- a/src/main/java/org/openslx/filetransfer/Downloader.java
+++ b/src/main/java/org/openslx/filetransfer/Downloader.java
@@ -12,12 +12,13 @@ import javax.net.ssl.SSLContext;
import net.jpountz.lz4.LZ4FastDecompressor;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
public class Downloader extends Transfer
{
- private static final Logger log = Logger.getLogger( Downloader.class );
+ private static final Logger log = LogManager.getLogger( Downloader.class );
private final LZ4FastDecompressor decompressor = lz4factory.fastDecompressor();
@@ -115,6 +116,7 @@ public class Downloader extends Transfer
compressed += compressedLength;
uncompressed += decompressedLength;
if ( decompressedLength > len ) {
+ // TODO: Partial reads with buffering, if remote payload is larger than our buffer
throw new RuntimeException( "This should never happen! ;)" );
}
if ( decompressedLength == compressedLength ) {
@@ -167,6 +169,19 @@ public class Downloader extends Transfer
}
FileRange requestedRange;
try {
+ byte[] incoming = new byte[ 500000 ];
+ /* TODO once the Lz4InputStream can handle small buffer sizes / partial reads
+ for ( int bufsiz = 600; bufsiz >= 100 && incoming == null; bufsiz -= 100 ) {
+ try {
+ incoming = new byte[ bufsiz * 1024 ];
+ } catch ( OutOfMemoryError e ) {
+ }
+ }
+ if ( incoming == null ) {
+ log.error( "Could not allocate buffer for receiving." );
+ return false;
+ }
+ */
while ( ( requestedRange = rangeCallback.get() ) != null ) {
if ( requestedRange.startOffset < 0 || requestedRange.startOffset >= requestedRange.endOffset ) {
log.error( "Callback supplied bad range (" + requestedRange.startOffset + " to " + requestedRange.endOffset + ")" );
@@ -187,16 +202,23 @@ public class Downloader extends Transfer
log.error( "Did not receive meta data from uploading remote peer after requesting range, aborting." );
return false;
}
+ if ( getRemoteError() != null ) {
+ log.error( "Remote peer sent error: " + getRemoteError() );
+ return false;
+ }
FileRange remoteRange = meta.getRange();
- if ( remoteRange == null || !remoteRange.equals( requestedRange ) ) {
- log.error( "Confirmed range by remote peer does not match requested range, aborting download." );
+ if ( remoteRange == null ) {
+ log.error( "Remote metadata does not contain range confirmation. " + meta );
+ }
+ if ( !remoteRange.equals( requestedRange ) ) {
+ log.error( "Confirmed range by remote peer (" + remoteRange
+ + ") does not match requested range (" + requestedRange + "), aborting download." );
return false;
}
// Receive requested range
int chunkLength = requestedRange.getLength();
// If the uploader sets the COMPRESS field, assume compressed chunk
InputStream inStream = meta.peerWantsCompression() ? compressedIn : dataFromServer;
- byte[] incoming = new byte[ 500000 ]; // 500kb
int hasRead = 0;
while ( hasRead < chunkLength ) {
int ret;
@@ -207,7 +229,7 @@ public class Downloader extends Transfer
return false;
}
} catch ( IOException e ) {
- log.error( "Could not read payload from socket" );
+ log.error( "Could not read payload from socket", e );
sendErrorCode( "payload read error" );
return false;
}
@@ -227,7 +249,7 @@ public class Downloader extends Transfer
compressedIn.printStats();
try {
transferSocket.shutdownOutput();
- } catch ( IOException e ) {
+ } catch ( Exception e ) {
}
} finally {
this.close( null );
diff --git a/src/main/java/org/openslx/filetransfer/FileRange.java b/src/main/java/org/openslx/filetransfer/FileRange.java
index e8a7d12..ed86e51 100644
--- a/src/main/java/org/openslx/filetransfer/FileRange.java
+++ b/src/main/java/org/openslx/filetransfer/FileRange.java
@@ -64,4 +64,10 @@ public class FileRange
return (int)startOffset ^ Integer.rotateLeft( (int)endOffset, 16 ) ^ (int)(startOffset >> 32);
}
+ @Override
+ public String toString()
+ {
+ return startOffset + "-" + endOffset;
+ }
+
}
diff --git a/src/main/java/org/openslx/filetransfer/Listener.java b/src/main/java/org/openslx/filetransfer/Listener.java
index a0fc172..fc990fc 100644
--- a/src/main/java/org/openslx/filetransfer/Listener.java
+++ b/src/main/java/org/openslx/filetransfer/Listener.java
@@ -3,6 +3,7 @@ package org.openslx.filetransfer;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.Socket;
+import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.RejectedExecutionException;
@@ -11,9 +12,11 @@ import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLException;
import javax.net.ssl.SSLServerSocketFactory;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.openslx.util.PrioThreadFactory;
public class Listener
@@ -25,11 +28,11 @@ public class Listener
private Thread acceptThread = null;
private final int readTimeoutMs;
private final ExecutorService processingPool = new ThreadPoolExecutor( 0, 8, 5, TimeUnit.MINUTES, new SynchronousQueue<Runnable>(),
- new PrioThreadFactory( "BFTP-Init" ) );
+ new PrioThreadFactory( "BFTP-BS" ) );
- private static final byte CONNECTING_PEER_WANTS_TO_UPLOAD = 85; // hex - code 'U' = 85.
- private static final byte CONNECTING_PEER_WANTS_TO_DOWNLOAD = 68; // hex - code 'D' = 68.
- private static Logger log = Logger.getLogger( Listener.class );
+ private static final byte CONNECTING_PEER_WANTS_TO_UPLOAD = 85; // ASCII 'U' = 85.
+ private static final byte CONNECTING_PEER_WANTS_TO_DOWNLOAD = 68; // ASCII 'D' = 68.
+ private static Logger log = LogManager.getLogger( Listener.class );
/***********************************************************************/
/**
@@ -67,8 +70,10 @@ public class Listener
SSLServerSocketFactory sslServerSocketFactory = context.getServerSocketFactory();
listenSocket = sslServerSocketFactory.createServerSocket();
}
+ listenSocket.setSoTimeout( 5000 );
listenSocket.setReuseAddress( true );
listenSocket.bind( new InetSocketAddress( this.port ) );
+ listenSocket.setSoTimeout( 0 );
} catch ( Exception e ) {
log.error( "Cannot listen on port " + this.port, e );
listenSocket = null;
@@ -82,16 +87,16 @@ public class Listener
if ( acceptThread != null )
return;
final Listener instance = this;
- acceptThread = new Thread( "BFTP-Listen-" + this.port ) {
+ acceptThread = new Thread( "BFTP:" + this.port ) {
@Override
public void run()
{
try {
// Run accept loop in own thread
while ( !isInterrupted() ) {
- Socket acceptedSocket = null;
+ final Socket connection;
try {
- acceptedSocket = listenSocket.accept();
+ connection = listenSocket.accept();
} catch ( SocketTimeoutException e ) {
continue;
} catch ( Exception e ) {
@@ -105,14 +110,12 @@ public class Listener
continue;
}
// Handle each accepted connection in a thread pool
- final Socket connection = acceptedSocket;
Runnable handler = new Runnable() {
@Override
public void run()
{
-
try {
- // Give initial byte signalling mode of operation 5 secs to arrive
+ // Give initial byte signaling mode of operation 5 secs to arrive
connection.setSoTimeout( 5000 );
byte[] b = new byte[ 1 ];
@@ -127,25 +130,32 @@ public class Listener
if ( b[0] == CONNECTING_PEER_WANTS_TO_UPLOAD ) {
// --> start Downloader(socket).
Downloader d = new Downloader( connection );
+ // Will take care of connection cleanup
incomingEvent.incomingUploadRequest( d );
} else if ( b[0] == CONNECTING_PEER_WANTS_TO_DOWNLOAD ) {
// --> start Uploader(socket).
Uploader u = new Uploader( connection );
+ // Will take care of connection cleanup
incomingEvent.incomingDownloadRequest( u );
} else {
- log.debug( "Got invalid init-byte ... close connection" );
+ log.debug( "Got invalid init-byte ... closing connection" );
Transfer.safeClose( connection );
}
+ } catch ( SSLException e ) {
+ Transfer.safeClose( connection );
+ log.warn( "SSL error when acceping client " + connection.getInetAddress().getHostAddress() );
+ } catch ( SocketException e ) {
+ // No reason to log, probably - connection where client did nothing after connecting.
} catch ( Exception e ) {
- log.warn( "Error accepting client", e );
Transfer.safeClose( connection );
+ log.warn( "Error handling client", e );
}
}
};
try {
processingPool.execute( handler );
} catch ( RejectedExecutionException e ) {
- Transfer.safeClose( acceptedSocket );
+ Transfer.safeClose( connection );
}
}
} finally {
diff --git a/src/main/java/org/openslx/filetransfer/Transfer.java b/src/main/java/org/openslx/filetransfer/Transfer.java
index 589d142..aebd3ce 100644
--- a/src/main/java/org/openslx/filetransfer/Transfer.java
+++ b/src/main/java/org/openslx/filetransfer/Transfer.java
@@ -9,13 +9,14 @@ import java.net.Socket;
import java.net.SocketTimeoutException;
import java.util.HashMap;
import java.util.Map;
+import java.util.Map.Entry;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocketFactory;
import net.jpountz.lz4.LZ4Factory;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.Logger;
import org.openslx.util.Util;
public abstract class Transfer
@@ -23,7 +24,7 @@ public abstract class Transfer
protected final Socket transferSocket;
protected final DataOutputStream outStream;
protected final DataInputStream dataFromServer;
- protected String ERROR = null;
+ private String remoteError;
private boolean shouldGetToken;
protected boolean useCompression = true;
@@ -51,7 +52,7 @@ public abstract class Transfer
transferSocket = sslSocketFactory.createSocket();
}
transferSocket.setSoTimeout( readTimeoutMs );
- transferSocket.connect( new InetSocketAddress( host, port ) );
+ transferSocket.connect( new InetSocketAddress( host, port ), 4000 );
outStream = new DataOutputStream( transferSocket.getOutputStream() );
dataFromServer = new DataInputStream( transferSocket.getInputStream() );
@@ -169,6 +170,7 @@ public abstract class Transfer
*/
protected MetaData readMetaData()
{
+
Map<String, String> entries = new HashMap<>();
try {
while ( true ) {
@@ -183,7 +185,7 @@ public abstract class Transfer
continue;
}
if ( splitted[0].equals( "ERROR" ) )
- ERROR = splitted[1];
+ remoteError = splitted[1];
if ( entries.containsKey( splitted[0] ) ) {
log.warn( "Received meta data key " + splitted[0] + " when already received, ignoring!" );
} else {
@@ -192,10 +194,10 @@ public abstract class Transfer
}
} catch ( SocketTimeoutException ste ) {
sendErrorCode( "timeout" );
- this.close( "Socket Timeout occured in readMetaData. " + ERROR );
+ this.close( "Socket Timeout occured in readMetaData." );
return null;
} catch ( Exception e ) {
- this.close( "Exception occured in readMetaData: " + e.toString() + " " + ERROR );
+ this.close( "Exception occured in readMetaData: " + e.toString() );
return null;
}
return new MetaData( entries );
@@ -219,11 +221,17 @@ public abstract class Transfer
*/
protected void close( String error, UploadStatusCallback callback, boolean sendToPeer )
{
+ close( error, callback, sendToPeer, null );
+ }
+
+ protected void close( String error, UploadStatusCallback callback, boolean sendToPeer, Exception e )
+ {
if ( error != null ) {
if ( sendToPeer )
sendErrorCode( error );
if ( callback != null )
callback.uploadError( error );
+ log.info( "Closing with error '" + error + "'", e );
}
synchronized ( transferSocket ) {
safeClose( dataFromServer, outStream, transferSocket );
@@ -232,7 +240,12 @@ public abstract class Transfer
protected void close( String error )
{
- close( error, null, false );
+ close( error, null );
+ }
+
+ protected void close( String error, Exception e )
+ {
+ close( error, null, false, e );
}
public void cancel()
@@ -272,7 +285,7 @@ public abstract class Transfer
*/
public String getRemoteError()
{
- return ERROR;
+ return remoteError;
}
/**
@@ -406,6 +419,21 @@ public abstract class Transfer
return meta.containsKey( "COMPRESS" );
}
+ @Override
+ public String toString()
+ {
+ StringBuilder sb = new StringBuilder();
+ for ( Entry<String, String> it : meta.entrySet() ) {
+ if ( sb.length() != 0 ) {
+ sb.append( ' ' );
+ }
+ sb.append( it.getKey() );
+ sb.append( '=' );
+ sb.append( it.getValue() );
+ }
+ return sb.toString();
+ }
+
}
}
diff --git a/src/main/java/org/openslx/filetransfer/Uploader.java b/src/main/java/org/openslx/filetransfer/Uploader.java
index e82955b..6edc268 100644
--- a/src/main/java/org/openslx/filetransfer/Uploader.java
+++ b/src/main/java/org/openslx/filetransfer/Uploader.java
@@ -12,12 +12,13 @@ import javax.net.ssl.SSLContext;
import net.jpountz.lz4.LZ4Compressor;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
public class Uploader extends Transfer
{
- private static final Logger log = Logger.getLogger( Uploader.class );
+ private static final Logger log = LogManager.getLogger( Uploader.class );
private final LZ4Compressor compressor = lz4factory.fastCompressor();
@@ -65,6 +66,10 @@ public class Uploader extends Transfer
return upload( filename, null );
}
+ /**
+ * Compressing output stream that will either write LZ4-compressed data, or if the data
+ * doesn't compress well, just the original uncompressed data.
+ */
private class Lz4OutStream extends OutputStream
{
@@ -72,7 +77,7 @@ public class Uploader extends Transfer
private byte[] buffer;
- private long compressed, uncompressed;
+ private long bytesSentTotal, bytesDecompressedTotal;
private int chunksCompressed, chunksUncompressed;
@@ -95,16 +100,17 @@ public class Uploader extends Transfer
if ( buffer == null || buffer.length < maxCompressedLength ) {
buffer = new byte[ maxCompressedLength ];
}
- uncompressed += decompressedLength;
+ bytesDecompressedTotal += decompressedLength;
int compressedLength = compressor.compress( data, off, decompressedLength, buffer, 0, maxCompressedLength );
parentStream.writeInt( decompressedLength );
+ // Only send compressed data if we got down to at least ~88% the original size
if ( ( compressedLength * 9 / 8 ) < decompressedLength ) {
- compressed += compressedLength;
+ bytesSentTotal += compressedLength;
chunksCompressed++;
parentStream.writeInt( compressedLength );
parentStream.write( buffer, 0, compressedLength );
} else {
- compressed += decompressedLength;
+ bytesSentTotal += decompressedLength;
chunksUncompressed++;
parentStream.writeInt( decompressedLength );
parentStream.write( data, off, decompressedLength );
@@ -113,15 +119,14 @@ public class Uploader extends Transfer
public void printStats()
{
- if ( compressed == 0 )
+ if ( bytesSentTotal == 0 )
return;
- log.info( "Sent bytes: " + compressed + ", decompressed bytes: " + uncompressed );
- log.info( "Sent compressed: " + chunksCompressed + ", uncompressed: " + chunksUncompressed );
+ log.info( "Bytes sent: " + bytesSentTotal + ", decompressed to: " + bytesDecompressedTotal );
+ log.info( "Chunks sent compressed: " + chunksCompressed + ", uncompressed: " + chunksUncompressed );
}
}
- @SuppressWarnings( "resource" )
public boolean upload( String filename, UploadStatusCallback callback )
{
if ( shouldGetToken() ) {
@@ -136,6 +141,18 @@ public class Uploader extends Transfer
this.close( "Could not open given file for reading.", callback, true );
return false;
}
+ byte[] data = null;
+ // Cannot go above 500000 for backwards compat
+ for ( int bufsiz = 500; bufsiz >= 100 && data == null; bufsiz -= 100 ) {
+ try {
+ data = new byte[ bufsiz * 1000 ];
+ } catch ( OutOfMemoryError e ) {
+ }
+ }
+ if ( data == null ) {
+ this.close( "Could not allocate buffer for reading.", callback, true );
+ return false;
+ }
while ( !Thread.currentThread().isInterrupted() ) { // Loop as long as remote peer is requesting chunks from this file
// Read meta data of remote peer - either new range, or it's telling us it's done
MetaData meta = readMetaData();
@@ -145,6 +162,10 @@ public class Uploader extends Transfer
}
if ( meta.isDone() ) // Download complete?
break;
+ if ( getRemoteError() != null ) {
+ this.close( "Remote peer sent error: " + getRemoteError(), callback, true );
+ return false;
+ }
// Not complete, so there must be another range request
FileRange requestedRange = meta.getRange();
if ( requestedRange == null ) {
@@ -158,14 +179,14 @@ public class Uploader extends Transfer
return false;
}
} catch ( IOException e ) {
- this.close( "Could not get current length of file " + filename, callback, false );
+ this.close( "Could not get current length of file " + filename, callback, false, e );
return false;
}
// Seek to requested chunk
try {
file.seek( requestedRange.startOffset );
} catch ( IOException e ) {
- this.close( "Could not seek to start of requested range in given file (" + requestedRange.startOffset + ")", callback, true );
+ this.close( "Could not seek to start of requested range in given file (" + requestedRange.startOffset + ")", callback, true, e );
return false;
}
// Send confirmation of range and compression mode we're about to send
@@ -185,7 +206,6 @@ public class Uploader extends Transfer
return false;
}
// Finally send requested chunk
- byte[] data = new byte[ 500000 ]; // 500kb
int hasRead = 0;
int length = requestedRange.getLength();
while ( hasRead < length ) {
@@ -193,7 +213,7 @@ public class Uploader extends Transfer
try {
ret = file.read( data, 0, Math.min( length - hasRead, data.length ) );
} catch ( IOException e ) {
- this.close( "Error reading from file ", callback, true );
+ this.close( "Error reading from file ", callback, true, e );
return false;
}
if ( ret == -1 ) {
@@ -204,7 +224,7 @@ public class Uploader extends Transfer
try {
outStr.write( data, 0, ret );
} catch ( IOException e ) {
- this.close( "Sending payload failed" );
+ this.close( "Sending payload failed", e );
return false;
}
if ( callback != null )
diff --git a/src/main/java/org/openslx/filetransfer/util/ChunkList.java b/src/main/java/org/openslx/filetransfer/util/ChunkList.java
index 91d6f1e..bd927b1 100644
--- a/src/main/java/org/openslx/filetransfer/util/ChunkList.java
+++ b/src/main/java/org/openslx/filetransfer/util/ChunkList.java
@@ -10,14 +10,15 @@ import java.util.LinkedList;
import java.util.List;
import java.util.zip.CRC32;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.openslx.filetransfer.LocalChunkSource.ChunkSource;
import org.openslx.util.ThriftUtil;
public class ChunkList
{
- private static final Logger LOGGER = Logger.getLogger( ChunkList.class );
+ private static final Logger LOGGER = LogManager.getLogger( ChunkList.class );
/**
* Here we keep a list of all chunks in the proper order, in case we quickly need to access one
@@ -204,7 +205,7 @@ public class ChunkList
missingChunks.addAll( append );
}
} catch ( Exception e ) {
- LOGGER.warn( "chunk clone list if messed up", e );
+ LOGGER.warn( "chunk clone list is messed up", e );
}
}
}
@@ -414,6 +415,35 @@ public class ChunkList
return sb.toString();
}
+ public synchronized String getStats()
+ {
+ int complete = 0, copying = 0, hashing = 0, missing = 0, qfc = 0, uploading = 0;
+ for ( FileChunk chunk : allChunks ) {
+ switch ( chunk.status ) {
+ case COMPLETE:
+ complete++;
+ break;
+ case COPYING:
+ copying++;
+ break;
+ case HASHING:
+ hashing++;
+ break;
+ case MISSING:
+ missing++;
+ break;
+ case QUEUED_FOR_COPY:
+ qfc++;
+ break;
+ case UPLOADING:
+ uploading++;
+ break;
+ }
+ }
+ return "(" + allChunks.size() + ":" + completeChunks.size() + "/" + pendingChunks.size() + "/" + missingChunks.size() + ")"
+ + " (" + complete + "/" + copying + "/" + hashing + "/" + missing + "/" + qfc + "/" + uploading + ")";
+ }
+
public synchronized boolean isEmpty()
{
return allChunks.isEmpty();
diff --git a/src/main/java/org/openslx/filetransfer/util/FileChunk.java b/src/main/java/org/openslx/filetransfer/util/FileChunk.java
index 6594e31..99b30ea 100644
--- a/src/main/java/org/openslx/filetransfer/util/FileChunk.java
+++ b/src/main/java/org/openslx/filetransfer/util/FileChunk.java
@@ -5,14 +5,15 @@ import java.util.Iterator;
import java.util.List;
import java.util.zip.CRC32;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.openslx.filetransfer.FileRange;
import org.openslx.filetransfer.LocalChunkSource.ChunkSource;
public class FileChunk
{
- private static final Logger LOGGER = Logger.getLogger( FileChunk.class );
+ private static final Logger LOGGER = LogManager.getLogger( FileChunk.class );
/**
* Length in bytes of binary sha1 representation
diff --git a/src/main/java/org/openslx/filetransfer/util/HashChecker.java b/src/main/java/org/openslx/filetransfer/util/HashChecker.java
index f6b27f7..41bd05a 100644
--- a/src/main/java/org/openslx/filetransfer/util/HashChecker.java
+++ b/src/main/java/org/openslx/filetransfer/util/HashChecker.java
@@ -9,7 +9,8 @@ import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
public class HashChecker
{
@@ -17,7 +18,7 @@ public class HashChecker
public static final int CALC_HASH = 2;
public static final int CALC_CRC32 = 4;
- private static final Logger LOGGER = Logger.getLogger( HashChecker.class );
+ private static final Logger LOGGER = LogManager.getLogger( HashChecker.class );
private final BlockingQueue<HashTask> queue;
@@ -136,7 +137,12 @@ public class HashChecker
chunk.setStatus( ChunkStatus.HASHING );
}
if ( blocking ) {
+ long pre = System.currentTimeMillis();
queue.put( task );
+ long duration = System.currentTimeMillis() - pre;
+ if ( duration > 1000 ) {
+ LOGGER.warn( "HashChecker.queue() took " + duration + "ms" );
+ }
} else {
if ( !queue.offer( task ) ) {
return false;
@@ -223,7 +229,7 @@ public class HashChecker
public static enum HashResult
{
- NONE, // No hashing tool place
+ NONE, // No hashing took place
VALID, // Hash matches
INVALID, // Hash does not match
FAILURE // Error calculating hash
diff --git a/src/main/java/org/openslx/filetransfer/util/IncomingTransferBase.java b/src/main/java/org/openslx/filetransfer/util/IncomingTransferBase.java
index 8a69020..8e68dc2 100644
--- a/src/main/java/org/openslx/filetransfer/util/IncomingTransferBase.java
+++ b/src/main/java/org/openslx/filetransfer/util/IncomingTransferBase.java
@@ -14,7 +14,8 @@ import java.util.Iterator;
import java.util.List;
import java.util.concurrent.ExecutorService;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.openslx.bwlp.thrift.iface.TransferState;
import org.openslx.bwlp.thrift.iface.TransferStatus;
import org.openslx.filetransfer.DataReceivedCallback;
@@ -30,7 +31,7 @@ import org.openslx.util.ThriftUtil;
public abstract class IncomingTransferBase extends AbstractTransfer implements HashCheckCallback
{
- private static final Logger LOGGER = Logger.getLogger( IncomingTransferBase.class );
+ private static final Logger LOGGER = LogManager.getLogger( IncomingTransferBase.class );
/**
* Remote peer is uploading, so on our end, we have Downloaders
@@ -153,7 +154,9 @@ public abstract class IncomingTransferBase extends AbstractTransfer implements H
@Override
public final int getActiveConnectionCount()
{
- return downloads.size();
+ synchronized ( downloads ) {
+ return downloads.size();
+ }
}
public final boolean hashesEqual( List<ByteBuffer> blockHashes )
@@ -215,11 +218,11 @@ public abstract class IncomingTransferBase extends AbstractTransfer implements H
public void updateBlockHashList( List<byte[]> hashList )
{
if ( state != TransferState.IDLE && state != TransferState.WORKING ) {
- LOGGER.debug( this.getId() + ": Rejecting block hash list in state " + state );
+ LOGGER.info( this.getId() + ": Rejecting block hash list in state " + state );
return;
}
if ( hashList == null ) {
- LOGGER.debug( this.getId() + ": Rejecting null block hash list" );
+ LOGGER.info( this.getId() + ": Rejecting null block hash list" );
return;
}
int firstNew = chunks.updateSha1Sums( hashList );
@@ -286,6 +289,9 @@ public abstract class IncomingTransferBase extends AbstractTransfer implements H
if ( sources != null && !sources.isEmpty() ) {
chunks.markLocalCopyCandidates( sources );
}
+ if ( state == TransferState.IDLE ) {
+ state = TransferState.WORKING;
+ }
localCopyManager.trigger();
}
@@ -389,7 +395,7 @@ public abstract class IncomingTransferBase extends AbstractTransfer implements H
currentChunk = chunks.getMissing();
} catch ( InterruptedException e ) {
Thread.currentThread().interrupt();
- cancel();
+ LOGGER.info( "Incoming transfer connection was interrupted" );
return null;
}
if ( currentChunk == null ) {
@@ -437,7 +443,12 @@ public abstract class IncomingTransferBase extends AbstractTransfer implements H
}
// We have no hash checker, or hasher rejected block,
// or the hash for the current chunk is unknown - flush to disk
+ long pre = System.currentTimeMillis();
writeFileData( currentChunk.range.startOffset, currentChunk.range.getLength(), buffer );
+ long duration = System.currentTimeMillis() - pre;
+ if ( duration > 2000 ) {
+ LOGGER.warn( "Writing chunk to disk before hash check took " + duration + "ms. Storage backend overloaded?" );
+ }
chunks.markCompleted( currentChunk, false );
chunkStatusChanged( currentChunk );
if ( passEx != null )
@@ -463,6 +474,7 @@ public abstract class IncomingTransferBase extends AbstractTransfer implements H
@Override
public void run()
{
+ int active;
try {
CbHandler cbh = new CbHandler( connection );
if ( connection.download( cbh, cbh ) ) {
@@ -481,7 +493,7 @@ public abstract class IncomingTransferBase extends AbstractTransfer implements H
}
chunkStatusChanged( cbh.currentChunk );
}
- LOGGER.debug( "Connection for " + getTmpFileName().getAbsolutePath() + " dropped" );
+ LOGGER.info( "Connection for " + getTmpFileName().getAbsolutePath() + " dropped prematurely" );
}
if ( state != TransferState.FINISHED && state != TransferState.ERROR ) {
lastActivityTime.set( System.currentTimeMillis() );
@@ -489,6 +501,7 @@ public abstract class IncomingTransferBase extends AbstractTransfer implements H
} finally {
synchronized ( downloads ) {
downloads.remove( connection );
+ active = downloads.size();
}
}
if ( chunks.isComplete() ) {
@@ -499,6 +512,9 @@ public abstract class IncomingTransferBase extends AbstractTransfer implements H
if ( localCopyManager != null ) {
localCopyManager.trigger();
}
+ LOGGER.info( "Downloader disconnected, " + active + " still running. " + chunks.getStats() );
+ } else {
+ LOGGER.info( "Downloader disconnected, state=" + state + ". " + chunks.getStats() );
}
}
} );
@@ -563,7 +579,7 @@ public abstract class IncomingTransferBase extends AbstractTransfer implements H
public void hashCheckDone( HashResult result, byte[] data, FileChunk chunk )
{
if ( state != TransferState.IDLE && state != TransferState.WORKING ) {
- LOGGER.debug( "hashCheckDone called in bad state " + state.name() );
+ LOGGER.warn( "hashCheckDone called in bad state " + state.name() );
return;
}
switch ( result ) {
@@ -576,7 +592,12 @@ public abstract class IncomingTransferBase extends AbstractTransfer implements H
chunks.markCompleted( chunk, true );
} else {
try {
+ long pre = System.currentTimeMillis();
writeFileData( chunk.range.startOffset, chunk.range.getLength(), data );
+ long duration = System.currentTimeMillis() - pre;
+ if ( duration > 2000 ) {
+ LOGGER.warn( "Writing chunk to disk after hash check took " + duration + "ms. Storage backend overloaded?" );
+ }
chunks.markCompleted( chunk, true );
} catch ( Exception e ) {
LOGGER.warn( "Cannot write to file after hash check", e );
@@ -600,7 +621,7 @@ public abstract class IncomingTransferBase extends AbstractTransfer implements H
}
// A block finished, see if we can queue a new one
queueUnhashedChunk( false );
- if ( localCopyManager != null ) {
+ if ( localCopyManager != null && localCopyManager.isAlive() ) {
localCopyManager.trigger();
}
}
@@ -617,7 +638,7 @@ public abstract class IncomingTransferBase extends AbstractTransfer implements H
try {
data = loadChunkFromFile( chunk );
} catch ( EOFException e1 ) {
- LOGGER.warn( "Cannot queue unhashed chunk: file too short. Marking is invalid." );
+ LOGGER.warn( "Cannot queue unhashed chunk: file too short. Marking as invalid." );
chunks.markFailed( chunk );
chunkStatusChanged( chunk );
return;
@@ -645,7 +666,7 @@ public abstract class IncomingTransferBase extends AbstractTransfer implements H
final synchronized void finishUploadInternal()
{
- if ( state == TransferState.FINISHED ) {
+ if ( state == TransferState.FINISHED || state == TransferState.ERROR ) {
return;
}
try {
@@ -659,13 +680,9 @@ public abstract class IncomingTransferBase extends AbstractTransfer implements H
if ( localCopyManager != null ) {
localCopyManager.interrupt();
}
- if ( state != TransferState.WORKING ) {
+ state = TransferState.FINISHED; // Races...
+ if ( !finishIncomingTransfer() ) {
state = TransferState.ERROR;
- } else {
- state = TransferState.FINISHED; // Races...
- if ( !finishIncomingTransfer() ) {
- state = TransferState.ERROR;
- }
}
}
diff --git a/src/main/java/org/openslx/filetransfer/util/LocalCopyManager.java b/src/main/java/org/openslx/filetransfer/util/LocalCopyManager.java
index 54dd2d0..e1fad97 100644
--- a/src/main/java/org/openslx/filetransfer/util/LocalCopyManager.java
+++ b/src/main/java/org/openslx/filetransfer/util/LocalCopyManager.java
@@ -9,7 +9,8 @@ import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.openslx.filetransfer.LocalChunkSource.ChunkSource;
import org.openslx.filetransfer.LocalChunkSource.SourceFile;
import org.openslx.util.Util;
@@ -17,7 +18,7 @@ import org.openslx.util.Util;
public class LocalCopyManager extends Thread
{
- private static final Logger LOGGER = Logger.getLogger( LocalCopyManager.class );
+ private static final Logger LOGGER = LogManager.getLogger( LocalCopyManager.class );
private FileChunk currentChunk = null;
diff --git a/src/main/java/org/openslx/filetransfer/util/OutgoingTransferBase.java b/src/main/java/org/openslx/filetransfer/util/OutgoingTransferBase.java
index 18296c5..ad2e96c 100644
--- a/src/main/java/org/openslx/filetransfer/util/OutgoingTransferBase.java
+++ b/src/main/java/org/openslx/filetransfer/util/OutgoingTransferBase.java
@@ -6,7 +6,8 @@ import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.TimeUnit;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.openslx.bwlp.thrift.iface.TransferInformation;
import org.openslx.filetransfer.Uploader;
@@ -17,7 +18,7 @@ public abstract class OutgoingTransferBase extends AbstractTransfer
* Constants
*/
- private static final Logger LOGGER = Logger.getLogger( OutgoingTransferBase.class );
+ private static final Logger LOGGER = LogManager.getLogger( OutgoingTransferBase.class );
private static final long INACTIVITY_TIMEOUT = TimeUnit.MINUTES.toMillis( 5 );
@@ -74,9 +75,13 @@ public abstract class OutgoingTransferBase extends AbstractTransfer
@Override
public void run()
{
- boolean ret = connection.upload( sourceFile.getAbsolutePath() );
- synchronized ( uploads ) {
- uploads.remove( connection );
+ boolean ret = false;
+ try {
+ ret = connection.upload( sourceFile.getAbsolutePath() );
+ } finally {
+ synchronized ( uploads ) {
+ uploads.remove( connection );
+ }
}
if ( ret ) {
connectFails.set( 0 );
diff --git a/src/main/java/org/openslx/firmware/FirmwareException.java b/src/main/java/org/openslx/firmware/FirmwareException.java
new file mode 100644
index 0000000..494d653
--- /dev/null
+++ b/src/main/java/org/openslx/firmware/FirmwareException.java
@@ -0,0 +1,25 @@
+package org.openslx.firmware;
+
+/**
+ * An exception of a firmware-related error.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class FirmwareException extends Exception
+{
+ /**
+ * Version for serialization.
+ */
+ private static final long serialVersionUID = -5932122856822258867L;
+
+ /**
+ * Creates a firmware exception including an error message.
+ *
+ * @param errorMsg message to describe the exception.
+ */
+ public FirmwareException( String errorMsg )
+ {
+ super( errorMsg );
+ }
+}
diff --git a/src/main/java/org/openslx/firmware/QemuFirmware.java b/src/main/java/org/openslx/firmware/QemuFirmware.java
new file mode 100644
index 0000000..7a81217
--- /dev/null
+++ b/src/main/java/org/openslx/firmware/QemuFirmware.java
@@ -0,0 +1,169 @@
+package org.openslx.firmware;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.Reader;
+import java.util.ArrayList;
+
+import com.google.gson.Gson;
+import com.google.gson.JsonIOException;
+import com.google.gson.JsonSyntaxException;
+import com.google.gson.annotations.SerializedName;
+
+/**
+ * Data representation of QEMU firmware specification files (*.json).
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class QemuFirmware
+{
+ /**
+ * Default QEMU firmware specification directory under Linux-based systems.
+ */
+ public final static String DEFAULT_SPEC_DIR = "/usr/share/qemu/firmware";
+
+ @SerializedName( "description" )
+ private String description;
+ @SerializedName( "interface-types" )
+ private ArrayList<String> interfaceTypes;
+ @SerializedName( "mapping" )
+ private FirmwareMapping mapping;
+ @SerializedName( "targets" )
+ private ArrayList<FirmwareTarget> targets;
+ @SerializedName( "features" )
+ private ArrayList<String> features;
+ @SerializedName( "tags" )
+ private ArrayList<String> tags;
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public ArrayList<String> getInterfaceTypes()
+ {
+ return interfaceTypes;
+ }
+
+ public FirmwareMapping getMapping()
+ {
+ return mapping;
+ }
+
+ public ArrayList<FirmwareTarget> getTargets()
+ {
+ return targets;
+ }
+
+ public ArrayList<String> getFeatures()
+ {
+ return features;
+ }
+
+ public ArrayList<String> getTags()
+ {
+ return tags;
+ }
+
+ /**
+ * Parse QEMU firmware specification from firmware specification Json file.
+ *
+ * @param fwSpecFile firmware specification Json file.
+ * @return QEMU firmware specification.
+ */
+ public static QemuFirmware fromFwSpec( File fwSpecFile )
+ {
+ final Gson gson = new Gson();
+ QemuFirmware firmware = null;
+
+ try {
+ final Reader jsonContent = new FileReader( fwSpecFile );
+ firmware = gson.fromJson( jsonContent, QemuFirmware.class );
+ } catch ( FileNotFoundException | NullPointerException | JsonSyntaxException | JsonIOException e ) {
+ firmware = null;
+ }
+
+ return firmware;
+ }
+}
+
+class FirmwareMapping
+{
+ @SerializedName( "device" )
+ private String device;
+ @SerializedName( "executable" )
+ private FirmwareMappingExecutable executable;
+ @SerializedName( "nvram-template" )
+ private FirmwareMappingNvramTemplate nvramTemplate;
+
+ public String getDevice()
+ {
+ return device;
+ }
+
+ public FirmwareMappingExecutable getExecutable()
+ {
+ return executable;
+ }
+
+ public FirmwareMappingNvramTemplate getNvramTemplate()
+ {
+ return nvramTemplate;
+ }
+}
+
+class FirmwareMappingExecutable
+{
+ @SerializedName( "filename" )
+ private String fileName;
+ @SerializedName( "format" )
+ private String format;
+
+ public String getFileName()
+ {
+ return fileName;
+ }
+
+ public String getFormat()
+ {
+ return format;
+ }
+}
+
+class FirmwareMappingNvramTemplate
+{
+ @SerializedName( "filename" )
+ private String fileName;
+ @SerializedName( "format" )
+ private String format;
+
+ public String getFileName()
+ {
+ return fileName;
+ }
+
+ public String getFormat()
+ {
+ return format;
+ }
+}
+
+class FirmwareTarget
+{
+ @SerializedName( "architecture" )
+ private String architecture;
+ @SerializedName( "machines" )
+ private ArrayList<String> machines;
+
+ public String getArchitecture()
+ {
+ return architecture;
+ }
+
+ public ArrayList<String> getMachines()
+ {
+ return machines;
+ }
+}
diff --git a/src/main/java/org/openslx/firmware/QemuFirmwareUtil.java b/src/main/java/org/openslx/firmware/QemuFirmwareUtil.java
new file mode 100644
index 0000000..987a0c0
--- /dev/null
+++ b/src/main/java/org/openslx/firmware/QemuFirmwareUtil.java
@@ -0,0 +1,121 @@
+package org.openslx.firmware;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.function.Predicate;
+
+import org.openslx.util.LevenshteinDistance;
+import org.openslx.virtualization.configuration.transformation.TransformationException;
+
+/**
+ * Utilities to process QEMU firmware specification files.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class QemuFirmwareUtil
+{
+ /**
+ * Lookup a virtual machine's target OS loader based on QEMU firmware specification files.
+ *
+ * @param fwSpecDir QEMU firmware specification directory of the target host.
+ * @param sourceOsLoader OS loader of the virtual machine.
+ * @param sourceOsArch OS architecture of the virtual machine.
+ * @param sourceOsMachine OS machine type of the virtual machine.
+ * @return Path to the new target OS loader file for the virtual machine.
+ *
+ * @throws TransformationException Failed to lookup target OS loader for virtual machine.
+ */
+ public static String lookupTargetOsLoader( String fwSpecDir, String sourceOsLoader, String sourceOsArch,
+ String sourceOsMachine )
+ throws FirmwareException
+ {
+ String lookupOsLoader = null;
+
+ // parse and check firmware specification directory
+ final File fwSpecDirFile = new File( fwSpecDir );
+ if ( !fwSpecDirFile.exists() || !fwSpecDirFile.isDirectory() ) {
+ throw new FirmwareException( "Path to QEMU firmware specifications directory is invalid!" );
+ }
+
+ // get all firmware specification files
+ final FileFilter fwSpecFilesFilter = file -> !file.isDirectory() && file.getName().endsWith( ".json" );
+ final File[] fwSpecFiles = fwSpecDirFile.listFiles( fwSpecFilesFilter );
+
+ // get paths to firmware files from firmware specification files
+ if ( fwSpecFiles != null ) {
+ final ArrayList<QemuFirmware> uefiFirmwares = new ArrayList<QemuFirmware>();
+
+ for ( final File fwSpecFile : fwSpecFiles ) {
+ // parse the firmware file
+ final QemuFirmware firmware = QemuFirmware.fromFwSpec( fwSpecFile );
+ if ( firmware == null ) {
+ throw new FirmwareException( "Firmware '" + fwSpecFile.toString() + "' can not be parsed correctly!" );
+ } else {
+ final Predicate<String> byInterfaceType = s -> s.toLowerCase().equals( "uefi" );
+ if ( firmware.getInterfaceTypes().stream().filter( byInterfaceType ).findAny().isPresent() ) {
+ // found valid UEFI firmware
+ // check if architecture and machine type of the VM is supported by the firmware
+ final Predicate<FirmwareTarget> byArchitecture = t -> sourceOsArch.equals( t.getArchitecture() );
+ final Predicate<String> byMachineType = s -> sourceOsMachine.startsWith( s.replace( "*", "" ) );
+ final Predicate<FirmwareTarget> byMachines = t -> t.getMachines().stream().filter( byMachineType )
+ .findAny().isPresent();
+
+ if ( firmware.getTargets().stream().filter( byArchitecture ).filter( byMachines ).findAny()
+ .isPresent() ) {
+ // found UEFI firmware supporting suitable architecture and machine type from VM
+ uefiFirmwares.add( firmware );
+ }
+ }
+ }
+ }
+
+ if ( uefiFirmwares.isEmpty() ) {
+ throw new FirmwareException( "There aren't any suitable UEFI firmwares locally available!" );
+ } else {
+ final LevenshteinDistance distance = new LevenshteinDistance( 1, 1, 1 );
+ int minFileNameDistance = Integer.MAX_VALUE;
+ Path suitablestUefiFirmwarePath = null;
+
+ for ( final QemuFirmware uefiFirmware : uefiFirmwares ) {
+ final Path uefiFirmwarePath = Paths.get( uefiFirmware.getMapping().getExecutable().getFileName() );
+ final Path sourceOsLoaderPath = Paths.get( sourceOsLoader );
+ final String uefiFirmwareFileName = uefiFirmwarePath.getFileName().toString().toLowerCase();
+ final String sourceOsLoaderFileName = sourceOsLoaderPath.getFileName().toString().toLowerCase();
+
+ final int fileNameDistance = distance.calculateDistance( uefiFirmwareFileName, sourceOsLoaderFileName );
+ if ( fileNameDistance < minFileNameDistance ) {
+ minFileNameDistance = fileNameDistance;
+ suitablestUefiFirmwarePath = uefiFirmwarePath;
+ }
+ }
+
+ lookupOsLoader = suitablestUefiFirmwarePath.toString();
+ }
+ }
+
+ return lookupOsLoader;
+ }
+
+ /**
+ * Lookup a virtual machine's target OS loader based on QEMU firmware specification files under
+ * the default path.
+ *
+ * @param sourceOsLoader OS loader of the virtual machine.
+ * @param sourceOsArch OS architecture of the virtual machine.
+ * @param sourceOsMachine OS machine type of the virtual machine.
+ * @return Path to the new target OS loader file for the virtual machine.
+ *
+ * @throws TransformationException Failed to lookup target OS loader for virtual machine.
+ */
+ public static String lookupTargetOsLoaderDefaultFwSpecDir( String sourceOsLoader, String sourceOsArch,
+ String sourceOsMachine )
+ throws FirmwareException
+ {
+ return QemuFirmwareUtil.lookupTargetOsLoader( QemuFirmware.DEFAULT_SPEC_DIR, sourceOsLoader, sourceOsArch,
+ sourceOsMachine );
+ }
+}
diff --git a/src/main/java/org/openslx/imagemaster/crcchecker/CrcFile.java b/src/main/java/org/openslx/imagemaster/crcchecker/CrcFile.java
index 17a44a2..4a05471 100644
--- a/src/main/java/org/openslx/imagemaster/crcchecker/CrcFile.java
+++ b/src/main/java/org/openslx/imagemaster/crcchecker/CrcFile.java
@@ -12,7 +12,8 @@ import java.util.Arrays;
import java.util.List;
import java.util.zip.CRC32;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
/**
* Represents a crc file
@@ -24,7 +25,7 @@ public class CrcFile
private Boolean valid = null;
private final File file;
- private static Logger log = Logger.getLogger( CrcFile.class );
+ private static Logger log = LogManager.getLogger( CrcFile.class );
/**
* Loads a crcFile from file
diff --git a/src/main/java/org/openslx/libvirt/capabilities/Capabilities.java b/src/main/java/org/openslx/libvirt/capabilities/Capabilities.java
new file mode 100644
index 0000000..7987371
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/capabilities/Capabilities.java
@@ -0,0 +1,155 @@
+package org.openslx.libvirt.capabilities;
+
+import java.io.File;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.openslx.libvirt.capabilities.cpu.Cpu;
+import org.openslx.libvirt.capabilities.guest.Guest;
+import org.openslx.libvirt.xml.LibvirtXmlDocument;
+import org.openslx.libvirt.xml.LibvirtXmlDocumentException;
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+import org.openslx.libvirt.xml.LibvirtXmlResources;
+import org.openslx.libvirt.xml.LibvirtXmlSerializationException;
+import org.openslx.libvirt.xml.LibvirtXmlValidationException;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+/**
+ * Implementation of the Libvirt capabilities XML document.
+ *
+ * The Libvirt capabilities XML document is used to describe the configuration and capabilities of
+ * the hypervisor's host.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Capabilities extends LibvirtXmlDocument
+{
+ /**
+ * Creates Libvirt capabilities XML document from {@link String} providing Libvirt capabilities
+ * XML content.
+ *
+ * @param xml {@link String} with Libvirt capabilities XML content.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the capabilities XML content failed.
+ * @throws LibvirtXmlValidationException XML content is not a valid capabilities XML document.
+ */
+ public Capabilities( String xml )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException, LibvirtXmlValidationException
+ {
+ super( xml, LibvirtXmlResources.getLibvirtRng( "capabilities.rng" ) );
+ }
+
+ /**
+ * Creates Libvirt capabilities XML document from {@link File} containing Libvirt capabilities
+ * XML content.
+ *
+ * @param xml existing {@link File} containing Libvirt capabilities XML content.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the capabilities XML content failed.
+ * @throws LibvirtXmlValidationException XML content is not a valid capabilities XML document.
+ */
+ public Capabilities( File xml )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException, LibvirtXmlValidationException
+ {
+ super( xml, LibvirtXmlResources.getLibvirtRng( "capabilities.rng" ) );
+ }
+
+ /**
+ * Creates Libvirt capabilities XML document from {@link InputStream} providing Libvirt
+ * capabilities XML content.
+ *
+ * @param xml {@link InputStream} providing Libvirt capabilities XML content.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the capabilities XML content failed.
+ * @throws LibvirtXmlValidationException XML content is not a valid capabilities XML document.
+ */
+ public Capabilities( InputStream xml )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException, LibvirtXmlValidationException
+ {
+ super( xml, LibvirtXmlResources.getLibvirtRng( "capabilities.rng" ) );
+ }
+
+ /**
+ * Creates Libvirt capabilities XML document from {@link InputSource} providing Libvirt
+ * capabilities XML content.
+ *
+ * @param xml {@link InputSource} providing Libvirt capabilities XML content.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the capabilities XML content failed.
+ * @throws LibvirtXmlValidationException XML content is not a valid capabilities XML document.
+ */
+ public Capabilities( InputSource xml )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException, LibvirtXmlValidationException
+ {
+ super( xml, LibvirtXmlResources.getLibvirtRng( "capabilities.rng" ) );
+ }
+
+ /**
+ * Returns UUID of the Libvirt host machine.
+ *
+ * @return UUID of the host machine.
+ */
+ public String getHostUuid()
+ {
+ return this.getRootXmlNode().getXmlElementValue( "host/uuid" );
+ }
+
+ /**
+ * Returns CPU capabilities of the host machine.
+ *
+ * @return CPU capabilities of the host machine.
+ */
+ public Cpu getHostCpu()
+ {
+ final Node hostCpuNode = this.getRootXmlNode().getXmlElement( "host/cpu" );
+
+ if ( hostCpuNode == null ) {
+ return null;
+ } else {
+ final LibvirtXmlNode hostCpuXmlNode = new LibvirtXmlNode( this.getRootXmlNode().getXmlDocument(),
+ hostCpuNode );
+ return Cpu.newInstance( hostCpuXmlNode );
+ }
+ }
+
+ /**
+ * Checks whether the Libvirt host machine has IOMMU support.
+ *
+ * @return State of the IOMMU support.
+ */
+ public boolean hasHostIommuSupport()
+ {
+ return this.getRootXmlNode().getXmlElementAttributeValueAsBool( "host/iommu", "support" );
+ }
+
+ /**
+ * Returns capabilities of all possible guest machines.
+ *
+ * @return capabilities of all possible guest machines.
+ */
+ public List<Guest> getGuests()
+ {
+ final List<Guest> guestList = new ArrayList<Guest>();
+ final NodeList guestNodes = this.getRootXmlNode().getXmlNodes( "guest" );
+
+ for ( int i = 0; i < guestNodes.getLength(); i++ ) {
+ final LibvirtXmlNode guestNode = new LibvirtXmlNode( this.getRootXmlNode().getXmlDocument(),
+ guestNodes.item( i ) );
+ final Guest guest = Guest.newInstance( guestNode );
+
+ if ( guest != null ) {
+ guestList.add( guest );
+ }
+ }
+
+ return guestList;
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/capabilities/cpu/Cpu.java b/src/main/java/org/openslx/libvirt/capabilities/cpu/Cpu.java
new file mode 100644
index 0000000..dc5fbd0
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/capabilities/cpu/Cpu.java
@@ -0,0 +1,165 @@
+package org.openslx.libvirt.capabilities.cpu;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+import org.w3c.dom.NodeList;
+
+/**
+ * Implementation of the host CPU capabilities as part of the Libvirt capabilities XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Cpu extends LibvirtXmlNode
+{
+ /**
+ * Creates an empty host CPU capabilities instance.
+ */
+ public Cpu()
+ {
+ super();
+ }
+
+ /**
+ * Creates a host CPU capabilities instance representing an existing Libvirt XML host CPU
+ * capabilities element.
+ *
+ * @param xmlNode existing Libvirt XML host CPU capabilities element.
+ */
+ public Cpu( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns the architecture name of the host CPU.
+ *
+ * @return architecture name of the host CPU.
+ */
+ public String getArch()
+ {
+ return this.getXmlElementValue( "arch" );
+ }
+
+ /**
+ * Returns the model name of the host CPU.
+ *
+ * @return model name of the host CPU.
+ */
+ public String getModel()
+ {
+ return this.getXmlElementValue( "model" );
+ }
+
+ /**
+ * Returns the vendor name of the host CPU.
+ *
+ * @return vendor name of the host CPU.
+ */
+ public String getVendor()
+ {
+ return this.getXmlElementValue( "vendor" );
+ }
+
+ /**
+ * Returns the number of sockets of the host CPU.
+ *
+ * @return number of sockets of the host CPU.
+ */
+ public int getTopologySockets()
+ {
+ final String numSockets = this.getXmlElementAttributeValue( "topology", "sockets" );
+ return Integer.parseInt( numSockets );
+ }
+
+ /**
+ * Returns the number of dies of the host CPU.
+ *
+ * @return number of dies of the host CPU.
+ */
+ public int getTopologyDies()
+ {
+ final String numDies = this.getXmlElementAttributeValue( "topology", "dies" );
+ return Integer.parseInt( numDies );
+ }
+
+ /**
+ * Returns the number of cores of the host CPU.
+ *
+ * @return number of cores of the host CPU.
+ */
+ public int getTopologyCores()
+ {
+ final String numCores = this.getXmlElementAttributeValue( "topology", "cores" );
+ return Integer.parseInt( numCores );
+ }
+
+ /**
+ * Returns the number of threads of the host CPU.
+ *
+ * @return number of threads of the host CPU.
+ */
+ public int getTopologyThreads()
+ {
+ final String numThreads = this.getXmlElementAttributeValue( "topology", "threads" );
+ return Integer.parseInt( numThreads );
+ }
+
+ /**
+ * Returns the supported features of the host CPU.
+ *
+ * @return supported features of the host CPU.
+ */
+ public List<Feature> getFeatures()
+ {
+ final List<Feature> featureList = new ArrayList<Feature>();
+ final NodeList featureNodes = this.getXmlNodes( "feature" );
+
+ for ( int i = 0; i < featureNodes.getLength(); i++ ) {
+ final LibvirtXmlNode featureNode = new LibvirtXmlNode( this.getXmlDocument(), featureNodes.item( i ) );
+ final Feature feature = Feature.newInstance( featureNode );
+
+ if ( feature != null ) {
+ featureList.add( feature );
+ }
+ }
+
+ return featureList;
+ }
+
+ /**
+ * Returns the supported memory pages of the host CPU.
+ *
+ * @return supported memory pages of the host CPU.
+ */
+ public List<Pages> getPages()
+ {
+ final List<Pages> pagesList = new ArrayList<Pages>();
+ final NodeList pagesNodes = this.getXmlNodes( "pages" );
+
+ for ( int i = 0; i < pagesNodes.getLength(); i++ ) {
+ final LibvirtXmlNode pagesNode = new LibvirtXmlNode( this.getXmlDocument(), pagesNodes.item( i ) );
+ final Pages pages = Pages.newInstance( pagesNode );
+
+ if ( pages != null ) {
+ pagesList.add( pages );
+ }
+ }
+
+ return pagesList;
+ }
+
+ /**
+ * Creates a host CPU capabilities instance representing an existing Libvirt XML host CPU
+ * capabilities element.
+ *
+ * @param xmlNode existing Libvirt XML host CPU capabilities element.
+ * @return host CPU capabilities instance.
+ */
+ public static Cpu newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new Cpu( xmlNode );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/capabilities/cpu/Feature.java b/src/main/java/org/openslx/libvirt/capabilities/cpu/Feature.java
new file mode 100644
index 0000000..96c77d5
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/capabilities/cpu/Feature.java
@@ -0,0 +1,51 @@
+package org.openslx.libvirt.capabilities.cpu;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * Implementation of a host CPU feature as part of the Libvirt capabilities XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Feature extends LibvirtXmlNode
+{
+ /**
+ * Creates an empty host CPU feature instance.
+ */
+ public Feature()
+ {
+ super();
+ }
+
+ /**
+ * Creates an host CPU feature representing an existing Libvirt XML host CPU feature element.
+ *
+ * @param xmlNode existing Libvirt XML host CPU feature element.
+ */
+ public Feature( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns the name of the host CPU feature.
+ *
+ * @return name of the host CPU feature.
+ */
+ public String getName()
+ {
+ return this.getXmlElementAttributeValue( "name" );
+ }
+
+ /**
+ * Creates an host CPU feature representing an existing Libvirt XML host CPU feature element.
+ *
+ * @param xmlNode existing Libvirt XML host CPU feature element.
+ * @return host CPU feature instance.
+ */
+ public static Feature newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new Feature( xmlNode );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/capabilities/cpu/Pages.java b/src/main/java/org/openslx/libvirt/capabilities/cpu/Pages.java
new file mode 100644
index 0000000..eea5a36
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/capabilities/cpu/Pages.java
@@ -0,0 +1,60 @@
+package org.openslx.libvirt.capabilities.cpu;
+
+import java.math.BigInteger;
+
+import org.openslx.libvirt.domain.DomainUtils;
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * Implementation of a host CPU memory pages instance as part of the Libvirt capabilities XML
+ * document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Pages extends LibvirtXmlNode
+{
+ /**
+ * Creates an empty host CPU memory pages instance.
+ */
+ public Pages()
+ {
+ super();
+ }
+
+ /**
+ * Creates a host CPU memory pages instance representing an existing Libvirt XML host CPU pages
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML host CPU pages element.
+ */
+ public Pages( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns size of the memory pages instance.
+ *
+ * @return size of the memory pages instance.
+ */
+ public BigInteger getSize()
+ {
+ final String pagesValue = this.getXmlElementAttributeValue( "size" );
+ final String pagesUnit = this.getXmlElementAttributeValue( "unit" );
+
+ return DomainUtils.decodeMemory( pagesValue, pagesUnit );
+ }
+
+ /**
+ * Creates a host CPU memory pages instance representing an existing Libvirt XML host CPU pages
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML host CPU pages element.
+ * @return host CPU memory pages instance.
+ */
+ public static Pages newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new Pages( xmlNode );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/capabilities/guest/Domain.java b/src/main/java/org/openslx/libvirt/capabilities/guest/Domain.java
new file mode 100644
index 0000000..8716064
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/capabilities/guest/Domain.java
@@ -0,0 +1,53 @@
+package org.openslx.libvirt.capabilities.guest;
+
+import org.openslx.libvirt.domain.Domain.Type;
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * Implementation of a guest domain as part of the Libvirt capabilities XML capabilities document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Domain extends LibvirtXmlNode
+{
+ /**
+ * Creates an empty guest domain instance.
+ */
+ public Domain()
+ {
+ super();
+ }
+
+ /**
+ * Creates a guest domain representing an existing Libvirt XML guest domain element.
+ *
+ * @param xmlNode existing Libvirt XML guest domain element.
+ */
+ public Domain( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns the domain type of the guest domain.
+ *
+ * @return type of the guest domain.
+ */
+ public Type getType()
+ {
+ final String type = this.getXmlElementAttributeValue( "type" );
+ return Type.fromString( type );
+ }
+
+ /**
+ * Creates a guest domain representing an existing Libvirt XML guest domain element.
+ *
+ * @param xmlNode existing Libvirt XML guest domain element.
+ * @return guest domain instance.
+ */
+ public static Domain newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new Domain( xmlNode );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/capabilities/guest/Guest.java b/src/main/java/org/openslx/libvirt/capabilities/guest/Guest.java
new file mode 100644
index 0000000..2471180
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/capabilities/guest/Guest.java
@@ -0,0 +1,127 @@
+package org.openslx.libvirt.capabilities.guest;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.openslx.libvirt.domain.Domain.OsType;
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+import org.w3c.dom.NodeList;
+
+/**
+ * Implementation of the guest capabilities as part of the Libvirt capabilities XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Guest extends LibvirtXmlNode
+{
+ /**
+ * Creates an empty guest instance.
+ */
+ public Guest()
+ {
+ super();
+ }
+
+ /**
+ * Creates a guest representing an existing Libvirt XML guest capabilities element.
+ *
+ * @param xmlNode existing Libvirt XML guest capabilities element.
+ */
+ public Guest( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Return OS type of the guest.
+ *
+ * @return OS type of the guest.
+ */
+ public OsType getOsType()
+ {
+ final String osType = this.getXmlElementValue( "os_type" );
+ return OsType.fromString( osType );
+ }
+
+ /**
+ * Returns the architecture name of the guest.
+ *
+ * @return architecture name of the guest.
+ */
+ public String getArchName()
+ {
+ return this.getXmlElementAttributeValue( "arch", "name" );
+ }
+
+ /**
+ * Return word size of the guest's architecture.
+ *
+ * @return word size of the guest's architecture.
+ */
+ public int getArchWordSize()
+ {
+ final String archWordSize = this.getXmlElementValue( "arch/wordsize" );
+ return Integer.parseInt( archWordSize );
+ }
+
+ public String getArchEmulator()
+ {
+ return this.getXmlElementValue( "arch/emulator" );
+ }
+
+ /**
+ * Returns the available machines of the guest's architecture.
+ *
+ * @return available machines of the guest's architecture.
+ */
+ public List<Machine> getArchMachines()
+ {
+ final List<Machine> machinesList = new ArrayList<Machine>();
+ final NodeList machineNodes = this.getXmlNodes( "arch/machine" );
+
+ for ( int i = 0; i < machineNodes.getLength(); i++ ) {
+ final LibvirtXmlNode machineNode = new LibvirtXmlNode( this.getXmlDocument(), machineNodes.item( i ) );
+ final Machine machine = Machine.newInstance( machineNode );
+
+ if ( machine != null ) {
+ machinesList.add( machine );
+ }
+ }
+
+ return machinesList;
+ }
+
+ /**
+ * Returns the supported domains of the guest.
+ *
+ * @return supported domains of the guest.
+ */
+ public List<Domain> getArchDomains()
+ {
+ final List<Domain> domainList = new ArrayList<Domain>();
+ final NodeList domainNodes = this.getXmlNodes( "arch/domain" );
+
+ for ( int i = 0; i < domainNodes.getLength(); i++ ) {
+ final LibvirtXmlNode domainNode = new LibvirtXmlNode( this.getXmlDocument(), domainNodes.item( i ) );
+ final Domain domain = Domain.newInstance( domainNode );
+
+ if ( domain != null ) {
+ domainList.add( domain );
+ }
+ }
+
+ return domainList;
+ }
+
+ /**
+ * Creates a guest representing an existing Libvirt XML guest capabilities element.
+ *
+ * @param xmlNode existing Libvirt XML guest capabilities element.
+ * @return guest capabilities instance.
+ */
+ public static Guest newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new Guest( xmlNode );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/capabilities/guest/Machine.java b/src/main/java/org/openslx/libvirt/capabilities/guest/Machine.java
new file mode 100644
index 0000000..dfe6362
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/capabilities/guest/Machine.java
@@ -0,0 +1,72 @@
+package org.openslx.libvirt.capabilities.guest;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * Implementation of a guest machine as part of the Libvirt XML capabilities document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Machine extends LibvirtXmlNode
+{
+ /**
+ * Creates an empty guest machine instance.
+ */
+ public Machine()
+ {
+ super();
+ }
+
+ /**
+ * Creates an guest machine representing an existing Libvirt XML guest machine element.
+ *
+ * @param xmlNode existing Libvirt XML guest machine element.
+ */
+ public Machine( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns the canonical machine name.
+ *
+ * @return canonical machine name.
+ */
+ public String getCanonicalMachine()
+ {
+ return this.getXmlElementAttributeValue( "canonical" );
+ }
+
+ /**
+ * Returns the maximum number of CPUs supported by the guest machine.
+ *
+ * @return maximum number of CPUs supported by the guest machine.
+ */
+ public int getMaxCpus()
+ {
+ final String numMaxCpus = this.getXmlElementAttributeValue( "maxCpus" );
+ return Integer.parseUnsignedInt( numMaxCpus );
+ }
+
+ /**
+ * Returns the name of the guest machine.
+ *
+ * @return name of the guest machine.
+ */
+ public String getName()
+ {
+ return this.getXmlElementValue( null );
+ }
+
+ /**
+ * Creates an guest machine representing an existing Libvirt XML guest machine element.
+ *
+ * @param xmlNode existing Libvirt XML guest machine element.
+ * @return guest machine instance.
+ */
+ public static Machine newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new Machine( xmlNode );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/Domain.java b/src/main/java/org/openslx/libvirt/domain/Domain.java
new file mode 100644
index 0000000..c19b2a3
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/Domain.java
@@ -0,0 +1,1743 @@
+package org.openslx.libvirt.domain;
+
+import java.io.File;
+import java.io.InputStream;
+import java.math.BigInteger;
+import java.util.ArrayList;
+import java.util.function.Function;
+import java.util.function.Predicate;
+import java.util.stream.Collectors;
+
+import javax.xml.XMLConstants;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathExpressionException;
+
+import org.openslx.libvirt.domain.device.Controller;
+import org.openslx.libvirt.domain.device.ControllerFloppy;
+import org.openslx.libvirt.domain.device.ControllerIde;
+import org.openslx.libvirt.domain.device.ControllerPci;
+import org.openslx.libvirt.domain.device.ControllerSata;
+import org.openslx.libvirt.domain.device.ControllerScsi;
+import org.openslx.libvirt.domain.device.ControllerUsb;
+import org.openslx.libvirt.domain.device.Device;
+import org.openslx.libvirt.domain.device.Disk;
+import org.openslx.libvirt.domain.device.DiskCdrom;
+import org.openslx.libvirt.domain.device.DiskFloppy;
+import org.openslx.libvirt.domain.device.DiskStorage;
+import org.openslx.libvirt.domain.device.FileSystem;
+import org.openslx.libvirt.domain.device.Graphics;
+import org.openslx.libvirt.domain.device.GraphicsSpice;
+import org.openslx.libvirt.domain.device.GraphicsVnc;
+import org.openslx.libvirt.domain.device.Hostdev;
+import org.openslx.libvirt.domain.device.HostdevMdev;
+import org.openslx.libvirt.domain.device.HostdevPci;
+import org.openslx.libvirt.domain.device.HostdevUsb;
+import org.openslx.libvirt.domain.device.Interface;
+import org.openslx.libvirt.domain.device.InterfaceBridge;
+import org.openslx.libvirt.domain.device.InterfaceNetwork;
+import org.openslx.libvirt.domain.device.Parallel;
+import org.openslx.libvirt.domain.device.Serial;
+import org.openslx.libvirt.domain.device.Shmem;
+import org.openslx.libvirt.domain.device.Sound;
+import org.openslx.libvirt.domain.device.Video;
+import org.openslx.libvirt.xml.LibvirtXmlDocument;
+import org.openslx.libvirt.xml.LibvirtXmlDocumentException;
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+import org.openslx.libvirt.xml.LibvirtXmlResources;
+import org.openslx.libvirt.xml.LibvirtXmlSerializationException;
+import org.openslx.libvirt.xml.LibvirtXmlValidationException;
+import org.openslx.util.XmlHelper;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+/**
+ * Implementation of the Libvirt domain XML document.
+ *
+ * The Libvirt domain XML document is used to describe virtual machines and their configurations.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Domain extends LibvirtXmlDocument
+{
+ /**
+ * XML namespace URI for QEMU command line elements in the Libvirt domain XML document.
+ */
+ private static final String XMLNS_QEMU_NS_URI = "http://libvirt.org/schemas/domain/qemu/1.0";
+
+ /**
+ * XML namespace prefix for QEMU command line elements in the Libvirt domain XML document.
+ */
+ private static final String XMLNS_QEMU_NS_PREFIX = "qemu";
+
+ /**
+ * Creates Libvirt domain XML document from {@link String} providing Libvirt domain XML content.
+ *
+ * @param xml {@link String} with Libvirt domain XML content.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the domain XML content failed.
+ * @throws LibvirtXmlValidationException XML content is not a valid domain XML document.
+ */
+ public Domain( String xml )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException, LibvirtXmlValidationException
+ {
+ super( xml, LibvirtXmlResources.getLibvirtRng( "domain.rng" ) );
+ this.assertDomainType();
+ }
+
+ /**
+ * Creates Libvirt domain XML document from {@link File} containing Libvirt domain XML content.
+ *
+ * @param xml existing {@link File} containing Libvirt domain XML content.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the domain XML content failed.
+ * @throws LibvirtXmlValidationException XML content is not a valid domain XML document.
+ */
+ public Domain( File xml )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException, LibvirtXmlValidationException
+ {
+ super( xml, LibvirtXmlResources.getLibvirtRng( "domain.rng" ) );
+ this.assertDomainType();
+ }
+
+ /**
+ * Creates Libvirt domain XML document from {@link InputStream} providing Libvirt domain XML
+ * content.
+ *
+ * @param xml {@link InputStream} providing Libvirt domain XML content.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the domain XML content failed.
+ * @throws LibvirtXmlValidationException XML content is not a valid domain XML document.
+ */
+ public Domain( InputStream xml )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException, LibvirtXmlValidationException
+ {
+ super( xml, LibvirtXmlResources.getLibvirtRng( "domain.rng" ) );
+ this.assertDomainType();
+ }
+
+ /**
+ * Creates Libvirt domain XML document from {@link InputSource} providing Libvirt domain XML
+ * content.
+ *
+ * @param xml {@link InputSource} providing Libvirt domain XML content.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the domain XML content failed.
+ * @throws LibvirtXmlValidationException XML content is not a valid domain XML document.
+ */
+ public Domain( InputSource xml )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException, LibvirtXmlValidationException
+ {
+ super( xml, LibvirtXmlResources.getLibvirtRng( "domain.rng" ) );
+ this.assertDomainType();
+ }
+
+ /**
+ * Quick sanity check whether this could be a libvirt domain file at all.
+ * We just check if the root node is called domain and has the attribute type.
+ *
+ * @throws LibvirtXmlValidationException If this is not met.
+ */
+ private void assertDomainType() throws LibvirtXmlValidationException
+ {
+ try {
+ XPathExpression expr = XmlHelper.compileXPath( "/domain[@type]" );
+ Object nodesObject = expr.evaluate( this.getRootXmlNode().getXmlDocument(), XPathConstants.NODESET );
+ NodeList nodes = (NodeList)nodesObject;
+ if ( nodes.getLength() == 0 )
+ throw new LibvirtXmlValidationException( "Root element isn't <domain type=...>" );
+ } catch ( XPathExpressionException e ) {
+ e.printStackTrace();
+ }
+ }
+
+ /**
+ * Types of hypervisors specifiable for a virtual machine in the Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum Type
+ {
+ // @formatter:off
+ QEMU ( "qemu" ),
+ KQEMU ( "kqemu" ),
+ KVM ( "kvm" ),
+ XEN ( "xen" ),
+ LXC ( "lxc" ),
+ UML ( "uml" ),
+ OPENVZ( "openvz" ),
+ TEST ( "test" ),
+ VMWARE( "vmware" ),
+ HYPERV( "hyperv" ),
+ VBOX ( "vbox" ),
+ PHYP ( "phyp" ),
+ VZ ( "vz" ),
+ BHYVE ( "bhyve" );
+ // @formatter:on
+
+ /**
+ * Name of the hypervisor in a Libvirt domain XML document.
+ */
+ private String type;
+
+ /**
+ * Creates a hypervisor type.
+ *
+ * @param type valid name of the hypervisor in a Libvirt domain XML document.
+ */
+ Type( String type )
+ {
+ this.type = type;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.type;
+ }
+
+ /**
+ * Creates a hypervisor type from its name with error check.
+ *
+ * @param type name of the hypervisor in the Libvirt domain XML document.
+ * @return valid hypervisor type.
+ */
+ public static Type fromString( String type )
+ {
+ for ( Type t : Type.values() ) {
+ if ( t.type.equalsIgnoreCase( type ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+
+ /**
+ * Returns hypervisor type defined in the Libvirt domain XML document.
+ *
+ * @return hypervisor type.
+ */
+ public Type getType()
+ {
+ String typeValue = this.getRootXmlNode().getXmlElementAttributeValue( null, "type" );
+ return Type.fromString( typeValue );
+ }
+
+ /**
+ * Sets hypervisor type in Libvirt domain XML document.
+ *
+ * @param type hypervisor type for Libvirt domain XML document.
+ */
+ public void setType( Type type )
+ {
+ this.getRootXmlNode().setXmlElementAttributeValue( null, "type", type.toString() );
+ }
+
+ /**
+ * Returns virtual machine name defined in the Libvirt domain XML document.
+ *
+ * @return name of the virtual machine.
+ */
+ public String getName()
+ {
+ return this.getRootXmlNode().getXmlElementValue( "name" );
+ }
+
+ /**
+ * Sets virtual machine name in the Libvirt domain XML document.
+ *
+ * @param name virtual machine name for Libvirt domain XML document.
+ */
+ public void setName( String name )
+ {
+ this.getRootXmlNode().setXmlElementValue( "name", name );
+ }
+
+ /**
+ * Returns virtual machine title defined in the Libvirt domain XML document.
+ *
+ * @return title of the virtual machine.
+ */
+ public String getTitle()
+ {
+ return this.getRootXmlNode().getXmlElementValue( "title" );
+ }
+
+ /**
+ * Sets virtual machine title in the Libvirt domain XML document.
+ *
+ * @param title virtual machine title for Libvirt domain XML document.
+ */
+ public void setTitle( String title )
+ {
+ this.getRootXmlNode().setXmlElementValue( "title", title );
+ }
+
+ /**
+ * Returns virtual machine description defined in the Libvirt domain XML document.
+ *
+ * @return description of virtual machine.
+ */
+ public String getDescription()
+ {
+ return this.getRootXmlNode().getXmlElementValue( "description" );
+ }
+
+ /**
+ * Sets virtual machine description in the Libvirt domain XML document.
+ *
+ * @param description virtual machine description for Libvirt domain XML document.
+ */
+ public void setDescription( String description )
+ {
+ this.getRootXmlNode().setXmlElementValue( "description", description );
+ }
+
+ /**
+ * Returns the libosinfo operating system identifier.
+ *
+ * @return libosinfo operating system identifier.
+ */
+ public String getLibOsInfoOsId()
+ {
+ return this.getRootXmlNode()
+ .getXmlElementAttributeValue( "metadata/*[local-name()='libosinfo']/*[local-name()='os']", "id" );
+ }
+
+ /**
+ * Returns the state of the Hyper-V vendor identifier feature.
+ *
+ * @return state of the Hyper-V vendor identifier feature.
+ */
+ public boolean isFeatureHypervVendorIdStateOn()
+ {
+ return this.getRootXmlNode().getXmlElementAttributeValueAsBool( "features/hyperv/vendor_id", "state" );
+ }
+
+ /**
+ * Sets the state of the Hyper-V vendor identifier feature.
+ *
+ * @param on state for the Hyper-V vendor identifier feature.
+ */
+ public void setFeatureHypervVendorIdState( boolean on )
+ {
+ this.getRootXmlNode().setXmlElementAttributeValueOnOff( "features/hyperv/vendor_id", "state", on );
+ }
+
+ /**
+ * Returns the value of the Hyper-V vendor identifier feature.
+ *
+ * @return value of the Hyper-V vendor identifier feature.
+ */
+ public String getFeatureHypervVendorIdValue()
+ {
+ return this.getRootXmlNode().getXmlElementAttributeValue( "features/hyperv/vendor_id", "value" );
+ }
+
+ /**
+ * Sets the value of the Hyper-V vendor identifier feature.
+ *
+ * @param value value for the Hyper-V vendor identifier feature.
+ */
+ public void setFeatureHypervVendorIdValue( String value )
+ {
+ this.getRootXmlNode().setXmlElementAttributeValue( "features/hyperv/vendor_id", "value", value );
+ }
+
+ /**
+ * Returns the state of the KVM hidden feature.
+ *
+ * @return state of the KVM hidden feature.
+ */
+ public boolean isFeatureKvmHiddenStateOn()
+ {
+ return this.getRootXmlNode().getXmlElementAttributeValueAsBool( "features/kvm/hidden", "state" );
+ }
+
+ /**
+ * Sets the state of the KVM hidden feature.
+ *
+ * @param on state for the KVM hidden feature.
+ */
+ public void setFeatureKvmHiddenState( boolean on )
+ {
+ this.getRootXmlNode().setXmlElementAttributeValueOnOff( "features/kvm/hidden", "state", on );
+ this.getRootXmlNode().setXmlElement( "cpu" );
+ if ( on ) {
+ Element cpu = this.getRootXmlNode().getXmlElement( "cpu" );
+ XmlHelper.getOrCreateElement( this.getRootXmlNode().getXmlDocument(), cpu,
+ null, null,
+ "feature", "name", "hypervisor" );
+ this.getRootXmlNode().setXmlElementAttributeValue( "cpu/feature", "policy", "disable" );
+ } else {
+ this.getRootXmlNode().removeXmlElement( "cpu/feature[@name='hypervisor']" );
+ }
+ }
+
+ /**
+ * Returns virtual machine UUID defined in the Libvirt domain XML document.
+ *
+ * @return UUID of virtual machine.
+ */
+ public String getUuid()
+ {
+ return this.getRootXmlNode().getXmlElementValue( "uuid" );
+ }
+
+ /**
+ * Sets virtual machine UUID in the Libvirt domain XML document.
+ *
+ * @param uuid virtual machine UUID for Libvirt domain XML document.
+ */
+ public void setUuid( String uuid )
+ {
+ this.getRootXmlNode().setXmlElementValue( "uuid", uuid );
+ }
+
+ /**
+ * Removes virtual machine UUID in the Libvirt domain XML document.
+ */
+ public void removeUuid()
+ {
+ this.getRootXmlNode().removeXmlElement( "uuid" );
+ }
+
+ /**
+ * Returns virtual machine memory defined in the Libvirt domain XML document.
+ *
+ * @return memory of virtual machine.
+ */
+ public BigInteger getMemory()
+ {
+ String memValue = this.getRootXmlNode().getXmlElementValue( "memory" );
+ String memUnit = this.getRootXmlNode().getXmlElementAttributeValue( "memory", "unit" );
+ return DomainUtils.decodeMemory( memValue, memUnit );
+ }
+
+ /**
+ * Sets virtual machine memory in the Libvirt domain XML document.
+ *
+ * @param memory virtual machine memory in the Libvirt domain XML document.
+ */
+ public void setMemory( BigInteger memory )
+ {
+ this.getRootXmlNode().setXmlElementAttributeValue( "memory", "unit", "KiB" );
+ this.getRootXmlNode().setXmlElementValue( "memory", DomainUtils.encodeMemory( memory, "KiB" ) );
+ }
+
+ /**
+ * Returns current virtual machine memory defined in the Libvirt domain XML document.
+ *
+ * @return current memory of virtual machine.
+ */
+ public BigInteger getCurrentMemory()
+ {
+ String memValue = this.getRootXmlNode().getXmlElementValue( "currentMemory" );
+ String memUnit = this.getRootXmlNode().getXmlElementAttributeValue( "currentMemory", "unit" );
+ return DomainUtils.decodeMemory( memValue, memUnit );
+ }
+
+ /**
+ * Set current virtual machine memory in the Libvirt domain XML document.
+ *
+ * @param currentMemory current virtual machine memory in the Libvirt domain XML document.
+ */
+ public void setCurrentMemory( BigInteger currentMemory )
+ {
+ this.getRootXmlNode().setXmlElementAttributeValue( "currentMemory", "unit", "KiB" );
+ this.getRootXmlNode().setXmlElementValue( "currentMemory", DomainUtils.encodeMemory( currentMemory, "KiB" ) );
+ }
+
+ /**
+ * Returns number of virtual machine CPUs defined in the Libvirt domain XML document.
+ *
+ * @return number of CPUs of the virtual machine.
+ */
+ public int getVCpu()
+ {
+ String number = this.getRootXmlNode().getXmlElementValue( "vcpu" );
+ return Integer.parseUnsignedInt( number );
+ }
+
+ /**
+ * Set number of virtual machine CPUs in the Libvirt domain XML document.
+ *
+ * @param number virtual machine CPUs.
+ */
+ public void setVCpu( int number )
+ {
+ this.getRootXmlNode().setXmlElementValue( "vcpu", Integer.toString( number ) );
+ }
+
+ /**
+ * Returns OS type defined in the Libvirt domain XML document.
+ *
+ * @return OS type of the virtual machine.
+ */
+ public OsType getOsType()
+ {
+ final String osType = this.getRootXmlNode().getXmlElementValue( "os/type" );
+ return OsType.fromString( osType );
+ }
+
+ /**
+ * Set OS type in the Libvirt domain XML document.
+ *
+ * @param type OS type for the virtual machine.
+ */
+ public void setOsType( OsType type )
+ {
+ this.getRootXmlNode().setXmlElementValue( "os/type", type.toString() );
+ }
+
+ /**
+ * Returns OS architecture defined in the Libvirt domain XML document.
+ *
+ * @return OS architecture of the virtual machine.
+ */
+ public String getOsArch()
+ {
+ return this.getRootXmlNode().getXmlElementAttributeValue( "os/type", "arch" );
+ }
+
+ /**
+ * Set OS architecture in the Libvirt domain XML document.
+ *
+ * @param arch OS architecture for the virtual machine.
+ */
+ public void setOsArch( String arch )
+ {
+ this.getRootXmlNode().setXmlElementAttributeValue( "os/type", "arch", arch );
+ }
+
+ /**
+ * Returns OS machine defined in the Libvirt domain XML document.
+ *
+ * @return OS machine of the virtual machine.
+ */
+ public String getOsMachine()
+ {
+ return this.getRootXmlNode().getXmlElementAttributeValue( "os/type", "machine" );
+ }
+
+ /**
+ * Set OS machine in the Libvirt domain XML document.
+ *
+ * @param machine OS machine for the virtual machine.
+ */
+ public void setOsMachine( String machine )
+ {
+ this.getRootXmlNode().setXmlElementAttributeValue( "os/type", "machine", machine );
+ }
+
+ /**
+ * Returns OS loader defined in the Libvirt domain XML document.
+ *
+ * @return OS loader of the virtual machine.
+ */
+ public String getOsLoader()
+ {
+ return this.getRootXmlNode().getXmlElementValue( "os/loader" );
+ }
+
+ /**
+ * Set OS loader in the Libvirt domain XML document.
+ *
+ * @param loader OS loader for the virtual machine.
+ */
+ public void setOsLoader( String loader )
+ {
+ this.getRootXmlNode().setXmlElementValue( "os/loader", loader );
+ }
+
+ /**
+ * Returns OS Nvram defined in the Libvirt domain XML document.
+ *
+ * @return OS Nvram of the virtual machine.
+ */
+ public String getOsNvram()
+ {
+ return this.getRootXmlNode().getXmlElementValue( "os/nvram" );
+ }
+
+ /**
+ * Set OS Nvram in the Libvirt domain XML document.
+ *
+ * @param nvram OS Nvram for the virtual machine.
+ */
+ public void setOsNvram( String nvram )
+ {
+ this.getRootXmlNode().setXmlElementValue( "os/nvram", nvram );
+ }
+
+ /**
+ * Operating system types specifiable for a virtual machine in the Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum OsType
+ {
+ // @formatter:off
+ XEN ( "xen" ),
+ LINUX( "linux" ),
+ HVM ( "hvm" ),
+ EXE ( "exe" ),
+ UML ( "uml" );
+ // @formatter:on
+
+ /**
+ * Name of the OS type in a Libvirt domain XML document.
+ */
+ private final String osType;
+
+ /**
+ * Creates an OS type.
+ *
+ * @param osType valid name of the OS type in the Libvirt domain XML document.
+ */
+ OsType( String osType )
+ {
+ this.osType = osType;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.osType;
+ }
+
+ /**
+ * Creates an OS type from its name with error check.
+ *
+ * @param osType name of the OS type in the Libvirt domain XML document.
+ * @return valid OS type.
+ */
+ public static OsType fromString( String osType )
+ {
+ for ( OsType t : OsType.values() ) {
+ if ( t.osType.equalsIgnoreCase( osType ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+
+ /**
+ * Returns virtual machine CPU model defined in the Libvirt domain XML document.
+ *
+ * @return CPU model of virtual machine.
+ */
+ public String getCpuModel()
+ {
+ return this.getRootXmlNode().getXmlElementValue( "cpu/model" );
+ }
+
+ /**
+ * Sets virtual machine CPU model in the Libvirt domain XML document.
+ *
+ * @param model virtual machine CPU model.
+ */
+ public void setCpuModel( String model )
+ {
+ this.getRootXmlNode().setXmlElementValue( "cpu/model", model );
+ }
+
+ /**
+ * CPU modes specifiable for a virtual machine in the Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum CpuMode
+ {
+ // @formatter:off
+ CUSTOM ( "custom" ),
+ HOST_MODEL ( "host-model" ),
+ HOST_PASSTHROUGH( "host-passthrough" );
+ // @formatter:on
+
+ /**
+ * Name of the CPU mode in a Libvirt domain XML document.
+ */
+ private String cpuMode;
+
+ /**
+ * Creates a CPU mode.
+ *
+ * @param mode valid name of the CPU mode in the Libvirt domain XML document.
+ */
+ CpuMode( String mode )
+ {
+ this.cpuMode = mode;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.cpuMode;
+ }
+
+ /**
+ * Creates a CPU mode from its name with error check.
+ *
+ * @param mode name of the CPU mode in the Libvirt domain XML document.
+ * @return valid CPU mode.
+ */
+ public static CpuMode fromString( String mode )
+ {
+ for ( CpuMode t : CpuMode.values() ) {
+ if ( t.cpuMode.equalsIgnoreCase( mode ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+
+ /**
+ * Returns virtual machine CPU mode defined in the Libvirt domain XML document.
+ *
+ * @return CPU mode of the virtual machine.
+ */
+ public CpuMode getCpuMode()
+ {
+ String cpuMode = this.getRootXmlNode().getXmlElementAttributeValue( "cpu", "mode" );
+ return CpuMode.fromString( cpuMode );
+ }
+
+ /**
+ * Sets virtual machine CPU mode in the Libvirt domain XML document.
+ *
+ * @param mode virtual machine CPU mode.
+ */
+ public void setCpuMode( CpuMode mode )
+ {
+ this.getRootXmlNode().setXmlElementAttributeValue( "cpu", "mode", mode.toString() );
+ // Pass through cache information as well, because for some reason this is no the default
+ // when we do CPU host passthrough....
+ if ( mode == CpuMode.HOST_PASSTHROUGH ) {
+ this.getRootXmlNode().setXmlElementAttributeValue( "cpu/cache", "mode", "passthrough" );
+ } else if ( "passthrough".equals( this.getRootXmlNode().getXmlElementAttributeValue( "cpu/cache", "mode" ) ) ) {
+ this.getRootXmlNode().removeXmlElement( "cpu/cache" );
+ }
+ }
+
+ /**
+ * Returns if the CPU migratable flag is set in the Libvirt domain XML document.
+ */
+ public boolean getCpuMigratable()
+ {
+ return this.getRootXmlNode().getXmlElementAttributeValueAsBool( "cpu", "migratable" );
+ }
+
+ /**
+ * Sets if vCPU is migratable in the Libvirt domain XML document.
+ */
+ public void setCpuMigratable( boolean migratable )
+ {
+ this.getRootXmlNode().setXmlElementAttributeValueOnOff( "cpu", "migratable", migratable );
+ }
+
+ /**
+ * CPU checks specifiable for a virtual machine in the Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum CpuCheck
+ {
+ // @formatter:off
+ NONE ( "none" ),
+ PARTIAL( "partial" ),
+ FULL ( "full" );
+ // @formatter:on
+
+ /**
+ * Name of the CPU check in the Libvirt domain XML document.
+ */
+ private String cpuCheck;
+
+ /**
+ * Creates a CPU check.
+ *
+ * @param check valid name of the CPU check in the Libvirt domain XML document.
+ */
+ CpuCheck( String check )
+ {
+ this.cpuCheck = check;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.cpuCheck;
+ }
+
+ /**
+ * Creates a CPU check from its name with error check.
+ *
+ * @param check name of the CPU check in the Libvirt domain XML document.
+ * @return valid CPU check.
+ */
+ public static CpuCheck fromString( String check )
+ {
+ for ( CpuCheck t : CpuCheck.values() ) {
+ if ( t.cpuCheck.equalsIgnoreCase( check ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+
+ /**
+ * Returns virtual machine CPU check defined in the Libvirt domain XML document.
+ *
+ * @return CPU check of the virtual machine.
+ */
+ public CpuCheck getCpuCheck()
+ {
+ String cpuCheck = this.getRootXmlNode().getXmlElementAttributeValue( "cpu", "check" );
+ return CpuCheck.fromString( cpuCheck );
+ }
+
+ /**
+ * Sets virtual machine CPU check in the Libvirt domain XML document.
+ *
+ * @param check virtual machine CPU check.
+ */
+ public void setCpuCheck( CpuCheck check )
+ {
+ this.getRootXmlNode().setXmlElementAttributeValue( "cpu", "check", check.toString() );
+ }
+
+ /**
+ * Returns the number of virtual machine CPU dies defined in the Libvirt domain XML document.
+ *
+ * @return number of virtual machine CPU dies.
+ */
+ public int getCpuDies()
+ {
+ final String numDies = this.getRootXmlNode().getXmlElementAttributeValue( "cpu/topology", "dies" );
+ return Integer.valueOf( numDies );
+ }
+
+ /**
+ * Set number of virtual machine CPU dies in the Libvirt domain XML document.
+ *
+ * @param number virtual machine CPU dies.
+ */
+ public void setCpuDies( int number )
+ {
+ this.getRootXmlNode().setXmlElementAttributeValue( "cpu/topology", "dies", Integer.toString( number ) );
+ }
+
+ /**
+ * Returns the number of virtual machine CPU sockets defined in the Libvirt domain XML document.
+ *
+ * @return number of virtual machine CPU sockets.
+ */
+ public int getCpuSockets()
+ {
+ final String numSockets = this.getRootXmlNode().getXmlElementAttributeValue( "cpu/topology", "sockets" );
+ return Integer.valueOf( numSockets );
+ }
+
+ /**
+ * Set number of virtual machine CPU dies in the Libvirt domain XML document.
+ *
+ * @param number virtual machine CPU dies.
+ */
+ public void setCpuSockets( int number )
+ {
+ this.getRootXmlNode().setXmlElementAttributeValue( "cpu/topology", "sockets", Integer.toString( number ) );
+ }
+
+ /**
+ * Returns the number of virtual machine CPU cores defined in the Libvirt domain XML document.
+ *
+ * @return number of virtual machine CPU cores.
+ */
+ public int getCpuCores()
+ {
+ final String numCores = this.getRootXmlNode().getXmlElementAttributeValue( "cpu/topology", "cores" );
+ return Integer.valueOf( numCores );
+ }
+
+ /**
+ * Set number of virtual machine CPU cores in the Libvirt domain XML document.
+ *
+ * @param number virtual machine CPU cores.
+ */
+ public void setCpuCores( int number )
+ {
+ this.getRootXmlNode().setXmlElementAttributeValue( "cpu/topology", "cores", Integer.toString( number ) );
+ }
+
+ /**
+ * Returns the number of virtual machine CPU threads defined in the Libvirt domain XML document.
+ *
+ * @return number of virtual machine CPU threads.
+ */
+ public int getCpuThreads()
+ {
+ final String numThreads = this.getRootXmlNode().getXmlElementAttributeValue( "cpu/topology", "threads" );
+ return Integer.valueOf( numThreads );
+ }
+
+ /**
+ * Set number of virtual machine CPU threads in the Libvirt domain XML document.
+ *
+ * @param number virtual machine CPU threads.
+ */
+ public void setCpuThreads( int number )
+ {
+ this.getRootXmlNode().setXmlElementAttributeValue( "cpu/topology", "threads", Integer.toString( number ) );
+ }
+
+ /**
+ * Returns the file name of the emulator binary defined in the Libvirt domain XML document.
+ *
+ * @return file name of the emulator binary.
+ */
+ public String getDevicesEmulator()
+ {
+ return this.getRootXmlNode().getXmlElementValue( "devices/emulator" );
+ }
+
+ /**
+ * Sets the file name of the emulator binary in the Libvirt domain XML document.
+ *
+ * @param emulator file name of the emulator binary.
+ */
+ public void setDevicesEmulator( String emulator )
+ {
+ this.getRootXmlNode().setXmlElementValue( "devices/emulator", emulator );
+ }
+
+ /**
+ * Returns virtual machine devices defined in the Libvirt domain XML document.
+ *
+ * @return devices of the virtual machine.
+ */
+ public ArrayList<Device> getDevices()
+ {
+ ArrayList<Device> devices = new ArrayList<Device>();
+ Node devicesNode = this.getRootXmlNode().getXmlElement( "devices" );
+
+ if ( devicesNode != null ) {
+
+ NodeList devicesElements = devicesNode.getChildNodes();
+
+ for ( int i = 0; i < devicesElements.getLength(); i++ ) {
+ final Node childNode = devicesElements.item( i );
+ if ( childNode.getNodeType() == Node.ELEMENT_NODE ) {
+ LibvirtXmlNode deviceNode = new LibvirtXmlNode( this.getRootXmlNode().getXmlDocument(), childNode );
+ Device device = Device.newInstance( deviceNode );
+
+ if ( device != null ) {
+ devices.add( device );
+ }
+ }
+ }
+ }
+
+ return devices;
+ }
+
+ /**
+ * Filter list of virtual machine devices of type {@link Device} and cast filtered instances to
+ * more specific device type <code>R</code>.
+ *
+ * @param <R> specific device type for filtering and casting.
+ * @param cls specific device type's class.
+ * @param devices list of virtual machines devices.
+ * @return filtered list of virtual machines devices of type <code>R</code>.
+ */
+ private static <R> ArrayList<R> filterDevices( Class<R> cls, ArrayList<Device> devices )
+ {
+ Predicate<Device> byFilter = device -> cls.isInstance( device );
+ Function<Device, R> castFunction = device -> cls.cast( device );
+
+ return devices.stream().filter( byFilter ).map( castFunction )
+ .collect( Collectors.toCollection( ArrayList::new ) );
+ }
+
+ /**
+ * Returns list of virtual machine controller devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine controller devices.
+ */
+ public ArrayList<Controller> getControllerDevices()
+ {
+ return Domain.filterDevices( Controller.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine floppy controller devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine floppy controller devices.
+ */
+ public ArrayList<ControllerFloppy> getFloppyControllerDevices()
+ {
+ return Domain.filterDevices( ControllerFloppy.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine IDE controller devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine IDE controller devices.
+ */
+ public ArrayList<ControllerIde> getIdeControllerDevices()
+ {
+ return Domain.filterDevices( ControllerIde.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine floppy controller devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine floppy controller devices.
+ */
+ public ArrayList<ControllerPci> getPciControllerDevices()
+ {
+ return Domain.filterDevices( ControllerPci.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine SATA controller devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine SATA controller devices.
+ */
+ public ArrayList<ControllerSata> getSataControllerDevices()
+ {
+ return Domain.filterDevices( ControllerSata.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine SCSI controller devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine SCSI controller devices.
+ */
+ public ArrayList<ControllerScsi> getScsiControllerDevices()
+ {
+ return Domain.filterDevices( ControllerScsi.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine USB controller devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine USB controller devices.
+ */
+ public ArrayList<ControllerUsb> getUsbControllerDevices()
+ {
+ return Domain.filterDevices( ControllerUsb.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine disk devices specified in the Libvirt domain XML document.
+ *
+ * @return list of virtual machine disk devices.
+ */
+ public ArrayList<Disk> getDiskDevices()
+ {
+ return Domain.filterDevices( Disk.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine disk CDROM devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine disk CDROM devices.
+ */
+ public ArrayList<DiskCdrom> getDiskCdromDevices()
+ {
+ return Domain.filterDevices( DiskCdrom.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine disk floppy devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine disk floppy devices.
+ */
+ public ArrayList<DiskFloppy> getDiskFloppyDevices()
+ {
+ return Domain.filterDevices( DiskFloppy.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine disk storage devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine disk storage devices.
+ */
+ public ArrayList<DiskStorage> getDiskStorageDevices()
+ {
+ return Domain.filterDevices( DiskStorage.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine file system devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine file system devices.
+ */
+ public ArrayList<FileSystem> getFileSystemDevices()
+ {
+ return Domain.filterDevices( FileSystem.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine hostdev devices specified in the Libvirt domain XML document.
+ *
+ * @return list of virtual machine hostdev devices.
+ */
+ public ArrayList<Hostdev> getHostdevDevices()
+ {
+ return Domain.filterDevices( Hostdev.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine mediated hostdev devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine mediated hostdev devices.
+ */
+ public ArrayList<HostdevMdev> getHostdevMdevDevices()
+ {
+ return Domain.filterDevices( HostdevMdev.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine PCI hostdev devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine PCI hostdev devices.
+ */
+ public ArrayList<HostdevPci> getHostdevPciDevices()
+ {
+ return Domain.filterDevices( HostdevPci.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine USB hostdev devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine USB hostdev devices.
+ */
+ public ArrayList<HostdevUsb> getHostdevUsbDevices()
+ {
+ return Domain.filterDevices( HostdevUsb.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine network interface devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine network interface devices.
+ */
+ public ArrayList<Interface> getInterfaceDevices()
+ {
+ return Domain.filterDevices( Interface.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine graphic devices specified in the Libvirt domain XML document.
+ *
+ * @return list of virtual machine graphic devices.
+ */
+ public ArrayList<Graphics> getGraphicDevices()
+ {
+ return Domain.filterDevices( Graphics.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine SPICE graphic devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine SPICE graphic devices.
+ */
+ public ArrayList<GraphicsSpice> getGraphicSpiceDevices()
+ {
+ return Domain.filterDevices( GraphicsSpice.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine VNC graphic devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine VNC graphic devices.
+ */
+ public ArrayList<GraphicsVnc> getGraphicVncDevices()
+ {
+ return Domain.filterDevices( GraphicsVnc.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine parallel port devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine parallel port devices.
+ */
+ public ArrayList<Parallel> getParallelDevices()
+ {
+ return Domain.filterDevices( Parallel.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine serial port devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine serial port devices.
+ */
+ public ArrayList<Serial> getSerialDevices()
+ {
+ return Domain.filterDevices( Serial.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine shared memory devices specified in the Libvirt domain XML
+ * document.
+ *
+ * @return list of virtual machine shared memory devices.
+ */
+ public ArrayList<Shmem> getShmemDevices()
+ {
+ return Domain.filterDevices( Shmem.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine sound devices specified in the Libvirt domain XML document.
+ *
+ * @return list of virtual machine sound devices.
+ */
+ public ArrayList<Sound> getSoundDevices()
+ {
+ return Domain.filterDevices( Sound.class, this.getDevices() );
+ }
+
+ /**
+ * Returns list of virtual machine video devices specified in the Libvirt domain XML document.
+ *
+ * @return list of virtual machine video devices.
+ */
+ public ArrayList<Video> getVideoDevices()
+ {
+ return Domain.filterDevices( Video.class, this.getDevices() );
+ }
+
+ /**
+ * Returns the values of QEMU command line arguments from the Libvirt domain XML document.
+ *
+ * @return values of QEMU command line arguments from the Libvirt domain XML document.
+ */
+ public ArrayList<String> getQemuCmdlnArguments()
+ {
+ final Document xmlDocument = this.getRootXmlNode().getXmlDocument();
+ final ArrayList<String> qemuCmdlnArgs = new ArrayList<String>();
+
+ final NodeList qemuCmdlnNodes = xmlDocument.getElementsByTagNameNS( XMLNS_QEMU_NS_URI, "commandline" );
+ if ( qemuCmdlnNodes.getLength() > 0 ) {
+ final Node qemuCmdlnNode = qemuCmdlnNodes.item( 0 );
+ final NodeList qemuCmdlnArgNodes = qemuCmdlnNode.getChildNodes();
+ for ( int i = 0; i < qemuCmdlnArgNodes.getLength(); i++ ) {
+ final Node qemuCmdlnArgNode = qemuCmdlnArgNodes.item( i );
+ if ( qemuCmdlnArgNode.getNodeType() == Node.ELEMENT_NODE ) {
+ final Element qemuCmdlnArgElement = Element.class.cast( qemuCmdlnArgNode );
+ final String value = qemuCmdlnArgElement.getAttribute( "value" );
+ if ( value != null && !value.isEmpty() ) {
+ qemuCmdlnArgs.add( value );
+ }
+ }
+ }
+ }
+
+ return qemuCmdlnArgs;
+ }
+
+ /**
+ * Adds a virtual machine device to the Libvirt domain XML document.
+ *
+ * @param device virtual machine device that is added to the Libvirt domain XML document.
+ * @return reference to the added device for configuration purposes if creation was successful.
+ */
+ public Device addDevice( Device device )
+ {
+ Device addedDevice = null;
+
+ if ( device != null ) {
+ Node devicesNode = this.getRootXmlNode().getXmlElement( "devices" );
+
+ if ( devicesNode != null ) {
+ LibvirtXmlNode parentDevicesNode = null;
+ parentDevicesNode = new LibvirtXmlNode( this.getRootXmlNode().getXmlDocument(), devicesNode );
+ addedDevice = Device.createInstance( device, parentDevicesNode );
+ }
+ }
+
+ return addedDevice;
+ }
+
+ /**
+ * Adds a virtual machine controller device to the Libvirt domain XML document.
+ *
+ * @return reference to the added controller device if creation was successful.
+ */
+ public Controller addControllerDevice()
+ {
+ return Controller.class.cast( this.addDevice( new Controller() ) );
+ }
+
+ /**
+ * Adds a virtual machine floppy controller device to the Libvirt domain XML document.
+ *
+ * @return reference to the added floppy controller device if creation was successful.
+ */
+ public ControllerFloppy addControllerFloppyDevice()
+ {
+ return ControllerFloppy.class.cast( this.addDevice( new ControllerFloppy() ) );
+ }
+
+ /**
+ * Adds a virtual machine IDE controller device to the Libvirt domain XML document.
+ *
+ * @return reference to the added IDE controller device if creation was successful.
+ */
+ public ControllerIde addControllerIdeDevice()
+ {
+ return ControllerIde.class.cast( this.addDevice( new ControllerIde() ) );
+ }
+
+ /**
+ * Adds a virtual machine PCI controller device to the Libvirt domain XML document.
+ *
+ * @return reference to the added PCI controller device if creation was successful.
+ */
+ public ControllerPci addControllerPciDevice()
+ {
+ return ControllerPci.class.cast( this.addDevice( new ControllerPci() ) );
+ }
+
+ /**
+ * Adds a virtual machine SATA controller device to the Libvirt domain XML document.
+ *
+ * @return reference to the added SATA controller device if creation was successful.
+ */
+ public ControllerSata addControllerSataDevice()
+ {
+ return ControllerSata.class.cast( this.addDevice( new ControllerSata() ) );
+ }
+
+ /**
+ * Adds a virtual machine SCSI controller device to the Libvirt domain XML document.
+ *
+ * @return reference to the added SCSI controller device if creation was successful.
+ */
+ public ControllerScsi addControllerScsiDevice()
+ {
+ return ControllerScsi.class.cast( this.addDevice( new ControllerScsi() ) );
+ }
+
+ /**
+ * Adds a virtual machine USB controller device to the Libvirt domain XML document.
+ *
+ * @return reference to the added USB controller device if creation was successful.
+ */
+ public ControllerUsb addControllerUsbDevice()
+ {
+ return ControllerUsb.class.cast( this.addDevice( new ControllerUsb() ) );
+ }
+
+ /**
+ * Adds a virtual machine disk device to the Libvirt domain XML document.
+ *
+ * @return reference to the added disk device if creation was successful.
+ */
+ public Disk addDiskDevice()
+ {
+ return Disk.class.cast( this.addDevice( new Disk() ) );
+ }
+
+ /**
+ * Adds a virtual machine CDROM disk device to the Libvirt domain XML document.
+ *
+ * @return reference to the added CDROM disk device if creation was successful.
+ */
+ public DiskCdrom addDiskCdromDevice()
+ {
+ return DiskCdrom.class.cast( this.addDevice( new DiskCdrom() ) );
+ }
+
+ /**
+ * Adds a virtual machine floppy disk device to the Libvirt domain XML document.
+ *
+ * @return reference to the added floppy disk device if creation was successful.
+ */
+ public DiskFloppy addDiskFloppyDevice()
+ {
+ return DiskFloppy.class.cast( this.addDevice( new DiskFloppy() ) );
+ }
+
+ /**
+ * Adds a virtual machine storage disk device to the Libvirt domain XML document.
+ *
+ * @return reference to the added storage disk device if creation was successful.
+ */
+ public DiskStorage addDiskStorageDevice()
+ {
+ return DiskStorage.class.cast( this.addDevice( new DiskStorage() ) );
+ }
+
+ /**
+ * Adds a virtual machine file system device to the Libvirt domain XML document.
+ *
+ * @return reference to the added file system device if creation was successful.
+ */
+ public FileSystem addFileSystemDevice()
+ {
+ return FileSystem.class.cast( this.addDevice( new FileSystem() ) );
+ }
+
+ /**
+ * Adds a virtual machine hostdev device to the Libvirt domain XML document.
+ *
+ * @return reference to the added hostdev device if creation was successful.
+ */
+ public Hostdev addHostdevDevice()
+ {
+ return Hostdev.class.cast( this.addDevice( new Hostdev() ) );
+ }
+
+ /**
+ * Adds a virtual machine mediated hostdev device to the Libvirt domain XML document.
+ *
+ * @return reference to the added mediated hostdev device if creation was successful.
+ */
+ public HostdevMdev addHostdevMdevDevice()
+ {
+ return HostdevMdev.class.cast( this.addDevice( new HostdevMdev() ) );
+ }
+
+ /**
+ * Adds a virtual machine PCI hostdev device to the Libvirt domain XML document.
+ *
+ * @return reference to the added PCI hostdev device if creation was successful.
+ */
+ public HostdevPci addHostdevPciDevice()
+ {
+ return HostdevPci.class.cast( this.addDevice( new HostdevPci() ) );
+ }
+
+ /**
+ * Adds a virtual machine USB hostdev device to the Libvirt domain XML document.
+ *
+ * @return reference to the added USB hostdev device if creation was successful.
+ */
+ public HostdevUsb addHostdevUsbDevice()
+ {
+ return HostdevUsb.class.cast( this.addDevice( new HostdevUsb() ) );
+ }
+
+ /**
+ * Adds a virtual machine network device to the Libvirt domain XML document.
+ *
+ * @return reference to the added network device if creation was successful.
+ */
+ public Interface addInterfaceDevice()
+ {
+ return Interface.class.cast( this.addDevice( new Interface() ) );
+ }
+
+ /**
+ * Adds a virtual machine network bridge interface device to the Libvirt domain XML document.
+ *
+ * @return reference to the added network interface device if creation was successful.
+ */
+ public InterfaceBridge addInterfaceBridgeDevice()
+ {
+ return InterfaceBridge.class.cast( this.addDevice( new InterfaceBridge() ) );
+ }
+
+ /**
+ * Adds a virtual machine network interface device to the Libvirt domain XML document.
+ *
+ * @return reference to the added network interface device if creation was successful.
+ */
+ public InterfaceNetwork addInterfaceNetworkDevice()
+ {
+ return InterfaceNetwork.class.cast( this.addDevice( new InterfaceNetwork() ) );
+ }
+
+ /**
+ * Adds a virtual machine graphics device to the Libvirt domain XML document.
+ *
+ * @return reference to the added graphics device if creation was successful.
+ */
+ public Graphics addGraphicsDevice()
+ {
+ return Graphics.class.cast( this.addDevice( new Graphics() ) );
+ }
+
+ /**
+ * Adds a virtual machine SPICE graphics device to the Libvirt domain XML document.
+ *
+ * @return reference to the added SPICE graphics device if creation was successful.
+ */
+ public GraphicsSpice addGraphicsSpiceDevice()
+ {
+ return GraphicsSpice.class.cast( this.addDevice( new GraphicsSpice() ) );
+ }
+
+ /**
+ * Adds a virtual machine VNC graphics device to the Libvirt domain XML document.
+ *
+ * @return reference to the added VNC graphics device if creation was successful.
+ */
+ public GraphicsVnc addGraphicsVncDevice()
+ {
+ return GraphicsVnc.class.cast( this.addDevice( new GraphicsVnc() ) );
+ }
+
+ /**
+ * Adds a virtual machine parallel port device to the Libvirt domain XML document.
+ *
+ * @return reference to the added parallel port device if creation was successful.
+ */
+ public Parallel addParallelDevice()
+ {
+ return Parallel.class.cast( this.addDevice( new Parallel() ) );
+ }
+
+ /**
+ * Adds a virtual machine serial port device to the Libvirt domain XML document.
+ *
+ * @return reference to the added serial port device if creation was successful.
+ */
+ public Serial addSerialDevice()
+ {
+ return Serial.class.cast( this.addDevice( new Serial() ) );
+ }
+
+ /**
+ * Adds a virtual machine shared memory device to the Libvirt domain XML document.
+ *
+ * @return reference to the added shared memory device if creation was successful.
+ */
+ public Shmem addShmemDevice()
+ {
+ return Shmem.class.cast( this.addDevice( new Shmem() ) );
+ }
+
+ /**
+ * Adds a virtual machine sound device to the Libvirt domain XML document.
+ *
+ * @return reference to the added sound device if creation was successful.
+ */
+ public Sound addSoundDevice()
+ {
+ return Sound.class.cast( this.addDevice( new Sound() ) );
+ }
+
+ /**
+ * Adds a virtual machine video device to the Libvirt domain XML document.
+ *
+ * @return reference to the added video device if creation was successful.
+ */
+ public Video addVideoDevice()
+ {
+ return Video.class.cast( this.addDevice( new Video() ) );
+ }
+
+ /**
+ * Adds an given value as QEMU command line argument to the Libvirt domain XML document.
+ *
+ * @param value QEMU command line argument value.
+ */
+ public void addQemuCmdlnArgument( final String value )
+ {
+ final Element rootElement = Element.class.cast( this.getRootXmlNode().getXmlBaseNode() );
+ final Document xmlDocument = this.getRootXmlNode().getXmlDocument();
+ final Element qemuCmdlnElement;
+
+ final NodeList qemuCmdlnNodes = rootElement.getElementsByTagNameNS( XMLNS_QEMU_NS_URI, "commandline" );
+ if ( qemuCmdlnNodes.getLength() < 1 ) {
+ // add missing <domain xmlns:qemu="..."> namespace attribute
+ rootElement.setAttributeNS( XMLConstants.XMLNS_ATTRIBUTE_NS_URI,
+ XMLConstants.XMLNS_ATTRIBUTE + ":" + XMLNS_QEMU_NS_PREFIX, XMLNS_QEMU_NS_URI );
+ // add missing <qemu:commandline> element
+ qemuCmdlnElement = xmlDocument.createElementNS( XMLNS_QEMU_NS_URI, "commandline" );
+ qemuCmdlnElement.setPrefix( XMLNS_QEMU_NS_PREFIX );
+ rootElement.appendChild( qemuCmdlnElement );
+ } else {
+ // use available <qemu:commandline> element
+ final Node qemuCmdlnNode = qemuCmdlnNodes.item( 0 );
+ assert ( qemuCmdlnNode.getNodeType() == Node.ELEMENT_NODE );
+ qemuCmdlnElement = Element.class.cast( qemuCmdlnNode );
+ }
+
+ // append <qemu:arg value='...'> element with attribute
+ final Element qemuCmdlnArgElement = xmlDocument.createElementNS( XMLNS_QEMU_NS_URI, "arg" );
+ qemuCmdlnArgElement.setAttribute( "value", value );
+ qemuCmdlnElement.appendChild( qemuCmdlnArgElement );
+ }
+
+ public void addGvtg( String optionalRomfile )
+ {
+ final Element rootElement = Element.class.cast( this.getRootXmlNode().getXmlBaseNode() );
+ final Document xmlDocument = this.getRootXmlNode().getXmlDocument();
+ final Element qemuOverrideElement;
+
+ final NodeList qemuCmdlnNodes = rootElement.getElementsByTagNameNS( XMLNS_QEMU_NS_URI, "override" );
+ if ( qemuCmdlnNodes.getLength() < 1 ) {
+ // add missing <domain xmlns:qemu="..."> namespace attribute
+ rootElement.setAttributeNS( XMLConstants.XMLNS_ATTRIBUTE_NS_URI,
+ XMLConstants.XMLNS_ATTRIBUTE + ":" + XMLNS_QEMU_NS_PREFIX, XMLNS_QEMU_NS_URI );
+ // add missing <qemu:override> element
+ qemuOverrideElement = xmlDocument.createElementNS( XMLNS_QEMU_NS_URI, "override" );
+ qemuOverrideElement.setPrefix( XMLNS_QEMU_NS_PREFIX );
+ rootElement.appendChild( qemuOverrideElement );
+ } else {
+ // use available <qemu:override> element
+ final Node qemuOverrideNode = qemuCmdlnNodes.item( 0 );
+ assert ( qemuOverrideNode.getNodeType() == Node.ELEMENT_NODE );
+ qemuOverrideElement = Element.class.cast( qemuOverrideNode );
+ }
+
+ // Get device subnode
+ Element qemuDeviceElement = XmlHelper.getOrCreateElement( xmlDocument, qemuOverrideElement,
+ XMLNS_QEMU_NS_URI, XMLNS_QEMU_NS_PREFIX, "device", "alias", "hostdev0" );
+ //
+ Element qemuFrontendElement = XmlHelper.getOrCreateElement( xmlDocument, qemuDeviceElement,
+ XMLNS_QEMU_NS_URI, XMLNS_QEMU_NS_PREFIX, "frontend", null, null );
+ // Properties
+ Element prop;
+ prop = XmlHelper.getOrCreateElement( xmlDocument, qemuFrontendElement,
+ XMLNS_QEMU_NS_URI, XMLNS_QEMU_NS_PREFIX, "property", "name", "x-igd-opregion" );
+ prop.setAttribute( "type", "bool" );
+ prop.setAttribute( "value", "true" );
+ prop = XmlHelper.getOrCreateElement( xmlDocument, qemuFrontendElement,
+ XMLNS_QEMU_NS_URI, XMLNS_QEMU_NS_PREFIX, "property", "name", "driver" );
+ prop.setAttribute( "type", "string" );
+ prop.setAttribute( "value", "vfio-pci-nohotplug" );
+ prop = XmlHelper.getOrCreateElement( xmlDocument, qemuFrontendElement,
+ XMLNS_QEMU_NS_URI, XMLNS_QEMU_NS_PREFIX, "property", "name", "ramfb" );
+ prop.setAttribute( "type", "bool" );
+ prop.setAttribute( "value", "true" );
+ if ( optionalRomfile != null ) {
+ prop = XmlHelper.getOrCreateElement( xmlDocument, qemuFrontendElement,
+ XMLNS_QEMU_NS_URI, XMLNS_QEMU_NS_PREFIX, "property", "name", "romfile" );
+ prop.setAttribute( "type", "string" );
+ prop.setAttribute( "value", optionalRomfile );
+ }
+ }
+
+ /**
+ * Removes boot oder entries in the Libvirt domain XML document.
+ */
+ public void removeBootOrder()
+ {
+ // remove boot order entries of all disk devices
+ for ( Disk diskDevice : this.getDiskDevices() ) {
+ diskDevice.removeBootOrder();
+ }
+
+ // remove boot order entries of all network interface devices
+ for ( Interface interfaceDevice : this.getInterfaceDevices() ) {
+ interfaceDevice.removeBootOrder();
+ }
+
+ // remove boot order entries of all hostdev devices
+ for ( Hostdev hostdevDevice : this.getHostdevDevices() ) {
+ hostdevDevice.removeBootOrder();
+ }
+
+ // remove boot oder entries under the 'os' element
+ this.getRootXmlNode().removeXmlElement( "os/boot" );
+ }
+
+ /**
+ * Removes underlying source for all disk devices in the Libvirt domain XML document.
+ *
+ * @implNote Calling this method will result in an invalid Libvirt domain XML document.
+ */
+ public void removeDiskDevicesStorage()
+ {
+ for ( Disk diskDevice : this.getDiskDevices() ) {
+ diskDevice.removeStorage();
+ }
+ }
+
+ /**
+ * Removes specified Nvram file in the Libvirt domain XML document.
+ */
+ public void removeOsNvram()
+ {
+ final Node nvramElement = this.getRootXmlNode().getXmlElement( "os/nvram" );
+
+ if ( nvramElement != null ) {
+ nvramElement.getParentNode().removeChild( nvramElement );
+ }
+ }
+
+ /**
+ * Removes network source for all interface devices in the Libvirt domain XML document.
+ */
+ public void removeInterfaceDevicesSource()
+ {
+ for ( Interface interfaceDevice : this.getInterfaceDevices() ) {
+ // set empty source to preserve the XML attribute (to prevent XML validation errors)
+ interfaceDevice.setSource( "" );
+ }
+ }
+
+ /**
+ * Remove any existing CPU pinning and numa config
+ */
+ public void resetCpuPin()
+ {
+ this.getRootXmlNode().removeXmlElement( "cputune" );
+ this.getRootXmlNode().removeXmlElement( "numatune" );
+ }
+
+ public void addCpuPin( int virtualCore, int hostCore )
+ {
+ final Element rootElement = Element.class.cast( this.getRootXmlNode().getXmlBaseNode() );
+ final Document xmlDocument = this.getRootXmlNode().getXmlDocument();
+ Node cpuTune = this.getRootXmlNode().getXmlElement( "cputune" );
+ if ( cpuTune == null ) {
+ cpuTune = xmlDocument.createElement( "cputune" );
+ rootElement.appendChild( cpuTune );
+ }
+ Element pin = xmlDocument.createElement( "vcpupin" );
+ pin.setAttribute( "vcpu", Integer.toString( virtualCore ) );
+ pin.setAttribute( "cpuset", Integer.toString( hostCore ) );
+ cpuTune.appendChild( pin );
+ Node vcpuNode = this.getRootXmlNode().getXmlElement( "vcpu" );
+ if ( vcpuNode instanceof Element ) {
+ ( (Element)vcpuNode ).setAttribute( "placement", "static" );
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/DomainUtils.java b/src/main/java/org/openslx/libvirt/domain/DomainUtils.java
new file mode 100644
index 0000000..2462371
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/DomainUtils.java
@@ -0,0 +1,118 @@
+package org.openslx.libvirt.domain;
+
+import java.math.BigInteger;
+
+/**
+ * Collection of helper functions to maintain a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public final class DomainUtils
+{
+
+ /**
+ * Converts memory value with specified SI unit to absolute value in bytes.
+ *
+ * @param value amount of memory in specified SI unit.
+ * @param unit SI unit name, one of: bytes, KB, k, KiB, MB, M, MiB, GB, G, GiB, TB, T, TiB, for
+ * <code>value</code>.
+ * @return absolute amount of memory in bytes.
+ */
+ public static BigInteger decodeMemory( String value, String unit )
+ {
+ BigInteger factor = null;
+ BigInteger result = new BigInteger( value );
+
+ switch ( unit ) {
+ case "b":
+ case "bytes":
+ factor = new BigInteger( "1" );
+ break;
+ case "KB":
+ factor = new BigInteger( "1000" );
+ break;
+ case "k":
+ case "KiB":
+ factor = new BigInteger( "1024" );
+ break;
+ case "MB":
+ factor = new BigInteger( "1000000" );
+ break;
+ case "M":
+ case "MiB":
+ factor = new BigInteger( "1048576" );
+ break;
+ case "GB":
+ factor = new BigInteger( "1000000000" );
+ break;
+ case "G":
+ case "GiB":
+ factor = new BigInteger( "1073741824" );
+ break;
+ case "TB":
+ factor = new BigInteger( "1000000000000" );
+ break;
+ case "T":
+ case "TiB":
+ factor = new BigInteger( "1099511627776" );
+ break;
+ default:
+ return null;
+ }
+
+ return result.multiply( factor );
+ }
+
+ /**
+ * Convert memory from absolute value in bytes to value in specified SI unit.
+ *
+ * @param value absolute amount of memory in bytes.
+ * @param unit SI unit name, one of: bytes, KB, k, KiB, MB, M, MiB, GB, G, GiB, TB, T, TiB for
+ * returned memory value.
+ * @return amount of memory in specified SI unit.
+ */
+ public static String encodeMemory( BigInteger value, String unit )
+ {
+ BigInteger dividend = null;
+
+ switch ( unit ) {
+ case "b":
+ case "bytes":
+ dividend = new BigInteger( "1" );
+ break;
+ case "KB":
+ dividend = new BigInteger( "1000" );
+ break;
+ case "k":
+ case "KiB":
+ dividend = new BigInteger( "1024" );
+ break;
+ case "MB":
+ dividend = new BigInteger( "1000000" );
+ break;
+ case "M":
+ case "MiB":
+ dividend = new BigInteger( "1048576" );
+ break;
+ case "GB":
+ dividend = new BigInteger( "1000000000" );
+ break;
+ case "G":
+ case "GiB":
+ dividend = new BigInteger( "1073741824" );
+ break;
+ case "TB":
+ dividend = new BigInteger( "1000000000000" );
+ break;
+ case "T":
+ case "TiB":
+ dividend = new BigInteger( "1099511627776" );
+ break;
+ default:
+ return null;
+ }
+
+ return value.divide( dividend ).toString();
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/Controller.java b/src/main/java/org/openslx/libvirt/domain/device/Controller.java
new file mode 100644
index 0000000..626462b
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/Controller.java
@@ -0,0 +1,181 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A controller (PCI, USB, ...) device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Controller extends Device
+{
+ /**
+ * Creates an empty controller device.
+ */
+ public Controller()
+ {
+ super();
+ }
+
+ /**
+ * Creates a controller device representing an existing Libvirt XML controller device element.
+ *
+ * @param xmlNode existing Libvirt XML controller device element.
+ */
+ public Controller( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns index of the controller.
+ *
+ * @return index of the controller.
+ */
+ public int getIndex()
+ {
+ String index = this.getXmlElementAttributeValue( "index" );
+ return Integer.parseInt( index );
+ }
+
+ /**
+ * Sets index for the controller.
+ *
+ * @param index index for the controller.
+ */
+ public void setIndex( int index )
+ {
+ this.setXmlElementAttributeValue( "index", Integer.toString( index ) );
+ }
+
+ /**
+ * Creates a non-existent controller device as Libvirt XML device element.
+ *
+ * @param controller controller device that is created.
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created controller device instance.
+ */
+ public static Controller createInstance( Controller controller, LibvirtXmlNode xmlNode )
+ {
+ Controller addedController = null;
+
+ if ( controller instanceof ControllerFloppy ) {
+ xmlNode.setXmlElementAttributeValue( "type", Type.FLOPPY.toString() );
+ addedController = ControllerFloppy.createInstance( xmlNode );
+ } else if ( controller instanceof ControllerIde ) {
+ xmlNode.setXmlElementAttributeValue( "type", Type.IDE.toString() );
+ addedController = ControllerIde.createInstance( xmlNode );
+ } else if ( controller instanceof ControllerPci ) {
+ xmlNode.setXmlElementAttributeValue( "type", Type.PCI.toString() );
+ addedController = ControllerPci.createInstance( xmlNode );
+ } else if ( controller instanceof ControllerSata ) {
+ xmlNode.setXmlElementAttributeValue( "type", Type.SATA.toString() );
+ addedController = ControllerSata.createInstance( xmlNode );
+ } else if ( controller instanceof ControllerScsi ) {
+ xmlNode.setXmlElementAttributeValue( "type", Type.SCSI.toString() );
+ addedController = ControllerScsi.createInstance( xmlNode );
+ } else if ( controller instanceof ControllerUsb ) {
+ xmlNode.setXmlElementAttributeValue( "type", Type.USB.toString() );
+ addedController = ControllerUsb.createInstance( xmlNode );
+ }
+
+ return addedController;
+ }
+
+ /**
+ * Creates a controller device representing an existing Libvirt XML controller device element.
+ *
+ * @param xmlNode existing Libvirt XML controller device element.
+ * @return controller device instance.
+ */
+ public static Controller newInstance( LibvirtXmlNode xmlNode )
+ {
+
+ Controller deviceController = null;
+ Type type = Type.fromString( xmlNode.getXmlElementAttributeValue( "type" ) );
+
+ if ( type == null ) {
+ return null;
+ }
+
+ switch ( type ) {
+ case FLOPPY:
+ deviceController = ControllerFloppy.newInstance( xmlNode );
+ break;
+ case IDE:
+ deviceController = ControllerIde.newInstance( xmlNode );
+ break;
+ case PCI:
+ deviceController = ControllerPci.newInstance( xmlNode );
+ break;
+ case SATA:
+ deviceController = ControllerSata.newInstance( xmlNode );
+ break;
+ case SCSI:
+ deviceController = ControllerScsi.newInstance( xmlNode );
+ break;
+ case USB:
+ deviceController = ControllerUsb.newInstance( xmlNode );
+ break;
+ }
+
+ return deviceController;
+ }
+
+ /**
+ * Type of controller device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ enum Type
+ {
+ // @formatter:off
+ FLOPPY( "fdc" ),
+ IDE ( "ide" ),
+ PCI ( "pci" ),
+ SATA ( "sata" ),
+ SCSI ( "scsi" ),
+ USB ( "usb" );
+ // @formatter:on
+
+ /**
+ * Name of the controller device type.
+ */
+ private String type = null;
+
+ /**
+ * Creates controller device type.
+ *
+ * @param type valid name of the controller device type in a Libvirt domain XML document.
+ */
+ Type( String type )
+ {
+ this.type = type;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.type;
+ }
+
+ /**
+ * Creates controller device type from its name with error check.
+ *
+ * @param type name of the controller device type in a Libvirt domain XML document.
+ * @return valid controller device type.
+ */
+ public static Type fromString( String type )
+ {
+ for ( Type t : Type.values() ) {
+ if ( t.type.equalsIgnoreCase( type ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/ControllerFloppy.java b/src/main/java/org/openslx/libvirt/domain/device/ControllerFloppy.java
new file mode 100644
index 0000000..5e580bd
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/ControllerFloppy.java
@@ -0,0 +1,54 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A floppy controller device in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class ControllerFloppy extends Controller
+{
+ /**
+ * Creates an empty floppy controller device.
+ */
+ public ControllerFloppy()
+ {
+ super();
+ }
+
+ /**
+ * Creates a floppy controller device representing an existing Libvirt XML floppy controller
+ * device element.
+ *
+ * @param xmlNode existing Libvirt XML controller device element.
+ */
+ public ControllerFloppy( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Creates a non-existent floppy controller device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created floppy controller device instance.
+ */
+ public static ControllerFloppy createInstance( LibvirtXmlNode xmlNode )
+ {
+ return ControllerFloppy.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a floppy controller device representing an existing Libvirt XML floppy controller
+ * device element.
+ *
+ * @param xmlNode existing Libvirt XML controller device element.
+ * @return floppy controller device instance.
+ */
+ public static ControllerFloppy newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new ControllerFloppy( xmlNode );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/ControllerIde.java b/src/main/java/org/openslx/libvirt/domain/device/ControllerIde.java
new file mode 100644
index 0000000..062b67d
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/ControllerIde.java
@@ -0,0 +1,128 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * An IDE controller device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class ControllerIde extends Controller
+{
+ /**
+ * Creates an empty IDE controller device.
+ */
+ public ControllerIde()
+ {
+ super();
+ }
+
+ /**
+ * Creates an IDE controller device representing an existing Libvirt XML IDE controller device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML IDE controller device element.
+ */
+ public ControllerIde( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns emulated hardware model of the IDE controller.
+ *
+ * @return hardware model of the IDE controller.
+ */
+ public Model getModel()
+ {
+ String model = this.getXmlElementAttributeValue( "model" );
+ return Model.fromString( model );
+ }
+
+ /**
+ * Sets hardware model for the IDE controller.
+ *
+ * @param model hardware model for the IDE controller.
+ */
+ public void setModel( Model model )
+ {
+ this.setXmlElementAttributeValue( "model", model.toString() );
+ }
+
+ /**
+ * Creates a non-existent IDE controller device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created IDE controller device instance.
+ */
+ public static ControllerIde createInstance( LibvirtXmlNode xmlNode )
+ {
+ return ControllerIde.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates an IDE controller device representing an existing Libvirt XML IDE controller device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML IDE controller device element.
+ * @return IDE controller device instance.
+ */
+ public static ControllerIde newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new ControllerIde( xmlNode );
+ }
+
+ /**
+ * Model of IDE controller device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ enum Model
+ {
+ // @formatter:off
+ PIIX3( "piix3" ),
+ PIIX4( "pixx4" ),
+ ICH6 ( "ich6" );
+ // @formatter:on
+
+ /**
+ * Name of the IDE controller device model.
+ */
+ private String model = null;
+
+ /**
+ * Creates IDE controller device model.
+ *
+ * @param type valid name of the IDE controller device model in a Libvirt domain XML document.
+ */
+ Model( String model )
+ {
+ this.model = model;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.model;
+ }
+
+ /**
+ * Creates IDE controller device model from its name with error check.
+ *
+ * @param type name of the IDE controller device model in a Libvirt domain XML document.
+ * @return valid IDE controller device model.
+ */
+ public static Model fromString( String model )
+ {
+ for ( Model t : Model.values() ) {
+ if ( t.model.equalsIgnoreCase( model ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/ControllerPci.java b/src/main/java/org/openslx/libvirt/domain/device/ControllerPci.java
new file mode 100644
index 0000000..feb8b1a
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/ControllerPci.java
@@ -0,0 +1,145 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A PCI controller device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class ControllerPci extends Controller
+{
+ /**
+ * Creates an empty PCI controller device.
+ */
+ public ControllerPci()
+ {
+ super();
+ }
+
+ /**
+ * Creates a PCI controller device representing an existing Libvirt XML PCI controller device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML PCI controller device element.
+ */
+ public ControllerPci( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns model of the PCI controller.
+ *
+ * @return model of the PCI controller.
+ */
+ public Model getModel()
+ {
+ String model = this.getXmlElementAttributeValue( "model" );
+ return Model.fromString( model );
+ }
+
+ /**
+ * Sets model for the PCI controller.
+ *
+ * @param model model for the PCI controller.
+ */
+ public void setModel( Model model )
+ {
+ this.setXmlElementAttributeValue( "model", model.toString() );
+ }
+
+ /**
+ * Returns emulated hardware model of the PCI controller.
+ *
+ * @return emulated hardware model of the PCI controller.
+ */
+ public String getModelEmulated()
+ {
+ return this.getXmlElementAttributeValue( "model", "name" );
+ }
+
+ /**
+ * Creates a non-existent PCI controller device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created PCI controller device instance.
+ */
+ public static ControllerPci createInstance( LibvirtXmlNode xmlNode )
+ {
+ return ControllerPci.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a PCI controller device representing an existing Libvirt XML PCI controller device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML PCI controller device element.
+ * @return PCI controller device instance.
+ */
+ public static ControllerPci newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new ControllerPci( xmlNode );
+ }
+
+ /**
+ * Model of PCI controller device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ enum Model
+ {
+ // @formatter:off
+ PCI_ROOT ( "pci-root" ),
+ PCI_BRDIGE ( "pci-bridge" ),
+ PCIE_ROOT ( "pcie-root" ),
+ PCI_DMI2BRIDGE ( "dmi-to-pci-bridge" ),
+ PCIE_ROOT_PORT ( "pcie-root-port" ),
+ PCIE_SWITCH_UPSTREAM_PORT ( "pcie-switch-upstream-port" ),
+ PCIE_SWITCH_DOWNSTREAM_PORT( "pcie-switch-downstream-port" ),
+ PCI_EXPANDER_BUS ( "pci-expander-bus" ),
+ PCIE_EXPANDER_BUS ( "pcie-expander-bus" ),
+ PCIE2PCI_BRIDGE ( "pcie-to-pci-bridge" );
+ // @formatter:on
+
+ /**
+ * Name of the PCI controller device model.
+ */
+ private String model = null;
+
+ /**
+ * Creates PCI controller device model.
+ *
+ * @param type valid name of the PCI controller device model in a Libvirt domain XML document.
+ */
+ Model( String model )
+ {
+ this.model = model;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.model;
+ }
+
+ /**
+ * Creates PCI controller device model from its name with error check.
+ *
+ * @param type name of the PCI controller device model in a Libvirt domain XML document.
+ * @return valid PCI controller device model.
+ */
+ public static Model fromString( String model )
+ {
+ for ( Model t : Model.values() ) {
+ if ( t.model.equalsIgnoreCase( model ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/ControllerSata.java b/src/main/java/org/openslx/libvirt/domain/device/ControllerSata.java
new file mode 100644
index 0000000..b784ae0
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/ControllerSata.java
@@ -0,0 +1,54 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A SATA controller device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class ControllerSata extends Controller
+{
+ /**
+ * Creates an empty SATA controller device.
+ */
+ public ControllerSata()
+ {
+ super();
+ }
+
+ /**
+ * Creates a SATA controller device representing an existing Libvirt XML SATA controller device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML SATA controller device element.
+ */
+ public ControllerSata( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Creates a non-existent SATA controller device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created SATA controller device instance.
+ */
+ public static ControllerSata createInstance( LibvirtXmlNode xmlNode )
+ {
+ return ControllerSata.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a SATA controller device representing an existing Libvirt XML SATA controller device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML SATA controller device element.
+ * @return SATA controller device instance.
+ */
+ public static ControllerSata newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new ControllerSata( xmlNode );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/ControllerScsi.java b/src/main/java/org/openslx/libvirt/domain/device/ControllerScsi.java
new file mode 100644
index 0000000..16c3a0f
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/ControllerScsi.java
@@ -0,0 +1,138 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A SCSI controller device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class ControllerScsi extends Controller
+{
+ /**
+ * Creates an empty SCSI controller device.
+ */
+ public ControllerScsi()
+ {
+ super();
+ }
+
+ /**
+ * Creates a SCSI controller device representing an existing Libvirt XML SCSI controller device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML SCSI controller device element.
+ */
+ public ControllerScsi( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns hardware model of the PCI controller.
+ *
+ * @return hardware model of the PCI controller.
+ */
+ public Model getModel()
+ {
+ String model = this.getXmlElementAttributeValue( "model" );
+ return Model.fromString( model );
+ }
+
+ /**
+ * Sets hardware model for the PCI controller.
+ *
+ * @param model hardware model for the PCI controller.
+ */
+ public void setModel( Model model )
+ {
+ this.setXmlElementAttributeValue( "model", model.toString() );
+ }
+
+ /**
+ * Creates a non-existent SCSI controller device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created SCSI controller device instance.
+ */
+ public static ControllerScsi createInstance( LibvirtXmlNode xmlNode )
+ {
+ return ControllerScsi.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a SCSI controller device representing an existing Libvirt XML SCSI controller device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML SCSI controller device element.
+ * @return SCSI controller device instance.
+ */
+ public static ControllerScsi newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new ControllerScsi( xmlNode );
+ }
+
+ /**
+ * Model of SCSI controller device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ enum Model
+ {
+ // @formatter:off
+ AUTO ( "auto" ),
+ BUSLOGIC ( "buslogic" ),
+ IBMVSCSI ( "ibmvscsi" ),
+ LSISAS1068 ( "lsisas1068" ),
+ LSISAS1078 ( "lsisas1078" ),
+ VIRTIO_SCSI ( "virtio-scsi" ),
+ VMPVSCSI ( "vmpvscsi" ),
+ VIRTIO_TRANSITIONAL ( "virtio-transitional" ),
+ VIRTIO_NON_TRANSITIONAL( "virtio-non-transitional" ),
+ NCR53C90 ( "ncr53c90" ),
+ AM53C974 ( "am53c974" ),
+ DC390 ( "dc390" );
+ // @formatter:on
+
+ /**
+ * Name of the SCSI controller device model.
+ */
+ private String model = null;
+
+ /**
+ * Creates SCSI controller device model.
+ *
+ * @param type valid name of the SCSI controller device model in a Libvirt domain XML
+ * document.
+ */
+ Model( String model )
+ {
+ this.model = model;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.model;
+ }
+
+ /**
+ * Creates SCSI controller device model from its name with error check.
+ *
+ * @param type name of the SCSI controller device model in a Libvirt domain XML document.
+ * @return valid SCSI controller device model.
+ */
+ public static Model fromString( String model )
+ {
+ for ( Model t : Model.values() ) {
+ if ( t.model.equalsIgnoreCase( model ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/ControllerUsb.java b/src/main/java/org/openslx/libvirt/domain/device/ControllerUsb.java
new file mode 100644
index 0000000..1798027
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/ControllerUsb.java
@@ -0,0 +1,139 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A USB controller device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class ControllerUsb extends Controller
+{
+ /**
+ * Creates an empty USB controller device.
+ */
+ public ControllerUsb()
+ {
+ super();
+ }
+
+ /**
+ * Creates an USB controller device representing an existing Libvirt XML USB controller device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML USB controller device element.
+ */
+ public ControllerUsb( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns hardware model of the PCI controller.
+ *
+ * @return hardware model of the PCI controller.
+ */
+ public Model getModel()
+ {
+ String model = this.getXmlElementAttributeValue( "model" );
+ return Model.fromString( model );
+ }
+
+ /**
+ * Sets hardware model for the PCI controller.
+ *
+ * @param model hardware model for the PCI controller.
+ */
+ public void setModel( Model model )
+ {
+ this.setXmlElementAttributeValue( "model", model.toString() );
+ }
+
+ /**
+ * Creates a non-existent USB controller device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created USB controller device instance.
+ */
+ public static ControllerUsb createInstance( LibvirtXmlNode xmlNode )
+ {
+ return ControllerUsb.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates an USB controller device representing an existing Libvirt XML USB controller device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML USB controller device element.
+ * @return USB controller device instance.
+ */
+ public static ControllerUsb newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new ControllerUsb( xmlNode );
+ }
+
+ /**
+ * Model of PCI controller device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum Model
+ {
+ // @formatter:off
+ NONE ( "none" ),
+ PIIX3_UHCI ( "piix3-uhci" ),
+ PIIX4_UHCI ( "piix4-uhci" ),
+ EHCI ( "ehci" ),
+ ICH9_EHCI1 ( "ich9-ehci1" ),
+ ICH9_UHCI1 ( "ich9-uhci1" ),
+ ICH9_UHCI2 ( "ich9-uhci2" ),
+ ICH9_UHCI3 ( "ich9-uhci3" ),
+ VT82C686B_UHCI( "vt82c686b-uhci" ),
+ PCI_OHCI ( "pci-ohci" ),
+ NEC_XHCI ( "nec-xhci" ),
+ QUSB1 ( "qusb1" ),
+ QUSB2 ( "qusb2" ),
+ QEMU_XHCI ( "qemu-xhci" );
+ // @formatter:on
+
+ /**
+ * Name of the USB controller device model.
+ */
+ private String model = null;
+
+ /**
+ * Creates USB controller device model.
+ *
+ * @param type valid name of the USB controller device model in a Libvirt domain XML document.
+ */
+ Model( String model )
+ {
+ this.model = model;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.model;
+ }
+
+ /**
+ * Creates USB controller device model from its name with error check.
+ *
+ * @param model name of the USB controller device model in a Libvirt domain XML document.
+ * @return valid USB controller device model.
+ */
+ public static Model fromString( String model )
+ {
+ for ( Model t : Model.values() ) {
+ if ( t.model.equalsIgnoreCase( model ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/Device.java b/src/main/java/org/openslx/libvirt/domain/device/Device.java
new file mode 100644
index 0000000..31a54ca
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/Device.java
@@ -0,0 +1,290 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+/**
+ * A virtual machines device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Device extends LibvirtXmlNode implements HostdevAddressableTarget<HostdevPciDeviceAddress>
+{
+ /**
+ * Creates an empty virtual machine device.
+ */
+ public Device()
+ {
+ super();
+ }
+
+ /**
+ * Creates a virtual machine device representing an existing Libvirt XML device element.
+ *
+ * @param xmlNode existing Libvirt XML device element.
+ */
+ public Device( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Removes device from Libvirt domain XML document.
+ */
+ public void remove()
+ {
+ Node node = this.getXmlElement();
+ node.getParentNode().removeChild( node );
+ }
+
+ /**
+ * Creates a Libvirt XML device element as child of a given Libvirt XML parent node.
+ *
+ * @param xmlParentNode parent Libvirt XML node of the Libvirt XML device element that is
+ * created.
+ * @param deviceType type of the Libvirt XML device element.
+ * @return created Libvirt XML device node.
+ */
+ private static LibvirtXmlNode createDeviceElement( LibvirtXmlNode xmlParentNode, Type deviceType )
+ {
+ // create XML element as part of the Libvirt XML document
+ Document xmlDocument = xmlParentNode.getXmlDocument();
+ Element deviceNode = xmlDocument.createElement( deviceType.toString() );
+
+ // append the created XML element to the Libvirt XML document
+ xmlParentNode.getXmlBaseNode().appendChild( deviceNode );
+
+ return new LibvirtXmlNode( xmlParentNode.getXmlDocument(), deviceNode );
+ }
+
+ /**
+ * Creates a non-existent virtual machine device as Libvirt XML device element.
+ *
+ * @param device virtual machine device that is created.
+ * @param xmlParentNode parent Libvirt XML node of the Libvirt XML device that is created.
+ * @return created virtual machine device instance.
+ */
+ public static Device createInstance( Device device, LibvirtXmlNode xmlParentNode )
+ {
+ Device createdDevice = null;
+
+ if ( device instanceof Controller ) {
+ LibvirtXmlNode xmlNode = Device.createDeviceElement( xmlParentNode, Type.CONTROLLER );
+ createdDevice = Controller.createInstance( Controller.class.cast( device ), xmlNode );
+ } else if ( device instanceof Disk ) {
+ LibvirtXmlNode xmlNode = Device.createDeviceElement( xmlParentNode, Type.DISK );
+ createdDevice = Disk.createInstance( Disk.class.cast( device ), xmlNode );
+ } else if ( device instanceof FileSystem ) {
+ LibvirtXmlNode xmlNode = Device.createDeviceElement( xmlParentNode, Type.FILESYSTEM );
+ createdDevice = FileSystem.createInstance( xmlNode );
+ } else if ( device instanceof Hostdev ) {
+ LibvirtXmlNode xmlNode = Device.createDeviceElement( xmlParentNode, Type.HOSTDEV );
+ createdDevice = Hostdev.createInstance( Hostdev.class.cast( device ), xmlNode );
+ } else if ( device instanceof Interface ) {
+ LibvirtXmlNode xmlNode = Device.createDeviceElement( xmlParentNode, Type.INTERFACE );
+ createdDevice = Interface.createInstance( Interface.class.cast( device ), xmlNode );
+ } else if ( device instanceof Graphics ) {
+ LibvirtXmlNode xmlNode = Device.createDeviceElement( xmlParentNode, Type.GRAPHICS );
+ createdDevice = Graphics.createInstance( Graphics.class.cast( device ), xmlNode );
+ } else if ( device instanceof Parallel ) {
+ LibvirtXmlNode xmlNode = Device.createDeviceElement( xmlParentNode, Type.PARALLEL );
+ createdDevice = Parallel.createInstance( xmlNode );
+ } else if ( device instanceof Serial ) {
+ LibvirtXmlNode xmlNode = Device.createDeviceElement( xmlParentNode, Type.SERIAL );
+ createdDevice = Serial.createInstance( xmlNode );
+ } else if ( device instanceof Shmem ) {
+ LibvirtXmlNode xmlNode = Device.createDeviceElement( xmlParentNode, Type.SHMEM );
+ createdDevice = Shmem.createInstance( xmlNode );
+ } else if ( device instanceof Sound ) {
+ LibvirtXmlNode xmlNode = Device.createDeviceElement( xmlParentNode, Type.SOUND );
+ createdDevice = Sound.createInstance( xmlNode );
+ } else if ( device instanceof Video ) {
+ LibvirtXmlNode xmlNode = Device.createDeviceElement( xmlParentNode, Type.VIDEO );
+ createdDevice = Video.createInstance( xmlNode );
+ }
+
+ return createdDevice;
+ }
+
+ /**
+ * Creates a virtual machine device representing an existing Libvirt XML device element.
+ *
+ * @param xmlNode existing Libvirt XML device element.
+ * @return virtual machine device instance.
+ */
+ public static Device newInstance( LibvirtXmlNode xmlNode )
+ {
+
+ Node element = xmlNode.getXmlElement();
+
+ if ( element == null ) {
+ return null;
+ } else {
+ Device device = null;
+ Type type = Type.fromString( element.getNodeName() );
+
+ if ( type == null ) {
+ return null;
+ }
+
+ switch ( type ) {
+ case CONTROLLER:
+ device = Controller.newInstance( xmlNode );
+ break;
+ case DISK:
+ device = Disk.newInstance( xmlNode );
+ break;
+ case FILESYSTEM:
+ device = FileSystem.newInstance( xmlNode );
+ break;
+ case HOSTDEV:
+ device = Hostdev.newInstance( xmlNode );
+ break;
+ case INTERFACE:
+ device = Interface.newInstance( xmlNode );
+ break;
+ case GRAPHICS:
+ device = Graphics.newInstance( xmlNode );
+ break;
+ case PARALLEL:
+ device = Parallel.newInstance( xmlNode );
+ break;
+ case SERIAL:
+ device = Serial.newInstance( xmlNode );
+ break;
+ case SHMEM:
+ device = Shmem.newInstance( xmlNode );
+ break;
+ case SOUND:
+ device = Sound.newInstance( xmlNode );
+ break;
+ case VIDEO:
+ device = Video.newInstance( xmlNode );
+ break;
+ }
+
+ return device;
+ }
+ }
+
+ /**
+ * Sets the PCI device address for an XML address element selected by a XPath expression.
+ *
+ * @param expression XPath expression to select the XML address element.
+ * @param address PCI device address for the selected XML address element.
+ */
+ protected void setPciAddress( final String expression, final HostdevPciDeviceAddress address )
+ {
+ final String pciDomain = HostdevUtils.appendHexPrefix( address.getPciDomainAsString() );
+ final String pciBus = HostdevUtils.appendHexPrefix( address.getPciBusAsString() );
+ final String pciDevice = HostdevUtils.appendHexPrefix( address.getPciDeviceAsString() );
+ final String pciFunction = HostdevUtils.appendHexPrefix( address.getPciFunctionAsString() );
+
+ this.setXmlElementAttributeValue( expression, "domain", pciDomain );
+ this.setXmlElementAttributeValue( expression, "bus", pciBus );
+ this.setXmlElementAttributeValue( expression, "slot", pciDevice );
+ this.setXmlElementAttributeValue( expression, "function", pciFunction );
+ }
+
+ /**
+ * Returns the PCI device address from an address XML element selected by a XPath expression.
+ *
+ * @param expression XPath expression to select the XML address element.
+ * @return PCI device address from the selected XML address element.
+ */
+ protected HostdevPciDeviceAddress getPciAddress( final String expression )
+ {
+ String pciDomain = this.getXmlElementAttributeValue( expression, "domain" );
+ String pciBus = this.getXmlElementAttributeValue( expression, "bus" );
+ String pciDevice = this.getXmlElementAttributeValue( expression, "slot" );
+ String pciFunction = this.getXmlElementAttributeValue( expression, "function" );
+
+ pciDomain = HostdevUtils.removeHexPrefix( pciDomain );
+ pciBus = HostdevUtils.removeHexPrefix( pciBus );
+ pciDevice = HostdevUtils.removeHexPrefix( pciDevice );
+ pciFunction = HostdevUtils.removeHexPrefix( pciFunction );
+
+ return HostdevPciDeviceAddress.valueOf( pciDomain + ":" + pciBus + ":" + pciDevice + "." + pciFunction );
+ }
+
+ /**
+ * Returns this devices PCI bus address, or null if it doesn't have an explicit one
+ * set, or if the address type isn't PCI.
+ */
+ public HostdevPciDeviceAddress getPciTarget()
+ {
+ if ( !"pci".equals( this.getXmlElementAttributeValue( "address", "type" ) ) )
+ return null;
+ return this.getPciAddress( "address" );
+ }
+
+ public void setPciTarget( HostdevPciDeviceAddress address )
+ {
+ this.setPciAddress( "address", address );
+ this.setXmlElementAttributeValue( "address", "type", "pci" );
+ }
+
+ /**
+ * Type of virtual machine devices.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ enum Type
+ {
+ // @formatter:off
+ CONTROLLER( "controller" ),
+ DISK ( "disk" ),
+ FILESYSTEM( "filesystem" ),
+ HOSTDEV ( "hostdev" ),
+ INTERFACE ( "interface" ),
+ GRAPHICS ( "graphics" ),
+ PARALLEL ( "parallel" ),
+ SERIAL ( "serial" ),
+ SHMEM ( "shmem" ),
+ SOUND ( "sound" ),
+ VIDEO ( "video" );
+ // @formatter:on
+
+ /**
+ * Name of the virtual machine device type.
+ */
+ private String type = null;
+
+ /**
+ * Creates virtual machine device type.
+ *
+ * @param type valid name of the virtual machine device type in a Libvirt domain XML document.
+ */
+ Type( String type )
+ {
+ this.type = type;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.type;
+ }
+
+ /**
+ * Creates virtual machine device type from its name with error check.
+ *
+ * @param type name of the virtual machine device type in a Libvirt domain XML document.
+ * @return valid virtual machine device type.
+ */
+ public static Type fromString( String type )
+ {
+ for ( Type t : Type.values() ) {
+ if ( t.type.equalsIgnoreCase( type ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/Disk.java b/src/main/java/org/openslx/libvirt/domain/device/Disk.java
new file mode 100644
index 0000000..7694538
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/Disk.java
@@ -0,0 +1,427 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+import org.w3c.dom.Node;
+
+/**
+ * A disk (floppy, CDROM, ...) device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Disk extends Device
+{
+ /**
+ * Creates an empty disk device.
+ */
+ public Disk()
+ {
+ super();
+ }
+
+ /**
+ * Creates a disk device representing an existing Libvirt XML disk device element.
+ *
+ * @param xmlNode existing Libvirt XML disk device element.
+ */
+ public Disk( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns storage type of the disk device.
+ *
+ * @return storage type of underlying source for the disk device.
+ */
+ public StorageType getStorageType()
+ {
+ String storageType = this.getXmlElementAttributeValue( "type" );
+ return StorageType.fromString( storageType );
+ }
+
+ /**
+ * Sets storage type for the disk device.
+ *
+ * @param storageType storage type of underlying source for the disk device.
+ *
+ * @implNote Please call {@link #setStorageSource(String)} after calling this method, otherwise
+ * the underlying source for the disk device may be invalid.
+ */
+ protected void setStorageType( StorageType storageType )
+ {
+ this.setXmlElementAttributeValue( "type", storageType.toString() );
+ }
+
+ /**
+ * Returns underlying source of disk device.
+ *
+ * @return file path to underlying source of disk device.
+ */
+ public String getStorageSource()
+ {
+ StorageType storageType = this.getStorageType();
+ String storageSource = null;
+
+ switch ( storageType ) {
+ case FILE:
+ storageSource = this.getXmlElementAttributeValue( "source", "file" );
+ break;
+ case BLOCK:
+ storageSource = this.getXmlElementAttributeValue( "source", "dev" );
+ break;
+ }
+
+ return storageSource;
+ }
+
+ /**
+ * Sets underlying source for disk device.
+ *
+ * @param source file path to underlying source for disk device.
+ *
+ * @implNote Please call {@link #setStorageType(StorageType)} before calling this method,
+ * otherwise the underlying source for the disk device is not set.
+ */
+ protected void setStorageSource( String source )
+ {
+ StorageType storageType = this.getStorageType();
+
+ // remove all attributes from sub-element 'source'
+ this.removeXmlElementAttributes( "source" );
+
+ // rewrite specific attribute depending on the storage type
+ switch ( storageType ) {
+ case FILE:
+ this.setXmlElementAttributeValue( "source", "file", source );
+ break;
+ case BLOCK:
+ this.setXmlElementAttributeValue( "source", "dev", source );
+ break;
+ }
+ }
+
+ /**
+ * Sets storage type and underlying source for disk device.
+ *
+ * @param storageType storage type of underlying source for the disk device.
+ * @param source file path to underlying source for disk device.
+ */
+ public void setStorage( StorageType storageType, String source )
+ {
+ this.setStorageType( storageType );
+ this.setStorageSource( source );
+ }
+
+ /**
+ * Removes underlying source of the disk device.
+ *
+ * @implNote Calling this method will result in an invalid Libvirt domain XML content.
+ */
+ public void removeStorage()
+ {
+ this.removeXmlElement( "source" );
+ }
+
+ /**
+ * Removes boot oder entry of the disk device.
+ */
+ public void removeBootOrder()
+ {
+ this.removeXmlElement( "boot" );
+ }
+
+ /**
+ * Returns read only state of disk device.
+ *
+ * @return read only state of disk device.
+ */
+ public boolean isReadOnly()
+ {
+ Node readOnly = this.getXmlElement( "readonly" );
+
+ if ( readOnly == null ) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ /**
+ * Sets read only state for disk device.
+ *
+ * @param readOnly state for disk device and its read only functionality.
+ */
+ public void setReadOnly( boolean readOnly )
+ {
+ if ( readOnly ) {
+ this.setXmlElement( "readonly" );
+ } else {
+ this.removeXmlElement( "readonly" );
+ }
+ }
+
+ /**
+ * Returns bus type of the disk device.
+ *
+ * @return bus type of the disk device.
+ */
+ public BusType getBusType()
+ {
+ String busType = this.getXmlElementAttributeValue( "target", "bus" );
+ return BusType.fromString( busType );
+ }
+
+ /**
+ * Sets bus type for the disk device.
+ *
+ * @param busType bus type for the disk device.
+ */
+ public void setBusType( BusType busType )
+ {
+ this.setXmlElementAttributeValue( "target", "bus", busType.toString() );
+ }
+
+ /**
+ * Returns target device of the disk device.
+ *
+ * @return target device of the disk device.
+ */
+ public String getTargetDevice()
+ {
+ return this.getXmlElementAttributeValue( "target", "dev" );
+ }
+
+ /**
+ * Sets target device for the disk device.
+ *
+ * @param targetDevice target device for the disk device.
+ */
+ public void setTargetDevice( String targetDevice )
+ {
+ this.setXmlElementAttributeValue( "target", "dev", targetDevice );
+ }
+
+ /**
+ * Creates a non-existent disk device as Libvirt XML device element.
+ *
+ * @param disk disk device that is created.
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created disk device instance.
+ */
+ public static Disk createInstance( Disk disk, LibvirtXmlNode xmlNode )
+ {
+ Disk addedDisk = null;
+
+ if ( disk instanceof DiskCdrom ) {
+ xmlNode.setXmlElementAttributeValue( "device", Type.CDROM.toString() );
+ addedDisk = DiskCdrom.createInstance( xmlNode );
+ } else if ( disk instanceof DiskFloppy ) {
+ xmlNode.setXmlElementAttributeValue( "device", Type.FLOPPY.toString() );
+ addedDisk = DiskFloppy.createInstance( xmlNode );
+ } else if ( disk instanceof DiskStorage ) {
+ xmlNode.setXmlElementAttributeValue( "device", Type.STORAGE.toString() );
+ addedDisk = DiskStorage.createInstance( xmlNode );
+ }
+
+ return addedDisk;
+ }
+
+ /**
+ * Creates a disk device representing an existing Libvirt XML disk device element.
+ *
+ * @param xmlNode existing Libvirt XML disk device element.
+ * @return disk device instance.
+ */
+ public static Disk newInstance( LibvirtXmlNode xmlNode )
+ {
+ Disk deviceDisk = null;
+ Type type = Type.fromString( xmlNode.getXmlElementAttributeValue( "device" ) );
+
+ if ( type == null ) {
+ return null;
+ }
+
+ switch ( type ) {
+ case CDROM:
+ deviceDisk = DiskCdrom.newInstance( xmlNode );
+ break;
+ case FLOPPY:
+ deviceDisk = DiskFloppy.newInstance( xmlNode );
+ break;
+ case STORAGE:
+ deviceDisk = DiskStorage.newInstance( xmlNode );
+ break;
+ }
+
+ return deviceDisk;
+ }
+
+ /**
+ * Type of disk device.
+ *
+ * Indicates how a disk is to be exposed to the guest OS.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ enum Type
+ {
+ // @formatter:off
+ CDROM ( "cdrom" ),
+ FLOPPY ( "floppy" ),
+ STORAGE( "disk" );
+ // @formatter:on
+
+ /**
+ * Name of the disk device type.
+ */
+ private String type = null;
+
+ /**
+ * Creates disk device type.
+ *
+ * @param type valid name of the disk device type in a Libvirt domain XML document.
+ */
+ Type( String type )
+ {
+ this.type = type;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.type;
+ }
+
+ /**
+ * Creates disk device type from its name with error check.
+ *
+ * @param type name of the disk device type in a Libvirt domain XML document.
+ * @return valid disk device type.
+ */
+ public static Type fromString( String type )
+ {
+ for ( Type t : Type.values() ) {
+ if ( t.type.equalsIgnoreCase( type ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+
+ /**
+ * Storage type of a disk device.
+ *
+ * The storage type refers to the underlying source for the disk.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum StorageType
+ {
+ // @formatter:off
+ FILE ( "file" ),
+ BLOCK ( "block" );
+ // @formatter:on
+
+ /**
+ * Name of the disk device type.
+ */
+ private String storageType = null;
+
+ /**
+ * Creates disk device storage type.
+ *
+ * @param storageType valid name of the disk device storage type in a Libvirt domain XML
+ * document.
+ */
+ StorageType( String storageType )
+ {
+ this.storageType = storageType;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.storageType;
+ }
+
+ /**
+ * Creates disk device storage type from its name with error check.
+ *
+ * @param storageType name of the disk device storage type in a Libvirt domain XML document.
+ * @return valid disk device storage type.
+ */
+ public static StorageType fromString( String storageType )
+ {
+ for ( StorageType t : StorageType.values() ) {
+ if ( t.storageType.equalsIgnoreCase( storageType ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+
+ /**
+ * Bus type (IDE, SATA, ...) of a disk device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum BusType
+ {
+ // @formatter:off
+ IDE ( "ide" ),
+ FDC ( "fdc" ),
+ SATA ( "sata" ),
+ SCSI ( "scsi" ),
+ SD ( "sd" ),
+ USB ( "usb" ),
+ VIRTIO( "virtio" ),
+ XEN ( "xen" );
+ // @formatter:on
+
+ /**
+ * Name of the disk device bus type.
+ */
+ private String busType = null;
+
+ /**
+ * Creates disk device bus type.
+ *
+ * @param busType valid name of the disk device bus type in a Libvirt domain XML document.
+ */
+ BusType( String busType )
+ {
+ this.busType = busType;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.busType;
+ }
+
+ /**
+ * Creates disk device bus type from its name with error check.
+ *
+ * @param busType name of the disk device bus type in a Libvirt domain XML document.
+ * @return valid disk device bus type.
+ */
+ public static BusType fromString( String busType )
+ {
+ for ( BusType t : BusType.values() ) {
+ if ( t.busType.equalsIgnoreCase( busType ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/DiskCdrom.java b/src/main/java/org/openslx/libvirt/domain/device/DiskCdrom.java
new file mode 100644
index 0000000..2ae08e1
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/DiskCdrom.java
@@ -0,0 +1,55 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A CDROM disk device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class DiskCdrom extends Disk
+{
+ /**
+ * Creates an empty CDROM disk device.
+ */
+ public DiskCdrom()
+ {
+ super();
+ }
+
+ /**
+ * Creates a CDROM disk device representing an existing Libvirt XML CDROM disk device element.
+ *
+ * @param xmlNode existing Libvirt XML CDROM disk device element.
+ */
+ public DiskCdrom( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+
+ // restrict CDROM disk device default read/write access always to readonly
+ this.setReadOnly( true );
+ }
+
+ /**
+ * Creates a non-existent CDROM disk device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created CDROM disk device instance.
+ */
+ public static DiskCdrom createInstance( LibvirtXmlNode xmlNode )
+ {
+ return DiskCdrom.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a CDROM disk device representing an existing Libvirt XML CDROM disk device element.
+ *
+ * @param xmlNode existing Libvirt XML CDROM disk device element.
+ * @return CDROM disk device instance.
+ */
+ public static DiskCdrom newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new DiskCdrom( xmlNode );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/DiskFloppy.java b/src/main/java/org/openslx/libvirt/domain/device/DiskFloppy.java
new file mode 100644
index 0000000..ce9733b
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/DiskFloppy.java
@@ -0,0 +1,52 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A floppy disk device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class DiskFloppy extends Disk
+{
+ /**
+ * Creates an empty floppy disk device.
+ */
+ public DiskFloppy()
+ {
+ super();
+ }
+
+ /**
+ * Creates a floppy disk device representing an existing Libvirt XML floppy disk device element.
+ *
+ * @param xmlNode existing Libvirt XML floppy disk device element.
+ */
+ public DiskFloppy( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Creates a non-existent floppy disk device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created floppy disk device instance.
+ */
+ public static DiskFloppy createInstance( LibvirtXmlNode xmlNode )
+ {
+ return DiskFloppy.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a floppy disk device representing an existing Libvirt XML floppy disk device element.
+ *
+ * @param xmlNode existing Libvirt XML floppy disk device element.
+ * @return floppy disk device instance.
+ */
+ public static DiskFloppy newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new DiskFloppy( xmlNode );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/DiskStorage.java b/src/main/java/org/openslx/libvirt/domain/device/DiskStorage.java
new file mode 100644
index 0000000..7fca789
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/DiskStorage.java
@@ -0,0 +1,54 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A storage (HDD, SSD, ...) disk device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class DiskStorage extends Disk
+{
+ /**
+ * Creates an empty storage disk device.
+ */
+ public DiskStorage()
+ {
+ super();
+ }
+
+ /**
+ * Creates a storage disk device representing an existing Libvirt XML storage disk device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML storage disk device element.
+ */
+ public DiskStorage( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Creates a non-existent storage disk device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created storage disk device instance.
+ */
+ public static DiskStorage createInstance( LibvirtXmlNode xmlNode )
+ {
+ return DiskStorage.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a storage disk device representing an existing Libvirt XML storage disk device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML storage disk device element.
+ * @return storage disk device instance.
+ */
+ public static DiskStorage newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new DiskStorage( xmlNode );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/FileSystem.java b/src/main/java/org/openslx/libvirt/domain/device/FileSystem.java
new file mode 100644
index 0000000..9ec8caf
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/FileSystem.java
@@ -0,0 +1,292 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A file system device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class FileSystem extends Device
+{
+ /**
+ * Creates an empty file system device.
+ */
+ public FileSystem()
+ {
+ super();
+ }
+
+ /**
+ * Creates a file system device representing an existing Libvirt XML file system device element.
+ *
+ * @param xmlNode existing Libvirt XML file system device element.
+ */
+ public FileSystem( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns access mode of the file system device.
+ *
+ * @return access mode of the file system device.
+ */
+ public AccessMode getAccessMode()
+ {
+ final String mode = this.getXmlElementAttributeValue( "accessmode" );
+ return AccessMode.fromString( mode );
+ }
+
+ /**
+ * Sets access mode for the file system device.
+ *
+ * @param mode access mode for the file system device.
+ */
+ public void setAccessMode( AccessMode mode )
+ {
+ this.setXmlElementAttributeValue( "accessmode", mode.toString() );
+ }
+
+ /**
+ * Returns type of the file system device.
+ *
+ * @return type of the file system device.
+ */
+ public Type getType()
+ {
+ final String type = this.getXmlElementAttributeValue( "type" );
+ return Type.fromString( type );
+ }
+
+ /**
+ * Sets type for the file system device.
+ *
+ * @param type type for the file system device.
+ */
+ public void setType( Type type )
+ {
+ this.setXmlElementAttributeValue( "type", type.toString() );
+ }
+
+ /**
+ * Returns source of the file system device.
+ *
+ * @return source of the file system device.
+ */
+ public String getSource()
+ {
+ final Type type = this.getType();
+ String source = null;
+
+ switch ( type ) {
+ case BIND:
+ source = this.getXmlElementAttributeValue( "source", "dir" );
+ break;
+ case BLOCK:
+ source = this.getXmlElementAttributeValue( "source", "dev" );
+ break;
+ case FILE:
+ source = this.getXmlElementAttributeValue( "source", "file" );
+ break;
+ case MOUNT:
+ source = this.getXmlElementAttributeValue( "source", "dir" );
+ break;
+ case RAM:
+ source = this.getXmlElementAttributeValue( "source", "usage" );
+ break;
+ case TEMPLATE:
+ source = this.getXmlElementAttributeValue( "source", "name" );
+ break;
+ }
+
+ return source;
+ }
+
+ /**
+ * Sets source for the file system device.
+ *
+ * @param source source for the file system device.
+ */
+ public void setSource( String source )
+ {
+ Type type = this.getType();
+
+ // remove all attributes from sub-element 'source'
+ this.removeXmlElementAttributes( "source" );
+
+ switch ( type ) {
+ case BIND:
+ this.setXmlElementAttributeValue( "source", "dir", source );
+ break;
+ case BLOCK:
+ this.setXmlElementAttributeValue( "source", "dev", source );
+ break;
+ case FILE:
+ this.setXmlElementAttributeValue( "source", "file", source );
+ break;
+ case MOUNT:
+ this.setXmlElementAttributeValue( "source", "dir", source );
+ break;
+ case RAM:
+ this.setXmlElementAttributeValue( "source", "usage", source );
+ break;
+ case TEMPLATE:
+ this.setXmlElementAttributeValue( "source", "name", source );
+ break;
+ }
+ }
+
+ /**
+ * Returns target of the file system device.
+ *
+ * @return target of the file system device.
+ */
+ public String getTarget()
+ {
+ return this.getXmlElementAttributeValue( "target", "dir" );
+ }
+
+ /**
+ * Sets target for the file system device.
+ *
+ * @param target target for the file system device.
+ */
+ public void setTarget( String target )
+ {
+ this.setXmlElementAttributeValue( "target", "dir", target );
+ }
+
+ /**
+ * Creates a non-existent file system device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created file system device instance.
+ */
+ public static FileSystem createInstance( LibvirtXmlNode xmlNode )
+ {
+ return FileSystem.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a file system device representing an existing Libvirt XML file system device element.
+ *
+ * @param xmlNode existing Libvirt XML file system device element.
+ * @return file system device instance.
+ */
+ public static FileSystem newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new FileSystem( xmlNode );
+ }
+
+ /**
+ * Access mode for the file system device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum AccessMode
+ {
+ // @formatter:off
+ PASSTHROUGH( "passthrough" ),
+ MAPPED ( "mapped" ),
+ SQUASH ( "squash" );
+ // @formatter:on
+
+ /**
+ * Name of the file system device access mode.
+ */
+ private String mode;
+
+ /**
+ * Creates file system device access mode.
+ *
+ * @param mode valid name of the file system device access mode in a Libvirt domain XML
+ * document.
+ */
+ AccessMode( String mode )
+ {
+ this.mode = mode;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.mode;
+ }
+
+ /**
+ * Creates file system device access mode from its name with error check.
+ *
+ * @param mode name of the file system device access mode in a Libvirt domain XML document.
+ * @return valid file system device access mode.
+ */
+ public static AccessMode fromString( String mode )
+ {
+ for ( AccessMode a : AccessMode.values() ) {
+ if ( a.mode.equalsIgnoreCase( mode ) ) {
+ return a;
+ }
+ }
+
+ return null;
+ }
+ }
+
+ /**
+ * Type of file system device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum Type
+ {
+ // @formatter:off
+ MOUNT ( "mount" ),
+ TEMPLATE( "template" ),
+ FILE ( "file" ),
+ BLOCK ( "block" ),
+ RAM ( "ram" ),
+ BIND ( "bind" );
+ // @formatter:on
+
+ /**
+ * Name of the file system device type.
+ */
+ private String type;
+
+ /**
+ * Creates file system device type.
+ *
+ * @param type valid name of the file system device type in a Libvirt domain XML document.
+ */
+ Type( String type )
+ {
+ this.type = type;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.type;
+ }
+
+ /**
+ * Creates file system device type from its name with error check.
+ *
+ * @param type name of the file system device type in a Libvirt domain XML document.
+ * @return valid file system device type.
+ */
+ public static Type fromString( String type )
+ {
+ for ( Type t : Type.values() ) {
+ if ( t.type.equalsIgnoreCase( type ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/Graphics.java b/src/main/java/org/openslx/libvirt/domain/device/Graphics.java
new file mode 100644
index 0000000..3fd2f81
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/Graphics.java
@@ -0,0 +1,269 @@
+package org.openslx.libvirt.domain.device;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A graphics (display) device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Graphics extends Device
+{
+ /**
+ * Creates an empty graphics device.
+ */
+ public Graphics()
+ {
+ super();
+ }
+
+ /**
+ * Creates a graphics device representing an existing Libvirt XML graphics device element.
+ *
+ * @param xmlNode existing Libvirt XML graphics device element.
+ */
+ public Graphics( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns the listen type of the graphics device.
+ *
+ * @return listen type of the graphics device.
+ */
+ public ListenType getListenType()
+ {
+ final String listenType = this.getXmlElementAttributeValue( "listen", "type" );
+ return ListenType.fromString( listenType );
+ }
+
+ /**
+ * Sets the listen type for the graphics device.
+ *
+ * @param type listen type for the graphics device.
+ */
+ public void setListenType( ListenType type )
+ {
+ this.setXmlElementAttributeValue( "listen", "type", type.toString() );
+ }
+
+ /**
+ * Returns the listen address of the graphics device.
+ *
+ * @return listen address of the graphics device.
+ */
+ public InetAddress getListenAddress()
+ {
+ InetAddress parsedListenAddress = null;
+
+ if ( this.getListenType() == ListenType.ADDRESS ) {
+ // only read listen address, if address listen type is set
+ final String rawListenAddress = this.getXmlElementAttributeValue( "listen", "address" );
+
+ try {
+ parsedListenAddress = InetAddress.getByName( rawListenAddress );
+ } catch ( UnknownHostException e ) {
+ parsedListenAddress = null;
+ }
+ }
+
+ return parsedListenAddress;
+ }
+
+ /**
+ * Sets the listen address for the graphics device.
+ *
+ * @param listenAddress listen address for the graphics device.
+ */
+ public void setListenAddress( InetAddress listenAddress )
+ {
+ if ( this.getListenType() == ListenType.ADDRESS && listenAddress != null ) {
+ // only set listen address, if address listen type is set
+ this.setXmlElementAttributeValue( "listen", "address", listenAddress.getHostAddress() );
+ }
+ }
+
+ /**
+ * Returns the listen port of the graphics device.
+ *
+ * @return listen port of the graphics device.
+ */
+ public int getListenPort()
+ {
+ final String listenPort = this.getXmlElementAttributeValue( "port" );
+ return Integer.valueOf( listenPort );
+ }
+
+ /**
+ * Sets the listen port for the graphics device.
+ *
+ * @param listenPort listen port for the graphics device.
+ */
+ public void setListenPort( int listenPort )
+ {
+ if ( this.getListenType() == ListenType.ADDRESS ) {
+ // only set listen port, if address listen type is set
+ this.setXmlElementAttributeValue( "port", Integer.toString( listenPort ) );
+ }
+ }
+
+ /**
+ * Creates a non-existent graphics device as Libvirt XML device element.
+ *
+ * @param graphics graphics device that is created.
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created graphics device instance.
+ */
+ public static Graphics createInstance( Graphics graphics, LibvirtXmlNode xmlNode )
+ {
+ Graphics addedGraphics = null;
+
+ if ( graphics instanceof GraphicsSpice ) {
+ xmlNode.setXmlElementAttributeValue( "type", Type.SPICE.toString() );
+ addedGraphics = GraphicsSpice.createInstance( xmlNode );
+ } else if ( graphics instanceof GraphicsVnc ) {
+ xmlNode.setXmlElementAttributeValue( "type", Type.VNC.toString() );
+ addedGraphics = GraphicsVnc.createInstance( xmlNode );
+ }
+
+ return addedGraphics;
+ }
+
+ /**
+ * Creates a graphics device representing an existing Libvirt XML graphics device element.
+ *
+ * @param xmlNode existing Libvirt XML graphics device element.
+ * @return graphics device instance.
+ */
+ public static Graphics newInstance( LibvirtXmlNode xmlNode )
+ {
+ Graphics deviceGraphics = null;
+ Type type = Type.fromString( xmlNode.getXmlElementAttributeValue( "type" ) );
+
+ if ( type == null ) {
+ return null;
+ }
+
+ switch ( type ) {
+ case SPICE:
+ deviceGraphics = GraphicsSpice.newInstance( xmlNode );
+ break;
+ case VNC:
+ deviceGraphics = GraphicsVnc.newInstance( xmlNode );
+ break;
+ }
+
+ return deviceGraphics;
+ }
+
+ /**
+ * Listen type of graphics device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum ListenType
+ {
+ // @formatter:off
+ NONE ( "none" ),
+ ADDRESS( "address" ),
+ NETWORK( "network" ),
+ SOCKET ( "socket" );
+ // @formatter:on
+
+ /**
+ * Name of graphics device listen type.
+ */
+ private String type = null;
+
+ /**
+ * Creates graphics device listen type.
+ *
+ * @param type valid name of the graphics device listen type in a Libvirt domain XML document.
+ */
+ ListenType( String type )
+ {
+ this.type = type;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.type;
+ }
+
+ /**
+ * Creates graphics device listen type from its name with error check.
+ *
+ * @param type name of the graphics device listen type in a Libvirt domain XML document.
+ * @return valid graphics device listen type.
+ */
+ public static ListenType fromString( String type )
+ {
+ for ( ListenType t : ListenType.values() ) {
+ if ( t.type.equalsIgnoreCase( type ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+
+ /**
+ * Type of graphics device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ enum Type
+ {
+ // @formatter:off
+ SPICE( "spice" ),
+ VNC ( "vnc" );
+ // @formatter:on
+
+ /**
+ * Name of graphics device type.
+ */
+ private String type = null;
+
+ /**
+ * Creates graphics device type.
+ *
+ * @param type valid name of the graphics device type in a Libvirt domain XML document.
+ */
+ Type( String type )
+ {
+ this.type = type;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.type;
+ }
+
+ /**
+ * Creates graphics device type from its name with error check.
+ *
+ * @param type name of the graphics device type in a Libvirt domain XML document.
+ * @return valid graphics device type.
+ */
+ public static Type fromString( String type )
+ {
+ for ( Type t : Type.values() ) {
+ if ( t.type.equalsIgnoreCase( type ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/GraphicsSpice.java b/src/main/java/org/openslx/libvirt/domain/device/GraphicsSpice.java
new file mode 100644
index 0000000..be67200
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/GraphicsSpice.java
@@ -0,0 +1,261 @@
+package org.openslx.libvirt.domain.device;
+
+import java.net.InetAddress;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A graphics SPICE device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class GraphicsSpice extends Graphics
+{
+ /**
+ * Default address of a SPICE graphics listener.
+ */
+ public static final InetAddress DEFAULT_ADDRESS = InetAddress.getLoopbackAddress();
+
+ /**
+ * Default port of a SPICE graphics listener.
+ */
+ public static final int DEFAULT_PORT = 59000;
+
+ /**
+ * Creates an empty graphics SPICE device.
+ */
+ public GraphicsSpice()
+ {
+ super();
+ }
+
+ /**
+ * Creates a graphics SPICE device representing an existing Libvirt XML graphics SPICE device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML graphics SPCIE device element.
+ */
+ public GraphicsSpice( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns the state whether OpenGL hardware acceleration is enabled or not.
+ *
+ * @return state whether OpenGL hardware acceleration is enabled or not.
+ */
+ public boolean isOpenGlEnabled()
+ {
+ return this.getXmlElementAttributeValueAsBool( "gl", "enable" );
+ }
+
+ /**
+ * Sets the state whether OpenGL hardware acceleration is enabled or not.
+ *
+ * @param enabled state whether OpenGL hardware acceleration is enabled or not.
+ */
+ public void setOpenGl( boolean enabled )
+ {
+ this.setXmlElementAttributeValueYesNo( "gl", "enable", enabled );
+ }
+
+ /**
+ * Returns the image compression type.
+ *
+ * @return image compression type.
+ */
+ public ImageCompression getImageCompression()
+ {
+ final String imageCompression = this.getXmlElementAttributeValue( "image", "compression" );
+ return ImageCompression.fromString( imageCompression );
+ }
+
+ /**
+ * Sets the image compression type.
+ *
+ * @param type image compression type.
+ */
+ public void setImageCompression( ImageCompression type )
+ {
+ this.setXmlElementAttributeValue( "image", "compression", type.toString() );
+ }
+
+ /**
+ * Checks if audio playback compression is enabled or not.
+ *
+ * @return state whether audio playback compression is enabled or not.
+ */
+ public boolean isPlaybackCompressionOn()
+ {
+ return this.getXmlElementAttributeValueAsBool( "playback", "compression" );
+ }
+
+ /**
+ * Sets the state whether audio playback compression is enabled or not.
+ *
+ * @param enabled state whether audio playback compression is enabled or not.
+ */
+ public void setPlaybackCompression( boolean enabled )
+ {
+ this.setXmlElementAttributeValueOnOff( "playback", "compression", enabled );
+ }
+
+ /**
+ * Returns the streaming mode.
+ *
+ * @return streaming mode type.
+ */
+ public StreamingMode getStreamingMode()
+ {
+ final String streamingMode = this.getXmlElementAttributeValue( "streaming", "mode" );
+ return StreamingMode.fromString( streamingMode );
+ }
+
+ /**
+ * Sets the streaming mode.
+ *
+ * @param type streaming mode type.
+ */
+ public void setStreamingMode( StreamingMode type )
+ {
+ this.setXmlElementAttributeValue( "streaming", "mode", type.toString() );
+ }
+
+ /**
+ * Creates a non-existent graphics SPICE device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created graphics SPICE device instance.
+ */
+ public static GraphicsSpice createInstance( LibvirtXmlNode xmlNode )
+ {
+ return GraphicsSpice.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a graphics SPICE device representing an existing Libvirt XML graphics SPICE device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML graphics SPICE device element.
+ * @return graphics SPICE device instance.
+ */
+ public static GraphicsSpice newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new GraphicsSpice( xmlNode );
+ }
+
+ /**
+ * Image compression type of graphics device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum ImageCompression
+ {
+ // @formatter:off
+ AUTO_GLZ( "auto_glz" ),
+ AUTO_LZ ( "auto_lz" ),
+ QUIC ( "quic" ),
+ GLZ ( "glz" ),
+ LZ ( "lz" ),
+ OFF ( "off" );
+ // @formatter:on
+
+ /**
+ * Name of graphics device image compression type.
+ */
+ private String type = null;
+
+ /**
+ * Creates graphics device image compression type.
+ *
+ * @param type valid name of the graphics device image compression type in a Libvirt domain
+ * XML document.
+ */
+ ImageCompression( String type )
+ {
+ this.type = type;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.type;
+ }
+
+ /**
+ * Creates graphics device image compression type from its name with error check.
+ *
+ * @param type name of the graphics device image compression type in a Libvirt domain XML
+ * document.
+ * @return valid graphics device image compression type.
+ */
+ public static ImageCompression fromString( String type )
+ {
+ for ( ImageCompression t : ImageCompression.values() ) {
+ if ( t.type.equalsIgnoreCase( type ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+
+ /**
+ * Streaming mode type of graphics device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum StreamingMode
+ {
+ // @formatter:off
+ ALL ( "all" ),
+ FILTER( "filter" ),
+ OFF ( "off" );
+ // @formatter:on
+
+ /**
+ * Name of graphics device image compression type.
+ */
+ private String type = null;
+
+ /**
+ * Creates graphics device streaming mode type.
+ *
+ * @param type valid name of the graphics device streaming mode type in a Libvirt domain XML
+ * document.
+ */
+ StreamingMode( String type )
+ {
+ this.type = type;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.type;
+ }
+
+ /**
+ * Creates graphics device streaming mode type from its name with error check.
+ *
+ * @param type name of the graphics device streaming mode type in a Libvirt domain XML
+ * document.
+ * @return valid graphics device streaming mode type.
+ */
+ public static StreamingMode fromString( String type )
+ {
+ for ( StreamingMode t : StreamingMode.values() ) {
+ if ( t.type.equalsIgnoreCase( type ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/GraphicsVnc.java b/src/main/java/org/openslx/libvirt/domain/device/GraphicsVnc.java
new file mode 100644
index 0000000..f595699
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/GraphicsVnc.java
@@ -0,0 +1,54 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A graphics VNC device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class GraphicsVnc extends Graphics
+{
+ /**
+ * Creates an empty graphics VNC device.
+ */
+ public GraphicsVnc()
+ {
+ super();
+ }
+
+ /**
+ * Creates a graphics VNC device representing an existing Libvirt XML graphics VNC device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML graphics VNC device element.
+ */
+ public GraphicsVnc( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Creates a non-existent graphics VNC device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created graphics VNC device instance.
+ */
+ public static GraphicsVnc createInstance( LibvirtXmlNode xmlNode )
+ {
+ return GraphicsVnc.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a graphics VNC device representing an existing Libvirt XML graphics VNC device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML graphics VNC device element.
+ * @return graphics VNC device instance.
+ */
+ public static GraphicsVnc newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new GraphicsVnc( xmlNode );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/Hostdev.java b/src/main/java/org/openslx/libvirt/domain/device/Hostdev.java
new file mode 100644
index 0000000..dc9cf5e
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/Hostdev.java
@@ -0,0 +1,175 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A hostdev device node in a Libvirt domain XML document for PCI, USB, ... passthrough.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Hostdev extends Device
+{
+ /**
+ * Creates an empty hostdev device.
+ */
+ public Hostdev()
+ {
+ super();
+ }
+
+ /**
+ * Creates a hostdev device representing an existing Libvirt XML hostdev device element.
+ *
+ * @param xmlNode existing Libvirt XML hostdev device element.
+ */
+ public Hostdev( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Checks if hostdev device is managed.
+ *
+ * If {@link #isManaged()} returns <code>true</code> the hostdev device is detached from the
+ * host before being passed on to the guest and reattached to the host after the guest exits.
+ *
+ * @return state whether hostdev device is managed.
+ */
+ public boolean isManaged()
+ {
+ return this.getXmlElementAttributeValueAsBool( "managed" );
+ }
+
+ /**
+ * Sets state whether hostdev device is managed.
+ *
+ * If the <code>managed</code> parameter is set to <code>true</code> the hostdev device is
+ * detached from the host before being passed on to the guest and reattached to the host after
+ * the guest exits.
+ *
+ * @param managed state whether hostdev device is managed or not.
+ */
+ public void setManaged( boolean managed )
+ {
+ this.setXmlElementAttributeValueYesNo( "managed", managed );
+ }
+
+ /**
+ * Removes boot oder entry of the hostdev device.
+ */
+ public void removeBootOrder()
+ {
+ this.removeXmlElement( "boot" );
+ }
+
+ /**
+ * Creates a non-existent hostdev device as Libvirt XML device element.
+ *
+ * @param hostdev hostdev device that is created.
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created hostdev device instance.
+ */
+ public static Hostdev createInstance( Hostdev hostdev, LibvirtXmlNode xmlNode )
+ {
+ Hostdev addedHostdev = null;
+
+ xmlNode.setXmlElementAttributeValue( "mode", "subsystem" );
+
+ if ( hostdev instanceof HostdevMdev ) {
+ xmlNode.setXmlElementAttributeValue( "type", Type.MDEV.toString() );
+ addedHostdev = HostdevMdev.createInstance( xmlNode );
+ } else if ( hostdev instanceof HostdevPci ) {
+ xmlNode.setXmlElementAttributeValue( "type", Type.PCI.toString() );
+ addedHostdev = HostdevPci.createInstance( xmlNode );
+ } else if ( hostdev instanceof HostdevUsb ) {
+ xmlNode.setXmlElementAttributeValue( "type", Type.USB.toString() );
+ addedHostdev = HostdevUsb.createInstance( xmlNode );
+ }
+
+ return addedHostdev;
+ }
+
+ /**
+ * Creates a hostdev device representing an existing Libvirt XML hostdev device element.
+ *
+ * @param xmlNode existing Libvirt XML hostdev device element.
+ * @return hostdev device instance.
+ */
+ public static Hostdev newInstance( LibvirtXmlNode xmlNode )
+ {
+ Hostdev deviceHostdev = null;
+ Type type = Type.fromString( xmlNode.getXmlElementAttributeValue( "type" ) );
+
+ if ( type == null ) {
+ return null;
+ }
+
+ switch ( type ) {
+ case MDEV:
+ deviceHostdev = HostdevMdev.newInstance( xmlNode );
+ break;
+ case PCI:
+ deviceHostdev = HostdevPci.newInstance( xmlNode );
+ break;
+ case USB:
+ deviceHostdev = HostdevUsb.newInstance( xmlNode );
+ break;
+ }
+
+ return deviceHostdev;
+ }
+
+ /**
+ * Type of hostdev device subsystem passthrough.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ enum Type
+ {
+ // @formatter:off
+ MDEV( "mdev" ),
+ PCI ( "pci" ),
+ USB ( "usb" );
+ // @formatter:on
+
+ /**
+ * Name of the hostdev device type.
+ */
+ private String type = null;
+
+ /**
+ * Creates hostdev device type.
+ *
+ * @param type valid name of the hostdev device type in a Libvirt domain XML document.
+ */
+ Type( String type )
+ {
+ this.type = type;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.type;
+ }
+
+ /**
+ * Creates hostdev device type from its name with error check.
+ *
+ * @param type name of the hostdev device storage in a Libvirt domain XML document.
+ * @return valid hostdev device type.
+ */
+ public static Type fromString( String type )
+ {
+ for ( Type t : Type.values() ) {
+ if ( t.type.equalsIgnoreCase( type ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/HostdevAddressableSource.java b/src/main/java/org/openslx/libvirt/domain/device/HostdevAddressableSource.java
new file mode 100644
index 0000000..9377421
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/HostdevAddressableSource.java
@@ -0,0 +1,26 @@
+package org.openslx.libvirt.domain.device;
+
+/**
+ * Addressable source operations for a hostdev device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ *
+ * @param <T> type of the source.
+ */
+public abstract interface HostdevAddressableSource<T>
+{
+ /**
+ * Returns the source of the source device (on the Libvirt host).
+ *
+ * @return source of the source device (on the Libvirt host).
+ */
+ public T getSource();
+
+ /**
+ * Sets the source for the source device (on the Libvirt host).
+ *
+ * @param source source for the source device (on the Libvirt host).
+ */
+ public void setSource( T source );
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/HostdevAddressableTarget.java b/src/main/java/org/openslx/libvirt/domain/device/HostdevAddressableTarget.java
new file mode 100644
index 0000000..ca06065
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/HostdevAddressableTarget.java
@@ -0,0 +1,26 @@
+package org.openslx.libvirt.domain.device;
+
+/**
+ * Addressable target operations for a hostdev device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ *
+ * @param <T> type of the target.
+ */
+public abstract interface HostdevAddressableTarget<T>
+{
+ /**
+ * Returns the target of the target device (in the virtual machine).
+ *
+ * @return target of the target device (in the virtual machine).
+ */
+ public T getPciTarget();
+
+ /**
+ * Sets the target for the target device (in the virtual machine).
+ *
+ * @param target target for the target device (in the virtual machine).
+ */
+ public void setPciTarget( T target );
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/HostdevMdev.java b/src/main/java/org/openslx/libvirt/domain/device/HostdevMdev.java
new file mode 100644
index 0000000..082ea5b
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/HostdevMdev.java
@@ -0,0 +1,182 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A hostdev mediated device node in a Libvirt domain XML document for mediated device passthrough.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class HostdevMdev extends Hostdev implements HostdevAddressableSource<HostdevMdevDeviceAddress>
+{
+ /**
+ * Creates an empty hostdev mediated device.
+ */
+ public HostdevMdev()
+ {
+ super();
+ }
+
+ /**
+ * Creates a hostdev mediated device representing an existing Libvirt XML hostdev mediated device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML hostdev mediated device element.
+ */
+ public HostdevMdev( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Checks whether the hostdev mediated device display is on or off.
+ *
+ * @return state whether the hostdev mediated device display is on or off.
+ */
+ public boolean isDisplayOn()
+ {
+ return this.getXmlElementAttributeValueAsBool( "display" );
+ }
+
+ /**
+ * Sets the state of the hostdev mediated device display.
+ *
+ * @param on state whether the hostdev mediated device display is on or off.
+ */
+ public void setDisplayOn( boolean on )
+ {
+ this.setXmlElementAttributeValueOnOff( "display", on );
+ }
+
+ /**
+ * Checks whether the hostdev mediated device memory framebuffer is on or off.
+ *
+ * @return state whether the hostdev mediated device memory framebuffer is on or off.
+ */
+ public boolean isMemoryFramebufferOn()
+ {
+ return this.getXmlElementAttributeValueAsBool( "ramfb" );
+ }
+
+ /**
+ * Sets the state of the hostdev mediated device memory framebuffer.
+ *
+ * @param on state whether the hostdev mediated device memory framebuffer is on or off.
+ */
+ public void setMemoryFramebufferOn( boolean on )
+ {
+ this.setXmlElementAttributeValueOnOff( "ramfb", on );
+ }
+
+ /**
+ * Returns the hostdev mediated device model.
+ *
+ * @return hostdev mediated device model.
+ */
+ public Model getModel()
+ {
+ final String model = this.getXmlElementAttributeValue( "model" );
+ return Model.fromString( model );
+ }
+
+ /**
+ * Sets the hostdev mediated device model.
+ *
+ * @param model hostdev mediated device model that is set.
+ */
+ public void setModel( Model model )
+ {
+ this.setXmlElementAttributeValue( "model", model.toString() );
+ }
+
+ @Override
+ public HostdevMdevDeviceAddress getSource()
+ {
+ final String mdevDeviceAddress = this.getXmlElementAttributeValue( "source/address", "uuid" );
+ return HostdevMdevDeviceAddress.valueOf( mdevDeviceAddress );
+ }
+
+ @Override
+ public void setSource( HostdevMdevDeviceAddress source )
+ {
+ this.setXmlElementAttributeValue( "source/address", "uuid", source.getDeviceAddressAsString() );
+ }
+
+ /**
+ * Creates a non-existent hostdev mediated device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created hostdev mediated device instance.
+ */
+ public static HostdevMdev createInstance( LibvirtXmlNode xmlNode )
+ {
+ return HostdevMdev.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a hostdev mediated device representing an existing Libvirt XML hostdev mediated device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML hostdev mediated device element.
+ * @return hostdev mediated device instance.
+ */
+ public static HostdevMdev newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new HostdevMdev( xmlNode );
+ }
+
+ /**
+ * Model for hostdev mediated device passthrough.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum Model
+ {
+ // @formatter:off
+ VFIO_PCI( "vfio-pci" ),
+ VFIO_CCW( "vfio-ccw" ),
+ VFIO_AP ( "vfio-ap" );
+ // @formatter:on
+
+ /**
+ * Name of the hostdev mediated device model.
+ */
+ private String model = null;
+
+ /**
+ * Creates hostdev mediated device model.
+ *
+ * @param type valid name of the hostdev mediated device model in a Libvirt domain XML
+ * document.
+ */
+ Model( String model )
+ {
+ this.model = model;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.model;
+ }
+
+ /**
+ * Creates hostdev mediated device model from its name with error check.
+ *
+ * @param model name of the hostdev mediated device model in a Libvirt domain XML document.
+ * @return valid hostdev mediated device model.
+ */
+ public static Model fromString( String model )
+ {
+ for ( Model m : Model.values() ) {
+ if ( m.model.equalsIgnoreCase( model ) ) {
+ return m;
+ }
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/HostdevMdevDeviceAddress.java b/src/main/java/org/openslx/libvirt/domain/device/HostdevMdevDeviceAddress.java
new file mode 100644
index 0000000..337791d
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/HostdevMdevDeviceAddress.java
@@ -0,0 +1,99 @@
+package org.openslx.libvirt.domain.device;
+
+import java.util.UUID;
+
+/**
+ * Representation of an address from a mediated device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class HostdevMdevDeviceAddress
+{
+ /**
+ * Address of the hostdev mediated device.
+ */
+ private final UUID deviceAddress;
+
+ /**
+ * Creates a new mediated device address and sets the address information to the default address
+ * {@code 00000000-0000-0000-0000-000000000000}.
+ */
+ public HostdevMdevDeviceAddress()
+ {
+ this( new UUID( 0, 0 ) );
+ }
+
+ /**
+ * Creates a new mediated device address consisting of a specified mediated device address.
+ *
+ * @param mdevDeviceAddress mediated device address.
+ */
+ public HostdevMdevDeviceAddress( UUID mdevDeviceAddress )
+ {
+ this.deviceAddress = mdevDeviceAddress;
+ }
+
+ /**
+ * Returns the address of the mediated device.
+ *
+ * @return address of the mediated device.
+ */
+ public UUID getDeviceAddress()
+ {
+ return this.deviceAddress;
+ }
+
+ /**
+ * Returns the address of the mediated device as {@code String}.
+ *
+ * @return address of the mediated device as {@code String}.
+ */
+ public String getDeviceAddressAsString()
+ {
+ return this.getDeviceAddress().toString();
+ }
+
+ /**
+ * Creates a new mediated device address parsed from a {@link String}.
+ *
+ * @param mdevDeviceAddress textual information containing a mediated device address as
+ * {@link String}. The textual mediated device address should be well-formed according
+ * to the string representation as described in {@link UUID#toString}.
+ *
+ * @return mediated device address instance.
+ */
+ public static HostdevMdevDeviceAddress valueOf( String mdevDeviceAddress )
+ {
+ HostdevMdevDeviceAddress parsedMdevDeviceAddress = null;
+
+ try {
+ final UUID deviceAddress = UUID.fromString( mdevDeviceAddress );
+ parsedMdevDeviceAddress = new HostdevMdevDeviceAddress( deviceAddress );
+ } catch ( IllegalArgumentException e ) {
+ parsedMdevDeviceAddress = null;
+ }
+
+ return parsedMdevDeviceAddress;
+ }
+
+ @Override
+ public boolean equals( Object obj )
+ {
+ if ( obj == null ) {
+ return false;
+ } else if ( this.getClass() != obj.getClass() ) {
+ return false;
+ } else {
+ // check if MDEV device addresses are equal
+ final HostdevMdevDeviceAddress other = HostdevMdevDeviceAddress.class.cast( obj );
+ return other.getDeviceAddress().equals( this.getDeviceAddress() );
+ }
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.getDeviceAddressAsString();
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/HostdevPci.java b/src/main/java/org/openslx/libvirt/domain/device/HostdevPci.java
new file mode 100644
index 0000000..1351f26
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/HostdevPci.java
@@ -0,0 +1,74 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A hostdev PCI device node in a Libvirt domain XML document for PCI passthrough.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class HostdevPci extends Hostdev implements HostdevAddressableSource<HostdevPciDeviceAddress>
+{
+ /**
+ * Creates an empty hostdev PCI device.
+ */
+ public HostdevPci()
+ {
+ super();
+ }
+
+ /**
+ * Creates a hostdev PCI device representing an existing Libvirt XML hostdev PCI device element.
+ *
+ * @param xmlNode existing Libvirt XML hostdev PCI device element.
+ */
+ public HostdevPci( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ @Override
+ public HostdevPciDeviceAddress getSource()
+ {
+ return this.getPciAddress( "source/address" );
+ }
+
+ @Override
+ public void setSource( HostdevPciDeviceAddress address )
+ {
+ this.setPciAddress( "source/address", address );
+ }
+
+ /**
+ * Set multifunction mode.
+ *
+ * If enabled, the device is said to have multiple functions.
+ */
+ public void setMultifunction( boolean on )
+ {
+ this.setXmlElementAttributeValueOnOff( "address", "multifunction", on );
+ }
+
+ /**
+ * Creates a non-existent hostdev PCI device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created hostdev PCI device instance.
+ */
+ public static HostdevPci createInstance( LibvirtXmlNode xmlNode )
+ {
+ return HostdevPci.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a hostdev PCI device representing an existing Libvirt XML hostdev PCI device element.
+ *
+ * @param xmlNode existing Libvirt XML hostdev PCI device element.
+ * @return hostdev PCI device instance.
+ */
+ public static HostdevPci newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new HostdevPci( xmlNode );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/HostdevPciDeviceAddress.java b/src/main/java/org/openslx/libvirt/domain/device/HostdevPciDeviceAddress.java
new file mode 100644
index 0000000..9281500
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/HostdevPciDeviceAddress.java
@@ -0,0 +1,295 @@
+package org.openslx.libvirt.domain.device;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Representation of a slot address from a PCI device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class HostdevPciDeviceAddress
+{
+ /**
+ * Regular expression to parse a PCI device address from a {@link String}.
+ * <p>
+ * The regular expression matches a PCI device address if its textual PCI device address is
+ * well-formed according to the following examples:
+ *
+ * <pre>
+ * 0000:00:02.3
+ * 0000:01:00.0
+ * 0000:00:1f.3
+ * </pre>
+ */
+ private static final String DEVICE_ADDRESS_REGEX = "^([a-f0-9]{4}):([a-f0-9]{2}):([a-f0-9]{2})\\.([0-7]{1})$";
+
+ /**
+ * Minimum value for a valid PCI device address component number.
+ */
+ private static final int DEVICE_ADDRESS_MIN_VALUE = 0;
+
+ /**
+ * Maximum value for a valid PCI device domain number.
+ */
+ private static final int DEVICE_ADDRESS_DOMAIN_MAX_VALUE = 0xffff;
+
+ /**
+ * Maximum value for a valid PCI device bus number.
+ */
+ private static final int DEVICE_ADDRESS_BUS_MAX_VALUE = 0xff;
+
+ /**
+ * Maximum value for a valid PCI device device number.
+ */
+ private static final int DEVICE_ADDRESS_DEVICE_MAX_VALUE = 0x1f;
+
+ /**
+ * Maximum value for a valid PCI device function number.
+ */
+ private static final int DEVICE_ADDRESS_FUNCTION_MAX_VALUE = 0x7;
+
+ /**
+ * Domain number of the PCI device address.
+ */
+ final int pciDomain;
+
+ /**
+ * Bus number of the PCI device address.
+ */
+ final int pciBus;
+
+ /**
+ * Device number of the PCI device address.
+ */
+ final int pciDevice;
+
+ /**
+ * Function number of the PCI device address.
+ */
+ final int pciFunction;
+
+ /**
+ * Creates a new PCI device address and sets the address information to the default
+ * address {@code 0000:00:00.0}.
+ */
+ public HostdevPciDeviceAddress()
+ {
+ this( 0, 0, 0, 0 );
+ }
+
+ /**
+ * Creates a new PCI device address consisting of a specified PCI bus, device, and function.
+ * <p>
+ * The domain of the PCI device address is set to the default number {@code 0000}.
+ *
+ * @param pciBus number of the PCI bus.
+ * @param pciDevice number of the PCI device.
+ * @param pciFunction number of the PCI function.
+ *
+ * @throws IllegalArgumentException failed to validate the PCI bus, device and function.
+ */
+ public HostdevPciDeviceAddress( int pciBus, int pciDevice, int pciFunction ) throws IllegalArgumentException
+ {
+ this( 0, pciBus, pciDevice, pciFunction );
+ }
+
+ /**
+ * Creates a new PCI device address consisting of a specified PCI domain, bus, device, and
+ * function.
+ *
+ * @param pciDomain number of the PCI domain.
+ * @param pciBus number of the PCI bus.
+ * @param pciDevice number of the PCI device.
+ * @param pciFunction number of the PCI function.
+ *
+ * @throws IllegalArgumentException failed to validate the PCI domain, bus, device and function.
+ */
+ public HostdevPciDeviceAddress( int pciDomain, int pciBus, int pciDevice, int pciFunction )
+ throws IllegalArgumentException
+ {
+ HostdevPciDeviceAddress.validatePciDeviceAddress( pciDomain, "PCI domain",
+ HostdevPciDeviceAddress.DEVICE_ADDRESS_DOMAIN_MAX_VALUE );
+ HostdevPciDeviceAddress.validatePciDeviceAddress( pciBus, "PCI bus",
+ HostdevPciDeviceAddress.DEVICE_ADDRESS_BUS_MAX_VALUE );
+ HostdevPciDeviceAddress.validatePciDeviceAddress( pciDevice, "PCI device",
+ HostdevPciDeviceAddress.DEVICE_ADDRESS_DEVICE_MAX_VALUE );
+ HostdevPciDeviceAddress.validatePciDeviceAddress( pciFunction, "PCI function",
+ HostdevPciDeviceAddress.DEVICE_ADDRESS_FUNCTION_MAX_VALUE );
+
+ this.pciDomain = pciDomain;
+ this.pciBus = pciBus;
+ this.pciDevice = pciDevice;
+ this.pciFunction = pciFunction;
+ }
+
+ /**
+ * Validates a specified PCI address component (PCI domain, bus, device or function).
+ *
+ * @param address value of the PCI address component.
+ * @param addressName name of the PCI address component.
+ * @param upperLimit maximum value for the PCI address component
+ *
+ * @throws IllegalArgumentException
+ */
+ private static void validatePciDeviceAddress( final int address, final String addressName, final int upperLimit )
+ throws IllegalArgumentException
+ {
+ if ( address < HostdevPciDeviceAddress.DEVICE_ADDRESS_MIN_VALUE ) {
+ throw new IllegalArgumentException(
+ "The " + addressName + " address must be larger or equal than "
+ + HostdevPciDeviceAddress.DEVICE_ADDRESS_MIN_VALUE );
+ } else if ( address > upperLimit ) {
+ throw new IllegalArgumentException(
+ "The " + addressName + " address must be smaller or equal than " + upperLimit );
+ }
+ }
+
+ /**
+ * Returns the PCI domain.
+ *
+ * @return PCI domain.
+ */
+ public int getPciDomain()
+ {
+ return this.pciDomain;
+ }
+
+ /**
+ * Returns the PCI domain as {@link String}.
+ *
+ * @return PCI domain as {@link String}.
+ */
+ public String getPciDomainAsString()
+ {
+ return String.format( "%04x", HostdevPciDeviceAddress.DEVICE_ADDRESS_DOMAIN_MAX_VALUE & this.getPciDomain() );
+ }
+
+ /**
+ * Returns the PCI bus.
+ *
+ * @return PCI bus.
+ */
+ public int getPciBus()
+ {
+ return this.pciBus;
+ }
+
+ /**
+ * Returns the PCI bus as {@link String}.
+ *
+ * @return PCI bus as {@link String}.
+ */
+ public String getPciBusAsString()
+ {
+ return String.format( "%02x", HostdevPciDeviceAddress.DEVICE_ADDRESS_BUS_MAX_VALUE & this.getPciBus() );
+ }
+
+ /**
+ * Returns the PCI device.
+ *
+ * @return PCI device.
+ */
+ public int getPciDevice()
+ {
+ return this.pciDevice;
+ }
+
+ /**
+ * Returns the PCI device as {@link String}.
+ *
+ * @return PCI device as {@link String}.
+ */
+ public String getPciDeviceAsString()
+ {
+ return String.format( "%02x", HostdevPciDeviceAddress.DEVICE_ADDRESS_DEVICE_MAX_VALUE & this.getPciDevice() );
+ }
+
+ /**
+ * Returns the PCI function.
+ *
+ * @return PCI function.
+ */
+ public int getPciFunction()
+ {
+ return this.pciFunction;
+ }
+
+ /**
+ * Returns the PCI function as {@link String}.
+ *
+ * @return PCI function as {@link String}.
+ */
+ public String getPciFunctionAsString()
+ {
+ return String.format( "%01x", HostdevPciDeviceAddress.DEVICE_ADDRESS_FUNCTION_MAX_VALUE & this.getPciFunction() );
+ }
+
+ /**
+ * Creates a new PCI device address parsed from a {@link String}.
+ * <p>
+ * The PCI device address consists of a PCI domain, bus, device and function parsed from the
+ * specified {@link String}.
+ *
+ * @param pciDeviceAddress textual information containing a PCI device address as {@link String}.
+ * The textual PCI device address should be well-formed according to the defined
+ * regular expression {@link #DEVICE_ADDRESS_REGEX}.
+ *
+ * @return PCI device address instance.
+ */
+ public static HostdevPciDeviceAddress valueOf( String pciDeviceAddress )
+ {
+ HostdevPciDeviceAddress parsedPciDeviceAddress;
+
+ if ( pciDeviceAddress == null || pciDeviceAddress.isEmpty() ) {
+ parsedPciDeviceAddress = null;
+ } else {
+ final Pattern pciDeviceAddressPattern = Pattern.compile( HostdevPciDeviceAddress.DEVICE_ADDRESS_REGEX );
+ final Matcher pciDeviceAddressMatcher = pciDeviceAddressPattern.matcher( pciDeviceAddress.toLowerCase() );
+
+ if ( pciDeviceAddressMatcher.find() ) {
+ final int pciDomain = Integer.valueOf( pciDeviceAddressMatcher.group( 1 ), 16 );
+ final int pciBus = Integer.valueOf( pciDeviceAddressMatcher.group( 2 ), 16 );
+ final int pciDevice = Integer.valueOf( pciDeviceAddressMatcher.group( 3 ), 16 );
+ final int pciFunction = Integer.valueOf( pciDeviceAddressMatcher.group( 4 ), 16 );
+
+ try {
+ parsedPciDeviceAddress = new HostdevPciDeviceAddress( pciDomain, pciBus, pciDevice, pciFunction );
+ } catch ( IllegalArgumentException e ) {
+ parsedPciDeviceAddress = null;
+ }
+ } else {
+ parsedPciDeviceAddress = null;
+ }
+ }
+
+ return parsedPciDeviceAddress;
+ }
+
+ @Override
+ public boolean equals( Object obj )
+ {
+ if ( obj == null ) {
+ return false;
+ } else if ( this.getClass() != obj.getClass() ) {
+ return false;
+ } else {
+ // check if PCI domain, bus, device and function are equal
+ final HostdevPciDeviceAddress other = HostdevPciDeviceAddress.class.cast( obj );
+ if ( this.getPciDomain() == other.getPciDomain() && this.getPciBus() == other.getPciBus()
+ && this.getPciDevice() == other.getPciDevice() && this.getPciFunction() == other.getPciFunction() ) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.getPciDomainAsString() + ":" + this.getPciBusAsString() + ":" + this.getPciDeviceAsString() + "."
+ + this.getPciFunctionAsString();
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/HostdevPciDeviceDescription.java b/src/main/java/org/openslx/libvirt/domain/device/HostdevPciDeviceDescription.java
new file mode 100644
index 0000000..25c29f2
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/HostdevPciDeviceDescription.java
@@ -0,0 +1,186 @@
+package org.openslx.libvirt.domain.device;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Representation of a PCI device description.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class HostdevPciDeviceDescription extends Hostdev
+{
+ /**
+ * Regular expression to parse a PCI vendor and device identifier from a {@link String}.
+ * <p>
+ * The regular expression matches a PCI device description if its textual PCI device description
+ * is well-formed according to the following examples:
+ *
+ * <pre>
+ * 8086:a170
+ * 10ec:8168
+ * 8086:15b7
+ * </pre>
+ */
+ private static final String DEVICE_DESCRIPTION_REGEX = "^([a-f0-9]{4}):([a-f0-9]{4})$";
+
+ /**
+ * Minimum value of a valid identifier from a PCI device description.
+ */
+ private static final int DEVICE_DESCRIPTION_ID_MIN_VALUE = 0x0000;
+
+ /**
+ * Maximum value of a valid identifier from a PCI device description.
+ */
+ private static final int DEVICE_DESCRIPTION_ID_MAX_VALUE = 0xffff;
+
+ /**
+ * Vendor identifier of the PCI device.
+ */
+ final int vendorId;
+
+ /**
+ * Device identifier of the PCI device.
+ */
+ final int deviceId;
+
+ /**
+ * Creates a new PCI device description consisting of a PCI vendor and device identifier.
+ *
+ * @param vendorId vendor identifier of the PCI device.
+ * @param deviceId device identifier of the PCI device.
+ *
+ * @throws throws IllegalArgumentException failed to validate the PCI device description
+ * identifiers.
+ */
+ public HostdevPciDeviceDescription( int vendorId, int deviceId ) throws IllegalArgumentException
+ {
+ HostdevPciDeviceDescription.validatePciDeviceDescriptionId( "PCI vendor ID", vendorId );
+ HostdevPciDeviceDescription.validatePciDeviceDescriptionId( "PCI device ID", deviceId );
+
+ this.vendorId = vendorId;
+ this.deviceId = deviceId;
+ }
+
+ /**
+ * Validates a PCI device description ID (a PCI vendor or device ID).
+ *
+ * @param idName name of the PCI device description identifier.
+ * @param id value of the PCI device description identifier that should be validated.
+ *
+ * @throws IllegalArgumentException failed to validate the PCI device description identifier.
+ */
+ private static void validatePciDeviceDescriptionId( final String idName, final int id )
+ throws IllegalArgumentException
+ {
+ if ( id < HostdevPciDeviceDescription.DEVICE_DESCRIPTION_ID_MIN_VALUE ) {
+ throw new IllegalArgumentException(
+ "The " + idName + "must be larger or equal than "
+ + HostdevPciDeviceDescription.DEVICE_DESCRIPTION_ID_MIN_VALUE );
+ } else if ( id > HostdevPciDeviceDescription.DEVICE_DESCRIPTION_ID_MAX_VALUE ) {
+ throw new IllegalArgumentException(
+ "The " + idName + "must be smaller or equal than "
+ + HostdevPciDeviceDescription.DEVICE_DESCRIPTION_ID_MAX_VALUE );
+ }
+ }
+
+ /**
+ * Returns the PCI vendor identifier.
+ *
+ * @return PCI vendor identifier.
+ */
+ public int getVendorId()
+ {
+ return this.vendorId;
+ }
+
+ /**
+ * Returns the PCI vendor identifier as {@link String}.
+ *
+ * @return PCI vendor identifier as {@link String}.
+ */
+ public String getVendorIdAsString()
+ {
+ return String.format( "%04x", HostdevPciDeviceDescription.DEVICE_DESCRIPTION_ID_MAX_VALUE & this.getVendorId() );
+ }
+
+ /**
+ * Returns the PCI device identifier.
+ *
+ * @return PCI device identifier.
+ */
+ public int getDeviceId()
+ {
+ return this.deviceId;
+ }
+
+ /**
+ * Returns the PCI device identifier as {@link String}.
+ *
+ * @return PCI device identifier as {@link String}.
+ */
+ public String getDeviceIdAsString()
+ {
+ return String.format( "%04x", HostdevPciDeviceDescription.DEVICE_DESCRIPTION_ID_MAX_VALUE & this.getDeviceId() );
+ }
+
+ /**
+ * Creates a new PCI device description parsed from a {@link String}.
+ * <p>
+ * The PCI device description consists of a PCI vendor and device identifier parsed from the
+ * specified {@link String}.
+ *
+ * @param vendorDeviceId textual information containing a PCI device description as
+ * {@link String}. The textual PCI device description should be well-formed according
+ * to the defined regular expression {@link #DEVICE_DESCRIPTION_REGEX}.
+ *
+ * @return PCI device description instance.
+ */
+ public static HostdevPciDeviceDescription valueOf( String vendorDeviceId )
+ {
+ final HostdevPciDeviceDescription pciDeviceDescription;
+
+ if ( vendorDeviceId == null || vendorDeviceId.isEmpty() ) {
+ pciDeviceDescription = null;
+ } else {
+ final Pattern pciDeviceDescPattern = Pattern.compile( HostdevPciDeviceDescription.DEVICE_DESCRIPTION_REGEX );
+ final Matcher pciDeviceDescMatcher = pciDeviceDescPattern.matcher( vendorDeviceId.toLowerCase() );
+
+ if ( pciDeviceDescMatcher.find() ) {
+ final int vendorId = Integer.valueOf( pciDeviceDescMatcher.group( 1 ), 16 );
+ final int deviceId = Integer.valueOf( pciDeviceDescMatcher.group( 2 ), 16 );
+
+ pciDeviceDescription = new HostdevPciDeviceDescription( vendorId, deviceId );
+ } else {
+ pciDeviceDescription = null;
+ }
+ }
+
+ return pciDeviceDescription;
+ }
+
+ @Override
+ public boolean equals( Object obj )
+ {
+ if ( obj == null ) {
+ return false;
+ } else if ( this.getClass() != obj.getClass() ) {
+ return false;
+ } else {
+ // check if vendor and device ID are equal
+ final HostdevPciDeviceDescription other = HostdevPciDeviceDescription.class.cast( obj );
+ if ( this.getVendorId() == other.getVendorId() && this.getDeviceId() == other.getDeviceId() ) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.getVendorIdAsString() + ":" + this.getDeviceIdAsString();
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/HostdevUsb.java b/src/main/java/org/openslx/libvirt/domain/device/HostdevUsb.java
new file mode 100644
index 0000000..7bf13f4
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/HostdevUsb.java
@@ -0,0 +1,88 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A hostdev USB device node in a Libvirt domain XML document for USB passthrough.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class HostdevUsb extends Hostdev implements HostdevAddressableSource<HostdevUsbDeviceDescription>
+{
+ /**
+ * Creates an empty hostdev USB device.
+ */
+ public HostdevUsb()
+ {
+ super();
+ }
+
+ /**
+ * Creates a hostdev USB device representing an existing Libvirt XML hostdev USB device element.
+ *
+ * @param xmlNode existing Libvirt XML hostdev USB device element.
+ */
+ public HostdevUsb( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ @Override
+ public HostdevUsbDeviceDescription getSource()
+ {
+ String vendorId = this.getXmlElementAttributeValue( "source/address/vendor", "id" );
+ String productId = this.getXmlElementAttributeValue( "source/address/product", "id" );
+
+ vendorId = HostdevUtils.removeHexPrefix( vendorId );
+ productId = HostdevUtils.removeHexPrefix( productId );
+
+ return HostdevUsbDeviceDescription.valueOf( vendorId + ":" + productId );
+ }
+
+ @Override
+ public void setSource( HostdevUsbDeviceDescription description )
+ {
+ final String vendorId = HostdevUtils.appendHexPrefix( description.getVendorIdAsString() );
+ final String productId = HostdevUtils.appendHexPrefix( description.getProductIdAsString() );
+
+ this.setXmlElementAttributeValue( "source/address/vendor", "id", vendorId );
+ this.setXmlElementAttributeValue( "source/address/product", "id", productId );
+ }
+
+ public HostdevUsbDeviceAddress getUsbTarget()
+ {
+ final String usbBus = this.getXmlElementAttributeValue( "address", "bus" );
+ final String usbPort = this.getXmlElementAttributeValue( "address", "port" );
+
+ return HostdevUsbDeviceAddress.valueOf( usbBus, usbPort );
+ }
+
+ public void setUsbTarget( HostdevUsbDeviceAddress address )
+ {
+ this.setXmlElementAttributeValue( "address", "bus", Integer.toString( address.getUsbBus() ) );
+ this.setXmlElementAttributeValue( "address", "port", Integer.toString( address.getUsbPort() ) );
+ }
+
+ /**
+ * Creates a non-existent hostdev USB device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created hostdev USB device instance.
+ */
+ public static HostdevUsb createInstance( LibvirtXmlNode xmlNode )
+ {
+ return HostdevUsb.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a hostdev USB device representing an existing Libvirt XML hostdev USB device element.
+ *
+ * @param xmlNode existing Libvirt XML hostdev USB device element.
+ * @return hostdev USB device instance.
+ */
+ public static HostdevUsb newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new HostdevUsb( xmlNode );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/HostdevUsbDeviceAddress.java b/src/main/java/org/openslx/libvirt/domain/device/HostdevUsbDeviceAddress.java
new file mode 100644
index 0000000..02961a1
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/HostdevUsbDeviceAddress.java
@@ -0,0 +1,141 @@
+package org.openslx.libvirt.domain.device;
+
+/**
+ * Representation of an address from an USB device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class HostdevUsbDeviceAddress
+{
+ /**
+ * Minimum value for a valid USB device address component number.
+ */
+ private static final int DEVICE_ADDRESS_MIN_VALUE = 0;
+
+ /**
+ * Maximum value for a valid USB device bus number.
+ */
+ static final int DEVICE_BUS_MAX_VALUE = 127;
+
+ /**
+ * Maximum value for a valid USB device port number.
+ */
+ static final int DEVICE_PORT_MAX_VALUE = 127;
+
+ /**
+ * USB bus of the USB device.
+ */
+ final int usbBus;
+
+ /**
+ * USB port of the USB device.
+ */
+ final int usbPort;
+
+ public HostdevUsbDeviceAddress( int usbBus, int usbPort ) throws IllegalArgumentException
+ {
+ HostdevUsbDeviceAddress.validateUsbDeviceAddress( usbBus, "USB bus",
+ HostdevUsbDeviceAddress.DEVICE_BUS_MAX_VALUE );
+ HostdevUsbDeviceAddress.validateUsbDeviceAddress( usbPort, "USB port",
+ HostdevUsbDeviceAddress.DEVICE_PORT_MAX_VALUE );
+
+ this.usbBus = usbBus;
+ this.usbPort = usbPort;
+ }
+
+ /**
+ * Validates a specified USB device address component (USB bus or port).
+ *
+ * @param address value of the USB address component.
+ * @param addressName name of the USB address component.
+ * @param upperLimit maximum value for the USB address component
+ *
+ * @throws IllegalArgumentException
+ */
+ private static void validateUsbDeviceAddress( final int address, final String addressName, final int upperLimit )
+ throws IllegalArgumentException
+ {
+ if ( address < HostdevUsbDeviceAddress.DEVICE_ADDRESS_MIN_VALUE ) {
+ throw new IllegalArgumentException(
+ "The " + addressName + " must be larger or equal than "
+ + HostdevUsbDeviceAddress.DEVICE_ADDRESS_MIN_VALUE );
+ } else if ( address > upperLimit ) {
+ throw new IllegalArgumentException(
+ "The " + addressName + " must be smaller or equal than " + upperLimit );
+ }
+ }
+
+ /**
+ * Returns the USB bus number.
+ *
+ * @return USB bus number.
+ */
+ public int getUsbBus()
+ {
+ return this.usbBus;
+ }
+
+ /**
+ * Returns the USB port number.
+ *
+ * @return USB port number.
+ */
+ public int getUsbPort()
+ {
+ return this.usbPort;
+ }
+
+ /**
+ * Creates a new USB device address parsed from {@link String}s.
+ *
+ * @param usbBus textual information containing a decimal USB device bus number as
+ * {@link String}.
+ * @param usbPort textual information containing a decimal USB device port number as
+ * {@link String}.
+ * @return USB device address instance.
+ */
+ public static HostdevUsbDeviceAddress valueOf( String usbBus, String usbPort )
+ {
+ HostdevUsbDeviceAddress usbDeviceAddress;
+
+ if ( usbBus == null || usbBus.isEmpty() || usbPort == null || usbPort.isEmpty() ) {
+ usbDeviceAddress = null;
+ } else {
+ try {
+ final int parsedUsbBus = Integer.valueOf( usbBus );
+ final int parsedUsbPort = Integer.valueOf( usbPort );
+ usbDeviceAddress = new HostdevUsbDeviceAddress( parsedUsbBus, parsedUsbPort );
+ } catch ( IllegalArgumentException e ) {
+ usbDeviceAddress = null;
+ }
+ }
+
+ return usbDeviceAddress;
+
+ }
+
+ @Override
+ public boolean equals( Object obj )
+ {
+ if ( obj == null ) {
+ return false;
+ } else if ( this.getClass() != obj.getClass() ) {
+ return false;
+ } else {
+ // check if USB bus and port are equal
+ final HostdevUsbDeviceAddress other = HostdevUsbDeviceAddress.class.cast( obj );
+ if ( this.getUsbBus() == other.getUsbBus() && this.getUsbPort() == other.getUsbPort() ) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.getUsbBus() + ":" + this.getUsbPort();
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/HostdevUsbDeviceDescription.java b/src/main/java/org/openslx/libvirt/domain/device/HostdevUsbDeviceDescription.java
new file mode 100644
index 0000000..d1c546f
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/HostdevUsbDeviceDescription.java
@@ -0,0 +1,190 @@
+package org.openslx.libvirt.domain.device;
+
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Representation of an USB device description.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class HostdevUsbDeviceDescription
+{
+ /**
+ * Regular expression to parse an USB device vendor and product identifier from a {@link String}.
+ * <p>
+ * The regular expression matches an USB device description if its textual USB device description
+ * is well-formed according to the following examples:
+ *
+ * <pre>
+ * 1d6b:0002
+ * 0461:4d22
+ * 046d:c312
+ * </pre>
+ */
+ private static final String DEVICE_DESCRIPTION_REGEX = "^([a-f0-9]{4}):([a-f0-9]{4})$";
+
+ /**
+ * Minimum value of a valid identifier from an USB device description.
+ */
+ private static final int DEVICE_DESCRIPTION_ID_MIN_VALUE = 0x0000;
+
+ /**
+ * Maximum value of a valid identifier from an USB device description.
+ */
+ private static final int DEVICE_DESCRIPTION_ID_MAX_VALUE = 0xffff;
+
+ /**
+ * Vendor identifier of the USB device.
+ */
+ final int vendorId;
+
+ /**
+ * Product identifier of the USB device.
+ */
+ final int productId;
+
+ /**
+ * Creates a new USB device description consisting of a USB vendor and product identifier.
+ *
+ * @param vendorId vendor identifier of the USB device.
+ * @param productId product identifier of the USB device.
+ *
+ * @throws throws IllegalArgumentException failed to validate the USB device description
+ * identifiers.
+ */
+ public HostdevUsbDeviceDescription( int vendorId, int productId ) throws IllegalArgumentException
+ {
+ HostdevUsbDeviceDescription.validateUsbDeviceDescriptionId( "PCI vendor ID", vendorId );
+ HostdevUsbDeviceDescription.validateUsbDeviceDescriptionId( "PCI device ID", productId );
+
+ this.vendorId = vendorId;
+ this.productId = productId;
+ }
+
+ /**
+ * Validates an USB device description ID (an USB vendor or product ID).
+ *
+ * @param idName name of the USB device description identifier.
+ * @param id value of the USB device description identifier that should be validated.
+ *
+ * @throws IllegalArgumentException failed to validate the USB device description identifier.
+ */
+ private static void validateUsbDeviceDescriptionId( final String idName, final int id )
+ throws IllegalArgumentException
+ {
+ if ( id < HostdevUsbDeviceDescription.DEVICE_DESCRIPTION_ID_MIN_VALUE ) {
+ throw new IllegalArgumentException(
+ "The " + idName + "must be larger or equal than "
+ + HostdevUsbDeviceDescription.DEVICE_DESCRIPTION_ID_MIN_VALUE );
+ } else if ( id > HostdevUsbDeviceDescription.DEVICE_DESCRIPTION_ID_MAX_VALUE ) {
+ throw new IllegalArgumentException(
+ "The " + idName + "must be smaller or equal than "
+ + HostdevUsbDeviceDescription.DEVICE_DESCRIPTION_ID_MAX_VALUE );
+ }
+ }
+
+ /**
+ * Returns the USB device vendor identifier.
+ *
+ * @return USB device vendor identifier.
+ */
+ public int getVendorId()
+ {
+ return this.vendorId;
+ }
+
+ /**
+ * Returns the USB vendor identifier as {@link String}.
+ *
+ * @return USB vendor identifier as {@link String}.
+ */
+ public String getVendorIdAsString()
+ {
+ return String.format( "%04x", HostdevUsbDeviceDescription.DEVICE_DESCRIPTION_ID_MAX_VALUE & this.getVendorId() );
+ }
+
+ /**
+ * Returns the USB device product identifier.
+ *
+ * @return USB device product identifier.
+ */
+ public int getProductId()
+ {
+ return this.productId;
+ }
+
+ /**
+ * Returns the USB device product identifier as {@link String}.
+ *
+ * @return USB device product identifier as {@link String}.
+ */
+ public String getProductIdAsString()
+ {
+ return String.format( "%04x", HostdevUsbDeviceDescription.DEVICE_DESCRIPTION_ID_MAX_VALUE & this.getProductId() );
+ }
+
+ /**
+ * Creates a new USB device description parsed from a {@link String}.
+ * <p>
+ * The USB device description consists of an USB vendor and product identifier parsed from the
+ * specified {@link String}.
+ *
+ * @param vendorProductId textual information containing an USB device description as
+ * {@link String}. The textual USB device description should be well-formed according
+ * to the defined regular expression {@link #DEVICE_DESCRIPTION_REGEX}.
+ *
+ * @return USB device description instance.
+ */
+ public static HostdevUsbDeviceDescription valueOf( String vendorProductId )
+ {
+ HostdevUsbDeviceDescription usbDeviceDescription;
+
+ if ( vendorProductId == null || vendorProductId.isEmpty() ) {
+ usbDeviceDescription = null;
+ } else {
+ final Pattern usbDeviceDescPattern = Pattern.compile( HostdevUsbDeviceDescription.DEVICE_DESCRIPTION_REGEX );
+ final Matcher usbDeviceDescMatcher = usbDeviceDescPattern.matcher( vendorProductId.toLowerCase() );
+
+ if ( usbDeviceDescMatcher.find() ) {
+ final int vendorId = Integer.valueOf( usbDeviceDescMatcher.group( 1 ), 16 );
+ final int productId = Integer.valueOf( usbDeviceDescMatcher.group( 2 ), 16 );
+
+ try {
+ usbDeviceDescription = new HostdevUsbDeviceDescription( vendorId, productId );
+ } catch ( IllegalArgumentException e ) {
+ usbDeviceDescription = null;
+ }
+ } else {
+ usbDeviceDescription = null;
+ }
+ }
+
+ return usbDeviceDescription;
+ }
+
+ @Override
+ public boolean equals( Object obj )
+ {
+ if ( obj == null ) {
+ return false;
+ } else if ( this.getClass() != obj.getClass() ) {
+ return false;
+ } else {
+ // check if vendor and product ID are equal
+ final HostdevUsbDeviceDescription other = HostdevUsbDeviceDescription.class.cast( obj );
+ if ( this.getVendorId() == other.getVendorId() && this.getProductId() == other.getProductId() ) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.getVendorIdAsString() + ":" + this.getProductIdAsString();
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/HostdevUtils.java b/src/main/java/org/openslx/libvirt/domain/device/HostdevUtils.java
new file mode 100644
index 0000000..204bea9
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/HostdevUtils.java
@@ -0,0 +1,32 @@
+package org.openslx.libvirt.domain.device;
+
+/**
+ * Collection of helper methods to maintain a Libvirt related hostdev XML element.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class HostdevUtils
+{
+ /**
+ * Appends the HEX prefix to a specified hostdev address component without any HEX prefix.
+ *
+ * @param component address component without any HEX prefix.
+ * @return address component with the HEX prefix.
+ */
+ public static String appendHexPrefix( String component )
+ {
+ return "0x" + component;
+ }
+
+ /**
+ * Removes a possible HEX prefix of a specified hostdev address component.
+ *
+ * @param component address component with possible HEX prefix.
+ * @return address component without any HEX prefix.
+ */
+ public static String removeHexPrefix( String component )
+ {
+ return component.replaceFirst( "0x", "" );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/Interface.java b/src/main/java/org/openslx/libvirt/domain/device/Interface.java
new file mode 100644
index 0000000..44b8e4c
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/Interface.java
@@ -0,0 +1,344 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A network interface device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Interface extends Device
+{
+ /**
+ * Creates an empty network device.
+ */
+ public Interface()
+ {
+ super();
+ }
+
+ /**
+ * Creates a network device representing an existing Libvirt XML network interface device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML network interface device element.
+ */
+ public Interface( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns hardware model of the network device.
+ *
+ * @return hardware model of the network device.
+ */
+ public Model getModel()
+ {
+ String model = this.getXmlElementAttributeValue( "model", "type" );
+ return Model.fromString( model );
+ }
+
+ /**
+ * Sets hardware model for the network device.
+ *
+ * @param model hardware model for the network device.
+ */
+ public void setModel( Model model )
+ {
+ this.setXmlElementAttributeValue( "model", "type", model.toString() );
+ }
+
+ /**
+ * Returns type of the network device.
+ *
+ * @return type of the network device.
+ */
+ public Type getType()
+ {
+ return Type.fromString( this.getXmlElementAttributeValue( "type" ) );
+ }
+
+ /**
+ * Sets type of the network device.
+ *
+ * @param type network device type.
+ */
+ public void setType( Type type )
+ {
+ String source = this.getSource();
+
+ // change type and set source again
+ this.setXmlElementAttributeValue( "type", type.toString() );
+ this.setSource( source );
+ }
+
+ /**
+ * Returns the source of the network device.
+ *
+ * @return source of the network device.
+ */
+ public String getSource()
+ {
+ Type type = this.getType();
+ String source = null;
+
+ switch ( type ) {
+ case BRIDGE:
+ source = this.getXmlElementAttributeValue( "source", "bridge" );
+ break;
+ case NETWORK:
+ source = this.getXmlElementAttributeValue( "source", "network" );
+ break;
+ }
+
+ return source;
+ }
+
+ /**
+ * Sets the source for the network device.
+ *
+ * @param source for the network device.
+ */
+ public void setSource( String source )
+ {
+ Type type = this.getType();
+
+ // remove all attributes from sub-element 'source'
+ this.removeXmlElementAttributes( "source" );
+
+ switch ( type ) {
+ case BRIDGE:
+ this.setXmlElementAttributeValue( "source", "bridge", source );
+ break;
+ case NETWORK:
+ this.setXmlElementAttributeValue( "source", "network", source );
+ break;
+ }
+ }
+
+ /**
+ * Returns MAC address of the network device.
+ *
+ * @return MAC address of the network device.
+ */
+ public String getMacAddress()
+ {
+ return this.getXmlElementAttributeValue( "mac", "address" );
+ }
+
+ /**
+ * Sets MAC address of the network device.
+ *
+ * @param macAddress MAC address for the network device.
+ */
+ public void setMacAddress( String macAddress )
+ {
+ this.setXmlElementAttributeValue( "mac", "address", macAddress );
+ }
+
+ /**
+ * Removes boot oder entry of the network interface device.
+ */
+ public void removeBootOrder()
+ {
+ this.removeXmlElement( "boot" );
+ }
+
+ /**
+ * Removes network source of the network interface device.
+ */
+ public void removeSource()
+ {
+ this.removeXmlElement( "source" );
+ }
+
+ /**
+ * Removes MAC address of the network interface device.
+ */
+ public void removeMacAddress()
+ {
+ this.removeXmlElement( "mac" );
+ }
+
+ /**
+ * Creates a non-existent network interface device as Libvirt XML device element.
+ *
+ * @param iface network device that is created.
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created network device instance.
+ */
+ public static Interface createInstance( Interface iface, LibvirtXmlNode xmlNode )
+ {
+ Interface addedInterface = null;
+
+ if ( iface instanceof InterfaceBridge ) {
+ xmlNode.setXmlElementAttributeValue( "type", Type.BRIDGE.toString() );
+ addedInterface = InterfaceBridge.createInstance( xmlNode );
+ } else if ( iface instanceof InterfaceNetwork ) {
+ xmlNode.setXmlElementAttributeValue( "type", Type.NETWORK.toString() );
+ addedInterface = InterfaceNetwork.createInstance( xmlNode );
+ }
+
+ return addedInterface;
+ }
+
+ /**
+ * Creates a network interface device representing an existing Libvirt XML network interface
+ * device element.
+ *
+ * @param xmlNode existing Libvirt XML network interface device element.
+ * @return network interface device instance.
+ */
+ public static Interface newInstance( LibvirtXmlNode xmlNode )
+ {
+ Interface deviceInterface = null;
+ Type type = Type.fromString( xmlNode.getXmlElementAttributeValue( "type" ) );
+
+ if ( type == null ) {
+ return null;
+ }
+
+ switch ( type ) {
+ case BRIDGE:
+ deviceInterface = InterfaceBridge.newInstance( xmlNode );
+ break;
+ case NETWORK:
+ deviceInterface = InterfaceNetwork.newInstance( xmlNode );
+ break;
+ }
+
+ return deviceInterface;
+ }
+
+ /**
+ * Type of network interface device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum Type
+ {
+ // @formatter:off
+ BRIDGE ( "bridge" ),
+ NETWORK( "network" );
+ // @formatter:on
+
+ /**
+ * Name of the network interface device type.
+ */
+ private String type = null;
+
+ /**
+ * Creates network interface device type.
+ *
+ * @param type valid name of the network interface device type in a Libvirt domain XML
+ * document.
+ */
+ Type( String type )
+ {
+ this.type = type;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.type;
+ }
+
+ /**
+ * Creates network interface device type from its name with error check.
+ *
+ * @param type name of the network interface device type in a Libvirt domain XML document.
+ * @return valid network interface device type.
+ */
+ public static Type fromString( String type )
+ {
+ for ( Type t : Type.values() ) {
+ if ( t.type.equalsIgnoreCase( type ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+
+ /**
+ * Model of network interface device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum Model
+ {
+ // @formatter:off
+ E1000 ( "e1000" ),
+ E1000_82544GC ( "e1000-82544gc" ),
+ E1000_82545EM ( "e1000-82545em" ),
+ E1000E ( "e1000e" ),
+ I82550 ( "i82550" ),
+ I82551 ( "i82551" ),
+ I82557A ( "i82557a" ),
+ I82557B ( "i82557b" ),
+ I82557C ( "i82557c" ),
+ I82558A ( "i82558a" ),
+ I82558B ( "i82558b" ),
+ I82559A ( "i82559a" ),
+ I82559B ( "i82559b" ),
+ I82559C ( "i82559c" ),
+ I82559ER ( "i82559er" ),
+ I82562 ( "i82562" ),
+ I82801 ( "i82801" ),
+ NE2K_PCI ( "ne2k_pci" ),
+ PCNET ( "pcnet" ),
+ RTL8139 ( "rtl8139" ),
+ TULIP ( "tulip" ),
+ VIRTIO ( "virtio" ),
+ VIRTIO_NET_PCI ( "virtio-net-pci" ),
+ VIRTIO_NET_PCI_NON_TRANSITIONAL( "virtio-net-pci-non-transitional" ),
+ VIRTIO_NET_PCI_TRANSITIONAL ( "virtio-net-pci-transitional" ),
+ VMXNET3 ( "vmxnet3" );
+ // @formatter:on
+
+ /**
+ * Name of the network interface device model.
+ */
+ private String model = null;
+
+ /**
+ * Creates network interface device model.
+ *
+ * @param type valid name of the network interface device model in a Libvirt domain XML
+ * document.
+ */
+ Model( String model )
+ {
+ this.model = model;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.model;
+ }
+
+ /**
+ * Creates network interface device model from its name with error check.
+ *
+ * @param model name of the network interface device model in a Libvirt domain XML document.
+ * @return valid network interface device model.
+ */
+ public static Model fromString( String model )
+ {
+ for ( Model m : Model.values() ) {
+ if ( m.model.equalsIgnoreCase( model ) ) {
+ return m;
+ }
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/InterfaceBridge.java b/src/main/java/org/openslx/libvirt/domain/device/InterfaceBridge.java
new file mode 100644
index 0000000..02eabb0
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/InterfaceBridge.java
@@ -0,0 +1,54 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A network bridge interface device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class InterfaceBridge extends Interface
+{
+ /**
+ * Creates an empty network bridge interface device.
+ */
+ public InterfaceBridge()
+ {
+ super();
+ }
+
+ /**
+ * Creates a network bridge interface device representing an existing Libvirt XML network bridge
+ * interface device element.
+ *
+ * @param xmlNode existing Libvirt XML network bridge interface device element.
+ */
+ public InterfaceBridge( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Creates a non-existent network bridge interface device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created network bridge interface device instance.
+ */
+ public static InterfaceBridge createInstance( LibvirtXmlNode xmlNode )
+ {
+ return InterfaceBridge.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a network bridge interface device representing an existing Libvirt XML network bridge
+ * interface device element.
+ *
+ * @param xmlNode existing Libvirt XML network bridge interface device element.
+ * @return network bridge interface device instance.
+ */
+ public static InterfaceBridge newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new InterfaceBridge( xmlNode );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/InterfaceNetwork.java b/src/main/java/org/openslx/libvirt/domain/device/InterfaceNetwork.java
new file mode 100644
index 0000000..ae1fd40
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/InterfaceNetwork.java
@@ -0,0 +1,54 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A network interface device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class InterfaceNetwork extends Interface
+{
+ /**
+ * Creates an empty network interface device.
+ */
+ public InterfaceNetwork()
+ {
+ super();
+ }
+
+ /**
+ * Creates a network interface device representing an existing Libvirt XML network interface
+ * device element.
+ *
+ * @param xmlNode existing Libvirt XML network interface device element.
+ */
+ public InterfaceNetwork( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Creates a non-existent network interface device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created network interface device device instance.
+ */
+ public static InterfaceNetwork createInstance( LibvirtXmlNode xmlNode )
+ {
+ return InterfaceNetwork.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a network interface device representing an existing Libvirt XML network interface
+ * device element.
+ *
+ * @param xmlNode existing Libvirt XML network interface device element.
+ * @return network interface device instance.
+ */
+ public static InterfaceNetwork newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new InterfaceNetwork( xmlNode );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/Parallel.java b/src/main/java/org/openslx/libvirt/domain/device/Parallel.java
new file mode 100644
index 0000000..7db60ca
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/Parallel.java
@@ -0,0 +1,158 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A parallel port device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Parallel extends Device
+{
+ /**
+ * Creates an empty parallel port device.
+ */
+ public Parallel()
+ {
+ super();
+ }
+
+ /**
+ * Creates a parallel port device representing an existing Libvirt XML parallel port device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML parallel port device element.
+ */
+ public Parallel( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns the type of the parallel port device.
+ *
+ * @return type of the parallel port device.
+ */
+ public Type getType()
+ {
+ final String type = this.getXmlElementAttributeValue( "type" );
+ return Type.fromString( type );
+ }
+
+ /**
+ * Sets the type for the parallel port device.
+ *
+ * @param type type for the parallel port device.
+ */
+ public void setType( Type type )
+ {
+ this.setXmlElementAttributeValue( "type", type.toString() );
+ }
+
+ /**
+ * Returns the source of the parallel port device.
+ *
+ * @return source of the parallel port device.
+ */
+ public String getSource()
+ {
+ return this.getXmlElementAttributeValue( "source", "path" );
+ }
+
+ /**
+ * Sets the source for the parallel port device.
+ *
+ * @param source source for the parallel port device.
+ */
+ public void setSource( String source )
+ {
+ this.setXmlElementAttributeValue( "source", "path", source );
+ }
+
+ /**
+ * Creates a non-existent parallel port device as Libvirt XML parallel port device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML parallel port device that is created.
+ * @return created parallel port device instance.
+ */
+ public static Parallel createInstance( LibvirtXmlNode xmlNode )
+ {
+ return Parallel.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a parallel port device representing an existing Libvirt XML parallel port device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML parallel port device element.
+ * @return parallel port device instance.
+ */
+ public static Parallel newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new Parallel( xmlNode );
+ }
+
+ /**
+ * Type of parallel port device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum Type
+ {
+ // @formatter:off
+ DEV ( "dev" ),
+ FILE ( "file" ),
+ PIPE ( "pipe" ),
+ UNIX ( "unix" ),
+ TCP ( "tcp" ),
+ UDP ( "udp" ),
+ NULL ( "null" ),
+ STDIO ( "stdio" ),
+ VC ( "vc" ),
+ PTY ( "pty" ),
+ SPICEVMC ( "spicevmc" ),
+ SPICEPORT( "spiceport" ),
+ NMDM ( "nmdm" );
+ // @formatter:on
+
+ /**
+ * Name of the parallel port device type.
+ */
+ private String type;
+
+ /**
+ * Creates parallel port device type.
+ *
+ * @param type valid name of the parallel port device type in a Libvirt domain XML document.
+ */
+ Type( String type )
+ {
+ this.type = type;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.type;
+ }
+
+ /**
+ * Creates parallel port device type from its name with error check.
+ *
+ * @param type name of the parallel port device type in a Libvirt domain XML document.
+ * @return valid parallel port device type.
+ */
+ public static Type fromString( String type )
+ {
+ for ( Type t : Type.values() ) {
+ if ( t.type.equalsIgnoreCase( type ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/Serial.java b/src/main/java/org/openslx/libvirt/domain/device/Serial.java
new file mode 100644
index 0000000..54be26e
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/Serial.java
@@ -0,0 +1,156 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A serial port device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Serial extends Device
+{
+ /**
+ * Creates an empty serial port device.
+ */
+ public Serial()
+ {
+ super();
+ }
+
+ /**
+ * Creates a serial port device representing an existing Libvirt XML serial port device element.
+ *
+ * @param xmlNode existing Libvirt XML serial port device element.
+ */
+ public Serial( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns the type of the serial port device.
+ *
+ * @return type of the serial port device.
+ */
+ public Type getType()
+ {
+ final String type = this.getXmlElementAttributeValue( "type" );
+ return Type.fromString( type );
+ }
+
+ /**
+ * Sets the type for the serial port device.
+ *
+ * @param type type for the serial port device.
+ */
+ public void setType( Type type )
+ {
+ this.setXmlElementAttributeValue( "type", type.toString() );
+ }
+
+ /**
+ * Returns the source of the serial port device.
+ *
+ * @return source of the serial port device.
+ */
+ public String getSource()
+ {
+ return this.getXmlElementAttributeValue( "source", "path" );
+ }
+
+ /**
+ * Sets the source for the serial port device.
+ *
+ * @param source source for the serial port device.
+ */
+ public void setSource( String source )
+ {
+ this.setXmlElementAttributeValue( "source", "path", source );
+ }
+
+ /**
+ * Creates a non-existent serial port device as Libvirt XML serial port device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML serial port device that is created.
+ * @return created serial port device instance.
+ */
+ public static Serial createInstance( LibvirtXmlNode xmlNode )
+ {
+ return Serial.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a serial port device representing an existing Libvirt XML serial port device element.
+ *
+ * @param xmlNode existing Libvirt XML serial port device element.
+ * @return serial port device instance.
+ */
+ public static Serial newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new Serial( xmlNode );
+ }
+
+ /**
+ * Type of serial port device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum Type
+ {
+ // @formatter:off
+ DEV ( "dev" ),
+ FILE ( "file" ),
+ PIPE ( "pipe" ),
+ UNIX ( "unix" ),
+ TCP ( "tcp" ),
+ UDP ( "udp" ),
+ NULL ( "null" ),
+ STDIO ( "stdio" ),
+ VC ( "vc" ),
+ PTY ( "pty" ),
+ SPICEVMC ( "spicevmc" ),
+ SPICEPORT( "spiceport" ),
+ NMDM ( "nmdm" );
+ // @formatter:on
+
+ /**
+ * Name of the serial port device type.
+ */
+ private String type;
+
+ /**
+ * Creates serial port device type.
+ *
+ * @param type valid name of the serial port device type in a Libvirt domain XML document.
+ */
+ Type( String type )
+ {
+ this.type = type;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.type;
+ }
+
+ /**
+ * Creates serial port device type from its name with error check.
+ *
+ * @param type name of the serial port device type in a Libvirt domain XML document.
+ * @return valid serial port device type.
+ */
+ public static Type fromString( String type )
+ {
+ for ( Type t : Type.values() ) {
+ if ( t.type.equalsIgnoreCase( type ) ) {
+ return t;
+ }
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/Shmem.java b/src/main/java/org/openslx/libvirt/domain/device/Shmem.java
new file mode 100644
index 0000000..3c48c95
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/Shmem.java
@@ -0,0 +1,178 @@
+package org.openslx.libvirt.domain.device;
+
+import java.math.BigInteger;
+
+import org.openslx.libvirt.domain.DomainUtils;
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A shared memory device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Shmem extends Device
+{
+ /**
+ * Creates an empty sound device.
+ */
+ public Shmem()
+ {
+ super();
+ }
+
+ /**
+ * Creates a shared memory device representing an existing Libvirt XML shared memory device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML shared memory device element.
+ */
+ public Shmem( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns the model of the shared memory device.
+ *
+ * @return model of the shared memory device.
+ */
+ public Model getModel()
+ {
+ String model = this.getXmlElementAttributeValue( "model", "type" );
+ return Model.fromString( model );
+ }
+
+ /**
+ * Sets the model for the shared memory device.
+ *
+ * @param model model for the shared memory device.
+ */
+ public void setModel( Model model )
+ {
+ this.setXmlElementAttributeValue( "model", "type", model.toString() );
+ }
+
+ /**
+ * Returns the name of the shared memory device.
+ *
+ * @return name of the shared memory device.
+ */
+ public String getName()
+ {
+ return this.getXmlElementAttributeValue( "name" );
+ }
+
+ /**
+ * Sets the name for the shared memory device.
+ *
+ * @param name name for the shared memory device.
+ */
+ public void setName( String name )
+ {
+ this.setXmlElementAttributeValue( "name", name );
+ }
+
+ /**
+ * Returns the memory size of the shared memory device.
+ *
+ * @return memory size of the shared memory device in bytes.
+ */
+ public BigInteger getSize()
+ {
+ final String unit = this.getXmlElementAttributeValue( "size", "unit" );
+ final String size = this.getXmlElementValue( "size" );
+
+ return DomainUtils.decodeMemory( size, unit );
+ }
+
+ /**
+ * Sets the memory size for the shared memory device.
+ *
+ * @param size memory size for the shared memory device in bytes.
+ */
+ public void setSize( BigInteger memory )
+ {
+ final String unit = "M";
+ final String size = DomainUtils.encodeMemory( memory, unit );
+
+ this.setXmlElementAttributeValue( "size", "unit", unit );
+ this.setXmlElementValue( "size", size );
+ }
+
+ /**
+ * Creates a non-existent shared memory device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created shared memory device instance.
+ */
+ public static Shmem createInstance( LibvirtXmlNode xmlNode )
+ {
+ return Shmem.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a shared memory device representing an existing Libvirt XML shared memory device
+ * element.
+ *
+ * @param xmlNode existing Libvirt XML shared memory device element.
+ * @return shared memory device instance.
+ */
+ public static Shmem newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new Shmem( xmlNode );
+ }
+
+ /**
+ * Model of shared memory device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum Model
+ {
+ // @formatter:off
+ IVSHMEM ( "ivshmem" ),
+ IVSHMEM_PLAIN ( "ivshmem-plain" ),
+ IVSHMEM_DOORBELL( "ivshmem-doorbell" );
+ // @formatter:on
+
+ /**
+ * Name of the shared memory device model.
+ */
+ private String model;
+
+ /**
+ * Creates shared memory device model.
+ *
+ * @param type valid name of the shared memory device model in a Libvirt domain XML document.
+ */
+ Model( String model )
+ {
+ this.model = model;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.model;
+ }
+
+ /**
+ * Creates shared memory device model from its name with error check.
+ *
+ * @param model name of the shared memory device model in a Libvirt domain XML document.
+ * @return valid shared memory device model.
+ */
+ public static Model fromString( String model )
+ {
+ for ( Model m : Model.values() ) {
+ if ( m.model.equalsIgnoreCase( model ) ) {
+ return m;
+ }
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/Sound.java b/src/main/java/org/openslx/libvirt/domain/device/Sound.java
new file mode 100644
index 0000000..dfeeffd
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/Sound.java
@@ -0,0 +1,128 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A sound device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Sound extends Device
+{
+ /**
+ * Creates an empty sound device.
+ */
+ public Sound()
+ {
+ super();
+ }
+
+ /**
+ * Creates a sound device representing an existing Libvirt XML sound device element.
+ *
+ * @param xmlNode existing Libvirt XML sound device element.
+ */
+ public Sound( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns hardware model of the sound device.
+ *
+ * @return hardware model of the sound device.
+ */
+ public Model getModel()
+ {
+ String model = this.getXmlElementAttributeValue( "model" );
+ return Model.fromString( model );
+ }
+
+ /**
+ * Sets hardware model for the sound device.
+ *
+ * @param model hardware model for the sound device.
+ */
+ public void setModel( Model model )
+ {
+ this.setXmlElementAttributeValue( "model", model.toString() );
+ }
+
+ /**
+ * Creates a non-existent sound device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created sound device instance.
+ */
+ public static Sound createInstance( LibvirtXmlNode xmlNode )
+ {
+ return Sound.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a sound device representing an existing Libvirt XML sound device element.
+ *
+ * @param xmlNode existing Libvirt XML sound device element.
+ * @return sound device instance.
+ */
+ public static Sound newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new Sound( xmlNode );
+ }
+
+ /**
+ * Model of sound device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum Model
+ {
+ // @formatter:off
+ AC97 ( "ac97" ),
+ ES1370( "es1370" ),
+ ICH6 ( "ich6" ),
+ ICH9 ( "ich9" ),
+ SB16 ( "sb16" );
+ // @formatter:on
+
+ /**
+ * Name of the sound device model.
+ */
+ private String model;
+
+ /**
+ * Creates sound device model.
+ *
+ * @param type valid name of the sound device model in a Libvirt domain XML document.
+ */
+ Model( String model )
+ {
+ this.model = model;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.model;
+ }
+
+ /**
+ * Creates sound device model from its name with error check.
+ *
+ * @param model name of the sound device model in a Libvirt domain XML document.
+ * @return valid sound device model.
+ */
+ public static Model fromString( String model )
+ {
+ for ( Model m : Model.values() ) {
+ if ( m.model.equalsIgnoreCase( model ) ) {
+ return m;
+ }
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/domain/device/Video.java b/src/main/java/org/openslx/libvirt/domain/device/Video.java
new file mode 100644
index 0000000..a674715
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/domain/device/Video.java
@@ -0,0 +1,197 @@
+package org.openslx.libvirt.domain.device;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+
+/**
+ * A video (GPU) device node in a Libvirt domain XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Video extends Device
+{
+ /**
+ * Creates an empty video device.
+ */
+ public Video()
+ {
+ super();
+ }
+
+ /**
+ * Creates a video device representing an existing Libvirt XML video device element.
+ *
+ * @param xmlNode existing Libvirt XML video device element.
+ */
+ public Video( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns hardware model of the video device.
+ *
+ * @return hardware model of the video device.
+ */
+ public Model getModel()
+ {
+ String model = this.getXmlElementAttributeValue( "model", "type" );
+ return Model.fromString( model );
+ }
+
+ /**
+ * Sets hardware model for the video device.
+ *
+ * @param model hardware model for the video device.
+ */
+ public void setModel( Model model )
+ {
+ this.setXmlElementAttributeValue( "model", "type", model.toString() );
+ }
+
+ /**
+ * Checks whether 2D hardware video acceleration is turned on or off.
+ *
+ * @return state of 2D hardware video acceleration.
+ */
+ public boolean get2DAcceleration()
+ {
+ return this.getXmlElementAttributeValueAsBool( "model/acceleration", "accel2d" );
+ }
+
+ /**
+ * Turns 2D hardware video acceleration on or off.
+ *
+ * @param acceleration state of 2D hardware video acceleration.
+ */
+ public void set2DAcceleration( boolean acceleration )
+ {
+ Model model = this.getModel();
+
+ if ( model != null ) {
+ if ( model == Model.VIRTIO ) {
+ // only set acceleration on supported Virtio GPUs
+ this.setXmlElementAttributeValueYesNo( "model/acceleration", "accel2d", acceleration );
+ } else {
+ String errorMsg =
+ "Video card model '" + model.toString() + "' does not support enabled 2D hardware acceleration.";
+ throw new IllegalArgumentException( errorMsg );
+ }
+ }
+ }
+
+ /**
+ * Checks whether 3D hardware video acceleration is turned on or off.
+ *
+ * @return state of 3D hardware video acceleration.
+ */
+ public boolean get3DAcceleration()
+ {
+ return this.getXmlElementAttributeValueAsBool( "model/acceleration", "accel3d" );
+ }
+
+ /**
+ * Turns 3D hardware video acceleration on or off.
+ *
+ * @param acceleration state of 3D hardware video acceleration.
+ */
+ public void set3DAcceleration( boolean acceleration )
+ {
+ Model model = this.getModel();
+
+ if ( model == Model.VIRTIO ) {
+ // only set acceleration on supported Virtio GPUs
+ this.setXmlElementAttributeValueYesNo( "model/acceleration", "accel3d", acceleration );
+ } else {
+ String errorMsg =
+ "Video card model '" + model.toString() + "' does not support enabled 3D hardware acceleration.";
+ throw new IllegalArgumentException( errorMsg );
+ }
+ }
+
+ /**
+ * Disables the video device by setting the model to {@link Model#NONE}.
+ */
+ public void disable()
+ {
+ this.removeXmlElementChilds();
+ this.setModel( Model.NONE );
+ }
+
+ /**
+ * Creates a non-existent video device as Libvirt XML device element.
+ *
+ * @param xmlNode Libvirt XML node of the Libvirt XML device that is created.
+ * @return created video device instance.
+ */
+ public static Video createInstance( LibvirtXmlNode xmlNode )
+ {
+ return Video.newInstance( xmlNode );
+ }
+
+ /**
+ * Creates a video device representing an existing Libvirt XML video device element.
+ *
+ * @param xmlNode existing Libvirt XML video device element.
+ * @return video device instance.
+ */
+ public static Video newInstance( LibvirtXmlNode xmlNode )
+ {
+ return new Video( xmlNode );
+ }
+
+ /**
+ * Model of video device.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum Model
+ {
+ // @formatter:off
+ NONE ( "none" ),
+ QXL ( "qxl" ),
+ VGA ( "vga" ),
+ VMVGA ( "vmvga" ),
+ VIRTIO( "virtio" );
+ // @formatter:on
+
+ /**
+ * Name of the video device model.
+ */
+ private String model = null;
+
+ /**
+ * Creates video device model.
+ *
+ * @param type valid name of the video device model in a Libvirt domain XML document.
+ */
+ Model( String model )
+ {
+ this.model = model;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.model;
+ }
+
+ /**
+ * Creates video device model from its name with error check.
+ *
+ * @param model name of the video device model in a Libvirt domain XML document.
+ * @return valid video device model.
+ */
+ public static Model fromString( String model )
+ {
+ for ( Model m : Model.values() ) {
+ if ( m.model.equalsIgnoreCase( model ) ) {
+ return m;
+ }
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/libosinfo/LibOsInfo.java b/src/main/java/org/openslx/libvirt/libosinfo/LibOsInfo.java
new file mode 100644
index 0000000..f506d74
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/libosinfo/LibOsInfo.java
@@ -0,0 +1,158 @@
+package org.openslx.libvirt.libosinfo;
+
+import java.io.File;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.function.Predicate;
+
+import org.openslx.libvirt.libosinfo.os.Os;
+import org.openslx.libvirt.xml.LibvirtXmlDocument;
+import org.openslx.libvirt.xml.LibvirtXmlDocumentException;
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+import org.openslx.libvirt.xml.LibvirtXmlResources;
+import org.openslx.libvirt.xml.LibvirtXmlSerializationException;
+import org.openslx.libvirt.xml.LibvirtXmlValidationException;
+import org.openslx.virtualization.Version;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+/**
+ * Implementation of a libosinfo XML document.
+ *
+ * The libosinfo XML document is used to describe existing operating systems, devices and their
+ * configuration possibilities.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class LibOsInfo extends LibvirtXmlDocument
+{
+ /**
+ * Creates a libosinfo XML document from a {@link String} providing libosinfo XML content.
+ *
+ * @param xml {@link String} with libosinfo XML content.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the libosinfo XML content failed.
+ * @throws LibvirtXmlValidationException XML content is not a valid libosinfo XML document.
+ */
+ public LibOsInfo( String xml )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException, LibvirtXmlValidationException
+ {
+ super( xml, LibvirtXmlResources.getLibOsInfoRng( "osinfo.rng" ) );
+ }
+
+ /**
+ * Creates a libosinfo XML document from a {@link File} containing libosinfo XML content.
+ *
+ * @param xml existing {@link File} containing libosinfo XML content.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the libosinfo XML content failed.
+ * @throws LibvirtXmlValidationException XML content is not a valid libosinfo XML document.
+ */
+ public LibOsInfo( File xml )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException, LibvirtXmlValidationException
+ {
+ super( xml, LibvirtXmlResources.getLibOsInfoRng( "osinfo.rng" ) );
+ }
+
+ /**
+ * Creates a libosinfo XML document from an {@link InputStream} providing libosinfo XML content.
+ *
+ * @param xml {@link InputStream} providing libosinfo XML content.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the libosinfo XML content failed.
+ * @throws LibvirtXmlValidationException XML content is not a valid libosinfo XML document.
+ */
+ public LibOsInfo( InputStream xml )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException, LibvirtXmlValidationException
+ {
+ super( xml, LibvirtXmlResources.getLibOsInfoRng( "osinfo.rng" ) );
+ }
+
+ /**
+ * Creates libosinfo XML document from {@link InputSource} providing libosinfo XML content.
+ *
+ * @param xml {@link InputSource} providing libosinfo XML content.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the libosinfo XML content failed.
+ * @throws LibvirtXmlValidationException XML content is not a valid libosinfo XML document.
+ */
+ public LibOsInfo( InputSource xml )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException, LibvirtXmlValidationException
+ {
+ super( xml, LibvirtXmlResources.getLibOsInfoRng( "osinfo.rng" ) );
+ }
+
+ /**
+ * Returns the version of the libosinfo database.
+ *
+ * @return version of the libosinfo database.
+ */
+ public Version getVersion()
+ {
+ final String version = this.getRootXmlNode().getXmlElementAttributeValue( "version" );
+ return Version.valueOf( version );
+ }
+
+ /**
+ * Returns a list of all defined operating systems.
+ *
+ * @return list of all defined operating systems.
+ */
+ public ArrayList<Os> getOses()
+ {
+ final ArrayList<Os> oses = new ArrayList<Os>();
+ final NodeList osNodes = this.getRootXmlNode().getXmlNodes( "os" );
+
+ if ( osNodes != null ) {
+ for ( int i = 0; i < osNodes.getLength(); i++ ) {
+ final Node childNode = osNodes.item( i );
+ if ( childNode.getNodeType() == Node.ELEMENT_NODE ) {
+ final LibvirtXmlNode osNode = new LibvirtXmlNode( this.getRootXmlNode().getXmlDocument(), childNode );
+ final Os os = Os.newInstance( osNode );
+
+ if ( os != null ) {
+ oses.add( os );
+ }
+ }
+ }
+ }
+
+ return oses;
+ }
+
+ /**
+ * Lookups an operating system in the libosinfo database specified by the operating system
+ * identifier.
+ *
+ * @param osId identifier of the operating system to lookup in the libosinfo database.
+ * @return found operating system from the libosinfo database.
+ */
+ public static Os lookupOs( String osId )
+ {
+ Os os = null;
+
+ if ( osId != null && !osId.isEmpty() ) {
+ ArrayList<Os> oses = null;
+
+ try {
+ final LibOsInfo osInfo = new LibOsInfo( LibvirtXmlResources.getLibOsInfoXml( "osinfo.xml" ) );
+ oses = osInfo.getOses();
+ } catch ( LibvirtXmlDocumentException | LibvirtXmlSerializationException | LibvirtXmlValidationException e ) {
+ oses = null;
+ }
+
+ if ( oses != null ) {
+ final Predicate<Os> byOsId = osCandidate -> osId.equals( osCandidate.getId() );
+ os = oses.stream().filter( byOsId ).findFirst().orElse( null );
+ }
+ }
+
+ return os;
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/libosinfo/os/Os.java b/src/main/java/org/openslx/libvirt/libosinfo/os/Os.java
new file mode 100644
index 0000000..37a0a2e
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/libosinfo/os/Os.java
@@ -0,0 +1,93 @@
+package org.openslx.libvirt.libosinfo.os;
+
+import org.openslx.libvirt.xml.LibvirtXmlNode;
+import org.openslx.virtualization.Version;
+
+/**
+ * A operating system node in a libosinfo XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Os extends LibvirtXmlNode
+{
+ /**
+ * Creates an empty operating system.
+ */
+ public Os()
+ {
+ super();
+ }
+
+ /**
+ * Creates a operating system representing an existing libosinfo XML operating system element.
+ *
+ * @param xmlNode existing libosinfo XML operating system element.
+ */
+ public Os( LibvirtXmlNode xmlNode )
+ {
+ super( xmlNode );
+ }
+
+ /**
+ * Returns the identifier of the operating system.
+ *
+ * @return identifier of the operating system.
+ */
+ public String getId()
+ {
+ return this.getXmlElementAttributeValue( "id" );
+ }
+
+ /**
+ * Returns the name of the operating system.
+ *
+ * @return name of the operating system.
+ */
+ public String getName()
+ {
+ return this.getXmlElementValue( "name" );
+ }
+
+ /**
+ * Returns the version of the operating system.
+ *
+ * @return version of the operating system.
+ */
+ public Version getVersion()
+ {
+ final String version = this.getXmlElementValue( "version" );
+ return Version.valueOf( version );
+ }
+
+ /**
+ * Returns the system family of the operating system.
+ *
+ * @return system family of the operating system.
+ */
+ public String getFamily()
+ {
+ return this.getXmlElementValue( "family" );
+ }
+
+ /**
+ * Returns the distribution name of the operating system.
+ *
+ * @return distribution name of the operating system.
+ */
+ public String getDistro()
+ {
+ return this.getXmlElementValue( "distro" );
+ }
+
+ /**
+ * Creates a operating system representing an existing libosinfo XML operating system element.
+ *
+ * @param xmlNode existing libosinfo XML operating system element.
+ * @return libosinfo XML operating system instance.
+ */
+ public static Os newInstance( LibvirtXmlNode node )
+ {
+ return new Os( node );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/xml/LibvirtXmlCreatable.java b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlCreatable.java
new file mode 100644
index 0000000..e799ace
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlCreatable.java
@@ -0,0 +1,26 @@
+package org.openslx.libvirt.xml;
+
+import org.w3c.dom.Node;
+
+/**
+ * Serializability of a Libvirt XML object from/to its XML representation.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public interface LibvirtXmlCreatable
+{
+ /**
+ * Serializing an object from its XML representation.
+ *
+ * @param xmlNode The object's XML representation.
+ */
+ void fromXmlNode( Node xmlNode );
+
+ /**
+ * Serializing the object to its XML representation.
+ *
+ * @return XML representation of the object.
+ */
+ Node toXmlNode();
+}
diff --git a/src/main/java/org/openslx/libvirt/xml/LibvirtXmlDocument.java b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlDocument.java
new file mode 100644
index 0000000..805376f
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlDocument.java
@@ -0,0 +1,355 @@
+package org.openslx.libvirt.xml;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringReader;
+import java.io.StringWriter;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+import org.w3c.dom.Document;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+/**
+ * A generic representation of a Libvirt XML file.
+ *
+ * @implNote Base class to derive the representation of specific Libvirt XML files.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public abstract class LibvirtXmlDocument implements LibvirtXmlSerializable, LibvirtXmlValidatable
+{
+ /**
+ * Document builder to parse Libvirt XML document from file.
+ */
+ private DocumentBuilder domBuilder = null;
+
+ /**
+ * Representation of a Libvirt XML document.
+ */
+ private Document xmlDocument = null;
+
+ /**
+ * XML transformer to transform Libvirt XML document to a file.
+ */
+ private Transformer xmlTransformer = null;
+
+ /**
+ * XML root node of the Libvirt XML document.
+ */
+ private LibvirtXmlNode rootXmlNode = null;
+
+ /**
+ * RNG schema validator to validate the Libvirt XML document content.
+ */
+ private LibvirtXmlSchemaValidator rngValidator = null;
+
+ /**
+ * Creates and initializes XML context to create and transform a Libvirt XML file from/to a file.
+ *
+ * @param rngSchema RNG schema to validate the Libvirt XML document content.
+ *
+ * @throws LibvirtXmlDocumentException error occured during setup of the XML context to read and
+ * write from/to a Libvirt XML file.
+ */
+ private void createXmlContext( InputStream rngSchema ) throws LibvirtXmlDocumentException
+ {
+ // used for XML input
+ try {
+ DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
+ domFactory.setIgnoringElementContentWhitespace( true );
+ domFactory.setNamespaceAware( true );
+ this.domBuilder = domFactory.newDocumentBuilder();
+ } catch ( ParserConfigurationException e ) {
+ String errorMsg = "Setting up XML context for reading from the Libvirt XML document failed.";
+ throw new LibvirtXmlDocumentException( errorMsg );
+ }
+
+ // used for XML output
+ try {
+ // use hack to load specific transformer factory implementation for XSLT
+ System.setProperty( TransformerFactory.class.getName(),
+ "org.apache.xalan.processor.TransformerFactoryImpl" );
+
+ // create XML transformer factory to create XML transformer with specific indentation
+ TransformerFactory transformerFactory = TransformerFactory.newInstance();
+
+ // create XML transformer and apply settings for output XML transformation
+ InputStream xslOutputSchemaStream = LibvirtXmlResources.getLibvirtXsl( "xml-output-transformation.xsl" );
+ StreamSource xslOutputSchema = new StreamSource( xslOutputSchemaStream );
+ this.xmlTransformer = transformerFactory.newTransformer( xslOutputSchema );
+ this.xmlTransformer.setOutputProperty( OutputKeys.ENCODING, "UTF-8" );
+ } catch ( TransformerConfigurationException e ) {
+ String errorMsg = "Setting up XML context for writing to the Libvirt XML document failed.";
+ throw new LibvirtXmlDocumentException( errorMsg );
+ }
+
+ // used for XML validation with RNG schema files
+ if ( rngSchema != null ) {
+ try {
+ this.rngValidator = new LibvirtXmlSchemaValidator( rngSchema );
+ } catch ( SAXException e ) {
+ String errorMsg = "Setting up XML context for validating to the Libvirt XML document failed.";
+ e.printStackTrace();
+ throw new LibvirtXmlDocumentException( errorMsg );
+ }
+ }
+ }
+
+ /**
+ * Creates a Libvirt XML document from a given XML content.
+ *
+ * @param xml XML content as {@link String}.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the XML content failed.
+ */
+ public LibvirtXmlDocument( String xml )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException
+ {
+ this( xml, null );
+ }
+
+ /**
+ * Creates a Libvirt XML document from a given XML content.
+ *
+ * @param xml XML content as {@link String}.
+ * @param rngSchema RNG schema to validate XML content.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the XML content failed.
+ */
+ public LibvirtXmlDocument( String xml, InputStream rngSchema )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException
+ {
+ this.createXmlContext( rngSchema );
+ this.fromXml( xml );
+ }
+
+ /**
+ * Creates a Libvirt XML document from a given XML content.
+ *
+ * @param xml XML content as {@link File}.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the XML content failed.
+ */
+ public LibvirtXmlDocument( File xml )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException
+ {
+ this( xml, null );
+ }
+
+ /**
+ * Creates a Libvirt XML document from a given XML content.
+ *
+ * @param xml XML content as {@link File}.
+ * @param rngSchema RNG schema to validate XML content.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the XML content failed.
+ */
+ public LibvirtXmlDocument( File xml, InputStream rngSchema )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException
+ {
+ this.createXmlContext( rngSchema );
+ this.fromXml( xml );
+ }
+
+ /**
+ * Creates a Libvirt XML document from a given XML content.
+ *
+ * @param xml XML content as {@link InputStream}.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the XML content failed.
+ */
+ public LibvirtXmlDocument( InputStream xml )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException
+ {
+ this( xml, null );
+ }
+
+ /**
+ * Creates a Libvirt XML document from a given XML content.
+ *
+ * @param xml XML content as {@link InputStream}.
+ * @param rngSchema RNG schema to validate XML content.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the XML content failed.
+ */
+ public LibvirtXmlDocument( InputStream xml, InputStream rngSchema )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException
+ {
+ this.createXmlContext( rngSchema );
+ this.fromXml( xml );
+ }
+
+ /**
+ * Creates a Libvirt XML document from a given XML content.
+ *
+ * @param xml XML content as {@link InputSource}.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the XML content failed.
+ */
+ public LibvirtXmlDocument( InputSource xml )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException
+ {
+ this( xml, null );
+ }
+
+ /**
+ * Creates a Libvirt XML document from a given XML content.
+ *
+ * @param xml XML content as {@link InputSource}.
+ * @param rngSchema RNG schema to validate XML content.
+ *
+ * @throws LibvirtXmlDocumentException creation of XML context failed.
+ * @throws LibvirtXmlSerializationException serialization of the XML content failed.
+ */
+ public LibvirtXmlDocument( InputSource xml, InputStream rngSchema )
+ throws LibvirtXmlDocumentException, LibvirtXmlSerializationException
+ {
+ this.createXmlContext( rngSchema );
+ this.fromXml( xml );
+ }
+
+ /**
+ * Returns the XML root node of the Libvirt XML document.
+ *
+ * @return root node of the Libvirt XML document.
+ */
+ public LibvirtXmlNode getRootXmlNode()
+ {
+ return this.rootXmlNode;
+ }
+
+ @Override
+ public void fromXml( String xml ) throws LibvirtXmlSerializationException
+ {
+ this.fromXml( new InputSource( new StringReader( xml ) ) );
+ }
+
+ @Override
+ public void fromXml( File xml ) throws LibvirtXmlSerializationException
+ {
+ try {
+ this.xmlDocument = this.domBuilder.parse( xml );
+ this.xmlDocument.getDocumentElement().normalize();
+ } catch ( SAXException e ) {
+ throw new LibvirtXmlSerializationException( e.getLocalizedMessage() );
+ } catch ( IOException e ) {
+ throw new LibvirtXmlSerializationException( e.getLocalizedMessage() );
+ }
+
+ this.rootXmlNode = new LibvirtXmlNode( this.xmlDocument, this.xmlDocument.getDocumentElement() );
+ }
+
+ @Override
+ public void fromXml( InputStream xml ) throws LibvirtXmlSerializationException
+ {
+ try {
+ this.xmlDocument = this.domBuilder.parse( xml );
+ this.xmlDocument.getDocumentElement().normalize();
+ } catch ( SAXException e ) {
+ throw new LibvirtXmlSerializationException( e.getLocalizedMessage() );
+ } catch ( IOException e ) {
+ throw new LibvirtXmlSerializationException( e.getLocalizedMessage() );
+ }
+
+ this.rootXmlNode = new LibvirtXmlNode( this.xmlDocument, this.xmlDocument.getDocumentElement() );
+ }
+
+ @Override
+ public void fromXml( InputSource xml ) throws LibvirtXmlSerializationException
+ {
+ try {
+ this.xmlDocument = this.domBuilder.parse( xml );
+ this.xmlDocument.getDocumentElement().normalize();
+ } catch ( SAXException e ) {
+ throw new LibvirtXmlSerializationException( e.getLocalizedMessage() );
+ } catch ( IOException e ) {
+ throw new LibvirtXmlSerializationException( e.getLocalizedMessage() );
+ }
+
+ this.rootXmlNode = new LibvirtXmlNode( this.xmlDocument, this.xmlDocument.getDocumentElement() );
+ }
+
+ @Override
+ public String toXml() throws LibvirtXmlSerializationException
+ {
+ StringWriter xmlWriter = null;
+ String xml = null;
+
+ try {
+ xmlWriter = new StringWriter();
+ DOMSource source = new DOMSource( this.xmlDocument );
+ StreamResult xmlString = new StreamResult( xmlWriter );
+ this.xmlTransformer.transform( source, xmlString );
+ xml = xmlWriter.toString();
+ } catch ( Exception e ) {
+ throw new LibvirtXmlSerializationException( e.getLocalizedMessage() );
+ } finally {
+ try {
+ xmlWriter.close();
+ } catch ( Throwable e ) {
+ }
+ }
+
+ return xml;
+ }
+
+ @Override
+ public void toXml( File xml ) throws LibvirtXmlSerializationException
+ {
+ FileWriter xmlWriter = null;
+
+ try {
+ xmlWriter = new FileWriter( xml );
+ DOMSource source = new DOMSource( this.xmlDocument );
+ StreamResult xmlStream = new StreamResult( xmlWriter );
+ this.xmlTransformer.transform( source, xmlStream );
+ } catch ( Exception e ) {
+ e.printStackTrace();
+ throw new LibvirtXmlSerializationException( e.getLocalizedMessage() );
+ } finally {
+ try {
+ xmlWriter.close();
+ } catch ( Throwable e ) {
+ }
+ }
+ }
+
+ @Override
+ public void validateXml() throws LibvirtXmlValidationException
+ {
+ if ( this.rngValidator != null ) {
+ this.rngValidator.validate( this.xmlDocument );
+ }
+ }
+
+ @Override
+ public String toString()
+ {
+ try {
+ return this.toXml();
+ } catch ( LibvirtXmlSerializationException e ) {
+ return null;
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/xml/LibvirtXmlDocumentException.java b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlDocumentException.java
new file mode 100644
index 0000000..f8605ed
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlDocumentException.java
@@ -0,0 +1,25 @@
+package org.openslx.libvirt.xml;
+
+/**
+ * An exception of a Libvirt XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class LibvirtXmlDocumentException extends Exception
+{
+ /**
+ * Version number for serialization.
+ */
+ private static final long serialVersionUID = -7423926322035713576L;
+
+ /**
+ * Creates an document exception including an error message.
+ *
+ * @param errorMsg message to describe a specific document error.
+ */
+ public LibvirtXmlDocumentException( String errorMsg )
+ {
+ super( errorMsg );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/xml/LibvirtXmlEditable.java b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlEditable.java
new file mode 100644
index 0000000..0143e46
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlEditable.java
@@ -0,0 +1,285 @@
+package org.openslx.libvirt.xml;
+
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Editability of XML nodes based on XPath expressions.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public interface LibvirtXmlEditable
+{
+ /**
+ * Returns XML node selected by a XPath expression
+ *
+ * @param expression XPath expression to select XML node.
+ * @return selected XML node.
+ */
+ public Node getXmlNode( String expression );
+
+ /**
+ * Returns XML nodes selected by a XPath expression
+ *
+ * @param expression XPath expression to select XML nodes.
+ * @return selected XML nodes.
+ */
+ public NodeList getXmlNodes( String expression );
+
+ /**
+ * Return current XML root element.
+ *
+ * @return current XML root element.
+ */
+ public default Node getXmlElement()
+ {
+ return this.getXmlElement( null );
+ }
+
+ /**
+ * Returns XML element from selection by a XPath expression.
+ *
+ * @param expression XPath expression to select XML element.
+ * @return selected XML element.
+ */
+ public Node getXmlElement( String expression );
+
+ /**
+ * Sets an XML element selected by a XPath expression.
+ *
+ * If the XML element selected by the given XPath expression does not exists, the XML
+ * element will be created.
+ *
+ * @param expression XPath expression to select XML element.
+ */
+ public default void setXmlElement( String expression )
+ {
+ this.setXmlElement( expression, null );
+ }
+
+ /**
+ * Sets a XML element selected by a XPath expression and appends child XML node.
+ *
+ * If the XML element selected by the given XPath expression does not exists, the XML
+ * element will be created and the given XML child node is appended.
+ *
+ * @param expression XPath expression to select XML element.
+ * @param child XML node that will be appended to the selected XML element.
+ */
+ public void setXmlElement( String expression, Node child );
+
+ /**
+ * Returns the text value of a XML element selected by a XPath expression.
+ *
+ * @param expression XPath expression to select XML element.
+ * @return Text value of the selected XML element.
+ */
+ public String getXmlElementValue( String expression );
+
+ /**
+ * Sets the text value of a XML element selected by a XPath expression.
+ *
+ * @param expression XPath expression to select XML element.
+ * @param value text value to set selected XML element's text.
+ */
+ public void setXmlElementValue( String expression, String value );
+
+ /**
+ * Removes a XML element and all its childs selected by a XPath expression.
+ *
+ * @param expression XPath expression to select XML element.
+ */
+ public void removeXmlElement( String expression );
+
+ /**
+ * Removes all child elements of the current XML root element.
+ */
+ public default void removeXmlElementChilds()
+ {
+ this.removeXmlElementChilds( null );
+ }
+
+ /**
+ * Removes all child elements of a XML element selected by a XPath expression.
+ *
+ * @param expression XPath expression to select XML element.
+ */
+ public void removeXmlElementChilds( String expression );
+
+ /**
+ * Returns the text value of a XML attribute from the current XML root element.
+ *
+ * @param attributeName name to select XML attribute of the current XML root element.
+ * @return attribute text of the XML attribute from the current XML root element as
+ * {@link String}.
+ */
+ public default String getXmlElementAttributeValue( String attributeName )
+ {
+ return this.getXmlElementAttributeValue( null, attributeName );
+ }
+
+ /**
+ * Returns the binary choice of a XML attribute from the current XML root element.
+ *
+ * If the text value of the XML attribute equals to <i>yes</i> or <i>on</i>, the returned
+ * {@link boolean} value is set to <i>true</i>. Otherwise, if the text value of the XML attribute
+ * equals to <i>no</i> or <i>off</i>, the returned {@link boolean} value is set to <i>false</i>.
+ *
+ * @param attributeName name to select XML attribute of the current XML root element.
+ * @return attribute value of the XML attribute from the current XML root element as
+ * {@link boolean}.
+ */
+ public default boolean getXmlElementAttributeValueAsBool( String attributeName )
+ {
+ final String attributeValue = this.getXmlElementAttributeValue( attributeName );
+ return "yes".equals( attributeValue ) || "on".equals( attributeValue ) || "true".equals( attributeValue );
+ }
+
+ /**
+ * Returns the binary choice of a XML attribute from a XML element selected by a XPath
+ * expression.
+ *
+ * If the text value of the XML attribute equals to <i>yes</i> or <i>on</i>, the returned
+ * {@link boolean} value is set to <i>true</i>. Otherwise, if the text value of the XML attribute
+ * equals to <i>no</i> or <i>off</i>, the returned {@link boolean} value is set to <i>false</i>.
+ *
+ * @param expression XPath expression to select XML element.
+ * @param attributeName name to select XML attribute of the current XML root element.
+ * @return attribute value of the XML attribute from the current XML root element as
+ * {@link boolean}.
+ */
+ public default boolean getXmlElementAttributeValueAsBool( String expression, String attributeName )
+ {
+ final String attributeValue = this.getXmlElementAttributeValue( expression, attributeName );
+ return "yes".equals( attributeValue ) || "on".equals( attributeValue );
+ }
+
+ /**
+ * Returns the text value of a XML attribute from a XML element selected by a XPath expression.
+ *
+ * @param expression XPath expression to select XML element.
+ * @param attributeName name to select XML attribute of the selected XML element.
+ * @return attribute text of the XML attribute from the selected XML element.
+ */
+ public String getXmlElementAttributeValue( String expression, String attributeName );
+
+ /**
+ * Sets the text value of a XML attribute from the current XML root element.
+ *
+ * @param attributeName name to select XML attribute of the current XML root element.
+ * @param value XML attribute value for the selected XML attribute from the current XML root
+ * element.
+ */
+ public default void setXmlElementAttributeValue( String attributeName, String value )
+ {
+ this.setXmlElementAttributeValue( null, attributeName, value );
+ }
+
+ /**
+ * Sets the binary choice value of a XML attribute from the current XML root element.
+ *
+ * If the binary choice value for the XML attribute equals to <i>true</i>, the text value of the
+ * selected XML attribute is set to <i>yes</i>. Otherwise, if the binary choice value for the
+ * selected XML attribute equals to <i>false</i>, the text value of the selected XML attribute is
+ * set to <i>no</i>.
+ *
+ * @param attributeName name to select XML attribute of the selected XML element.
+ * @param value binary choice value for the selected XML attribute from the selected XML element.
+ */
+ public default void setXmlElementAttributeValueYesNo( String attributeName, boolean value )
+ {
+ final String valueYesNo = value ? "yes" : "no";
+ this.setXmlElementAttributeValue( attributeName, valueYesNo );
+ }
+
+ /**
+ * Sets the binary choice value of a XML attribute from a XML element selected by a XPath
+ * expression.
+ *
+ * If the binary choice value for the XML attribute equals to <i>true</i>, the text value of the
+ * selected XML attribute is set to <i>yes</i>. Otherwise, if the binary choice value for the
+ * selected XML attribute equals to <i>false</i>, the text value of the selected XML attribute is
+ * set to <i>no</i>.
+ *
+ * @param expression XPath expression to select XML element.
+ * @param attributeName name to select XML attribute of the selected XML element.
+ * @param value binary choice value for the selected XML attribute from the selected XML element.
+ */
+ public default void setXmlElementAttributeValueYesNo( String expression, String attributeName, boolean value )
+ {
+ final String valueYesNo = value ? "yes" : "no";
+ this.setXmlElementAttributeValue( expression, attributeName, valueYesNo );
+ }
+
+ /**
+ * Sets the binary choice value of a XML attribute from the current XML root element.
+ *
+ * If the binary choice value for the XML attribute equals to <i>true</i>, the text value of the
+ * selected XML attribute is set to <i>on</i>. Otherwise, if the binary choice value for the
+ * selected XML attribute equals to <i>false</i>, the text value of the selected XML attribute is
+ * set to <i>off</i>.
+ *
+ * @param attributeName name to select XML attribute of the selected XML element.
+ * @param value binary choice value for the selected XML attribute from the selected XML element.
+ */
+ public default void setXmlElementAttributeValueOnOff( String attributeName, boolean value )
+ {
+ final String valueOnOff = value ? "on" : "off";
+ this.setXmlElementAttributeValue( attributeName, valueOnOff );
+ }
+
+ /**
+ * Sets the binary choice value of a XML attribute from a XML element selected by a XPath
+ * expression.
+ *
+ * If the binary choice value for the XML attribute equals to <i>true</i>, the text value of the
+ * selected XML attribute is set to <i>on</i>. Otherwise, if the binary choice value for the
+ * selected XML attribute equals to <i>false</i>, the text value of the selected XML attribute is
+ * set to <i>off</i>.
+ *
+ * @param expression XPath expression to select XML element.
+ * @param attributeName name to select XML attribute of the selected XML element.
+ * @param value binary choice value for the selected XML attribute from the selected XML element.
+ */
+ public default void setXmlElementAttributeValueOnOff( String expression, String attributeName, boolean value )
+ {
+ final String valueOnOff = value ? "on" : "off";
+ this.setXmlElementAttributeValue( expression, attributeName, valueOnOff );
+ }
+
+ /**
+ * Sets the text value of a XML attribute from a XML element selected by a XPath expression.
+ *
+ * @param expression XPath expression to select XML element.
+ * @param attributeName name to select XML attribute of the selected XML element.
+ * @param value XML attribute value for the selected XML attribute from the selected XML element.
+ */
+ public void setXmlElementAttributeValue( String expression, String attributeName, String value );
+
+ /**
+ * Removes an XML attribute from the current XML root element.
+ *
+ * @param attributeName name of the attribute which should be deleted.
+ */
+ public default void removeXmlElementAttribute( String attributeName )
+ {
+ this.removeXmlElementAttribute( null, attributeName );
+ }
+
+ /**
+ * Removes an XML attribute from a XML element selected by a XPath expression.
+ *
+ * @param expression XPath expression to select XML element.
+ * @param attributeName name of the attribute which should be deleted.
+ */
+ public void removeXmlElementAttribute( String expression, String attributeName );
+
+ /**
+ * Removes all XML attributes from a XML element selected by a XPath expression.
+ *
+ * @param expression XPath expression to select XML element.
+ */
+ public void removeXmlElementAttributes( String expression );
+
+}
diff --git a/src/main/java/org/openslx/libvirt/xml/LibvirtXmlNode.java b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlNode.java
new file mode 100644
index 0000000..a941acb
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlNode.java
@@ -0,0 +1,350 @@
+package org.openslx.libvirt.xml;
+
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * A representation of a XML node as part of a {@link LibvirtXmlDocument}.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class LibvirtXmlNode implements LibvirtXmlCreatable, LibvirtXmlEditable
+{
+ /**
+ * Separation character for internal XPath expressions.
+ */
+ private static final String XPATH_EXPRESSION_SEPARATOR = "/";
+
+ /**
+ * Current XML node selection character for internal XPath expressions.
+ */
+ private static final String XPATH_EXPRESSION_CURRENT_NODE = ".";
+
+ /**
+ * Factory to create XPath objects.
+ */
+ private XPathFactory xPathFactory = null;
+
+ /**
+ * Representation of the XML document, in which this {@link LibvirtXmlNode} is part of.
+ */
+ private Document xmlDocument = null;
+
+ /**
+ * Current XML base node as XML root anchor for relative internal XPath expressions.
+ */
+ private Node xmlBaseNode = null;
+
+ /**
+ * Create and initialize XPath context to define and compile custom XPath expressions.
+ */
+ private void createXPathContext()
+ {
+ this.xPathFactory = XPathFactory.newInstance();
+ }
+
+ /**
+ * Creates empty Libvirt XML node, which does not belong to any XML document and does not specify
+ * any XML base node.
+ *
+ * @implNote Please call {@link LibvirtXmlNode#setXmlDocument(Document)} and
+ * {@link LibvirtXmlNode#setXmlBaseNode(Node)} manually to obtain a functional Libvirt
+ * XML node.
+ */
+ public LibvirtXmlNode()
+ {
+ this( null, null );
+ }
+
+ /**
+ * Creates Libvirt XML node from a existing Libvirt XML node by reference.
+ *
+ * @param xmlNode existing Libvirt XML node.
+ */
+ public LibvirtXmlNode( LibvirtXmlNode xmlNode )
+ {
+ this( xmlNode.getXmlDocument(), xmlNode.getXmlBaseNode() );
+ }
+
+ /**
+ * Creates Libvirt XML node as part of a existing XML document.
+ *
+ * @param xmlDocument existing XML document.
+ *
+ * @implNote Please call {@link LibvirtXmlNode#setXmlBaseNode(Node)} manually to obtain a
+ * functional Libvirt XML node.
+ */
+ public LibvirtXmlNode( Document xmlDocument )
+ {
+ this( xmlDocument, null );
+ }
+
+ /**
+ * Creates Libvirt XML node with a specific XML base node.
+ *
+ * @param xmlBaseNode existing XML base node.
+ *
+ * @implNote Please call {@link LibvirtXmlNode#setXmlDocument(Document)} manually to obtain a
+ * functional Libvirt XML node.
+ */
+ public LibvirtXmlNode( Node xmlBaseNode )
+ {
+ this( null, xmlBaseNode );
+ }
+
+ /**
+ * Creates Libvirt XML node with a specific XML base node as part of a XML document.
+ *
+ * @param xmlDocument existing XML document.
+ * @param xmlBaseNode existing XML base node.
+ */
+ public LibvirtXmlNode( Document xmlDocument, Node xmlBaseNode )
+ {
+ this.createXPathContext();
+
+ this.setXmlDocument( xmlDocument );
+ this.setXmlBaseNode( xmlBaseNode );
+ }
+
+ /**
+ * Returns referenced XML document.
+ *
+ * @return referenced XML document.
+ */
+ public Document getXmlDocument()
+ {
+ return this.xmlDocument;
+ }
+
+ /**
+ * Sets existing XML document for Libvirt XML node.
+ *
+ * @param xmlDocument existing XML document.
+ */
+ public void setXmlDocument( Document xmlDocument )
+ {
+ this.xmlDocument = xmlDocument;
+ }
+
+ /**
+ * Returns current XML base node.
+ *
+ * @return current XML base node as XML root anchor of relative internal XPath expressions.
+ */
+ public Node getXmlBaseNode()
+ {
+ return this.xmlBaseNode;
+ }
+
+ /**
+ * Sets existing XML base node for Libvirt XML node.
+ *
+ * @param xmlBaseNode existing XML base node as XML root anchor for relative internal XPath
+ * expressions.
+ */
+ public void setXmlBaseNode( Node xmlBaseNode )
+ {
+ this.xmlBaseNode = xmlBaseNode;
+ }
+
+ @Override
+ public Node getXmlNode( String expression )
+ {
+ if ( XPATH_EXPRESSION_CURRENT_NODE.equals( expression ) ) {
+ return this.xmlBaseNode;
+ }
+ NodeList nodes = this.getXmlNodes( expression );
+ return nodes.item( 0 );
+ }
+
+ @Override
+ public NodeList getXmlNodes( String expression )
+ {
+ Object nodes = null;
+
+ try {
+ XPath xPath = this.xPathFactory.newXPath();
+ XPathExpression xPathExpr = xPath.compile( expression );
+ nodes = xPathExpr.evaluate( this.xmlBaseNode, XPathConstants.NODESET );
+ } catch ( XPathExpressionException e ) {
+ e.printStackTrace();
+ }
+
+ return NodeList.class.cast( nodes );
+ }
+
+ @Override
+ public Element getXmlElement( String expression )
+ {
+ String completeExpression = null;
+
+ if ( expression == null || expression.isEmpty() ) {
+ completeExpression = XPATH_EXPRESSION_CURRENT_NODE;
+ } else {
+ completeExpression = XPATH_EXPRESSION_CURRENT_NODE + XPATH_EXPRESSION_SEPARATOR + expression;
+ }
+
+ Node node = this.getXmlNode( completeExpression );
+
+ if ( node != null && node.getNodeType() == Node.ELEMENT_NODE ) {
+ return (Element)node;
+ } else {
+ return null;
+ }
+ }
+
+ private Node createXmlElement( String expression )
+ {
+ Node parentNode = this.xmlBaseNode;
+ Node currentNode = parentNode;
+
+ if ( expression != null && !expression.isEmpty() ) {
+ String[] nodeNames = expression.split( XPATH_EXPRESSION_SEPARATOR );
+ String partialExpression = XPATH_EXPRESSION_CURRENT_NODE;
+
+ for ( int i = 0; i < nodeNames.length; i++ ) {
+ partialExpression += XPATH_EXPRESSION_SEPARATOR + nodeNames[i];
+ currentNode = this.getXmlNode( partialExpression );
+
+ if ( currentNode == null ) {
+ currentNode = this.xmlDocument.createElement( nodeNames[i] );
+ parentNode.appendChild( currentNode );
+ }
+
+ parentNode = currentNode;
+ }
+ }
+
+ return currentNode;
+ }
+
+ @Override
+ public void setXmlElement( String expression, Node child )
+ {
+ Node node = this.createXmlElement( expression );
+
+ if ( child != null ) {
+ node.appendChild( child );
+ }
+ }
+
+ @Override
+ public String getXmlElementValue( String expression )
+ {
+ Node node = this.getXmlElement( expression );
+
+ if ( node != null ) {
+ return node.getTextContent();
+ } else {
+ return null;
+ }
+ }
+
+ @Override
+ public void setXmlElementValue( String expression, String value )
+ {
+ Node node = this.createXmlElement( expression );
+ node.setTextContent( value );
+ }
+
+ @Override
+ public void removeXmlElement( String expression )
+ {
+ Node node = this.getXmlElement( expression );
+
+ if ( node != null ) {
+ node.getParentNode().removeChild( node );
+ }
+ }
+
+ @Override
+ public void removeXmlElementChilds( String expression )
+ {
+ Node node = this.getXmlElement( expression );
+
+ if ( node != null ) {
+ final NodeList childs = node.getChildNodes();
+ while ( childs.getLength() > 0 ) {
+ Node child = childs.item( 0 );
+ node.removeChild( child );
+ }
+ }
+ }
+
+ @Override
+ public String getXmlElementAttributeValue( String expression, String attributeName )
+ {
+ Node node = this.getXmlElement( expression );
+
+ if ( node == null ) {
+ return null;
+ } else {
+ Node attribute = node.getAttributes().getNamedItem( attributeName );
+
+ if ( attribute == null ) {
+ return null;
+ } else {
+ return attribute.getNodeValue();
+ }
+ }
+ }
+
+ @Override
+ public void setXmlElementAttributeValue( String expression, String attributeName, String value )
+ {
+ Node node = this.createXmlElement( expression );
+ Node attribute = node.getAttributes().getNamedItem( attributeName );
+
+ if ( attribute == null ) {
+ Element element = Element.class.cast( node );
+ element.setAttribute( attributeName, value );
+ } else {
+ attribute.setNodeValue( value );
+ }
+ }
+
+ @Override
+ public void removeXmlElementAttribute( String expression, String attributeName )
+ {
+ Node node = this.getXmlElement( expression );
+
+ if ( node != null ) {
+ Node attribute = node.getAttributes().getNamedItem( attributeName );
+ node.getAttributes().removeNamedItem( attribute.getNodeName() );
+ }
+ }
+
+ @Override
+ public void removeXmlElementAttributes( String expression )
+ {
+ Node node = this.getXmlElement( expression );
+
+ if ( node != null ) {
+ for ( int i = 0; i < node.getAttributes().getLength(); i++ ) {
+ Node attribute = node.getAttributes().item( 0 );
+ node.getAttributes().removeNamedItem( attribute.getNodeName() );
+ }
+ }
+ }
+
+ @Override
+ public void fromXmlNode( Node xmlNode )
+ {
+ this.setXmlBaseNode( xmlNode );
+ }
+
+ @Override
+ public Node toXmlNode()
+ {
+ return this.getXmlBaseNode();
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/xml/LibvirtXmlResources.java b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlResources.java
new file mode 100644
index 0000000..5aa3a5b
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlResources.java
@@ -0,0 +1,105 @@
+package org.openslx.libvirt.xml;
+
+import java.io.InputStream;
+
+import org.openslx.util.Resources;
+
+/**
+ * Collection of resource utils for a Libvirt XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public final class LibvirtXmlResources
+{
+ /**
+ * File path prefix of the absolute path to the libvirt resource folder in a *.jar file.
+ */
+ private static final String LIBVIRT_PREFIX_PATH = Resources.PATH_SEPARATOR + "libvirt";
+
+ /**
+ * File path prefix of the absolute path to the libosinfo resource folder in a *.jar file.
+ */
+ private static final String LIBOSINFO_PREFIX_PATH = Resources.PATH_SEPARATOR + "libvirt" + Resources.PATH_SEPARATOR
+ + "libosinfo";
+
+ /**
+ * File path prefix of the absolute path to the libvirt XSL resource folder in a *.jar file.
+ */
+ private static final String LIBVIRT_PREFIX_PATH_XSL = LIBVIRT_PREFIX_PATH + Resources.PATH_SEPARATOR + "xsl";
+
+ /**
+ * File path prefix of the absolute path to the libvirt RNG resource folder in a *.jar file.
+ */
+ private static final String LIBVIRT_PREFIX_PATH_RNG = LIBVIRT_PREFIX_PATH + Resources.PATH_SEPARATOR + "rng";
+
+ /**
+ * File path prefix of the absolute path to the libosinfo RNG resource folder in a *.jar file.
+ */
+ private static final String LIBOSINFO_PREFIX_PATH_RNG = LIBOSINFO_PREFIX_PATH + Resources.PATH_SEPARATOR + "rng";
+
+ /**
+ * File path prefix of the absolute path to the libosinfo XML resource folder in a *.jar file.
+ */
+ private static final String LIBOSINFO_PREFIX_PATH_XML = LIBOSINFO_PREFIX_PATH + Resources.PATH_SEPARATOR + "xml";
+
+ /**
+ * Returns a Libvirt resource as stream.
+ *
+ * @param prefix file path of the Libvirt resource in the resources *.jar folder.
+ * @param fileName file name of the Libvirt resource in the resources *.jar folder.
+ * @return Libvirt resource as stream.
+ */
+ private static InputStream getLibvirtResource( String prefix, String fileName )
+ {
+ final String path = prefix + Resources.PATH_SEPARATOR + fileName;
+ return LibvirtXmlResources.class.getResourceAsStream( path );
+ }
+
+ /**
+ * Returns a Libvirt XSL resource as stream.
+ *
+ * @param libvirtXslFileName file name of the XSL resource in the resources *.jar folder.
+ * @return Libvirt XSL resource as stream.
+ */
+ public static InputStream getLibvirtXsl( String libvirtXslFileName )
+ {
+ return LibvirtXmlResources.getLibvirtResource( LibvirtXmlResources.LIBVIRT_PREFIX_PATH_XSL, libvirtXslFileName );
+ }
+
+ /**
+ * Returns a Libvirt RNG schema resource as stream.
+ *
+ * @param libvirtRngFileName file name of the RNG schema resource in the resources *.jar folder.
+ * @return Libvirt RNG schema resource as stream.
+ */
+ public static InputStream getLibvirtRng( String libvirtRngFileName )
+ {
+ return LibvirtXmlResources.getLibvirtResource( LibvirtXmlResources.LIBVIRT_PREFIX_PATH_RNG, libvirtRngFileName );
+ }
+
+ /**
+ * Returns a libosinfo RNG schema resource as stream.
+ *
+ * @param libosInfoRngFileName file name of the RNG schema resource in the resources *.jar
+ * folder.
+ * @return libosinfo RNG schema resource as stream.
+ */
+ public static InputStream getLibOsInfoRng( String libosInfoRngFileName )
+ {
+ return LibvirtXmlResources.getLibvirtResource( LibvirtXmlResources.LIBOSINFO_PREFIX_PATH_RNG,
+ libosInfoRngFileName );
+ }
+
+ /**
+ * Returns a libosinfo XML resource as stream.
+ *
+ * @param libosInfoXmlFileName file name of the XML resource in the resources *.jar folder.
+ * @return libosinfo XML resource as stream.
+ */
+ public static InputStream getLibOsInfoXml( String libosInfoXmlFileName )
+ {
+ return LibvirtXmlResources.getLibvirtResource( LibvirtXmlResources.LIBOSINFO_PREFIX_PATH_XML,
+ libosInfoXmlFileName );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/xml/LibvirtXmlSchemaValidator.java b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlSchemaValidator.java
new file mode 100644
index 0000000..d589d41
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlSchemaValidator.java
@@ -0,0 +1,284 @@
+package org.openslx.libvirt.xml;
+
+import java.io.BufferedInputStream;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.Reader;
+import java.nio.charset.StandardCharsets;
+
+import javax.xml.XMLConstants;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+import javax.xml.validation.Schema;
+import javax.xml.validation.SchemaFactory;
+import javax.xml.validation.Validator;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.ls.LSInput;
+import org.w3c.dom.ls.LSResourceResolver;
+import org.xml.sax.SAXException;
+
+/**
+ * Resource resolver input for RelaxNG schemas.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+class LibvirtXmlSchemaResourceInput implements LSInput
+{
+ /**
+ * Stores the public identification of the schema resource.
+ */
+ private String publicId;
+
+ /**
+ * Stores the system identification of the schema resource.
+ */
+ private String systemId;
+
+ /**
+ * Stream to process and read the schema resource.
+ */
+ private BufferedInputStream inputStream;
+
+ /**
+ * Creates a resource resolver input for a RelaxNG schema.
+ *
+ * @param publicId public identification of the schema resource.
+ * @param sysId system identification of the schema resource.
+ * @param input stream of the schema resource.
+ */
+ public LibvirtXmlSchemaResourceInput( String publicId, String sysId, InputStream input )
+ {
+ this.publicId = publicId;
+ this.systemId = sysId;
+ this.inputStream = new BufferedInputStream( input );
+ }
+
+ @Override
+ public String getBaseURI()
+ {
+ return null;
+ }
+
+ @Override
+ public InputStream getByteStream()
+ {
+ return null;
+ }
+
+ @Override
+ public boolean getCertifiedText()
+ {
+ return false;
+ }
+
+ @Override
+ public Reader getCharacterStream()
+ {
+ return null;
+ }
+
+ @Override
+ public String getEncoding()
+ {
+ return null;
+ }
+
+ @Override
+ public String getPublicId()
+ {
+ return this.publicId;
+ }
+
+ @Override
+ public String getStringData()
+ {
+ String data = null;
+
+ synchronized ( this.inputStream ) {
+ try {
+ int inputLength = this.inputStream.available();
+ byte[] input = new byte[ inputLength ];
+ this.inputStream.read( input );
+ data = new String( input, StandardCharsets.UTF_8 );
+ } catch ( IOException e ) {
+ e.printStackTrace();
+ }
+ }
+
+ return data;
+ }
+
+ @Override
+ public String getSystemId()
+ {
+ return this.systemId;
+ }
+
+ @Override
+ public void setBaseURI( String arg0 )
+ {
+ }
+
+ @Override
+ public void setByteStream( InputStream arg0 )
+ {
+ }
+
+ @Override
+ public void setCertifiedText( boolean arg0 )
+ {
+ }
+
+ @Override
+ public void setCharacterStream( Reader arg0 )
+ {
+ }
+
+ @Override
+ public void setEncoding( String arg0 )
+ {
+ }
+
+ @Override
+ public void setPublicId( String arg0 )
+ {
+ this.publicId = arg0;
+ }
+
+ @Override
+ public void setStringData( String arg0 )
+ {
+ }
+
+ @Override
+ public void setSystemId( String arg0 )
+ {
+ this.systemId = arg0;
+ }
+}
+
+/**
+ * Resource resolver for RelaxNG schemas.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+class LibvirtXmlSchemaResourceResolver implements LSResourceResolver
+{
+ @Override
+ public LSInput resolveResource( String type, String namespaceURI, String publicId, String systemId, String baseURI )
+ {
+ InputStream rngResourceStream = LibvirtXmlResources.getLibvirtRng( systemId );
+ return new LibvirtXmlSchemaResourceInput( publicId, systemId, rngResourceStream );
+ }
+}
+
+/**
+ * Validator for validation of Libvirt XML documents with RelaxNG schemas.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class LibvirtXmlSchemaValidator
+{
+ /**
+ * RelaxNG based validator for validation of Libvirt XML documents.
+ */
+ private Validator rngSchemaValidator;
+
+ /**
+ * Creates a validator for validation of Libvirt XML documents with RelaxNG schemas.
+ *
+ * @param rngSchema RelaxNG schema used for validation with {@link #validate(Document)}.
+ *
+ * @throws SAXException creation of a Libvirt XML validator failed.
+ */
+ public LibvirtXmlSchemaValidator( InputStream rngSchema ) throws SAXException
+ {
+ this.createValidationContext( rngSchema );
+ }
+
+ /**
+ * Creates context for validation of Libvirt XML documents with a RelaxNG schema.
+ *
+ * @param rngSchema RelaxNG schema used for validation with {@link #validate(Document)}.
+ *
+ * @throws SAXException Loading, creation and processing of <code>rngSchema</code> has failed.
+ */
+ private void createValidationContext( InputStream rngSchema ) throws SAXException
+ {
+ // use hack to load specific schema factory implementation for RelaxNG schemas
+ System.setProperty( SchemaFactory.class.getName() + ":" + XMLConstants.RELAXNG_NS_URI,
+ "com.thaiopensource.relaxng.jaxp.XMLSyntaxSchemaFactory" );
+
+ // create schema resource resolver to resolve schema resources during parsing and validation
+ LibvirtXmlSchemaResourceResolver schemaResolver = new LibvirtXmlSchemaResourceResolver();
+
+ // create schema factory to be able to create a RelaxNG schema validator
+ SchemaFactory factory = SchemaFactory.newInstance( XMLConstants.RELAXNG_NS_URI );
+ factory.setResourceResolver( schemaResolver );
+ Schema schema = factory.newSchema( new StreamSource( rngSchema ) );
+
+ // create the RelaxNG schema validator
+ this.rngSchemaValidator = schema.newValidator();
+ this.rngSchemaValidator.setResourceResolver( schemaResolver );
+ }
+
+ /**
+ * Transforms a DOM source to a Stream source.
+ *
+ * @param domSource DOM source of a Libvirt XML document.
+ * @return Stream source of a Libvirt XML document.
+ *
+ * @throws TransformerException Transformation of DOM source to a Stream source has failed.
+ *
+ * @implNote This utility method is necessary in {@link #validate(Document)} to be able to
+ * validate a DOM Libvirt XML document with the schema and validator implementation for
+ * RelaxNG schema files from
+ * <code>com.thaiopensource.relaxng.jaxp.XMLSyntaxSchemaFactory</code>.
+ */
+ private static StreamSource toStreamSource( DOMSource domSource ) throws TransformerException
+ {
+ ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+ StreamResult result = new StreamResult( outputStream );
+
+ // create identity transformer
+ Transformer transformer = TransformerFactory.newInstance().newTransformer();
+ transformer.transform( domSource, result );
+
+ ByteArrayInputStream inputStream = new ByteArrayInputStream( outputStream.toByteArray() );
+ return new StreamSource( inputStream );
+ }
+
+ /**
+ * Validates a given (and parsed) DOM Libvirt XML document.
+ *
+ * Validation takes place if the specified <code>xmlDocument</code> is non-null, otherwise the
+ * validation succeeds immediately. If the validation of the <code>xmlDocument</code> fails, a
+ * validation exception is thrown.
+ *
+ * @param xmlDocument Libvirt XML document.
+ *
+ * @throws LibvirtXmlValidationException Validation of Libvirt XML document failed.
+ */
+ public void validate( Document xmlDocument ) throws LibvirtXmlValidationException
+ {
+ if ( xmlDocument != null ) {
+ try {
+ DOMSource domSource = new DOMSource( xmlDocument );
+ StreamSource source = LibvirtXmlSchemaValidator.toStreamSource( domSource );
+ this.rngSchemaValidator.validate( source );
+ } catch ( SAXException | TransformerException | IOException e ) {
+ throw new LibvirtXmlValidationException( e.getLocalizedMessage() );
+ }
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/xml/LibvirtXmlSerializable.java b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlSerializable.java
new file mode 100644
index 0000000..4cd0a32
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlSerializable.java
@@ -0,0 +1,69 @@
+package org.openslx.libvirt.xml;
+
+import java.io.File;
+import java.io.InputStream;
+
+import org.xml.sax.InputSource;
+
+/**
+ * Serializability of a Libvirt XML document from/to a XML file.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public abstract interface LibvirtXmlSerializable
+{
+ /**
+ * Serialize Libvirt XML document from {@link String}.
+ *
+ * @param xml {@link String} containing XML content.
+ *
+ * @throws LibvirtXmlSerializationException serialization of Libvirt XML document failed.
+ */
+ public void fromXml( String xml ) throws LibvirtXmlSerializationException;
+
+ /**
+ * Serialize Libvirt XML document from {@link File}.
+ *
+ * @param xml {@link File} containing XML content.
+ *
+ * @throws LibvirtXmlSerializationException serialization of Libvirt XML document failed.
+ */
+ public void fromXml( File xml ) throws LibvirtXmlSerializationException;
+
+ /**
+ * Serialize Libvirt XML document from {@link InputStream}.
+ *
+ * @param xml {@link InputStream} providing XML content.
+ *
+ * @throws LibvirtXmlSerializationException serialization of Libvirt XML document failed.
+ */
+ void fromXml( InputStream xml ) throws LibvirtXmlSerializationException;
+
+ /**
+ * Serialize Libvirt XML document from {@link InputSource}.
+ *
+ * @param xml {@link InputSource} providing XML content.
+ *
+ * @throws LibvirtXmlSerializationException serialization of Libvirt XML document failed.
+ */
+ public void fromXml( InputSource xml ) throws LibvirtXmlSerializationException;
+
+ /**
+ * Serialize Libvirt XML document to {@link String}.
+ *
+ * @return XML {@link String} containing Libvirt XML document content.
+ *
+ * @throws LibvirtXmlSerializationException serialization of Libvirt XML document failed.
+ */
+ public String toXml() throws LibvirtXmlSerializationException;
+
+ /**
+ * Serialize Libvirt XML document to {@link File}.
+ *
+ * @param xml XML {@link File} containing Libvirt XML document content.
+ *
+ * @throws LibvirtXmlSerializationException serialization of Libvirt XML document failed.
+ */
+ public void toXml( File xml ) throws LibvirtXmlSerializationException;
+}
diff --git a/src/main/java/org/openslx/libvirt/xml/LibvirtXmlSerializationException.java b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlSerializationException.java
new file mode 100644
index 0000000..d522107
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlSerializationException.java
@@ -0,0 +1,25 @@
+package org.openslx.libvirt.xml;
+
+/**
+ * An exception of an serialization error during Libvirt XML serialization.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class LibvirtXmlSerializationException extends Exception
+{
+ /**
+ * Version number for serialization.
+ */
+ private static final long serialVersionUID = 7995955592221349949L;
+
+ /**
+ * Creates a XML serialization exception including an error message.
+ *
+ * @param errorMsg message to describe a specific XML serialization error.
+ */
+ public LibvirtXmlSerializationException( String errorMsg )
+ {
+ super( errorMsg );
+ }
+}
diff --git a/src/main/java/org/openslx/libvirt/xml/LibvirtXmlValidatable.java b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlValidatable.java
new file mode 100644
index 0000000..8574cc4
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlValidatable.java
@@ -0,0 +1,18 @@
+package org.openslx.libvirt.xml;
+
+/**
+ * Validatability of Libvirt XML document.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public abstract interface LibvirtXmlValidatable
+{
+ /**
+ * Validates the XML document's content and report error if document is not a valid Libvirt XML
+ * document.
+ *
+ * @throws LibvirtXmlValidationException XML content is not a valid Libvirt XML.
+ */
+ public void validateXml() throws LibvirtXmlValidationException;
+}
diff --git a/src/main/java/org/openslx/libvirt/xml/LibvirtXmlValidationException.java b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlValidationException.java
new file mode 100644
index 0000000..24e9db7
--- /dev/null
+++ b/src/main/java/org/openslx/libvirt/xml/LibvirtXmlValidationException.java
@@ -0,0 +1,25 @@
+package org.openslx.libvirt.xml;
+
+/**
+ * An exception of an unsuccessful Libvirt XML validation.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class LibvirtXmlValidationException extends Exception
+{
+ /**
+ * Version number for serialization.
+ */
+ private static final long serialVersionUID = 2299967599483742777L;
+
+ /**
+ * Creates a validation exception including an error message.
+ *
+ * @param errorMsg message to describe a specific Libvirt XML error.
+ */
+ public LibvirtXmlValidationException( String errorMsg )
+ {
+ super( errorMsg );
+ }
+}
diff --git a/src/main/java/org/openslx/sat/thrift/version/Feature.java b/src/main/java/org/openslx/sat/thrift/version/Feature.java
index b81d65f..4507505 100644
--- a/src/main/java/org/openslx/sat/thrift/version/Feature.java
+++ b/src/main/java/org/openslx/sat/thrift/version/Feature.java
@@ -35,5 +35,9 @@ public enum Feature {
* Allow editing of USB speed
*/
CONFIGURE_USB,
-
+
+ /**
+ * Allow uploading of Docker Images
+ */
+ DOCKER_CONTAINER,
}
diff --git a/src/main/java/org/openslx/thrifthelper/ImagePublishDataEx.java b/src/main/java/org/openslx/thrifthelper/ImagePublishDataEx.java
index 5cf0a10..5c5ef01 100644
--- a/src/main/java/org/openslx/thrifthelper/ImagePublishDataEx.java
+++ b/src/main/java/org/openslx/thrifthelper/ImagePublishDataEx.java
@@ -2,9 +2,13 @@ package org.openslx.thrifthelper;
import org.openslx.bwlp.thrift.iface.ImagePublishData;
-@SuppressWarnings( "serial" )
public class ImagePublishDataEx extends ImagePublishData
{
+ /**
+ * Version for serialization.
+ */
+ private static final long serialVersionUID = 314945044011262005L;
+
public String exImagePath;
public boolean exIsValid;
}
diff --git a/src/main/java/org/openslx/thrifthelper/TBinaryProtocolSafe.java b/src/main/java/org/openslx/thrifthelper/TBinaryProtocolSafe.java
index 86a2306..ca2bb2c 100644
--- a/src/main/java/org/openslx/thrifthelper/TBinaryProtocolSafe.java
+++ b/src/main/java/org/openslx/thrifthelper/TBinaryProtocolSafe.java
@@ -1,15 +1,26 @@
package org.openslx.thrifthelper;
-import java.io.UnsupportedEncodingException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.SocketAddress;
+import java.net.SocketException;
import java.nio.ByteBuffer;
+import java.nio.charset.StandardCharsets;
+import javax.net.ssl.SSLException;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.apache.thrift.TException;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TMessage;
import org.apache.thrift.protocol.TProtocol;
import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.protocol.TProtocolFactory;
+import org.apache.thrift.transport.TSocket;
import org.apache.thrift.transport.TTransport;
+import org.apache.thrift.transport.TTransportException;
+import org.apache.thrift.transport.layered.TLayeredTransport;
/**
* Binary protocol implementation for thrift.
@@ -18,13 +29,20 @@ import org.apache.thrift.transport.TTransport;
*/
public class TBinaryProtocolSafe extends TBinaryProtocol
{
+
+ private final static Logger LOGGER = LogManager.getLogger( ThriftHandler.class );
+
/**
* Factory
*/
- @SuppressWarnings( "serial" )
public static class Factory implements TProtocolFactory
{
+ /**
+ * Version for serialization.
+ */
+ private static final long serialVersionUID = 6896537370338823740L;
+
protected boolean strictRead_ = false;
protected boolean strictWrite_ = true;
@@ -57,24 +75,53 @@ public class TBinaryProtocolSafe extends TBinaryProtocol
public TBinaryProtocolSafe(TTransport trans, boolean strictRead, boolean strictWrite)
{
- super( trans );
- strictRead_ = strictRead;
- strictWrite_ = strictWrite;
+ super( trans, maxLen, maxLen, strictRead, strictWrite );
}
- /**
+ /*
* Reading methods.
*/
+ @Override
public TMessage readMessageBegin() throws TException
{
- int size = readI32();
+ int size;
+ try {
+ size = readI32();
+ } catch ( TTransportException e ) {
+ // Do this to suppress certain SSL handshake errors that result from port scanning and service probing
+ if ( e.getCause() instanceof SSLException ) {
+ String m = e.getCause().getMessage();
+ // We still want SSL errors that help diagnosing more specific SSL errors that relate to actual
+ // SSL handshake attempts, like incompatible TLS versions or ciphers.
+ if ( !m.contains( "Remote host terminated the handshake" )
+ && !m.contains( "Unsupported or unrecognized SSL message" ) ) {
+ LOGGER.warn( getIp() + m );
+ }
+ // Fake an END_OF_FILE exception, as the logException() method in the server class will
+ // ignore there. Let's hope it will stay ignored in the future.
+ throw new TTransportException( TTransportException.END_OF_FILE );
+ } else if ( e.getCause() instanceof SocketException
+ && ( e.getCause().getMessage().contains( " timed out" )
+ || e.getCause().getMessage().contains( "Connection reset" )
+ || e.getCause().getMessage().contains( "Connection or inbound" ) ) ) {
+ // Faaaake
+ throw new TTransportException( TTransportException.END_OF_FILE );
+ } else if ( e.getMessage().contains( "larger than max length" ) || e.getMessage().contains( "Read a negative frame size" ) ) {
+ // Also fake, since this one prints a whole stack trace compared to the other
+ // message by AbstractNonblockingServer
+ LOGGER.debug( e.getMessage(), e );
+ throw new TTransportException( TTransportException.END_OF_FILE );
+ }
+ throw e;
+ }
if ( size > maxLen )
- throw new TProtocolException( TProtocolException.SIZE_LIMIT, "Payload too big." );
+ throw new TProtocolException( TProtocolException.SIZE_LIMIT, getIp() + "Payload too big." );
if ( size < 0 ) {
int version = size & VERSION_MASK;
if ( version != VERSION_1 ) {
- throw new TProtocolException( TProtocolException.BAD_VERSION, "Bad version in readMessageBegin" );
+ LOGGER.warn( getIp() + "Bad version (" + version + ") in readMessageBegin" );
+ throw new TTransportException( TTransportException.END_OF_FILE );
}
return new TMessage( readString(), (byte) ( size & 0x000000ff ), readI32() );
} else {
@@ -85,24 +132,43 @@ public class TBinaryProtocolSafe extends TBinaryProtocol
}
}
+ private String getIp()
+ {
+ TTransport t = trans_;
+ while ( t instanceof TLayeredTransport ) {
+ t = ( (TLayeredTransport)t ).getInnerTransport();
+ }
+ InetAddress ia = null;
+ if ( t instanceof TSocket ) {
+ SocketAddress sa = ( (TSocket)t ).getSocket().getRemoteSocketAddress();
+ if ( sa != null && ( sa instanceof InetSocketAddress ) )
+ ia = ( (InetSocketAddress)sa ).getAddress();
+ if ( ia == null )
+ ia = ( (TSocket)t ).getSocket().getInetAddress();
+ } else {
+ LOGGER.debug( "getIp(" + t.getClass().getSimpleName() + ")" );
+ }
+ if ( ia == null )
+ return "";
+ return ia.getHostAddress() + ": ";
+ }
+
+ @Override
public String readString() throws TException
{
int size = readI32();
if ( size > maxLen )
throw new TProtocolException( TProtocolException.SIZE_LIMIT, "Payload too big." );
if ( trans_.getBytesRemainingInBuffer() >= size ) {
- try {
- String s = new String( trans_.getBuffer(), trans_.getBufferPosition(), size, "UTF-8" );
- trans_.consumeBuffer( size );
- return s;
- } catch ( UnsupportedEncodingException e ) {
- throw new TException( "JVM DOES NOT SUPPORT UTF-8" );
- }
+ String s = new String( trans_.getBuffer(), trans_.getBufferPosition(), size, StandardCharsets.UTF_8 );
+ trans_.consumeBuffer( size );
+ return s;
}
return readStringBody( size );
}
+ @Override
public ByteBuffer readBinary() throws TException
{
int size = readI32();
@@ -120,4 +186,3 @@ public class TBinaryProtocolSafe extends TBinaryProtocol
}
}
-
diff --git a/src/main/java/org/openslx/thrifthelper/TConst.java b/src/main/java/org/openslx/thrifthelper/TConst.java
index 2ff902e..b7debba 100644
--- a/src/main/java/org/openslx/thrifthelper/TConst.java
+++ b/src/main/java/org/openslx/thrifthelper/TConst.java
@@ -9,5 +9,6 @@ public class TConst
public static final String VIRT_VMWARE = "vmware";
public static final String VIRT_VIRTUALBOX = "virtualbox";
public static final String VIRT_QEMU = "qemukvm";
+ public static final String VIRT_DOCKER = "docker";
}
diff --git a/src/main/java/org/openslx/thrifthelper/ThriftHandler.java b/src/main/java/org/openslx/thrifthelper/ThriftHandler.java
index 05563d0..37c2897 100644
--- a/src/main/java/org/openslx/thrifthelper/ThriftHandler.java
+++ b/src/main/java/org/openslx/thrifthelper/ThriftHandler.java
@@ -7,51 +7,93 @@ import java.util.ArrayDeque;
import java.util.Collections;
import java.util.Deque;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.Set;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.apache.thrift.TException;
import org.apache.thrift.TServiceClient;
+import org.apache.thrift.protocol.TProtocolException;
import org.apache.thrift.transport.TTransportException;
import org.openslx.thrifthelper.ThriftManager.ErrorCallback;
+import org.openslx.util.QuickTimer;
+import org.openslx.util.QuickTimer.Task;
class ThriftHandler<T extends TServiceClient> implements InvocationHandler
{
- private final static Logger LOGGER = Logger.getLogger( ThriftHandler.class );
+ private final static Logger LOGGER = LogManager.getLogger( ThriftHandler.class );
+
+ /**
+ * How long a client/connection should be allowed to be idle before we get rid of it and open a fresh one
+ */
+ private final static long MAX_IDLE_MS = 110_000;
protected interface WantClientCallback<T>
{
public T getNewClient();
}
- private final Deque<T> pool = new ArrayDeque<>();
+ /** Pool of (potentially) good connections, waiting for reuse */
+ private final Deque<TWrap<T>> pool = new ArrayDeque<>();
+ /** Old connections to be released by cleanup task */
+ private Deque<TWrap<T>> trash = new ArrayDeque<>();
- private final WantClientCallback<? extends T> callback;
+ private final WantClientCallback<? extends T> clientFactory;
private final ErrorCallback errorCallback;
private final Set<String> thriftMethods;
- public ThriftHandler( final Class<? extends T> clazz, WantClientCallback<? extends T> cb, ErrorCallback errCb )
+ public ThriftHandler( final Class<? extends T> clazz, WantClientCallback<? extends T> clientFactory, ErrorCallback errCb )
{
- errorCallback = errCb;
- callback = cb;
+ this.errorCallback = errCb;
+ this.clientFactory = clientFactory;
Set<String> tmpset = new HashSet<String>();
Method[] methods = clazz.getMethods();
+ // Iterate over all methods of this class
for ( int i = 0; i < methods.length; i++ ) {
boolean thrift = false;
+ // If a method throws some form of TException, consider it a potential method from the thrift interface
Class<?>[] type = methods[i].getExceptionTypes();
for ( int e = 0; e < type.length; e++ ) {
- if ( TException.class.isAssignableFrom( type[e] ) )
+ if ( TException.class.isAssignableFrom( type[e] ) ) {
thrift = true;
+ break;
+ }
}
String name = methods[i].getName();
if ( thrift && !name.startsWith( "send_" ) && !name.startsWith( "recv_" ) ) {
+ // Exclude the send_ and recv_ helpers
tmpset.add( name );
}
}
thriftMethods = Collections.unmodifiableSet( tmpset );
+ // Periodically scan for old connections, in case the application idles for extended periods of time...
+ QuickTimer.scheduleAtFixedDelay( new Task() {
+ @Override
+ public void fire()
+ {
+ Deque<TWrap<T>> newTrash = new ArrayDeque<>();
+ Deque<TWrap<T>> list;
+ long now = System.currentTimeMillis();
+ synchronized ( pool ) {
+ list = trash;
+ trash = newTrash;
+ for ( Iterator<TWrap<T>> it = pool.iterator(); it.hasNext(); ) {
+ TWrap<T> client = it.next();
+ if ( client.deadline < now ) {
+ list.add( client );
+ it.remove();
+ }
+ }
+ }
+ for ( TWrap<T> client : list ) {
+ freeClient( client );
+ }
+ }
+ }, MAX_IDLE_MS * 5, MAX_IDLE_MS * 5 );
}
@Override
@@ -63,31 +105,33 @@ class ThriftHandler<T extends TServiceClient> implements InvocationHandler
throw new IllegalAccessException( "Cannot call this method on a proxied thrift client" );
}
- T client = getClient();
+ TWrap<T> clientWrap = getClient();
try {
Throwable cause = null;
- for ( int i = 1;; i++ ) {
- if ( client != null ) {
- try {
- return method.invoke( client, args );
- } catch ( InvocationTargetException e ) {
- cause = e.getCause();
- if ( cause != null && ! ( cause instanceof TException ) ) {
- throw cause;
- }
- freeClient( client );
- client = null;
- if ( cause == null ) {
- cause = e;
- }
+ for ( int i = 1; clientWrap != null; i++ ) {
+ try {
+ return method.invoke( clientWrap.client, args );
+ } catch ( InvocationTargetException e ) {
+ cause = e.getCause(); // Get original exception
+ if ( cause != null && ! ( cause instanceof TTransportException )
+ && ! ( cause instanceof TProtocolException ) ) {
+ // If it's not an exception potentially hinting at dead connection, just pass it on
+ throw cause;
+ }
+ // Get rid of broken connection
+ freeClient( clientWrap );
+ clientWrap = null;
+ if ( cause == null ) {
+ cause = e;
}
}
// Call the error callback. As long as true is returned, keep retrying
if ( !errorCallback.thriftError( i, method.getName(), cause ) ) {
break;
}
- if ( client == null ) {
- client = getClient();
+ // Apparently we should retry, get another client
+ if ( clientWrap == null ) {
+ clientWrap = getClient();
cause = null;
}
}
@@ -97,44 +141,69 @@ class ThriftHandler<T extends TServiceClient> implements InvocationHandler
throw cause;
throw new TTransportException( "Could not connect" );
} finally {
- returnClient( client );
+ returnClient( clientWrap );
}
}
- private void freeClient( T client )
+ private void freeClient( TWrap<T> client )
{
try {
- client.getInputProtocol().getTransport().close();
+ client.client.getInputProtocol().getTransport().close();
} catch ( Exception e ) {
}
try {
- client.getOutputProtocol().getTransport().close();
+ client.client.getOutputProtocol().getTransport().close();
} catch ( Exception e ) {
}
}
- private T getClient()
+ /**
+ * Get an available client connection. Prefer connection from pool,
+ * honoring the max idle time. If none are available, create a fresh
+ * client connection.
+ */
+ private TWrap<T> getClient()
{
- T client;
+ long now = System.currentTimeMillis();
synchronized ( pool ) {
- client = pool.poll();
- if ( client != null ) {
- return client;
+ TWrap<T> client;
+ while ( ( client = pool.poll() ) != null ) {
+ if ( client.deadline >= now )
+ return client; // Still fresh
+ trash.add( client );
}
}
- // Pool is closed, create new client
+ // No usable existing connection, create new client
LOGGER.debug( "Creating new thrift client" );
- return callback.getNewClient();
+ T client = clientFactory.getNewClient();
+ if ( client == null )
+ return null;
+ return new TWrap<T>( client );
}
- private void returnClient( T client )
+ /**
+ * Return a client connection to the pool, updating its last
+ * use timestamp for proper idle timeout handling.
+ */
+ private void returnClient( TWrap<T> client )
{
if ( client == null )
return;
+ client.deadline = System.currentTimeMillis() + MAX_IDLE_MS;
synchronized ( pool ) {
pool.push( client );
}
}
+
+ private static class TWrap<T>
+ {
+ private final T client;
+ private long deadline;
+ public TWrap(T client)
+ {
+ this.client = client;
+ }
+ }
}
diff --git a/src/main/java/org/openslx/thrifthelper/ThriftManager.java b/src/main/java/org/openslx/thrifthelper/ThriftManager.java
index 2fe706d..07256b2 100644
--- a/src/main/java/org/openslx/thrifthelper/ThriftManager.java
+++ b/src/main/java/org/openslx/thrifthelper/ThriftManager.java
@@ -8,13 +8,14 @@ import java.net.Socket;
import javax.net.SocketFactory;
import javax.net.ssl.SSLContext;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.apache.thrift.TServiceClient;
import org.apache.thrift.protocol.TBinaryProtocol;
import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.transport.TFramedTransport;
import org.apache.thrift.transport.TSocket;
import org.apache.thrift.transport.TTransportException;
+import org.apache.thrift.transport.layered.TFramedTransport;
import org.openslx.bwlp.thrift.iface.MasterServer;
import org.openslx.bwlp.thrift.iface.SatelliteServer;
import org.openslx.thrifthelper.ThriftHandler.WantClientCallback;
@@ -23,7 +24,7 @@ import org.openslx.util.Util;
public class ThriftManager<T>
{
- private final static Logger LOGGER = Logger.getLogger( ThriftManager.class );
+ private final static Logger LOGGER = LogManager.getLogger( ThriftManager.class );
public interface ErrorCallback
{
@@ -40,14 +41,13 @@ public class ThriftManager<T>
private final T client;
- @SuppressWarnings( "unchecked" )
private ThriftManager( Class<T> ifClazz, Class<? extends TServiceClient> clientClazz,
WantClientCallback<? extends TServiceClient> internalCallback, ErrorCallback errorCb )
{
- this.client = (T)Proxy.newProxyInstance(
+ this.client = ifClazz.cast( Proxy.newProxyInstance(
ifClazz.getClassLoader(),
new Class[] { ifClazz }, new ThriftHandler<TServiceClient>(
- clientClazz, internalCallback, errorCb ) );
+ clientClazz, internalCallback, errorCb ) ) );
}
private static ThriftManager<MasterServer.Iface> masterManager = null;
@@ -55,6 +55,7 @@ public class ThriftManager<T>
private static ErrorCallback satErrorCallback = null;
private static ErrorCallback masterErrorCallback = null;
+ private static SSLContext satSslContext = null;
/**
* Sets the address of the master server
@@ -106,6 +107,7 @@ public class ThriftManager<T>
LOGGER.error( "Given address is empty." );
return false;
}
+ satSslContext = ctx;
// finally set it
satelliteManager = new ThriftManager<SatelliteServer.Iface>( SatelliteServer.Iface.class, SatelliteServer.Client.class,
new WantClientCallback<SatelliteServer.Client>() {
@@ -123,6 +125,14 @@ public class ThriftManager<T>
} );
return true;
}
+
+ /**
+ * Get the SSL context used for talking to the satellite server (if any)
+ */
+ public static SSLContext getSatelliteSslContext()
+ {
+ return satSslContext;
+ }
/**
* Returns the singleton client of the thrift connection to the satellite
diff --git a/src/main/java/org/openslx/util/AppUtil.java b/src/main/java/org/openslx/util/AppUtil.java
new file mode 100644
index 0000000..340dc21
--- /dev/null
+++ b/src/main/java/org/openslx/util/AppUtil.java
@@ -0,0 +1,166 @@
+package org.openslx.util;
+
+import java.io.InputStream;
+import java.time.Instant;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
+import java.util.jar.Attributes;
+import java.util.jar.JarInputStream;
+import java.util.jar.Manifest;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+public class AppUtil
+{
+
+ private final static Logger LOGGER = LogManager.getLogger( AppUtil.class );
+
+ private static final int PROPERTY_MAX_WIDTH = 30;
+
+ private static final String MANIFEST_REVISION_VERSION = "Revision-Version";
+ private static final String MANIFEST_REVISION_BRANCH = "Revision-Branch";
+ private static final String MANIFEST_BUILD_TIMESTAMP = "Build-Timestamp";
+ private static final String MANIFEST_BUILD_JDK = "Build-Jdk";
+
+ private static final String PROPERTY_APP_NAME = "app.name";
+ private static final String PROPERTY_APP_VERSION = "app.version";
+ private static final String PROPERTY_APP_REVISION_VERSION = "app.revision.version";
+ private static final String PROPERTY_APP_REVISION_BRANCH = "app.revision.branch";
+ private static final String PROPERTY_APP_BUILD_DATE = "app.build.date";
+ private static final String PROPERTY_APP_BUILD_JDK = "app.build.jdk";
+
+ private static final String PROPERTY_JAVA_OS_NAME = "os.name";
+ private static final String PROPERTY_JAVA_OS_ARCH = "os.arch";
+
+ private static final String PROPERTY_JAVA_SPEC_VENDOR = "java.specification.vendor";
+ private static final String PROPERTY_JAVA_SPEC_NAME = "java.specification.name";
+ private static final String PROPERTY_JAVA_SPEC_VERSION = "java.specification.version";
+
+ private static final String PROPERTY_JAVA_VERSION = "java.version";
+ private static final String PROPERTY_JAVA_VERSION_VM = "java.vm.version";
+ private static final String PROPERTY_JAVA_VERSION_RUNTIME = "java.runtime.version";
+
+ private static final String PROPERTY_JAVA_MEMORY_LIMIT = "java.runtime.memory";
+
+ private static final String PROPERTY_JAVA_BITNESS = "sun.arch.data.model";
+
+ private static Attributes manifestAttributes = null;
+
+ private static String getManifestValue( final String entry )
+ {
+ if ( manifestAttributes == null ) {
+ InputStream jarFileStream = null;
+ JarInputStream jarStream = null;
+ // Do this so in case of failure, we won't open the jar again and again and spam exceptions to the log
+ manifestAttributes = new Attributes();
+
+ try {
+ jarFileStream = AppUtil.class.getProtectionDomain().getCodeSource().getLocation().openStream();
+ jarStream = new JarInputStream( jarFileStream );
+ final Manifest mf = jarStream.getManifest();
+ manifestAttributes = mf.getMainAttributes();
+ } catch ( Exception e ) {
+ LOGGER.warn( "Cannot read jar/manifest attributes", e );
+ } finally {
+ Util.safeClose( jarStream, jarFileStream );
+ }
+ }
+
+ return manifestAttributes.getValue( entry );
+ }
+
+ public static String getRevisionVersion()
+ {
+ return AppUtil.getManifestValue( AppUtil.MANIFEST_REVISION_VERSION );
+ }
+
+ public static String getRevisionBranch()
+ {
+ return AppUtil.getManifestValue( AppUtil.MANIFEST_REVISION_BRANCH );
+ }
+
+ public static long getBuildTimestamp()
+ {
+ final String timestampRaw = AppUtil.getManifestValue( AppUtil.MANIFEST_BUILD_TIMESTAMP );
+ long timestamp = 0;
+
+ try {
+ timestamp = Long.valueOf( timestampRaw );
+ timestamp /= 1000L;
+ } catch ( NumberFormatException e ) {
+ timestamp = 0;
+ }
+
+ return timestamp;
+ }
+
+ public static String getBuildTime()
+ {
+ final long timestamp = AppUtil.getBuildTimestamp();
+ final String buildTime;
+
+ if ( timestamp > 0 ) {
+ final Instant time = Instant.ofEpochSecond( timestamp );
+ buildTime = DateTimeFormatter.RFC_1123_DATE_TIME.withZone( ZoneId.systemDefault() ).format( time );
+ } else {
+ buildTime = null;
+ }
+
+ return buildTime;
+ }
+
+ public static String getBuildJdk()
+ {
+ return AppUtil.getManifestValue( AppUtil.MANIFEST_BUILD_JDK );
+ }
+
+ private static String formatProperty( final String property )
+ {
+ return String.format( "%-" + AppUtil.PROPERTY_MAX_WIDTH + "s", property );
+ }
+
+ public static void logProperty( final Logger logger, final String propertyName, final String propertyValue )
+ {
+ logger.info( AppUtil.formatProperty( propertyName ) + propertyValue );
+ }
+
+ public static void logJavaProperty( Logger logger, final String javaProperty )
+ {
+ AppUtil.logProperty( logger, javaProperty, System.getProperty( javaProperty ) );
+ }
+
+ public static void logHeader( final Logger logger, final String appName, final String appVersion )
+ {
+ // Format maximum VM memory
+ final String mem;
+ long limit = Runtime.getRuntime().maxMemory() / ( 1024l * 1024 );
+ if ( limit > 99999999 ) {
+ mem = "-";
+ } else if ( limit >= 2048 ) {
+ mem = String.format( "%.1fG", limit / 1024f );
+ } else {
+ mem = limit + "M";
+ }
+ logger.info( "-------------------------------------------------------------------------------" );
+ logger.info( appName );
+ logger.info( "-------------------------------------------------------------------------------" );
+ logProperty( logger, AppUtil.PROPERTY_APP_NAME, appName );
+ logProperty( logger, AppUtil.PROPERTY_APP_VERSION, appVersion );
+ logProperty( logger, AppUtil.PROPERTY_APP_REVISION_VERSION, AppUtil.getRevisionVersion() );
+ logProperty( logger, AppUtil.PROPERTY_APP_REVISION_BRANCH, AppUtil.getRevisionBranch() );
+ logProperty( logger, AppUtil.PROPERTY_APP_BUILD_DATE, AppUtil.getBuildTime() );
+ logProperty( logger, AppUtil.PROPERTY_APP_BUILD_JDK, AppUtil.getBuildJdk() );
+ logJavaProperty( logger, AppUtil.PROPERTY_JAVA_OS_NAME );
+ logJavaProperty( logger, AppUtil.PROPERTY_JAVA_SPEC_VENDOR );
+ logJavaProperty( logger, AppUtil.PROPERTY_JAVA_SPEC_NAME );
+ logJavaProperty( logger, AppUtil.PROPERTY_JAVA_SPEC_VERSION );
+ logJavaProperty( logger, AppUtil.PROPERTY_JAVA_VERSION );
+ logJavaProperty( logger, AppUtil.PROPERTY_JAVA_VERSION_VM );
+ logJavaProperty( logger, AppUtil.PROPERTY_JAVA_VERSION_RUNTIME );
+ logJavaProperty( logger, AppUtil.PROPERTY_JAVA_BITNESS );
+ logJavaProperty( logger, AppUtil.PROPERTY_JAVA_OS_ARCH );
+ logProperty( logger, AppUtil.PROPERTY_JAVA_MEMORY_LIMIT, mem );
+ logger.info( "-------------------------------------------------------------------------------" );
+ }
+}
diff --git a/src/main/java/org/openslx/util/FsUtil.java b/src/main/java/org/openslx/util/FsUtil.java
index 76571ef..3f9731a 100644
--- a/src/main/java/org/openslx/util/FsUtil.java
+++ b/src/main/java/org/openslx/util/FsUtil.java
@@ -2,12 +2,13 @@ package org.openslx.util;
import java.io.File;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
public class FsUtil
{
- private static final Logger LOGGER = Logger.getLogger( FsUtil.class );
+ private static final Logger LOGGER = LogManager.getLogger( FsUtil.class );
public static String getRelativePath( File absolutePath, File parentDir )
{
diff --git a/src/main/java/org/openslx/util/GenericDataCache.java b/src/main/java/org/openslx/util/GenericDataCache.java
index 5ae73fb..a7116b7 100644
--- a/src/main/java/org/openslx/util/GenericDataCache.java
+++ b/src/main/java/org/openslx/util/GenericDataCache.java
@@ -2,12 +2,13 @@ package org.openslx.util;
import java.util.concurrent.atomic.AtomicReference;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
public abstract class GenericDataCache<T>
{
- private static final Logger LOGGER = Logger.getLogger( GenericDataCache.class );
+ private static final Logger LOGGER = LogManager.getLogger( GenericDataCache.class );
/**
* How long the cached data is valid after fetching
diff --git a/src/main/java/org/openslx/util/Json.java b/src/main/java/org/openslx/util/Json.java
index f92bb58..5e5fbcb 100644
--- a/src/main/java/org/openslx/util/Json.java
+++ b/src/main/java/org/openslx/util/Json.java
@@ -8,7 +8,8 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.apache.thrift.TBase;
import com.google.gson.Gson;
@@ -25,7 +26,7 @@ import com.google.gson.JsonSyntaxException;
public class Json {
- private static final Logger LOGGER = Logger.getLogger(Json.class);
+ private static final Logger LOGGER = LogManager.getLogger(Json.class);
/**
* Global static instance. The Gson object is thread-safe.
@@ -137,7 +138,7 @@ public class Json {
if (element == null || element.isJsonNull())
continue;
try {
- field.setter.invoke(inst, context.deserialize(element, field.field.getType()));
+ field.setter.invoke(inst, new Object[] { context.deserialize(element, field.field.getType()) });
} catch (Exception e) {
LOGGER.warn("Could not call " + field.setter.getName() + " on " + clazz.getSimpleName(), e);
}
diff --git a/src/main/java/org/openslx/util/LevenshteinDistance.java b/src/main/java/org/openslx/util/LevenshteinDistance.java
new file mode 100644
index 0000000..0f33167
--- /dev/null
+++ b/src/main/java/org/openslx/util/LevenshteinDistance.java
@@ -0,0 +1,85 @@
+package org.openslx.util;
+
+public final class LevenshteinDistance
+{
+ private final int insertionCost;
+ private final int deletionCost;
+ private final int substitutionCost;
+
+ public LevenshteinDistance()
+ {
+ this( 1, 1, 1 );
+ }
+
+ public LevenshteinDistance( int insertionCost, int deletionCost, int substitutionCost )
+ {
+ this.validateCostArgument( insertionCost >= 0, "Insertion cost must be greater than or equal to 0" );
+ this.validateCostArgument( deletionCost >= 0, "Deletion cost must be greater than or equal to 0" );
+ this.validateCostArgument( substitutionCost >= 0, "Substitution cost must be greater than or equal to 0" );
+
+ this.insertionCost = insertionCost;
+ this.deletionCost = deletionCost;
+ this.substitutionCost = substitutionCost;
+ }
+
+ private void validateCostArgument( boolean condition, String errorMsg )
+ {
+ if ( !condition ) {
+ throw new IllegalArgumentException( errorMsg );
+ }
+ }
+
+ public int calculateDistance( CharSequence source, CharSequence target )
+ {
+ if ( source == null || target == null ) {
+ throw new IllegalArgumentException( "Source or target cannot be null" );
+ }
+
+ int sourceLength = source.length();
+ int targetLength = target.length();
+
+ int[][] matrix = new int[ sourceLength + 1 ][ targetLength + 1 ];
+ matrix[0][0] = 0;
+
+ for ( int row = 1; row <= sourceLength; ++row ) {
+ matrix[row][0] = row;
+ }
+
+ for ( int col = 1; col <= targetLength; ++col ) {
+ matrix[0][col] = col;
+ }
+
+ for ( int row = 1; row <= sourceLength; ++row ) {
+ for ( int col = 1; col <= targetLength; ++col ) {
+ matrix[row][col] = calcMinCost( source, target, matrix, row, col );
+ }
+ }
+
+ return matrix[sourceLength][targetLength];
+ }
+
+ private int calcMinCost( CharSequence source, CharSequence target, int[][] matrix, int row, int col )
+ {
+ return Math.min( calcSubstitutionCost( source, target, matrix, row, col ),
+ Math.min( calcDeletionCost( matrix, row, col ), calcInsertionCost( matrix, row, col ) ) );
+ }
+
+ private int calcInsertionCost( int[][] matrix, int row, int col )
+ {
+ return matrix[row][col - 1] + insertionCost;
+ }
+
+ private int calcDeletionCost( int[][] matrix, int row, int col )
+ {
+ return matrix[row - 1][col] + deletionCost;
+ }
+
+ private int calcSubstitutionCost( CharSequence source, CharSequence target, int[][] matrix, int row, int col )
+ {
+ int cost = 0;
+ if ( source.charAt( row - 1 ) != target.charAt( col - 1 ) ) {
+ cost = substitutionCost;
+ }
+ return matrix[row - 1][col - 1] + cost;
+ }
+}
diff --git a/src/main/java/org/openslx/util/QuickTimer.java b/src/main/java/org/openslx/util/QuickTimer.java
index ec7c2ed..a26fd76 100644
--- a/src/main/java/org/openslx/util/QuickTimer.java
+++ b/src/main/java/org/openslx/util/QuickTimer.java
@@ -3,7 +3,8 @@ package org.openslx.util;
import java.util.Timer;
import java.util.TimerTask;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
/**
* This is a global, static {@link Timer} you can use anywhere for repeating
@@ -15,7 +16,7 @@ import org.apache.log4j.Logger;
*/
public class QuickTimer {
- private static final Logger LOGGER = Logger.getLogger(QuickTimer.class);
+ private static final Logger LOGGER = LogManager.getLogger(QuickTimer.class);
private static final Timer timer = new Timer("QuickTimer", true);
diff --git a/src/main/java/org/openslx/util/Resources.java b/src/main/java/org/openslx/util/Resources.java
new file mode 100644
index 0000000..9c1dddf
--- /dev/null
+++ b/src/main/java/org/openslx/util/Resources.java
@@ -0,0 +1,15 @@
+package org.openslx.util;
+
+/**
+ * Collection of resource utils.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Resources
+{
+ /**
+ * Path separator for resource {@link URL}s.
+ */
+ public static final String PATH_SEPARATOR = "/";
+}
diff --git a/src/main/java/org/openslx/util/TarArchiveUtil.java b/src/main/java/org/openslx/util/TarArchiveUtil.java
new file mode 100644
index 0000000..9970b0b
--- /dev/null
+++ b/src/main/java/org/openslx/util/TarArchiveUtil.java
@@ -0,0 +1,146 @@
+package org.openslx.util;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.nio.charset.StandardCharsets;
+import java.util.zip.GZIPInputStream;
+import java.util.zip.GZIPOutputStream;
+
+import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
+import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
+import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
+
+public class TarArchiveUtil
+{
+
+ private TarArchiveUtil()
+ {
+ }
+
+ public static class TarArchiveReader implements AutoCloseable
+ {
+ private final TarArchiveInputStream tarInputStream;
+ private TarArchiveEntry currentEntry = null;
+
+ public TarArchiveReader( InputStream in ) throws IOException
+ {
+ this( in, true, false );
+ }
+
+ public TarArchiveReader( InputStream in, boolean isBuffered, boolean isCompressed ) throws IOException
+ {
+ InputStream stream = in;
+ if ( isBuffered ) {
+ stream = new BufferedInputStream( stream );
+ }
+
+ if ( isCompressed ) {
+ stream = new GZIPInputStream( stream );
+ }
+
+ this.tarInputStream = new TarArchiveInputStream( stream );
+ }
+
+ public boolean hasNextEntry() throws IOException
+ {
+ this.currentEntry = this.tarInputStream.getNextTarEntry();
+ if ( this.currentEntry != null ) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ public String getEntryName()
+ {
+ if ( this.currentEntry == null )
+ return null;
+
+ return this.currentEntry.getName();
+ }
+
+ public byte[] readCurrentEntry() throws IOException
+ {
+ ByteArrayOutputStream output = new ByteArrayOutputStream();
+ byte[] rawData = new byte[ 1024 ];
+ int count = 0;
+
+ while ( ( count = this.tarInputStream.read( rawData ) ) != -1 ) {
+ output.write( rawData, 0, count );
+ }
+
+ return output.toByteArray();
+ }
+
+ @Override
+ public void close() throws IOException
+ {
+ tarInputStream.close();
+ }
+
+ }
+
+ public static class TarArchiveWriter implements AutoCloseable
+ {
+ private final TarArchiveOutputStream tarOutputStream;
+
+ public TarArchiveWriter( OutputStream out ) throws IOException
+ {
+ this( out, true, true );
+ }
+
+ public TarArchiveWriter( OutputStream out, boolean isBuffered, boolean isCompressed ) throws IOException
+ {
+ OutputStream stream = out;
+
+ if ( isBuffered ) {
+ stream = new BufferedOutputStream( stream );
+ }
+
+ if ( isCompressed ) {
+ stream = new GZIPOutputStream( stream );
+ }
+
+ this.tarOutputStream = new TarArchiveOutputStream( stream );
+ }
+
+ public void writeFile( String filename, String data ) throws IOException
+ {
+
+ if ( data == null )
+ return;
+ putFile( filename, data.getBytes( StandardCharsets.UTF_8 ) );
+ }
+
+ public void writeFile( String filename, byte[] data ) throws IOException
+ {
+ if ( data == null )
+ return;
+ putFile( filename, data );
+ }
+
+ private void putFile( String filename, byte[] data ) throws IOException
+ {
+ if ( data == null )
+ return;
+
+ TarArchiveEntry entry = new TarArchiveEntry( filename );
+ entry.setSize( data.length );
+ entry.setModTime( System.currentTimeMillis() );
+ entry.setMode( 0644 );
+ tarOutputStream.putArchiveEntry( entry );
+ tarOutputStream.write( data );
+ tarOutputStream.closeArchiveEntry();
+ }
+
+ @Override
+ public void close() throws IOException
+ {
+ tarOutputStream.close();
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/util/ThriftUtil.java b/src/main/java/org/openslx/util/ThriftUtil.java
index bafe566..ef10798 100644
--- a/src/main/java/org/openslx/util/ThriftUtil.java
+++ b/src/main/java/org/openslx/util/ThriftUtil.java
@@ -2,11 +2,12 @@ package org.openslx.util;
import java.io.BufferedReader;
import java.io.IOException;
+import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
-import org.openslx.util.vm.VmwareConfig;
+import org.openslx.virtualization.configuration.VirtualizationConfigurationVmwareFileFormat;
public class ThriftUtil {
@@ -16,9 +17,9 @@ public class ThriftUtil {
List<byte[]> hashList = new ArrayList<>(blockHashes.size());
for (ByteBuffer hash : blockHashes) {
byte[] buffer = new byte[hash.remaining()];
- hash.mark();
+ ((Buffer)hash).mark();
hash.get(buffer);
- hash.reset();
+ ((Buffer)hash).reset();
hashList.add(buffer);
}
return hashList;
@@ -28,9 +29,9 @@ public class ThriftUtil {
byte[] byteArray = null;
if (buffer != null) {
byteArray = new byte[buffer.remaining()];
- buffer.mark();
+ ((Buffer)buffer).mark();
buffer.get(byteArray);
- buffer.reset();
+ ((Buffer)buffer).reset();
}
return byteArray;
}
@@ -40,7 +41,8 @@ public class ThriftUtil {
BufferedReader reader;
StringBuffer content = new StringBuffer("");
try {
- reader = VmwareConfig.getVmxReader(bytes, bytes.length);
+ // Why is a generic function to convert a buffer to string CALLING A VMWARE SPECIFIC FUNCTION!?
+ reader = VirtualizationConfigurationVmwareFileFormat.getVmxReader(bytes, bytes.length);
String line="";
while ((line=reader.readLine()) != null) {
content.append(line + "\n");
diff --git a/src/main/java/org/openslx/util/Util.java b/src/main/java/org/openslx/util/Util.java
index 441bc88..8593f80 100644
--- a/src/main/java/org/openslx/util/Util.java
+++ b/src/main/java/org/openslx/util/Util.java
@@ -2,11 +2,12 @@ package org.openslx.util;
import java.util.regex.Pattern;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
public class Util
{
- private static Logger log = Logger.getLogger( Util.class );
+ private static Logger log = LogManager.getLogger( Util.class );
/**
* Check if the given object is null, abort program if true. An optional
@@ -117,9 +118,20 @@ public class Util
}
}
+ /**
+ * Number of seconds elapsed since 1970-01-01 UTC.
+ */
public static long unixTime()
{
return System.currentTimeMillis() / 1000;
}
+ /**
+ * Monotonic tick count in milliseconds, not bound to RTC.
+ */
+ public static long tickCount()
+ {
+ return System.nanoTime() / 1000;
+ }
+
}
diff --git a/src/main/java/org/openslx/util/XmlHelper.java b/src/main/java/org/openslx/util/XmlHelper.java
index 70c5be8..90d282b 100644
--- a/src/main/java/org/openslx/util/XmlHelper.java
+++ b/src/main/java/org/openslx/util/XmlHelper.java
@@ -3,6 +3,8 @@ package org.openslx.util;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
@@ -14,24 +16,29 @@ import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpression;
import javax.xml.xpath.XPathExpressionException;
import javax.xml.xpath.XPathFactory;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.w3c.dom.Attr;
import org.w3c.dom.Document;
+import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
public class XmlHelper
{
- private final static Logger LOGGER = Logger.getLogger( XmlHelper.class );
+ private final static Logger LOGGER = LogManager.getLogger( XmlHelper.class );
// TODO check thread-safety
- public static final XPath XPath = XPathFactory.newInstance().newXPath();
+ private static final XPath XPath = XPathFactory.newInstance().newXPath();
private static DocumentBuilder dBuilder;
static {
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
+ dbFactory.setNamespaceAware( true );
dbFactory.setIgnoringComments( true );
try {
dBuilder = dbFactory.newDocumentBuilder();
@@ -40,17 +47,64 @@ public class XmlHelper
}
}
+ public static String globalXPathToLocalXPath( String xPath )
+ {
+ final StringBuilder exprBuilder = new StringBuilder();
+ final String[] elements = xPath.split( "/" );
+
+ for ( final String element : elements ) {
+ if ( !element.isEmpty() ) {
+ final Pattern arraySpecifierRegex = Pattern.compile( "^(.*)\\[(.*)\\]$" );
+ final Matcher arraySpecifierMatcher = arraySpecifierRegex.matcher( element );
+ final String elementName;
+ final String elementSpecifier;
+
+ if ( arraySpecifierMatcher.find() ) {
+ elementName = arraySpecifierMatcher.group( 1 );
+ elementSpecifier = arraySpecifierMatcher.group( 2 );
+ } else {
+ elementName = element;
+ elementSpecifier = null;
+ }
+
+ if ( !elementName.startsWith( "@" ) && !elementName.equals( "*" ) ) {
+ exprBuilder.append( "/*[local-name()='" + elementName + "']" );
+
+ } else {
+ exprBuilder.append( "/" + elementName );
+ }
+
+ if ( elementSpecifier != null && !elementSpecifier.isEmpty() ) {
+ exprBuilder.append( "[" + elementSpecifier + "]" );
+ }
+ }
+ }
+
+ return exprBuilder.toString();
+ }
+
+ public static XPathExpression compileXPath( String xPath ) throws XPathExpressionException
+ {
+ final String localXPath = XmlHelper.globalXPathToLocalXPath( xPath );
+ return XPath.compile( localXPath );
+ }
+
public static Document parseDocumentFromStream( InputStream is )
{
Document doc = null;
+
+ // read document from stream
try {
doc = dBuilder.parse( is );
} catch ( SAXException | IOException e ) {
- LOGGER.error( "Failed to parse input stream to document." );
+ doc = null;
}
- if ( doc == null )
- return null;
- doc.getDocumentElement().normalize();
+
+ // normalize parsed document
+ if ( doc != null ) {
+ doc.getDocumentElement().normalize();
+ }
+
return doc;
}
@@ -105,4 +159,51 @@ public class XmlHelper
return null;
}
}
+
+ public static Element getOrCreateElement( Document doc, Element parent, String nsUri, String nsName,
+ String name, String attrName, String attrValue )
+ {
+ final NodeList childList;
+ if ( nsUri == null ) {
+ childList = parent.getElementsByTagName( name );
+ } else {
+ childList = parent.getElementsByTagNameNS( nsUri, name );
+ }
+ Element element = null;
+ outer: for ( int i = 0; i < childList.getLength(); ++i ) {
+ Node n = childList.item( i );
+ if ( n.getNodeType() != Node.ELEMENT_NODE )
+ continue;
+ if ( attrName != null && attrValue != null ) {
+ for ( int ai = 0; ai < n.getAttributes().getLength(); ++ai ) {
+ Node attr = n.getAttributes().item( ai );
+ if ( attr.getNodeType() != Attr.ELEMENT_NODE )
+ continue;
+ Attr a = (Attr)attr;
+ if ( !attrName.equals( a.getLocalName() ) || !attrValue.equals( a.getValue() ) )
+ continue;
+ element = (Element)n;
+ break outer;
+ }
+ } else {
+ element = (Element)n;
+ break;
+ }
+ }
+ if ( element == null ) {
+ // Need a new <qemu:device alias="hostdev0">
+ if ( nsUri == null || nsName == null ) {
+ element = doc.createElement( name );
+ } else {
+ element = doc.createElementNS( nsUri, name );
+ element.setPrefix( nsName );
+ }
+ if ( attrName != null && attrValue != null ) {
+ element.setAttribute( attrName, attrValue );
+ }
+ parent.appendChild( element );
+ }
+ return element;
+ }
+
}
diff --git a/src/main/java/org/openslx/util/vm/DiskImage.java b/src/main/java/org/openslx/util/vm/DiskImage.java
deleted file mode 100644
index 2b24a3f..0000000
--- a/src/main/java/org/openslx/util/vm/DiskImage.java
+++ /dev/null
@@ -1,205 +0,0 @@
-package org.openslx.util.vm;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.util.Arrays;
-
-import org.apache.log4j.Logger;
-import org.openslx.bwlp.thrift.iface.Virtualizer;
-import org.openslx.thrifthelper.TConst;
-import org.openslx.util.Util;
-
-public class DiskImage
-{
- private static final Logger LOGGER = Logger.getLogger( DiskImage.class );
- /**
- * Big endian representation of the 4 bytes 'KDMV'
- */
- private static final int VMDK_MAGIC = 0x4b444d56;
- private static final int VDI_MAGIC = 0x7f10dabe;
- /**
- * Big endian representation of the 4 bytes 'QFI\xFB'
- */
- private static final int QEMU_MAGIC = 0x514649fb;
-
- public enum ImageFormat
- {
- VMDK( "vmdk" ), QCOW2( "qcow2" ), VDI( "vdi" );
-
- public final String extension;
-
- private ImageFormat( String extension )
- {
- this.extension = extension;
- }
-
- public static ImageFormat defaultForVirtualizer( Virtualizer virt )
- {
- if ( virt == null )
- return null;
- return defaultForVirtualizer( virt.virtId );
- }
-
- public static ImageFormat defaultForVirtualizer( String virtId )
- {
- if ( virtId == null )
- return null;
- if ( virtId.equals( TConst.VIRT_VMWARE ) )
- return VMDK;
- if ( virtId.equals( TConst.VIRT_VIRTUALBOX ) )
- return VDI;
- if ( virtId.equals( TConst.VIRT_QEMU ) )
- return QCOW2;
- return null;
- }
- }
-
- public final boolean isStandalone;
- public final boolean isCompressed;
- public final boolean isSnapshot;
- public final ImageFormat format;
- public final String subFormat;
- public final int hwVersion;
- public final String diskDescription;
-
- public ImageFormat getImageFormat()
- {
- return format;
- }
-
- public DiskImage( File disk ) throws FileNotFoundException, IOException, UnknownImageFormatException
- {
- LOGGER.debug( "Validating disk file: " + disk.getAbsolutePath() );
- try ( RandomAccessFile file = new RandomAccessFile( disk, "r" ) ) {
- // vmdk
- boolean isVmdkMagic = ( file.readInt() == VMDK_MAGIC );
- if ( isVmdkMagic || file.length() < 4096 ) {
- if ( isVmdkMagic ) {
- file.seek( 512 );
- } else {
- file.seek( 0 );
- }
- byte[] buffer = new byte[ (int)Math.min( 2048, file.length() ) ];
- file.readFully( buffer );
- VmwareConfig config;
- try {
- config = new VmwareConfig( buffer, findNull( buffer ) );
- } catch ( UnsupportedVirtualizerFormatException e ) {
- config = null;
- }
- if ( config != null ) {
- String sf = config.get( "createType" );
- String parent = config.get( "parentCID" );
- if ( sf != null || parent != null ) {
- subFormat = sf;
- this.isStandalone = isStandaloneCreateType( subFormat, parent );
- this.isCompressed = subFormat != null && subFormat.equalsIgnoreCase( "streamOptimized" );
- this.isSnapshot = parent != null && !parent.equalsIgnoreCase( "ffffffff" );
- this.format = ImageFormat.VMDK;
- String hwv = config.get( "ddb.virtualHWVersion" );
- if ( hwv == null ) {
- this.hwVersion = 10;
- } else {
- this.hwVersion = Util.parseInt( hwv, 10 );
- }
- this.diskDescription = null;
- return;
- }
- }
- }
- // Format spec from: https://forums.virtualbox.org/viewtopic.php?t=8046
- // First 64 bytes are the opening tag: <<< .... >>>
- // which we don't care about, then comes the VDI signature
- file.seek( 64 );
- if ( file.readInt() == VDI_MAGIC ) {
- // skip the next 4 ints as they don't interest us:
- // - VDI version
- // - size of header, strangely irrelevant?
- // - image type, 1 for dynamic allocated storage, 2 for fixed size
- // - image flags, seem to be always 00 00 00 00
- file.skipBytes( 4 * 4 );
-
- // next 256 bytes are image description
- byte[] imageDesc = new byte[ 256 ];
- file.readFully( imageDesc );
- // next sections are irrelevant (int if not specified):
- // - offset blocks
- // - offset data
- // - cylinders
- // - heads
- // - sectors
- // - sector size
- // - <unused>
- // - disk size (long = 8 bytes)
- // - block size
- // - block extra data
- // - blocks in hdd
- // - blocks allocated
- file.skipBytes( 4 * 13 );
-
- // now it gets interesting, UUID of VDI
- byte[] diskUuid = new byte[ 16 ];
- file.readFully( diskUuid );
- // last snapshot uuid, mostly uninteresting since we don't support snapshots -> skip 16 bytes
- // TODO: meaning of "uuid link"? for now, skip 16
- file.skipBytes( 32 );
-
- // parent uuid, indicator if this VDI is a snapshot or not
- byte[] parentUuid = new byte[ 16 ];
- file.readFully( parentUuid );
- byte[] zeroUuid = new byte[ 16 ];
- Arrays.fill( zeroUuid, (byte)0 );
- this.isSnapshot = !Arrays.equals( parentUuid, zeroUuid );
- // VDI does not seem to support split VDI files so always standalone
- this.isStandalone = true;
- // compression is done by sparsifying the disk files, there is no flag for it
- this.isCompressed = false;
- this.format = ImageFormat.VDI;
- this.subFormat = null;
- this.diskDescription = new String( imageDesc );
- this.hwVersion = 0;
- return;
- }
-
- // TODO: qcow
- file.seek( 0 );
- if ( file.readInt() == QEMU_MAGIC ) {
- // dummy values
- this.isStandalone = true;
- this.isCompressed = false;
- this.isSnapshot = false;
- this.format = ImageFormat.QCOW2;
- this.subFormat = null;
- this.diskDescription = null;
- this.hwVersion = 0;
- return;
- }
- }
- throw new UnknownImageFormatException();
- }
-
- private int findNull( byte[] buffer )
- {
- for ( int i = 0; i < buffer.length; ++i ) {
- if ( buffer[i] == 0 )
- return i;
- }
- return buffer.length;
- }
-
- private boolean isStandaloneCreateType( String type, String parent )
- {
- if ( type == null )
- return false;
- if ( parent != null && !parent.equalsIgnoreCase( "ffffffff" ) )
- return false;
- return type.equalsIgnoreCase( "streamOptimized" ) || type.equalsIgnoreCase( "monolithicSparse" );
- }
-
- public static class UnknownImageFormatException extends Exception
- {
- private static final long serialVersionUID = -6647935235475007171L;
- }
-}
diff --git a/src/main/java/org/openslx/util/vm/KeyValuePair.java b/src/main/java/org/openslx/util/vm/KeyValuePair.java
deleted file mode 100644
index d89d51b..0000000
--- a/src/main/java/org/openslx/util/vm/KeyValuePair.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.openslx.util.vm;
-
-class KeyValuePair
-{
- public final String key;
- public final String value;
-
- public KeyValuePair( String key, String value )
- {
- this.key = key;
- this.value = value;
- }
-} \ No newline at end of file
diff --git a/src/main/java/org/openslx/util/vm/QemuMetaData.java b/src/main/java/org/openslx/util/vm/QemuMetaData.java
deleted file mode 100644
index 201ffd8..0000000
--- a/src/main/java/org/openslx/util/vm/QemuMetaData.java
+++ /dev/null
@@ -1,233 +0,0 @@
-package org.openslx.util.vm;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.log4j.Logger;
-import org.openslx.bwlp.thrift.iface.OperatingSystem;
-import org.openslx.bwlp.thrift.iface.Virtualizer;
-import org.openslx.thrifthelper.TConst;
-import org.openslx.util.vm.DiskImage.ImageFormat;
-import org.openslx.util.vm.DiskImage.UnknownImageFormatException;
-
-public class QemuMetaData extends VmMetaData<VBoxSoundCardMeta, VBoxDDAccelMeta, VBoxHWVersionMeta, VBoxEthernetDevTypeMeta, VBoxUsbSpeedMeta>
-{
-
- private final Map<String, String> arguments = new HashMap<String, String>();
- // the above map's elements will take the place of <args> in the config string
- private String config;
- private static final Logger LOGGER = Logger.getLogger( QemuMetaData.class );
-
- private static final Virtualizer virtualizer = new Virtualizer( TConst.VIRT_QEMU, "QEMU-KVM" );
-
- public QemuMetaData( List<OperatingSystem> osList, File file ) throws FileNotFoundException, IOException, UnsupportedVirtualizerFormatException
- {
- super( osList );
- DiskImage di;
- try {
- di = new DiskImage( file );
- } catch ( UnknownImageFormatException e ) {
- di = null;
- }
- if ( di == null || di.format != ImageFormat.QCOW2 ) {
- throw new UnsupportedVirtualizerFormatException( "This is not a qcow2 disk image" );
- }
- config = "qemu-system-i386 <args> <image> -enable-kvm\nqemu-system-x86_64 <args> <image> -enable-kvm";
- displayName = file.getName().substring( 0, file.getName().indexOf( "." ) );
- setOs( "anyOs" );
- hdds.add( new HardDisk( "anychipset", DriveBusType.IDE, file.getAbsolutePath() ) );
- makeStartSequence();
- }
-
- // initiates the arguments map with a default working sequence that will later be used in the definition array
- public void makeStartSequence()
- {
- arguments.put( "cpu", "host" );
- arguments.put( "smp", "2" );
- arguments.put( "m", "1024" );
- arguments.put( "vga", "std" );
- }
-
- private String configWithArgs()
- {
- String tempString = "";
- for ( String key : arguments.keySet() ) {
- tempString += "-" + key + " " + arguments.get( key ) + " ";
- }
- return config.replaceAll( "<args>", tempString );
- }
-
- @Override
- public byte[] getFilteredDefinitionArray()
- {
- return configWithArgs().getBytes( StandardCharsets.UTF_8 );
- }
-
- @Override
- public void applySettingsForLocalEdit()
- {
- }
-
- @Override
- public boolean addHddTemplate( File diskImage, String hddMode, String redoDir )
- {
- String tempS = config.replaceAll( "<image>", diskImage.getAbsolutePath() );
- config = tempS;
- hdds.add( new HardDisk( "anychipset", DriveBusType.IDE, diskImage.getAbsolutePath() ) );
- return true;
- }
-
- @Override
- public boolean addHddTemplate( String diskImagePath, String hddMode, String redoDir )
- {
- String tempS = config.replaceAll( "<image>", diskImagePath );
- config = tempS;
- hdds.add( new HardDisk( "anychipset", DriveBusType.IDE, diskImagePath ) );
- return true;
- }
-
- @Override
- public boolean addDefaultNat()
- {
- return true;
- }
-
- @Override
- public void setOs( String vendorOsId )
- {
- setOs( TConst.VIRT_QEMU, vendorOsId );
- }
-
- @Override
- public boolean addDisplayName( String name )
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
- public boolean addRam( int mem )
- {
- this.arguments.put( "m", Integer.toString( mem ) );
- return true;
- }
-
- @Override
- public void addFloppy( int index, String image, boolean readOnly )
- {
- // TODO Auto-generated method stub
-
- }
-
- @Override
- public boolean addCdrom( String image )
- {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
- public boolean addCpuCoreCount( int nrOfCores )
- {
- this.arguments.put( "smp", Integer.toString( nrOfCores ) );
- return true;
- }
-
- @Override
- public void setSoundCard( VmMetaData.SoundCardType type )
- {
- }
-
- @Override
- public VmMetaData.SoundCardType getSoundCard()
- {
- return null;
- }
-
- @Override
- public void setDDAcceleration( VmMetaData.DDAcceleration type )
- {
- }
-
- @Override
- public VmMetaData.DDAcceleration getDDAcceleration()
- {
- return null;
- }
-
- @Override
- public void setHWVersion( VmMetaData.HWVersion type )
- {
- }
-
- @Override
- public VmMetaData.HWVersion getHWVersion()
- {
- return null;
- }
-
- @Override
- public void setEthernetDevType( int cardIndex, VmMetaData.EthernetDevType type )
- {
- }
-
- @Override
- public VmMetaData.EthernetDevType getEthernetDevType( int cardIndex )
- {
- return null;
- }
-
- @Override
- public byte[] getDefinitionArray()
- {
- return configWithArgs().getBytes( StandardCharsets.UTF_8 );
- }
-
- @Override
- public boolean addEthernet( VmMetaData.EtherType type )
- {
- return false;
- }
-
- @Override
- public Virtualizer getVirtualizer()
- {
- return virtualizer;
- }
-
- @Override
- public boolean tweakForNonPersistent()
- {
- return false;
- }
-
- @Override
- public void registerVirtualHW()
- {
- }
-
- @Override
- public void setMaxUsbSpeed( VmMetaData.UsbSpeed speed )
- {
- // TODO: Actual speed setting?
- if ( speed == null || speed == VmMetaData.UsbSpeed.NONE ) {
- arguments.remove( "usb" );
- } else {
- arguments.put( "usb", "" );
- }
- }
-
- @Override
- public VmMetaData.UsbSpeed getMaxUsbSpeed()
- {
- if ( arguments.containsKey( "usb" ) )
- return VmMetaData.UsbSpeed.USB2_0; // TODO
- return VmMetaData.UsbSpeed.NONE;
- }
-
-}
diff --git a/src/main/java/org/openslx/util/vm/UnsupportedVirtualizerFormatException.java b/src/main/java/org/openslx/util/vm/UnsupportedVirtualizerFormatException.java
deleted file mode 100644
index 08c9673..0000000
--- a/src/main/java/org/openslx/util/vm/UnsupportedVirtualizerFormatException.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package org.openslx.util.vm;
-
-@SuppressWarnings( "serial" )
-public class UnsupportedVirtualizerFormatException extends Exception
-{
- public UnsupportedVirtualizerFormatException(String message) {
- super(message);
- }
-} \ No newline at end of file
diff --git a/src/main/java/org/openslx/util/vm/VboxMetaData.java b/src/main/java/org/openslx/util/vm/VboxMetaData.java
deleted file mode 100644
index da5189e..0000000
--- a/src/main/java/org/openslx/util/vm/VboxMetaData.java
+++ /dev/null
@@ -1,521 +0,0 @@
-package org.openslx.util.vm;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-import java.nio.ByteBuffer;
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map.Entry;
-import java.util.UUID;
-
-import org.apache.log4j.Logger;
-import org.openslx.bwlp.thrift.iface.OperatingSystem;
-import org.openslx.bwlp.thrift.iface.Virtualizer;
-import org.openslx.thrifthelper.TConst;
-import org.openslx.util.vm.VboxConfig.PlaceHolder;
-import org.w3c.dom.Attr;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-class VBoxSoundCardMeta
-{
- public final boolean isPresent;
- public final String value;
-
- public VBoxSoundCardMeta( boolean present, String val )
- {
- isPresent = present;
- value = val;
- }
-}
-
-class VBoxDDAccelMeta
-{
- public final boolean isPresent;
-
- public VBoxDDAccelMeta( boolean present )
- {
- isPresent = present;
- }
-}
-
-class VBoxHWVersionMeta
-{
- public final int version;
-
- public VBoxHWVersionMeta( int vers )
- {
- version = vers;
- }
-}
-
-class VBoxEthernetDevTypeMeta
-{
- public final String value;
- public final boolean isPresent;
-
- public VBoxEthernetDevTypeMeta( boolean present, String val )
- {
- value = val;
- isPresent = present;
- }
-}
-
-class VBoxUsbSpeedMeta
-{
- public final String value;
- public final int speed;
- public VBoxUsbSpeedMeta( String value, int speed )
- {
- this.value = value;
- this.speed = speed;
- }
-}
-
-public class VboxMetaData extends VmMetaData<VBoxSoundCardMeta, VBoxDDAccelMeta, VBoxHWVersionMeta, VBoxEthernetDevTypeMeta, VBoxUsbSpeedMeta>
-{
- private static final Logger LOGGER = Logger.getLogger( VboxMetaData.class );
-
- private static final Virtualizer virtualizer = new Virtualizer( TConst.VIRT_VIRTUALBOX, "VirtualBox" );
-
- private final VboxConfig config;
-
- public static enum EthernetType
- {
- NAT( "vboxnet1" ), BRIDGED( "vboxnet0" ), HOST_ONLY( "vboxnet2" );
-
- public final String vnet;
-
- private EthernetType( String vnet )
- {
- this.vnet = vnet;
- }
- }
-
- public VboxMetaData( List<OperatingSystem> osList, File file ) throws IOException, UnsupportedVirtualizerFormatException
- {
- super( osList );
- this.config = new VboxConfig( file );
- init();
- }
-
- public VboxMetaData( List<OperatingSystem> osList, byte[] vmContent, int length ) throws IOException, UnsupportedVirtualizerFormatException
- {
- super( osList );
- this.config = new VboxConfig( vmContent, length );
- init();
- }
-
- private void init()
- {
- registerVirtualHW();
- displayName = config.getDisplayName();
- setOs( config.getOsName() );
- this.isMachineSnapshot = config.isMachineSnapshot();
- for ( HardDisk hardDisk : config.getHdds() ) {
- hdds.add( hardDisk );
- }
- }
-
- @Override
- public Virtualizer getVirtualizer()
- {
- return virtualizer;
- }
-
- @Override
- public void applySettingsForLocalEdit()
- {
- // TODO Auto-generated method stub
- }
-
- @Override
- public byte[] getDefinitionArray()
- {
- return config.toString( false ).getBytes( StandardCharsets.UTF_8 );
- }
-
- @Override
- public byte[] getFilteredDefinitionArray()
- {
- return config.toString( false ).getBytes( StandardCharsets.UTF_8 );
- }
-
- @Override
- public boolean addHddTemplate( String diskImage, String hddMode, String redoDir )
- {
- config.changeAttribute( "/VirtualBox/Machine/MediaRegistry/HardDisks/HardDisk[@location='" + PlaceHolder.HDDLOCATION.toString() + "']", "location", diskImage );
- config.changeAttribute( "/VirtualBox/Machine", "snapshotFolder", redoDir );
- return true;
- }
-
- @Override
- public boolean addHddTemplate( File diskImage, String hddMode, String redoDir )
- {
- String diskImagePath = diskImage.getName();
- config.changeAttribute( "/VirtualBox/Machine/MediaRegistry/HardDisks/HardDisk", "location", diskImagePath );
-
- UUID newhdduuid = UUID.randomUUID();
-
- // patching the new uuid in the vbox config file here
- String vboxUUid = "{" + newhdduuid.toString() + "}";
- config.changeAttribute( "/VirtualBox/Machine/MediaRegistry/HardDisks/HardDisk", "uuid", vboxUUid );
- config.changeAttribute( "/VirtualBox/Machine/StorageControllers/StorageController/AttachedDevice/Image", "uuid", vboxUUid );
-
- // the order of the UUID is BIG_ENDIAN but we need to change the order of the first 8 Bytes
- // to be able to write them to the vdi file... the PROBLEM here is that the first 8
- // are in LITTLE_ENDIAN order in pairs of 4-2-2 not the whole 8 so just changing the
- // order when we are adding them to the bytebuffer won't help
- //
- // the following is a workaround that works
- ByteBuffer buffer = ByteBuffer.wrap( new byte[ 16 ] );
- buffer.putLong( newhdduuid.getMostSignificantBits() );
- buffer.putLong( newhdduuid.getLeastSignificantBits() );
- byte[] oldOrder = buffer.array();
- // make a coppy here because the last 8 Bytes don't need to change position
- byte[] bytesToWrite = Arrays.copyOf( oldOrder, oldOrder.length );
- // use an offset int[] to help with the shuffle
- int[] offsets = { 3, 2, 1, 0, 5, 4, 7, 6 };
- for ( int index = 0; index < 8; index++ ) {
- bytesToWrite[index] = oldOrder[offsets[index]];
- }
- try ( RandomAccessFile file = new RandomAccessFile( diskImage, "rw" ) ) {
- file.seek( 392 );
- file.write( bytesToWrite, 0, 16 );
- } catch ( Exception e ) {
- LOGGER.warn( "could not patch new uuid in the vdi", e );
- }
-
- // we need a new machine uuid
- UUID newMachineUuid = UUID.randomUUID();
- if ( newMachineUuid.equals( newhdduuid ) ) {
- LOGGER.warn( "The new Machine UUID is the same as the new HDD UUID; tying again...this vm might not start" );
- newMachineUuid = UUID.randomUUID();
- }
- String machineUUid = "{" + newMachineUuid.toString() + "}";
- return config.changeAttribute( "/VirtualBox/Machine", "uuid", machineUUid );
- }
-
- @Override
- public boolean addDefaultNat()
- {
- if ( config.addNewNode( "/VirtualBox/Machine/Hardware/Network/Adapter", "NAT" ) == null ) {
- LOGGER.error( "Failed to set network adapter to NAT." );
- return false;
- }
- return config.changeAttribute( "/VirtualBox/Machine/Hardware/Network/Adapter", "MACAddress", "080027B86D12" );
- }
-
- @Override
- public void setOs( String vendorOsId )
- {
- config.changeAttribute( "/VirtualBox/Machine", "OSType", vendorOsId );
- setOs( TConst.VIRT_VIRTUALBOX, vendorOsId );
- }
-
- @Override
- public boolean addDisplayName( String name )
- {
- return config.changeAttribute( "/VirtualBox/Machine", "name", name );
- }
-
- @Override
- public boolean addRam( int mem )
- {
- return config.changeAttribute( "/VirtualBox/Machine/Hardware/Memory", "RAMSize", Integer.toString( mem ) );
- }
-
- @Override
- public void addFloppy( int index, String image, boolean readOnly )
- {
- Element floppyController = null;
- NodeList matches = (NodeList)config.findNodes( "/VirtualBox/Machine/StorageControllers/StorageController[@name='Floppy']" );
- if ( matches == null || matches.getLength() == 0 ) {
- floppyController = (Element)config.addNewNode( "/VirtualBox/Machine/StorageControllers", "StorageController" );
- if ( floppyController == null ) {
- LOGGER.error( "Failed to add <Image> to floppy device." );
- return;
- }
- floppyController.setAttribute( "name", "Floppy" );
- floppyController.setAttribute( "type", "I82078" );
- floppyController.setAttribute( "PortCount", "1" );
- floppyController.setAttribute( "useHostIOCache", "true" );
- floppyController.setAttribute( "Bootable", "false" );
- }
- // virtualbox only allows one controller per type
- if ( matches.getLength() > 1 ) {
- LOGGER.error( "Multiple floppy controllers detected, this should never happen! " );
- return;
- }
- // so if we had any matches, we know we have exactly one
- if ( floppyController == null )
- floppyController = (Element)matches.item( 0 );
-
- // add the floppy device
- Element floppyDevice = (Element)config.addNewNode( floppyController, "AttachedDevice" );
- if ( floppyDevice == null ) {
- LOGGER.error( "Failed to add <Image> to floppy device." );
- return;
- }
- floppyDevice.setAttribute( "type", "Floppy" );
- floppyDevice.setAttribute( "hotpluggable", "false" );
- floppyDevice.setAttribute( "port", "0" );
- floppyDevice.setAttribute( "device", Integer.toString( index ) );
-
- // finally add the image to it, if one was given
- if ( image != null ) {
- Element floppyImage = (Element)config.addNewNode( floppyDevice, "Image" );
- if ( floppyImage == null ) {
- LOGGER.error( "Failed to add <Image> to floppy device." );
- return;
- }
- floppyImage.setAttribute( "uuid", VboxConfig.PlaceHolder.FLOPPYUUID.toString() );
- // register the image in the media registry
- Element floppyImages = (Element)config.addNewNode( "/VirtualBox/Machine/MediaRegistry", "FloppyImages" );
- if ( floppyImages == null ) {
- LOGGER.error( "Failed to add <FloppyImages> to media registry." );
- return;
- }
- Element floppyImageReg = (Element)config.addNewNode( "/VirtualBox/Machine/MediaRegistry/FloppyImages", "Image" );
- if ( floppyImageReg == null ) {
- LOGGER.error( "Failed to add <Image> to floppy images in the media registry." );
- return;
- }
- floppyImageReg.setAttribute( "uuid", VboxConfig.PlaceHolder.FLOPPYUUID.toString() );
- floppyImageReg.setAttribute( "location", VboxConfig.PlaceHolder.FLOPPYLOCATION.toString() );
- }
- }
-
- @Override
- public boolean addCdrom( String image )
- {
- // TODO - done in run-virt currently
- return false;
- }
-
- @Override
- public boolean addCpuCoreCount( int nrOfCores )
- {
- return config.changeAttribute( "/VirtualBox/Machine/Hardware/CPU", "count", Integer.toString( nrOfCores ) );
- }
-
- @Override
- public void setSoundCard( org.openslx.util.vm.VmMetaData.SoundCardType type )
- {
- VBoxSoundCardMeta sound = soundCards.get( type );
- config.changeAttribute( "/VirtualBox/Machine/Hardware/AudioAdapter", "enabled", Boolean.toString( sound.isPresent ) );
- config.changeAttribute( "/VirtualBox/Machine/Hardware/AudioAdapter", "controller", sound.value );
- }
-
- @Override
- public VmMetaData.SoundCardType getSoundCard()
- {
- // initialize here to type None to avoid all null pointer exceptions thrown for unknown user written sound cards
- VmMetaData.SoundCardType returnsct = VmMetaData.SoundCardType.NONE;
- Element x = (Element)config.findNodes( "/VirtualBox/Machine/Hardware/AudioAdapter" ).item( 0 );
- if ( !x.hasAttribute( "enabled" ) || ( x.hasAttribute( "enabled" ) && x.getAttribute( "enabled" ).equals( "false" ) ) ) {
- return returnsct;
- } else {
- // extra separate case for the non-existing argument}
- if ( !x.hasAttribute( "controller" ) ) {
- returnsct = VmMetaData.SoundCardType.AC;
- } else {
- String controller = x.getAttribute( "controller" );
- VBoxSoundCardMeta soundMeta = null;
- for ( VmMetaData.SoundCardType type : VmMetaData.SoundCardType.values() ) {
- soundMeta = soundCards.get( type );
- if ( soundMeta != null ) {
- if ( controller.equals( soundMeta.value ) ) {
- returnsct = type;
- }
- }
- }
- }
- }
- return returnsct;
- }
-
- @Override
- public void setDDAcceleration( VmMetaData.DDAcceleration type )
- {
- VBoxDDAccelMeta accel = ddacc.get( type );
- config.changeAttribute( "/VirtualBox/Machine/Hardware/Display", "accelerate3D", Boolean.toString( accel.isPresent ) );
- }
-
- @Override
- public VmMetaData.DDAcceleration getDDAcceleration()
- {
- VmMetaData.DDAcceleration returndda = null;
- Element x = (Element)config.findNodes( "/VirtualBox/Machine/Hardware/Display" ).item( 0 );
- if ( x.hasAttribute( "accelerate3D" ) ) {
- if ( x.getAttribute( "accelerate3D" ).equals( "true" ) ) {
- returndda = VmMetaData.DDAcceleration.ON;
- } else {
- returndda = VmMetaData.DDAcceleration.OFF;
- }
- } else {
- returndda = VmMetaData.DDAcceleration.OFF;
- }
- return returndda;
- }
-
- /**
- * Function does nothing for Virtual Box;
- * Virtual Box accepts per default only one hardware version and is hidden from the user
- */
- @Override
- public void setHWVersion( HWVersion type )
- {
- }
-
- @Override
- public VmMetaData.HWVersion getHWVersion()
- {
- // Virtual Box uses only one virtual hardware version and can't be changed
- return VmMetaData.HWVersion.DEFAULT;
- }
-
- @Override
- public void setEthernetDevType( int cardIndex, EthernetDevType type )
- {
- String index = "0";
- VBoxEthernetDevTypeMeta nic = networkCards.get( type );
- // cardIndex is not used yet...maybe later needed for different network cards
- config.changeAttribute( "/VirtualBox/Machine/Hardware/Network/Adapter[@slot='" + index + "']", "enabled", Boolean.toString( nic.isPresent ) );
- config.changeAttribute( "/VirtualBox/Machine/Hardware/Network/Adapter[@slot='" + index + "']", "type", nic.value );
- }
-
- @Override
- public VmMetaData.EthernetDevType getEthernetDevType( int cardIndex )
- {
- VmMetaData.EthernetDevType returnedt = VmMetaData.EthernetDevType.NONE;
- Element x = (Element)config.findNodes( "/VirtualBox/Machine/Hardware/Network/Adapter" ).item( 0 );
- if ( !x.hasAttribute( "enabled" ) || ( x.hasAttribute( "enabled" ) && x.getAttribute( "enabled" ).equals( "false" ) ) ) {
- return returnedt;
- } else {
- // extra separate case for the non-existing argument}
- if ( !x.hasAttribute( "type" ) ) {
- returnedt = VmMetaData.EthernetDevType.PCNETFAST3;
- } else {
- String temp = x.getAttribute( "type" );
- VBoxEthernetDevTypeMeta etherMeta = null;
- for ( VmMetaData.EthernetDevType type : VmMetaData.EthernetDevType.values() ) {
- etherMeta = networkCards.get( type );
- if ( etherMeta != null ) {
- if ( temp.equals( etherMeta.value ) ) {
- returnedt = type;
- }
- }
- }
- }
- }
- return returnedt;
- }
-
- public void registerVirtualHW()
- {
- // none type needs to have a valid value; it takes the value of AC97; if value is left null or empty vm will not start because value is not valid
- // TODO: Maybe just remove the entire section from the XML? Same for ethernet...
- soundCards.put( VmMetaData.SoundCardType.NONE, new VBoxSoundCardMeta( false, "AC97" ) );
- soundCards.put( VmMetaData.SoundCardType.SOUND_BLASTER, new VBoxSoundCardMeta( true, "SB16" ) );
- soundCards.put( VmMetaData.SoundCardType.HD_AUDIO, new VBoxSoundCardMeta( true, "HDA" ) );
- soundCards.put( VmMetaData.SoundCardType.AC, new VBoxSoundCardMeta( true, "AC97" ) );
-
- ddacc.put( VmMetaData.DDAcceleration.OFF, new VBoxDDAccelMeta( false ) );
- ddacc.put( VmMetaData.DDAcceleration.ON, new VBoxDDAccelMeta( true ) );
-
- hwversion.put( VmMetaData.HWVersion.DEFAULT, new VBoxHWVersionMeta( 0 ) );
-
- // none type needs to have a valid value; it takes the value of pcnetcpi2; if value is left null or empty vm will not start because value is not valid
- networkCards.put( VmMetaData.EthernetDevType.NONE, new VBoxEthernetDevTypeMeta( false, "Am79C970A" ) );
- networkCards.put( VmMetaData.EthernetDevType.PCNETPCI2, new VBoxEthernetDevTypeMeta( true, "Am79C970A" ) );
- networkCards.put( VmMetaData.EthernetDevType.PCNETFAST3, new VBoxEthernetDevTypeMeta( true, "Am79C973" ) );
- networkCards.put( VmMetaData.EthernetDevType.PRO1000MTD, new VBoxEthernetDevTypeMeta( true, "82540EM" ) );
- networkCards.put( VmMetaData.EthernetDevType.PRO1000TS, new VBoxEthernetDevTypeMeta( true, "82543GC" ) );
- networkCards.put( VmMetaData.EthernetDevType.PRO1000MTS, new VBoxEthernetDevTypeMeta( true, "82545EM" ) );
- networkCards.put( VmMetaData.EthernetDevType.PARAVIRT, new VBoxEthernetDevTypeMeta( true, "virtio" ) );
-
- usbSpeeds.put( VmMetaData.UsbSpeed.NONE, new VBoxUsbSpeedMeta( null, 0 ) );
- usbSpeeds.put( VmMetaData.UsbSpeed.USB1_1, new VBoxUsbSpeedMeta( "OHCI", 1 ) );
- usbSpeeds.put( VmMetaData.UsbSpeed.USB2_0, new VBoxUsbSpeedMeta( "EHCI", 2 ) );
- usbSpeeds.put( VmMetaData.UsbSpeed.USB3_0, new VBoxUsbSpeedMeta( "XHCI", 3 ) );
- }
-
- @Override
- public boolean addEthernet( VmMetaData.EtherType type )
- {
- Node hostOnlyInterfaceNode = config.addNewNode( "/VirtualBox/Machine/Hardware/Network/Adapter[@slot='0']", "HostOnlyInterface" );
- if ( hostOnlyInterfaceNode == null ) {
- LOGGER.error( "Failed to create node for HostOnlyInterface." );
- return false;
- }
- return config.addAttributeToNode( hostOnlyInterfaceNode, "name", EthernetType.valueOf( type.name() ).vnet );
- }
-
- @Override
- public boolean tweakForNonPersistent()
- {
- // Cannot disable suspend
- // https://forums.virtualbox.org/viewtopic.php?f=6&t=77169
- // https://forums.virtualbox.org/viewtopic.php?f=8&t=80338
- // But some other stuff that won't make sense in non-persistent mode
- config.setExtraData( "GUI/LastCloseAction", "PowerOff" );
- // Could use "Default" instead of "Last" above, but you won't get any confirmation dialog in that case
- config.setExtraData( "GUI/RestrictedRuntimeHelpMenuActions", "All" );
- config.setExtraData( "GUI/RestrictedRuntimeMachineMenuActions", "TakeSnapshot,Pause,SaveState" );
- config.setExtraData( "GUI/RestrictedRuntimeMenus", "Help" );
- config.setExtraData( "GUI/PreventSnapshotOperations", "true" );
- config.setExtraData( "GUI/PreventApplicationUpdate", "true" );
- config.setExtraData( "GUI/RestrictedCloseActions", "SaveState,PowerOffRestoringSnapshot,Detach" );
- return true;
- }
-
- @Override
- public void setMaxUsbSpeed( VmMetaData.UsbSpeed speed )
- {
- // Wipe existing ones
- config.removeNodes( "/VirtualBox/Machine/Hardware", "USB" );
- if ( speed == null || speed == VmMetaData.UsbSpeed.NONE ) {
- // Add marker so we know it's not an old config and we really want no USB
- Element node = config.createNodeRecursive( "/VirtualBox/OpenSLX/USB" );
- if ( node != null ) {
- node.setAttribute( "disabled", "true" );
- }
- return; // NO USB
- }
- Element node = config.createNodeRecursive( "/VirtualBox/Machine/Hardware/USB/Controllers/Controller" );
- VBoxUsbSpeedMeta vboxSpeed = usbSpeeds.get( speed );
- node.setAttribute( "type", vboxSpeed.value );
- node.setAttribute( "name", vboxSpeed.value );
- if ( speed == UsbSpeed.USB2_0 ) {
- // If EHCI (2.0) is selected, VBox adds an OHCI controller too...
- node.setAttribute( "type", "OHCI" );
- node.setAttribute( "name", "OHCI" );
- }
- }
-
- @Override
- public VmMetaData.UsbSpeed getMaxUsbSpeed()
- {
- NodeList nodes = config.findNodes( "/VirtualBox/Machine/Hardware/USB/Controllers/Controller/@type" );
- int maxSpeed = 0;
- VmMetaData.UsbSpeed maxItem = VmMetaData.UsbSpeed.NONE;
- for ( int i = 0; i < nodes.getLength(); ++i ) {
- if ( nodes.item( i ).getNodeType() != Node.ATTRIBUTE_NODE ) {
- LOGGER.info( "Not ATTRIBUTE type" );
- continue;
- }
- String type = ((Attr)nodes.item( i )).getValue();
- for ( Entry<VmMetaData.UsbSpeed, VBoxUsbSpeedMeta> s : usbSpeeds.entrySet() ) {
- if ( s.getValue().speed > maxSpeed && type.equals( s.getValue().value ) ) {
- maxSpeed = s.getValue().speed;
- maxItem = s.getKey();
- }
- }
- }
- return maxItem;
- }
-}
diff --git a/src/main/java/org/openslx/util/vm/VmMetaData.java b/src/main/java/org/openslx/util/vm/VmMetaData.java
deleted file mode 100644
index 29e2db9..0000000
--- a/src/main/java/org/openslx/util/vm/VmMetaData.java
+++ /dev/null
@@ -1,399 +0,0 @@
-package org.openslx.util.vm;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.apache.log4j.Logger;
-import org.openslx.bwlp.thrift.iface.OperatingSystem;
-import org.openslx.bwlp.thrift.iface.Virtualizer;
-
-/**
- * Describes a configured virtual machine. This class is parsed from a machine
- * description, like a *.vmx for VMware machines.
- */
-public abstract class VmMetaData<T, U, V, W, X>
-{
- private static final Logger LOGGER = Logger.getLogger( VmMetaData.class );
-
- /*
- * Helper types
- */
- protected Map<SoundCardType, T> soundCards = new HashMap<>();
- protected Map<DDAcceleration, U> ddacc = new HashMap<>();
- protected Map<HWVersion, V> hwversion = new HashMap<>();
- protected Map<EthernetDevType, W> networkCards = new HashMap<>();
- protected Map<UsbSpeed, X> usbSpeeds = new HashMap<>();
-
- /**
- * Virtual sound cards types
- */
- public static enum SoundCardType
- {
- NONE( "None" ), DEFAULT( "(default)" ), SOUND_BLASTER( "Sound Blaster 16" ), ES( "ES 1371" ), HD_AUDIO( "Intel Integrated HD Audio" ), AC( "Intel ICH Audio Codec 97" );
-
- public final String displayName;
-
- private SoundCardType( String dName )
- {
- this.displayName = dName;
- }
- }
-
- /**
- * 3D acceleration types
- */
- public static enum DDAcceleration
- {
- OFF( "Off" ), ON( "On" );
-
- public final String displayName;
-
- private DDAcceleration( String dName )
- {
- this.displayName = dName;
- }
- }
-
- /**
- * Virtual hardware version - currently only in use for VMPlayer
- */
- public static enum HWVersion
- {
- NONE( "(invalid)" ),
- THREE( " 3 (Workstation 4/5, Player 1)" ),
- FOUR( " 4 (Workstation 4/5, Player 1/2, Fusion 1)" ),
- SIX( " 6 (Workstation 6)" ),
- SEVEN( " 7 (Workstation 6.5/7, Player 3, Fusion 2/3)" ),
- EIGHT( " 8 (Workstation 8, Player/Fusion 4)" ),
- NINE( " 9 (Workstation 9, Player/Fusion 5)" ),
- TEN( "10 (Workstation 10, Player/Fusion 6)" ),
- ELEVEN( "11 (Workstation 11, Player/Fusion 7)" ),
- TWELVE( "12 (Workstation/Player 12, Fusion 8)" ),
- FOURTEEN( "14 (Workstation/Player 14, Fusion 10)"),
- FIFTEEN( "15 (Workstation/Player 15, Fusion 11)"),
- FIFTEEN_ONE( "16 (Workstation/Player 15.1, Fusion 11.1)"),
- DEFAULT( "default" );
-
- public final String displayName;
-
- private HWVersion( String dName )
- {
- this.displayName = dName;
- }
- }
-
- /**
- * Virtual network cards
- */
- public static enum EthernetDevType
- {
- AUTO( "(default)" ), PCNET32( "AMD PCnet32" ), E1000( "Intel E1000 (PCI)" ), E1000E( "Intel E1000e (PCI-Express)" ), VMXNET( "VMXnet" ), VMXNET3( "VMXnet 3" ), PCNETPCI2(
- "PCnet-PCI II" ), PCNETFAST3( "PCnet-FAST III" ), PRO1000MTD( "Intel PRO/1000 MT Desktop" ), PRO1000TS(
- "Intel PRO/1000 T Server" ), PRO1000MTS( "Intel PRO/1000 MT Server" ), PARAVIRT( "Paravirtualized Network" ), NONE( "No Network Card" );
-
- public final String displayName;
-
- private EthernetDevType( String dName )
- {
- this.displayName = dName;
- }
- }
-
- public static enum UsbSpeed
- {
- NONE( "None" ),
- USB1_1( "USB 1.1" ),
- USB2_0( "USB 2.0" ),
- USB3_0( "USB 3.0" );
-
- public final String displayName;
-
- private UsbSpeed( String dName )
- {
- this.displayName = dName;
- }
- }
-
- public static enum DriveBusType
- {
- SCSI, IDE, SATA;
- }
-
- public static class HardDisk
- {
- public final String chipsetDriver;
- public final DriveBusType bus;
- public final String diskImage;
-
- public HardDisk( String chipsetDriver, DriveBusType bus, String diskImage )
- {
- this.chipsetDriver = chipsetDriver;
- this.bus = bus;
- this.diskImage = diskImage;
- }
- }
-
- public static enum EtherType
- {
- NAT, BRIDGED, HOST_ONLY;
- }
- /*
- * Members
- */
-
- protected final List<HardDisk> hdds = new ArrayList<>();
-
- private final List<OperatingSystem> osList;
-
- private OperatingSystem os = null;
-
- protected String displayName = null;
-
- protected boolean isMachineSnapshot;
-
- /*
- * Getters for virtual hardware
- */
- public List<SoundCardType> getSupportedSoundCards()
- {
- ArrayList<SoundCardType> availables = new ArrayList<SoundCardType>( soundCards.keySet() );
- Collections.sort( availables );
- return availables;
- }
-
- public List<DDAcceleration> getSupportedDDAccs()
- {
- ArrayList<DDAcceleration> availables = new ArrayList<DDAcceleration>( ddacc.keySet() );
- Collections.sort( availables );
- return availables;
- }
-
- public List<HWVersion> getSupportedHWVersions()
- {
- ArrayList<HWVersion> availables = new ArrayList<HWVersion>( hwversion.keySet() );
- Collections.sort( availables );
- return availables;
- }
-
- public List<EthernetDevType> getSupportedEthernetDevices()
- {
- ArrayList<EthernetDevType> availables = new ArrayList<EthernetDevType>( networkCards.keySet() );
- Collections.sort( availables );
- return availables;
- }
-
- public List<UsbSpeed> getSupportedUsbSpeeds()
- {
- ArrayList<UsbSpeed> availables = new ArrayList<>( usbSpeeds.keySet() );
- Collections.sort( availables );
- return availables;
- }
-
- /**
- * Get operating system of this VM.
- */
- public OperatingSystem getOs()
- {
- return os;
- }
-
- /**
- * Get all hard disks of this VM.
- */
- public List<HardDisk> getHdds()
- {
- return Collections.unmodifiableList( hdds );
- }
-
- /**
- * Get display name of VM.
- */
- public String getDisplayName()
- {
- return displayName;
- }
-
- /*
- * Getter for isMachineSnapshot
- */
- public boolean isMachineSnapshot()
- {
- return isMachineSnapshot;
- }
-
- /**
- * This method should return a minimal representation of the input meta data.
- * The representation is platform dependent, and should be stripped of all
- * non-essential configuration, such as CD/DVD/FLoppy drives, serial or parallel
- * ports, shared folders, or anything else that could be considered sensible
- * information (absolute paths containing the local user's name).
- */
- public abstract byte[] getFilteredDefinitionArray();
-
- public final ByteBuffer getFilteredDefinition()
- {
- return ByteBuffer.wrap( getFilteredDefinitionArray() );
- }
-
- /*
- * Methods
- */
-
- public VmMetaData( List<OperatingSystem> osList )
- {
- this.osList = osList;
- }
-
- /**
- * Called from subclass to set the OS. If the OS cannot be determined from the
- * given parameters, it will not be set.
- *
- * @param virtId
- * virtualizer, eg "vmware" for VMware
- * @param virtOsId
- * the os identifier used by the virtualizer, eg. windows7-64 for
- * 64bit Windows 7 on VMware
- */
- protected final void setOs( String virtId, String virtOsId )
- {
- OperatingSystem lazyMatch = null;
- for ( OperatingSystem os : osList ) {
- if ( os.getVirtualizerOsId() == null )
- continue;
- for ( Entry<String, String> entry : os.getVirtualizerOsId().entrySet() ) {
- if ( !entry.getValue().equals( virtOsId ) )
- continue;
- if ( entry.getKey().equals( virtId ) ) {
- this.os = os;
- return;
- } else {
- lazyMatch = os;
- }
- }
- }
- this.os = lazyMatch;
- }
-
- /**
- * Apply config options that are desired when locally editing a VM. for vmware,
- * this disables automatic DPI scaling of the guest.
- */
- public abstract void applySettingsForLocalEdit();
-
- /**
- * Returns a VmMetaData instance of the given machine description given as file
- *
- * @param osList List of supported operating systems
- * @param file VM's machine description file to get the metadata instance from
- * @return VmMetaData object representing the relevant parts of the given machine description
- */
- public static VmMetaData<?, ?, ?, ?, ?> getInstance( List<OperatingSystem> osList, File file )
- throws IOException
- {
- try {
- return new VmwareMetaData( osList, file );
- } catch ( UnsupportedVirtualizerFormatException e ) {
- LOGGER.info( "Not a VMware file", e );
- }
- try {
- return new VboxMetaData( osList, file );
- } catch ( UnsupportedVirtualizerFormatException e ) {
- LOGGER.info( "Not a VirtualBox file", e );
- }
- try {
- return new QemuMetaData( osList, file );
- } catch ( Exception e ) {
- LOGGER.info( "Not a QEmu file", e );
- }
- LOGGER.error( "Could not detect any known virtualizer format" );
- return null;
- }
-
- /**
- * Returns a VmMetaData instance of the given machine description given as a byte array
- *
- * @param osList List of supported operating systems
- * @param vmContent VM's machine description as byte array (e.g. stored in DB)
- * @param length length of the byte array given as vmContent
- * @return VmMetaData object representing the relevant parts of the given machine description
- * @throws IOException
- */
- public static VmMetaData<?, ?, ?, ?, ?> getInstance( List<OperatingSystem> osList, byte[] vmContent, int length ) throws IOException
- {
- Map<String, Exception> exceptions = new HashMap<>();
- try {
- return new VmwareMetaData( osList, vmContent, length );
- } catch ( UnsupportedVirtualizerFormatException e ) {
- exceptions.put( "Not a VMware file", e );
- }
- try {
- return new VboxMetaData( osList, vmContent, length );
- } catch ( UnsupportedVirtualizerFormatException e ) {
- exceptions.put( "Not a VirtualBox file", e );
- }
- // TODO QEmu -- hack above expects qcow2 file, so we can't do anything here yet
- LOGGER.error( "Could not detect any known virtualizer format" );
- for ( Entry<String, Exception> e : exceptions.entrySet() ) {
- LOGGER.error( e.getKey(), e.getValue() );
- }
- return null;
- }
-
- public abstract boolean addHddTemplate( File diskImage, String hddMode, String redoDir );
-
- public abstract boolean addHddTemplate( String diskImagePath, String hddMode, String redoDir );
-
- public abstract boolean addDefaultNat();
-
- public abstract void setOs( String vendorOsId );
-
- public abstract boolean addDisplayName( String name );
-
- public abstract boolean addRam( int mem );
-
- public abstract void addFloppy( int index, String image, boolean readOnly );
-
- public abstract boolean addCdrom( String image );
-
- public abstract boolean addCpuCoreCount( int nrOfCores );
-
- public abstract void setSoundCard( SoundCardType type );
-
- public abstract SoundCardType getSoundCard();
-
- public abstract void setDDAcceleration( DDAcceleration type );
-
- public abstract DDAcceleration getDDAcceleration();
-
- public abstract void setHWVersion( HWVersion type );
-
- public abstract HWVersion getHWVersion();
-
- public abstract void setEthernetDevType( int cardIndex, EthernetDevType type );
-
- public abstract EthernetDevType getEthernetDevType( int cardIndex );
-
- public abstract void setMaxUsbSpeed( UsbSpeed speed );
-
- public abstract UsbSpeed getMaxUsbSpeed();
-
- public abstract byte[] getDefinitionArray();
-
- public abstract boolean addEthernet( EtherType type );
-
- public abstract Virtualizer getVirtualizer();
-
- public abstract boolean tweakForNonPersistent();
-
- /**
- * Function used to register virtual devices
- */
- public abstract void registerVirtualHW();
-}
diff --git a/src/main/java/org/openslx/util/vm/VmwareMetaData.java b/src/main/java/org/openslx/util/vm/VmwareMetaData.java
deleted file mode 100644
index 29227a7..0000000
--- a/src/main/java/org/openslx/util/vm/VmwareMetaData.java
+++ /dev/null
@@ -1,664 +0,0 @@
-package org.openslx.util.vm;
-
-import java.io.File;
-import java.io.IOException;
-import java.nio.charset.StandardCharsets;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.log4j.Logger;
-import org.openslx.bwlp.thrift.iface.OperatingSystem;
-import org.openslx.bwlp.thrift.iface.Virtualizer;
-import org.openslx.thrifthelper.TConst;
-import org.openslx.util.Util;
-import org.openslx.util.vm.VmwareConfig.ConfigEntry;
-
-class VmWareSoundCardMeta
-{
- public final boolean isPresent;
- public final String value;
-
- public VmWareSoundCardMeta( boolean present, String val )
- {
- isPresent = present;
- value = val;
- }
-}
-
-class VmWareDDAccelMeta
-{
- public final boolean isPresent;
-
- public VmWareDDAccelMeta( boolean present )
- {
- isPresent = present;
- }
-}
-
-class VmWareHWVersionMeta
-{
- public final int version;
-
- public VmWareHWVersionMeta( int vers )
- {
- version = vers;
- }
-}
-
-class VmWareEthernetDevTypeMeta
-{
- public final String value;
-
- public VmWareEthernetDevTypeMeta( String val )
- {
- value = val;
- }
-}
-
-class VmwareUsbSpeed
-{
- public final String keyName;
- public final int speedNumeric;
-
- public VmwareUsbSpeed( int speed, String key )
- {
- this.keyName = key + ".present";
- this.speedNumeric = speed;
- }
-}
-
-public class VmwareMetaData extends VmMetaData<VmWareSoundCardMeta, VmWareDDAccelMeta, VmWareHWVersionMeta, VmWareEthernetDevTypeMeta, VmwareUsbSpeed>
-{
-
- private static final Logger LOGGER = Logger.getLogger( VmwareMetaData.class );
-
- private static final Virtualizer virtualizer = new Virtualizer( TConst.VIRT_VMWARE, "VMware" );
-
- private static final Pattern hddKey = Pattern.compile( "^(ide\\d|scsi\\d|sata\\d):?(\\d)?\\.(.*)", Pattern.CASE_INSENSITIVE );
-
- // Lowercase list of allowed settings for upload (as regex)
- private static final Pattern[] whitelist;
-
- private final VmwareConfig config;
-
- // Init static members
- static {
- String[] list = { "^guestos", "^uuid\\.bios", "^config\\.version", "^ehci[.:]", "^mks\\.enable3d", "^virtualhw\\.",
- "^sound[.:]", "\\.pcislotnumber$", "^pcibridge", "\\.virtualdev$", "^tools\\.syncTime$", "^time\\.synchronize",
- "^bios\\.bootDelay", "^rtc\\.", "^xhci[.:]", "^usb_xhci[.:]", "\\.deviceType$", "\\.port$", "\\.parent$", "^usb[.:]",
- "^firmware" };
- whitelist = new Pattern[ list.length ];
- for ( int i = 0; i < list.length; ++i ) {
- whitelist[i] = Pattern.compile( list[i].toLowerCase() );
- }
- }
-
- public static enum EthernetType
- {
- NAT( "vmnet1" ), BRIDGED( "vmnet0" ), HOST_ONLY( "vmnet2" );
-
- public final String vmnet;
-
- private EthernetType( String vnet )
- {
- this.vmnet = vnet;
- }
- }
-
- private final Map<String, Controller> disks = new HashMap<>();
-
- public VmwareMetaData( List<OperatingSystem> osList, File file ) throws IOException, UnsupportedVirtualizerFormatException
- {
- super( osList );
- this.config = new VmwareConfig( file );
- init();
- }
-
- public VmwareMetaData( List<OperatingSystem> osList, byte[] vmxContent, int length ) throws UnsupportedVirtualizerFormatException
- {
- super( osList );
- this.config = new VmwareConfig( vmxContent, length ); // still unfiltered
- init(); // now filtered
- }
-
- private void init()
- {
- registerVirtualHW();
-
- for ( Entry<String, ConfigEntry> entry : config.entrySet() ) {
- handleLoadEntry( entry );
- }
- // Fix accidentally filtered USB config if we see EHCI is present
- if ( isSetAndTrue( "ehci.present" ) && !isSetAndTrue( "usb.present" ) ) {
- addFiltered( "usb.present", "TRUE" );
- }
- // if we find this tag, we already went through the hdd's - so we're done.
- if ( config.get( "#SLX_HDD_BUS" ) != null ) {
- return;
- }
- // Now find the HDDs and add to list
- for ( Entry<String, Controller> cEntry : disks.entrySet() ) {
- Controller controller = cEntry.getValue();
- String controllerType = cEntry.getKey();
- if ( !controller.present )
- continue;
- for ( Entry<String, Device> dEntry : controller.devices.entrySet() ) {
- Device device = dEntry.getValue();
- if ( !device.present )
- continue; // Not present
- if ( device.deviceType != null && !device.deviceType.toLowerCase().endsWith( "disk" ) )
- continue; // Not a HDD
- DriveBusType bus = null;
- if ( controllerType.startsWith( "ide" ) ) {
- bus = DriveBusType.IDE;
- } else if ( controllerType.startsWith( "scsi" ) ) {
- bus = DriveBusType.SCSI;
- } else if ( controllerType.startsWith( "sata" ) ) {
- bus = DriveBusType.SATA;
- }
- hdds.add( new HardDisk( controller.virtualDev, bus, device.filename ) );
- }
- }
- // TODO check if this machine is in a paused/suspended state
- this.isMachineSnapshot = false;
-
- // Add HDD to cleaned vmx
- if ( !hdds.isEmpty() ) {
- HardDisk hdd = hdds.get( 0 );
- addFiltered( "#SLX_HDD_BUS", hdd.bus.toString() );
- if ( hdd.chipsetDriver != null ) {
- addFiltered( "#SLX_HDD_CHIP", hdd.chipsetDriver );
- }
- }
- }
-
- private void addFiltered( String key, String value )
- {
- config.set( key, value ).filtered( true );
- }
-
- private boolean isSetAndTrue( String key )
- {
- String value = config.get( key );
- return value != null && value.equalsIgnoreCase( "true" );
- }
-
- private void handleLoadEntry( Entry<String, ConfigEntry> entry )
- {
- String lowerKey = entry.getKey().toLowerCase();
- // Cleaned vmx construction
- for ( Pattern exp : whitelist ) {
- if ( exp.matcher( lowerKey ).find() ) {
- entry.getValue().filtered( true );
- break;
- }
- }
- //
- // Dig Usable meta data
- String value = entry.getValue().getValue();
- if ( lowerKey.equals( "guestos" ) ) {
- setOs( value );
- return;
- }
- if ( lowerKey.equals( "displayname" ) ) {
- displayName = value;
- return;
- }
- Matcher hdd = hddKey.matcher( entry.getKey() );
- if ( hdd.find() ) {
- handleHddEntry( hdd.group( 1 ).toLowerCase(), hdd.group( 2 ), hdd.group( 3 ), value );
- }
- }
-
- private void handleHddEntry( String controllerStr, String deviceStr, String property, String value )
- {
- Controller controller = disks.get( controllerStr );
- if ( controller == null ) {
- controller = new Controller();
- disks.put( controllerStr, controller );
- }
- if ( deviceStr == null || deviceStr.isEmpty() ) {
- // Controller property
- if ( property.equalsIgnoreCase( "present" ) ) {
- controller.present = Boolean.parseBoolean( value );
- } else if ( property.equalsIgnoreCase( "virtualDev" ) ) {
- controller.virtualDev = value;
- }
- return;
- }
- // Device property
- Device device = controller.devices.get( deviceStr );
- if ( device == null ) {
- device = new Device();
- controller.devices.put( deviceStr, device );
- }
- if ( property.equalsIgnoreCase( "deviceType" ) ) {
- device.deviceType = value;
- } else if ( property.equalsIgnoreCase( "filename" ) ) {
- device.filename = value;
- } else if ( property.equalsIgnoreCase( "present" ) ) {
- device.present = Boolean.parseBoolean( value );
- }
- }
-
- @Override
- public boolean addHddTemplate( File diskImage, String hddMode, String redoDir )
- {
- return addHddTemplate( diskImage.getName(), hddMode, redoDir );
- }
-
- @Override
- public boolean addHddTemplate( String diskImagePath, String hddMode, String redoDir )
- {
- if ( diskImagePath.isEmpty() ) {
- LOGGER.error( "Empty disk image path given!" );
- return false;
- }
- DriveBusType bus;
- try {
- bus = DriveBusType.valueOf( config.get( "#SLX_HDD_BUS" ) );
- } catch ( Exception e ) {
- LOGGER.warn( "Unknown bus type: " + config.get( "#SLX_HDD_BUS" ) + ". Cannot add hdd config." );
- return false;
- }
- String chipset = config.get( "#SLX_HDD_CHIP" );
- String prefix;
- switch ( bus ) {
- case IDE:
- prefix = "ide0:0";
- addFiltered( "ide0.present", "TRUE" );
- break;
- case SATA:
- // Cannot happen?... use lsisas1068
- case SCSI:
- prefix = "scsi0:0";
- addFiltered( "scsi0.present", "TRUE" );
- if ( chipset != null ) {
- addFiltered( "scsi0.virtualDev", chipset );
- }
- break;
- default:
- LOGGER.warn( "Unknown HDD bus type: " + bus.toString() );
- return false;
- }
- // Gen
- addFiltered( prefix + ".present", "TRUE" );
- addFiltered( prefix + ".deviceType", "disk" );
- addFiltered( prefix + ".fileName", diskImagePath );
- if ( hddMode != null ) {
- addFiltered( prefix + ".mode", hddMode );
- addFiltered( prefix + ".redo", "" );
- addFiltered( prefix + ".redoLogDir", redoDir );
- }
- config.remove( "#SLX_HDD_BUS" );
- config.remove( "#SLX_HDD_CHIP" );
- return true;
- }
-
- public boolean addDefaultNat()
- {
- addFiltered( "ethernet0.present", "TRUE" );
- addFiltered( "ethernet0.connectionType", "nat" );
- return true;
- }
-
- public boolean addEthernet( VmMetaData.EtherType type )
- {
- boolean ret = false;
- int index = 0;
- for ( ;; ++index ) {
- if ( config.get( "ethernet" + index + ".present" ) == null )
- break;
- }
- switch ( type ) {
- case NAT:
- ret = addEthernet( index, EthernetType.NAT );
- break;
- case BRIDGED:
- ret = addEthernet( index, EthernetType.BRIDGED );
- break;
- case HOST_ONLY:
- ret = addEthernet( index, EthernetType.HOST_ONLY );
- break;
- default:
- // Should not come to this...
- break;
- }
- return ret;
- }
-
- public boolean addEthernet( int index, EthernetType type )
- {
- String ether = "ethernet" + index;
- addFiltered( ether + ".present", "TRUE" );
- addFiltered( ether + ".connectionType", "custom" );
- addFiltered( ether + ".vnet", type.vmnet );
- if ( config.get( ether + ".virtualDev" ) == null ) {
- String dev = config.get( "ethernet0.virtualDev" );
- if ( dev != null ) {
- addFiltered( ether + ".virtualDev", dev );
- }
- }
- return true;
- }
-
- public void addFloppy( int index, String image, boolean readOnly )
- {
- String pre = "floppy" + index;
- addFiltered( pre + ".present", "TRUE" );
- if ( image == null ) {
- addFiltered( pre + ".startConnected", "FALSE" );
- addFiltered( pre + ".fileType", "device" );
- config.remove( pre + ".fileName" );
- config.remove( pre + ".readonly" );
- addFiltered( pre + ".autodetect", "TRUE" );
- } else {
- addFiltered( pre + ".startConnected", "TRUE" );
- addFiltered( pre + ".fileType", "file" );
- addFiltered( pre + ".fileName", image );
- addFiltered( pre + ".readonly", vmBoolean( readOnly ) );
- config.remove( pre + ".autodetect" );
- }
- }
-
- public boolean addCdrom( String image )
- {
- for ( String port : new String[] { "ide0:0", "ide0:1", "ide1:0", "ide1:1", "scsi0:1" } ) {
- if ( !isSetAndTrue( port + ".present" ) ) {
- addFiltered( port + ".present", "TRUE" );
- if ( image == null ) {
- addFiltered( port + ".autodetect", "TRUE" );
- addFiltered( port + ".deviceType", "cdrom-raw" );
- config.remove( port + ".fileName" );
- } else {
- config.remove( port + ".autodetect" );
- addFiltered( port + ".deviceType", "cdrom-image" );
- addFiltered( port + ".fileName", image );
- }
- return true;
- }
- }
- return false;
- }
-
- private static String vmBoolean( boolean var )
- {
- return Boolean.toString( var ).toUpperCase();
- }
-
- private static String vmInteger( int val )
- {
- return Integer.toString( val );
- }
-
- @Override
- public boolean tweakForNonPersistent()
- {
- addFiltered( "suspend.disabled", "TRUE" );
- return true;
- }
-
- @Override
- public boolean addDisplayName( String name )
- {
- addFiltered( "displayName", name );
- return true;
- }
-
- @Override
- public boolean addRam( int mem )
- {
- addFiltered( "memsize", Integer.toString( mem ) );
- return true;
- }
-
- public void setOs( String vendorOsId )
- {
- addFiltered( "guestOS", vendorOsId );
- setOs( TConst.VIRT_VMWARE, vendorOsId );
- }
-
- @Override
- public byte[] getFilteredDefinitionArray()
- {
- return config.toString( true, false ).getBytes( StandardCharsets.UTF_8 );
- }
-
- public byte[] getDefinitionArray()
- {
- return config.toString( false, false ).getBytes( StandardCharsets.UTF_8 );
- }
-
- @Override
- public Virtualizer getVirtualizer()
- {
- return virtualizer;
- }
-
- private static class Device
- {
- public boolean present = false;
- public String deviceType = null;
- public String filename = null;
-
- @Override
- public String toString()
- {
- return filename + " is " + deviceType + " (present: " + present + ")";
- }
- }
-
- private static class Controller
- {
- public boolean present = true; // Seems to be implicit, seen at least for IDE...
- public String virtualDev = null;
- Map<String, Device> devices = new HashMap<>();
-
- @Override
- public String toString()
- {
- return virtualDev + " is (present: " + present + "): " + devices.toString();
- }
- }
-
- @Override
- public void applySettingsForLocalEdit()
- {
- addFiltered( "gui.applyHostDisplayScalingToGuest", "FALSE" );
- }
-
- public String getValue( String key )
- {
- return config.get( key );
- }
-
- public void setSoundCard( VmMetaData.SoundCardType type )
- {
- VmWareSoundCardMeta soundCardMeta = soundCards.get( type );
- addFiltered( "sound.present", vmBoolean( soundCardMeta.isPresent ) );
- if ( soundCardMeta.value != null ) {
- addFiltered( "sound.virtualDev", soundCardMeta.value );
- } else {
- config.remove( "sound.virtualDev" );
- }
- }
-
- public VmMetaData.SoundCardType getSoundCard()
- {
- if ( !isSetAndTrue( "sound.present" ) || !isSetAndTrue( "sound.autodetect" ) ) {
- return VmMetaData.SoundCardType.NONE;
- }
- String current = config.get( "sound.virtualDev" );
- if ( current != null ) {
- VmWareSoundCardMeta soundCardMeta = null;
- for ( VmMetaData.SoundCardType type : VmMetaData.SoundCardType.values() ) {
- soundCardMeta = soundCards.get( type );
- if ( soundCardMeta != null ) {
- if ( current.equals( soundCardMeta.value ) ) {
- return type;
- }
- }
- }
- }
- return VmMetaData.SoundCardType.DEFAULT;
- }
-
- public void setDDAcceleration( VmMetaData.DDAcceleration type )
- {
- VmWareDDAccelMeta ddaMeta = ddacc.get( type );
- addFiltered( "mks.enable3d", vmBoolean( ddaMeta.isPresent ) );
- }
-
- public VmMetaData.DDAcceleration getDDAcceleration()
- {
- if ( isSetAndTrue( "mks.enable3d" ) ) {
- return VmMetaData.DDAcceleration.ON;
- } else {
- return VmMetaData.DDAcceleration.OFF;
- }
- }
-
- public void setHWVersion( VmMetaData.HWVersion type )
- {
- VmWareHWVersionMeta hwVersionMeta = hwversion.get( type );
- addFiltered( "virtualHW.version", vmInteger( hwVersionMeta.version ) );
- }
-
- public VmMetaData.HWVersion getHWVersion()
- {
- int currentValue = Util.parseInt( config.get( "virtualHW.version" ), -1 );
- VmWareHWVersionMeta hwVersionMeta = null;
- for ( VmMetaData.HWVersion ver : VmMetaData.HWVersion.values() ) {
- hwVersionMeta = hwversion.get( ver );
- if ( hwVersionMeta == null ) {
- continue;
- }
- if ( currentValue == hwVersionMeta.version ) {
- return ver;
- }
- }
- return HWVersion.NONE;
- }
-
- public void setEthernetDevType( int cardIndex, VmMetaData.EthernetDevType type )
- {
- VmWareEthernetDevTypeMeta ethernetDevTypeMeta = networkCards.get( type );
- if ( ethernetDevTypeMeta.value != null ) {
- addFiltered( "ethernet" + cardIndex + ".virtualDev", ethernetDevTypeMeta.value );
- } else {
- config.remove( "ethernet" + cardIndex + ".virtualDev" );
- }
- }
-
- public VmMetaData.EthernetDevType getEthernetDevType( int cardIndex )
- {
- String temp = config.get( "ethernet" + cardIndex + ".virtualDev" );
- if ( temp != null ) {
- VmWareEthernetDevTypeMeta ethernetDevTypeMeta = null;
- for ( VmMetaData.EthernetDevType type : VmMetaData.EthernetDevType.values() ) {
- ethernetDevTypeMeta = networkCards.get( type );
- if ( ethernetDevTypeMeta == null ) {
- continue;
- }
- if ( temp.equals( ethernetDevTypeMeta.value ) ) {
- return type;
- }
- }
- }
- return VmMetaData.EthernetDevType.AUTO;
- }
-
- @Override
- public void setMaxUsbSpeed( VmMetaData.UsbSpeed newSpeed )
- {
- if ( newSpeed == null ) {
- newSpeed = VmMetaData.UsbSpeed.NONE;
- }
- VmwareUsbSpeed newSpeedMeta = usbSpeeds.get( newSpeed );
- if ( newSpeedMeta == null ) {
- throw new RuntimeException( "USB Speed " + newSpeed.name() + " not registered with VMware" );
- }
- for ( VmwareUsbSpeed meta : usbSpeeds.values() ) {
- if ( meta == null )
- continue; // Should not happen
- if ( meta.keyName == null )
- continue; // "No USB" has no config entry, obviously
- if ( meta.speedNumeric <= newSpeedMeta.speedNumeric ) {
- // Enable desired speed class, plus all lower ones
- addFiltered( meta.keyName, "TRUE" );
- } else {
- // This one is higher – remove
- config.remove( meta.keyName );
- }
- }
- // VMware 14+ needs this to use USB 3.0 devices at USB 3.0 ports in VMs configured for < 3.0
- if ( newSpeedMeta.speedNumeric > 0 && newSpeedMeta.speedNumeric < 3 ) {
- addFiltered( "usb.mangleUsb3Speed", "TRUE" );
- }
- }
-
- @Override
- public VmMetaData.UsbSpeed getMaxUsbSpeed()
- {
- int max = 0;
- VmMetaData.UsbSpeed maxEnum = VmMetaData.UsbSpeed.NONE;
- for ( Entry<VmMetaData.UsbSpeed, VmwareUsbSpeed> entry : usbSpeeds.entrySet() ) {
- VmwareUsbSpeed v = entry.getValue();
- if ( v.speedNumeric > max && isSetAndTrue( v.keyName ) ) {
- max = v.speedNumeric;
- maxEnum = entry.getKey();
- }
- }
- return maxEnum;
- }
-
- @Override
- public boolean addCpuCoreCount( int numCores )
- {
- // TODO actually add the cpu core count to the machine description
- return false;
- }
-
- public void registerVirtualHW()
- {
- soundCards.put( VmMetaData.SoundCardType.NONE, new VmWareSoundCardMeta( false, null ) );
- soundCards.put( VmMetaData.SoundCardType.DEFAULT, new VmWareSoundCardMeta( true, null ) );
- soundCards.put( VmMetaData.SoundCardType.SOUND_BLASTER, new VmWareSoundCardMeta( true, "sb16" ) );
- soundCards.put( VmMetaData.SoundCardType.ES, new VmWareSoundCardMeta( true, "es1371" ) );
- soundCards.put( VmMetaData.SoundCardType.HD_AUDIO, new VmWareSoundCardMeta( true, "hdaudio" ) );
-
- ddacc.put( VmMetaData.DDAcceleration.OFF, new VmWareDDAccelMeta( false ) );
- ddacc.put( VmMetaData.DDAcceleration.ON, new VmWareDDAccelMeta( true ) );
-
- hwversion.put( VmMetaData.HWVersion.NONE, new VmWareHWVersionMeta( 0 ) );
- hwversion.put( VmMetaData.HWVersion.THREE, new VmWareHWVersionMeta( 3 ) );
- hwversion.put( VmMetaData.HWVersion.FOUR, new VmWareHWVersionMeta( 4 ) );
- hwversion.put( VmMetaData.HWVersion.SIX, new VmWareHWVersionMeta( 6 ) );
- hwversion.put( VmMetaData.HWVersion.SEVEN, new VmWareHWVersionMeta( 7 ) );
- hwversion.put( VmMetaData.HWVersion.EIGHT, new VmWareHWVersionMeta( 8 ) );
- hwversion.put( VmMetaData.HWVersion.NINE, new VmWareHWVersionMeta( 9 ) );
- hwversion.put( VmMetaData.HWVersion.TEN, new VmWareHWVersionMeta( 10 ) );
- hwversion.put( VmMetaData.HWVersion.ELEVEN, new VmWareHWVersionMeta( 11 ) );
- hwversion.put( VmMetaData.HWVersion.TWELVE, new VmWareHWVersionMeta( 12 ) );
- hwversion.put( VmMetaData.HWVersion.FOURTEEN, new VmWareHWVersionMeta( 14 ) );
- hwversion.put( VmMetaData.HWVersion.FIFTEEN, new VmWareHWVersionMeta( 15 ) );
- hwversion.put( VmMetaData.HWVersion.FIFTEEN_ONE, new VmWareHWVersionMeta( 16 ) );
-
- networkCards.put( VmMetaData.EthernetDevType.AUTO, new VmWareEthernetDevTypeMeta( null ) );
- networkCards.put( VmMetaData.EthernetDevType.PCNET32, new VmWareEthernetDevTypeMeta( "vlance" ) );
- networkCards.put( VmMetaData.EthernetDevType.E1000, new VmWareEthernetDevTypeMeta( "e1000" ) );
- networkCards.put( VmMetaData.EthernetDevType.E1000E, new VmWareEthernetDevTypeMeta( "e1000e" ) );
- networkCards.put( VmMetaData.EthernetDevType.VMXNET, new VmWareEthernetDevTypeMeta( "vmxnet" ) );
- networkCards.put( VmMetaData.EthernetDevType.VMXNET3, new VmWareEthernetDevTypeMeta( "vmxnet3" ) );
-
- usbSpeeds.put( VmMetaData.UsbSpeed.NONE, new VmwareUsbSpeed( 0, null ));
- usbSpeeds.put( VmMetaData.UsbSpeed.USB1_1, new VmwareUsbSpeed( 1, "usb" ) );
- usbSpeeds.put( VmMetaData.UsbSpeed.USB2_0, new VmwareUsbSpeed( 2, "ehci" ) );
- usbSpeeds.put( VmMetaData.UsbSpeed.USB3_0, new VmwareUsbSpeed( 3, "usb_xhci" ) );
- }
-
-}
diff --git a/src/main/java/org/openslx/virtualization/Version.java b/src/main/java/org/openslx/virtualization/Version.java
new file mode 100644
index 0000000..c823324
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/Version.java
@@ -0,0 +1,321 @@
+package org.openslx.virtualization;
+
+import java.util.List;
+import java.util.function.Predicate;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.openslx.util.Util;
+
+/**
+ * Represents a version information.
+ *
+ * The version information is used in the field of virtualization (for virtualizers, disk images,
+ * virtualization configuration files, ...).
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class Version implements Comparable<Version>
+{
+ /**
+ * Regular expression to parse a version from a {@link String}.
+ * <p>
+ * The regular expression matches a version if its textual version information is well-formed
+ * according to the following examples:
+ *
+ * <pre>
+ * 52
+ * 4.31
+ * 5.10.13
+ * </pre>
+ */
+ private static final Pattern VERSION_NUMBER_REGEX = Pattern.compile( "^(\\d+)(?:\\.(\\d+)(?:\\.(\\d+))?)?$" );
+
+ /**
+ * Major number of the version.
+ */
+ private final short major;
+
+ /**
+ * Minor number of the version.
+ */
+ private final short minor;
+
+ /**
+ * Name or description of the version.
+ */
+ private final String name;
+
+ /**
+ * Creates a new version.
+ *
+ * The version consists of a major version, whereas the minor version is set to the value
+ * <code>0</code> and the version name is undefined.
+ *
+ * @param major major version.
+ */
+ public Version( short major )
+ {
+ this( major, Short.valueOf( "0" ), null );
+ }
+
+ /**
+ * Creates a new version.
+ *
+ * The version consists of a major version labeled with a version name, whereas the minor version
+ * is set to the value <code>0</code>.
+ *
+ * @param major major version.
+ * @param name version name.
+ */
+ public Version( short major, String name )
+ {
+ this( major, Short.valueOf( "0" ), name );
+ }
+
+ /**
+ * Creates a new version.
+ *
+ * The version consists of a major and a minor version, whereas the version name is undefined.
+ *
+ * @param major major version.
+ * @param minor minor version.
+ */
+ public Version( short major, short minor )
+ {
+ this( major, minor, null );
+ }
+
+ /**
+ * Creates a new version.
+ *
+ * The version consists of a major and a minor version labeled with a version name.
+ *
+ * @param major major version.
+ * @param minor minor version.
+ * @param name version name.
+ */
+ public Version( short major, short minor, String name )
+ {
+ this.major = major;
+ this.minor = minor;
+ this.name = name;
+ }
+
+ /**
+ * Returns the major version.
+ *
+ * @return major version.
+ */
+ public short getMajor()
+ {
+ return this.major;
+ }
+
+ /**
+ * Returns the minor version.
+ *
+ * @return minor version.
+ */
+ public short getMinor()
+ {
+ return this.minor;
+ }
+
+ /**
+ * Returns the full version as {@link Integer}.
+ *
+ * The full version consists of the major and minor version where both are combined in one
+ * {@link Integer} value. The upper 16-bits of the value represent the major number, whereas
+ * the lower 16-bits represent the minor number.
+ *
+ * @return full version as {@link Integer}.
+ */
+ public int getVersion()
+ {
+ final int major = this.major;
+ final int minor = this.minor;
+
+ return ( major << Short.SIZE ) | minor;
+ }
+
+ /**
+ * Returns the name of the version.
+ *
+ * @return name of the version.
+ */
+ public String getName()
+ {
+ return this.name;
+ }
+
+ /**
+ * Checks if version is supported by a version from a list of supported versions.
+ *
+ * @param supportedVersions list of supported versions.
+ * @return state whether version is supported by a version from the list of versions or not.
+ */
+ public boolean isSupported( List<Version> supportedVersions )
+ {
+ return supportedVersions.contains( this );
+ }
+
+ /**
+ * Returns a version from a list of supported versions filtered by its given filter predicate.
+ *
+ * @param byFilter filter predicate.
+ * @param supportedVersions list of supported versions.
+ * @return version from a list of supported versions filtered by its given filter predicate.
+ */
+ private static Version getInstanceByPredicateFromVersions( Predicate<Version> byFilter,
+ List<Version> supportedVersions )
+ {
+ return supportedVersions.stream().filter( byFilter ).findFirst().orElse( null );
+ }
+
+ /**
+ * Returns a version from a list of supported versions by its given major version.
+ *
+ * @param major version.
+ * @param supportedVersions list of supported versions.
+ * @return version from a list of supported versions by its given major version.
+ */
+ public static Version getInstanceByMajorFromVersions( short major, List<Version> supportedVersions )
+ {
+ final Predicate<Version> byMajor = version -> major == version.getMajor();
+ return Version.getInstanceByPredicateFromVersions( byMajor, supportedVersions );
+ }
+
+ /**
+ * Returns a version from a list of supported versions by its given major and minor version.
+ *
+ * @param major version.
+ * @param minor version.
+ * @param supportedVersions list of supported versions.
+ * @return version from a list of supported versions by its given major and minor version.
+ */
+ public static Version getInstanceByMajorMinorFromVersions( short major, short minor,
+ List<Version> supportedVersions )
+ {
+ final Predicate<Version> byMajorMinor = version -> major == version.getMajor() && minor == version.getMinor();
+ return supportedVersions.stream().filter( byMajorMinor ).findFirst().orElse( null );
+ }
+
+ /**
+ * Checks if this version is smaller than a specified {@code version}.
+ *
+ * @param version for comparison.
+ * @return state whether this version is smaller than the specified {@code version} or not.
+ */
+ public boolean isSmallerThan( Version version )
+ {
+ return ( this.compareTo( version ) < 0 ) ? true : false;
+ }
+
+ /**
+ * Checks if this version is greater than a specified {@code version}.
+ *
+ * @param version for comparison.
+ * @return state whether this version is greater than the specified {@code version} or not.
+ */
+ public boolean isGreaterThan( Version version )
+ {
+ return ( this.compareTo( version ) > 0 ) ? true : false;
+ }
+
+ /**
+ * Creates a new version parsed from a {@link String}.
+ *
+ * The version consists of a major and a minor version parsed from the specified {@link String}.
+ *
+ * @param version textual information containing a version as {@link String}. The textual
+ * version should be well-formed according to the defined regular expression
+ * {@link #VERSION_NUMBER_REGEX}.
+ * @return version instance.
+ */
+ public static Version valueOf( String version )
+ {
+ final Version parsedVersion;
+
+ if ( Util.isEmptyString( version ) ) {
+ parsedVersion = null;
+ } else {
+ final Matcher versionMatcher = VERSION_NUMBER_REGEX.matcher( version );
+
+ if ( versionMatcher.find() ) {
+ final String majorStr = versionMatcher.group( 1 );
+ final String minorStr = versionMatcher.group( 2 );
+
+ final short major = ( majorStr != null ) ? Short.valueOf( majorStr ) : 0;
+ final short minor = ( minorStr != null ) ? Short.valueOf( minorStr ) : 0;
+
+ parsedVersion = new Version( major, minor );
+
+ } else {
+ parsedVersion = null;
+ }
+ }
+
+ return parsedVersion;
+ }
+
+ @Override
+ public String toString()
+ {
+ if ( Util.isEmptyString( this.getName() ) ) {
+ return String.format( "%d.%d", this.getMajor(), this.getMinor() );
+ } else {
+ return String.format( "%d.%d %s", this.getMajor(), this.getMinor(), this.getName() );
+ }
+ }
+
+ @Override
+ public boolean equals( Object obj )
+ {
+ if ( obj == null ) {
+ return false;
+ } else if ( this.getClass() != obj.getClass() ) {
+ return false;
+ } else if ( this.compareTo( Version.class.cast( obj ) ) == 0 ) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public int compareTo( Version v )
+ {
+ // compare the current version to the specified version
+ if ( this.getMajor() < v.getMajor() ) {
+ // current major version is smaller than the given major version
+ return -1;
+ } else if ( this.getMajor() > v.getMajor() ) {
+ // current major version is larger than the given major version
+ return 1;
+ } else {
+ // current major version is equal to the given major version
+ // so compare the current minor version to the specified minor version
+ if ( this.getMinor() < v.getMinor() ) {
+ // current minor version is smaller than the given minor version
+ // so the entire version is smaller than the given version
+ return -1;
+ } else if ( this.getMinor() > v.getMinor() ) {
+ // current minor version is larger than the given minor version
+ // so the entire version is larger than the given version
+ return 1;
+ } else {
+ // current minor version is equal to the given minor version
+ // so the entire version is equal to the given version
+ return 0;
+ }
+ }
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return ( Short.valueOf( this.getMajor() ).hashCode() ) ^ ( Short.valueOf( this.getMinor() ).hashCode() );
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfiguration.java b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfiguration.java
new file mode 100644
index 0000000..f548597
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfiguration.java
@@ -0,0 +1,378 @@
+package org.openslx.virtualization.configuration;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.openslx.bwlp.thrift.iface.OperatingSystem;
+import org.openslx.virtualization.Version;
+import org.openslx.virtualization.hardware.VirtOptionValue;
+import org.openslx.virtualization.hardware.ConfigurationGroups;
+import org.openslx.virtualization.virtualizer.Virtualizer;
+
+/**
+ * Describes a configured virtual machine. This class is parsed from a machine
+ * description, like a *.vmx for VMware machines.
+ */
+public abstract class VirtualizationConfiguration
+{
+ private static final Logger LOGGER = LogManager.getLogger( VirtualizationConfiguration.class );
+
+ private final Virtualizer virtualizer;
+
+
+ public static enum DriveBusType
+ {
+ SCSI, IDE, SATA, NVME;
+ }
+
+ public static class HardDisk
+ {
+ public final String chipsetDriver;
+ public final DriveBusType bus;
+ public final String diskImage;
+
+ public HardDisk( String chipsetDriver, DriveBusType bus, String diskImage )
+ {
+ this.chipsetDriver = chipsetDriver;
+ this.bus = bus;
+ this.diskImage = diskImage;
+ }
+ }
+
+ public static enum EtherType
+ {
+ NAT, BRIDGED, HOST_ONLY;
+ }
+
+ public static class ConfigurableOptionGroup
+ {
+ public final ConfigurationGroups groupIdentifier;
+
+ public final List<VirtOptionValue> availableOptions;
+
+ public ConfigurableOptionGroup( ConfigurationGroups groupIdentifier, List<VirtOptionValue> availableOptions )
+ {
+ this.groupIdentifier = groupIdentifier;
+ this.availableOptions = Collections.unmodifiableList( availableOptions );
+ }
+
+ public VirtOptionValue getSelected()
+ {
+ for (VirtOptionValue hw : availableOptions) {
+ if ( hw.isActive() )
+ return hw;
+ }
+ return null;
+ }
+
+ }
+
+ /*
+ * Members
+ */
+
+ protected final List<HardDisk> hdds = new ArrayList<HardDisk>();
+
+ protected final List<OperatingSystem> osList;
+
+ private OperatingSystem os = null;
+
+ protected String displayName = null;
+
+ protected boolean isMachineSnapshot;
+
+ protected final List<ConfigurableOptionGroup> configurableOptions = new ArrayList<>();
+
+ /**
+ * Get operating system of this VM.
+ *
+ * @return operating system of the VM.
+ */
+ public OperatingSystem getOs()
+ {
+ return os;
+ }
+
+ /**
+ * Sets the operating system for the virtualization configuration.
+ *
+ * @param os operating system for the virtualization configuration.
+ */
+ public void setOs( OperatingSystem os )
+ {
+ this.os = os;
+ }
+
+ /**
+ * Get all hard disks of this VM.
+ *
+ * @return list of hard disks of the VM.
+ */
+ public List<HardDisk> getHdds()
+ {
+ return Collections.unmodifiableList( hdds );
+ }
+
+ /**
+ * Get display name of VM.
+ *
+ * @return display name of the VM.
+ */
+ public String getDisplayName()
+ {
+ return displayName;
+ }
+
+ public boolean isMachineSnapshot()
+ {
+ return isMachineSnapshot;
+ }
+
+ /**
+ * Return name of file that indicates this VM is currently suspended.
+ * The existence of this file means the VM is currently suspended.
+ * Can be null if this virtualizer doesn't support suspension, or if
+ * it's already known the VM is not in a suspended state.
+ */
+ public String getSuspendedFile()
+ {
+ return null;
+ }
+
+ private class VersionOption extends VirtOptionValue {
+
+ private final Version version;
+
+ public VersionOption( Version version )
+ {
+ super( Integer.toString( version.getVersion() ), version.getName() );
+ this.version = version;
+ }
+
+ @Override
+ public boolean isActive()
+ {
+ try {
+ return getVirtualizerVersion().equals( version );
+ } catch (NullPointerException e) {
+ return false;
+ }
+ }
+
+ @Override
+ public void apply()
+ {
+ setVirtualizerVersion( version );
+ }
+ }
+
+ /*
+ * Methods
+ */
+
+ public VirtualizationConfiguration( Virtualizer virtualizer, List<OperatingSystem> osList )
+ {
+ this.virtualizer = virtualizer;
+
+ if ( osList == null ) {
+ // create empty operating system list if none is specified
+ this.osList = new ArrayList<OperatingSystem>();
+ } else {
+ this.osList = osList;
+ }
+
+ // register virtual hardware models for graphical editing of virtual devices (GPU, sound, USB, ...)
+ final List<Version> availables = this.getVirtualizer().getSupportedVersions();
+ //Collections.sort( availables ); // XXX WTF? How did this not break before? It's an unmodifiable collection
+ if ( availables != null ) {
+ // XXX List is null for qemu?
+ List<VirtOptionValue> list = new ArrayList<>();
+ for ( Version ver : availables ) {
+ list.add( new VersionOption( ver ) );
+ }
+ configurableOptions.add( new ConfigurableOptionGroup( ConfigurationGroups.HW_VERSION, list ) );
+ }
+ this.registerVirtualHW();
+ }
+
+ /**
+ * Returns a VmMetaData instance of the given machine description given as file
+ *
+ * @param osList List of supported operating systems
+ * @param file VM's machine description file to get the metadata instance from
+ * @return VmMetaData object representing the relevant parts of the given machine description
+ * @throws IOException failed to read machine description from specified file.
+ */
+ public static VirtualizationConfiguration getInstance( List<OperatingSystem> osList, File file )
+ throws IOException
+ {
+ try {
+ return new VirtualizationConfigurationVmware( osList, file );
+ } catch ( VirtualizationConfigurationException e ) {
+ LOGGER.debug( "Not a VMware file", e );
+ }
+ try {
+ return new VirtualizationConfigurationVirtualBox( osList, file );
+ } catch ( VirtualizationConfigurationException e ) {
+ LOGGER.debug( "Not a VirtualBox file", e );
+ }
+ try {
+ return new VirtualizationConfigurationQemu( osList, file );
+ } catch ( VirtualizationConfigurationException e ) {
+ LOGGER.debug( "Not a Libvirt file", e );
+ }
+ try {
+ return new VirtualizationConfigurationDocker( osList, file );
+ } catch ( VirtualizationConfigurationException e ) {
+ LOGGER.debug( "Not a tar.gz file, for docker container", e );
+ }
+
+ LOGGER.error( "Could not detect any known virtualizer format" );
+ return null;
+ }
+
+ /**
+ * Returns a VmMetaData instance of the given machine description given as a byte array
+ *
+ * @param osList List of supported operating systems
+ * @param vmContent VM's machine description as byte array (e.g. stored in DB)
+ * @param length length of the byte array given as vmContent
+ * @return VmMetaData object representing the relevant parts of the given machine description
+ * @throws IOException failed to read machine description from specified byte stream.
+ * @throws VirtualizationConfigurationException
+ */
+ public static VirtualizationConfiguration getInstance( List<OperatingSystem> osList, byte[] vmContent,
+ int length )
+ throws IOException, VirtualizationConfigurationException
+ {
+ try {
+ return new VirtualizationConfigurationVmware( osList, vmContent, length );
+ } catch ( VirtualizationConfigurationException e ) {
+ LOGGER.debug( "Not a VMware file", e );
+ }
+ try {
+ return new VirtualizationConfigurationDocker( osList, vmContent, length );
+ } catch ( VirtualizationConfigurationException e ) {
+ LOGGER.debug( "Not a tar.gz file, for docker container", e );
+ }
+ try {
+ return new VirtualizationConfigurationVirtualBox( osList, vmContent, length );
+ } catch ( VirtualizationConfigurationException e ) {
+ LOGGER.debug( "Not a VirtualBox file", e );
+ }
+ try {
+ return new VirtualizationConfigurationQemu( osList, vmContent, length );
+ } catch ( VirtualizationConfigurationException e ) {
+ LOGGER.debug( "Not a Libvirt file", e );
+ }
+ throw new VirtualizationConfigurationException( "Unknown virtualizer config format" );
+ }
+
+ /**
+ * Returns the file name extension for the virtualization configuration file.
+ *
+ * @return file name extension for the virtualization configuration file.
+ */
+ public abstract String getFileNameExtension();
+
+ public abstract boolean addEmptyHddTemplate();
+
+ public abstract boolean addHddTemplate( File diskImage, String hddMode, String redoDir );
+
+ public abstract boolean addHddTemplate( String diskImagePath, String hddMode, String redoDir );
+
+ public abstract boolean addDefaultNat();
+
+ public abstract void setOs( String vendorOsId );
+
+ public abstract boolean addDisplayName( String name );
+
+ public abstract boolean addRam( int mem );
+
+ public abstract void addFloppy( int index, String image, boolean readOnly );
+
+ public abstract boolean addCdrom( String image );
+
+ public abstract boolean addCpuCoreCount( int nrOfCores );
+
+ public abstract void disableUsb();
+
+ public abstract void setVirtualizerVersion( Version type );
+
+ public abstract Version getVirtualizerVersion();
+
+ public abstract byte[] getConfigurationAsByteArray();
+
+ public String getConfigurationAsString()
+ {
+ return new String( this.getConfigurationAsByteArray(), StandardCharsets.UTF_8 );
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.getConfigurationAsString();
+ }
+
+ public abstract boolean addEthernet( EtherType type );
+
+ public Virtualizer getVirtualizer()
+ {
+ return this.virtualizer;
+ }
+
+ /**
+ * Validates the virtualization configuration and reports errors if its content is not a valid
+ * virtualization configuration.
+ *
+ * @throws VirtualizationConfigurationException validation of the virtualization configuration
+ * failed.
+ */
+ public abstract void validate() throws VirtualizationConfigurationException;
+
+ /**
+ * Transforms the virtualization configuration in terms of a privacy filter to filter out
+ * sensitive information like name of users in absolute paths.
+ *
+ * @throws VirtualizationConfigurationException transformation of the virtualization
+ * configuration failed.
+ */
+ public abstract void transformPrivacy() throws VirtualizationConfigurationException;
+
+ /**
+ * Transforms the virtualization configuration applying options that are desired when locally
+ * editing a virtualized system (e.g. disables automatic DPI scaling).
+ *
+ * @throws VirtualizationConfigurationException transformation of the virtualization
+ * configuration failed.
+ */
+ public abstract void transformEditable() throws VirtualizationConfigurationException;
+
+ /**
+ * Transforms the virtualization configuration applying options that are desired when running a
+ * virtualized system in a stateless manner.
+ *
+ * @throws VirtualizationConfigurationException transformation of the virtualization
+ * configuration failed.
+ */
+ public abstract void transformNonPersistent() throws VirtualizationConfigurationException;
+
+ /**
+ * Function used to register virtual devices.
+ */
+ public abstract void registerVirtualHW();
+
+ /**
+ * Get all config options this virtualizer supports, with all available options.
+ */
+ public List<ConfigurableOptionGroup> getConfigurableOptions()
+ {
+ return Collections.unmodifiableList( configurableOptions );
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationDocker.java b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationDocker.java
new file mode 100644
index 0000000..3163ed2
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationDocker.java
@@ -0,0 +1,174 @@
+package org.openslx.virtualization.configuration;
+
+import java.io.BufferedInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.List;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.openslx.bwlp.thrift.iface.OperatingSystem;
+import org.openslx.virtualization.Version;
+import org.openslx.virtualization.virtualizer.VirtualizerDocker;
+
+public class VirtualizationConfigurationDocker extends VirtualizationConfiguration {
+
+ /**
+ * File name extension for Docker virtualization configuration files.
+ */
+ private static final String FILE_NAME_EXTENSION = null;
+
+ private static final Logger LOGGER = LogManager.getLogger( VirtualizationConfigurationDocker.class);
+
+ /**
+ * containerDefinition is a serialized tar.gz archive and represents a
+ * ContainerDefinition. This archive contains a serialized Container Recipe (e.g. Dockerfile)
+ * and a ContainerMeta witch is serialized as a json file.
+ * <p>
+ * See ContainerDefintion in tutor-module (bwsuite).
+ * <p>
+ * This field is in vm context the machine description e.g. vmware = vmx.
+ * This field will be stored in table imageversion.virtualizerconfig
+ */
+ private byte[] containerDefinition;
+
+ public VirtualizationConfigurationDocker(List<OperatingSystem> osList, File file) throws VirtualizationConfigurationException {
+ super(new VirtualizerDocker(), osList);
+
+ BufferedInputStream bis = null;
+
+ try {
+ bis = new BufferedInputStream(new FileInputStream(file));
+ containerDefinition = new byte[(int) file.length()];
+ bis.read(containerDefinition);
+
+ checkIsTarGz();
+ } catch (IOException | VirtualizationConfigurationException e) {
+ LOGGER.error("Couldn't read dockerfile", e);
+ } finally {
+ try {
+ bis.close();
+ } catch ( IOException e ) {
+ LOGGER.warn( "Could not close the input stream!" );
+ }
+ }
+ }
+
+ public VirtualizationConfigurationDocker(List<OperatingSystem> osList, byte[] vmContent, int length)
+ throws VirtualizationConfigurationException {
+ super(new VirtualizerDocker(), osList);
+
+ containerDefinition = vmContent;
+
+ checkIsTarGz();
+ }
+
+ /*
+ TODO This is just a simple check to prevent the workflow from considering any content as acceptable.
+ */
+ /**
+ * Checks if the first two bytes of the content identifies a tar.gz archive.
+ * The first byte is 31 == 0x1f, the second byte has to be -117 == 0x8b.
+ *
+ * @throws VirtualizationConfigurationException
+ */
+ private void checkIsTarGz() throws VirtualizationConfigurationException {
+ if (!((31 == containerDefinition[0]) && (-117 == containerDefinition[1]))) {
+ LOGGER.debug("Not Supported Content.");
+ throw new VirtualizationConfigurationException(
+ "DockerMetaDataDummy: Not tar.gz encoded content!");
+ }
+ }
+
+ @Override public void transformEditable() throws VirtualizationConfigurationException {
+
+ }
+
+ @Override
+ public void transformPrivacy() throws VirtualizationConfigurationException {
+ }
+
+ @Override
+ public boolean addEmptyHddTemplate() {
+ return true;
+ }
+
+ @Override public boolean addHddTemplate(File diskImage, String hddMode, String redoDir) {
+ return true;
+ }
+
+ @Override public boolean addHddTemplate(String diskImagePath, String hddMode, String redoDir) {
+ return false;
+ }
+
+ @Override public boolean addDefaultNat() {
+ return true;
+ }
+
+ @Override public void setOs(String vendorOsId) {
+
+ }
+
+ @Override public boolean addDisplayName(String name) {
+ return true;
+ }
+
+ @Override public boolean addRam(int mem) {
+ return true;
+ }
+
+ @Override public void addFloppy(int index, String image, boolean readOnly) {
+
+ }
+
+ @Override public boolean addCdrom(String image) {
+ return true;
+ }
+
+ @Override public boolean addCpuCoreCount(int nrOfCores) {
+ return true;
+ }
+
+ @Override public void setVirtualizerVersion( Version type )
+ {
+ }
+
+ @Override public Version getVirtualizerVersion()
+ {
+ return null;
+ }
+
+ @Override public byte[] getConfigurationAsByteArray() {
+ return this.containerDefinition;
+ }
+
+ @Override public boolean addEthernet(EtherType type) {
+ return true;
+ }
+
+ @Override public void transformNonPersistent() throws VirtualizationConfigurationException {
+
+ }
+
+ @Override public void registerVirtualHW() {
+
+ }
+
+ @Override
+ public String getFileNameExtension() {
+ return VirtualizationConfigurationDocker.FILE_NAME_EXTENSION;
+ }
+
+ @Override
+ public void validate() throws VirtualizationConfigurationException
+ {
+ }
+
+ @Override
+ public void disableUsb()
+ {
+ // Not applicable, maybe some day via USBguard?
+ }
+
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationException.java b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationException.java
new file mode 100644
index 0000000..2d401b1
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationException.java
@@ -0,0 +1,13 @@
+package org.openslx.virtualization.configuration;
+
+public class VirtualizationConfigurationException extends Exception
+{
+ /**
+ * Version for serialization.
+ */
+ private static final long serialVersionUID = 5794121065945636839L;
+
+ public VirtualizationConfigurationException(String message) {
+ super(message);
+ }
+} \ No newline at end of file
diff --git a/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationQemu.java b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationQemu.java
new file mode 100644
index 0000000..6c62a96
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationQemu.java
@@ -0,0 +1,903 @@
+package org.openslx.virtualization.configuration;
+
+import java.io.File;
+import java.math.BigInteger;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.openslx.bwlp.thrift.iface.OperatingSystem;
+import org.openslx.firmware.FirmwareException;
+import org.openslx.firmware.QemuFirmwareUtil;
+import org.openslx.libvirt.domain.Domain;
+import org.openslx.libvirt.domain.DomainUtils;
+import org.openslx.libvirt.domain.device.ControllerUsb;
+import org.openslx.libvirt.domain.device.Disk.BusType;
+import org.openslx.libvirt.domain.device.Disk.StorageType;
+import org.openslx.libvirt.domain.device.DiskCdrom;
+import org.openslx.libvirt.domain.device.DiskFloppy;
+import org.openslx.libvirt.domain.device.DiskStorage;
+import org.openslx.libvirt.domain.device.Graphics;
+import org.openslx.libvirt.domain.device.GraphicsSpice;
+import org.openslx.libvirt.domain.device.Interface;
+import org.openslx.libvirt.domain.device.Sound;
+import org.openslx.libvirt.domain.device.Video;
+import org.openslx.libvirt.libosinfo.LibOsInfo;
+import org.openslx.libvirt.libosinfo.os.Os;
+import org.openslx.libvirt.xml.LibvirtXmlDocumentException;
+import org.openslx.libvirt.xml.LibvirtXmlSerializationException;
+import org.openslx.libvirt.xml.LibvirtXmlValidationException;
+import org.openslx.util.LevenshteinDistance;
+import org.openslx.util.Util;
+import org.openslx.virtualization.Version;
+import org.openslx.virtualization.hardware.VirtOptionValue;
+import org.openslx.virtualization.hardware.ConfigurationGroups;
+import org.openslx.virtualization.hardware.Ethernet;
+import org.openslx.virtualization.hardware.SoundCard;
+import org.openslx.virtualization.hardware.Usb;
+import org.openslx.virtualization.virtualizer.VirtualizerQemu;
+
+/**
+ * Virtual machine configuration (managed by Libvirt) for the QEMU hypervisor.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class VirtualizationConfigurationQemu extends VirtualizationConfiguration
+{
+ /**
+ * Name of the network bridge for the LAN.
+ */
+ public static final String NETWORK_BRIDGE_LAN_DEFAULT = "br0";
+
+ /**
+ * Name of the network bridge for the default NAT network.
+ */
+ public static final String NETWORK_BRIDGE_NAT_DEFAULT = "nat1";
+
+ /**
+ * Name of the network for the isolated host network (host only).
+ */
+ public static final String NETWORK_BRIDGE_HOST_ONLY_DEFAULT = "vsw2";
+
+ /**
+ * Default physical CDROM drive of the hypervisor host.
+ */
+ public static final String CDROM_DEFAULT_PHYSICAL_DRIVE = "/dev/sr0";
+
+ /**
+ * File name extension for QEMU (Libvirt) virtualization configuration files.
+ */
+ public static final String FILE_NAME_EXTENSION = "xml";
+
+ /**
+ * Libvirt XML configuration file to modify configuration of virtual machine for QEMU.
+ */
+ private Domain vmConfig = null;
+
+ /**
+ * Creates new virtual machine configuration (managed by Libvirt) for the QEMU hypervisor.
+ *
+ * @param osList list of operating systems.
+ * @param file image file for the QEMU hypervisor.
+ *
+ * @throws VirtualizationConfigurationException Libvirt XML configuration cannot be processed.
+ */
+ public VirtualizationConfigurationQemu( List<OperatingSystem> osList, File file )
+ throws VirtualizationConfigurationException
+ {
+ super( new VirtualizerQemu(), osList );
+
+ try {
+ // read and parse Libvirt domain XML configuration document
+ this.vmConfig = new Domain( file );
+ } catch ( LibvirtXmlDocumentException | LibvirtXmlSerializationException | LibvirtXmlValidationException e ) {
+ throw new VirtualizationConfigurationException( e.getLocalizedMessage() );
+ }
+
+ // parse VM config and initialize fields of QemuMetaData class
+ this.parseVmConfig();
+ }
+
+ /**
+ * Creates new virtual machine configuration (managed by Libvirt) for the QEMU hypervisor.
+ *
+ * @param osList list of operating systems.
+ * @param vmContent file content for the QEMU hypervisor.
+ * @param length number of bytes of the file content.
+ *
+ * @throws VirtualizationConfigurationException Libvirt XML configuration cannot be processed.
+ */
+ public VirtualizationConfigurationQemu( List<OperatingSystem> osList, byte[] vmContent, int length )
+ throws VirtualizationConfigurationException
+ {
+ super( new VirtualizerQemu(), osList );
+
+ try {
+ // read and parse Libvirt domain XML configuration document
+ this.vmConfig = new Domain( new String( vmContent, StandardCharsets.UTF_8 ) );
+ } catch ( LibvirtXmlDocumentException | LibvirtXmlSerializationException | LibvirtXmlValidationException e ) {
+ throw new VirtualizationConfigurationException( e.getLocalizedMessage() );
+ }
+
+ // parse VM config and initialize fields of QemuMetaData class
+ this.parseVmConfig();
+ }
+
+ /**
+ * Parses Libvirt domain XML configuration to initialize QEMU metadata.
+ */
+ private void parseVmConfig()
+ {
+ // set display name of VM
+ this.displayName = vmConfig.getName();
+
+ // this property cannot be checked with the Libvirt domain XML configuration
+ // to check if machine is in a paused/suspended state, look in the QEMU qcow2 image for snapshots and machine states
+ this.isMachineSnapshot = false;
+
+ // add HDDs, SSDs to QEMU metadata
+ for ( DiskStorage storageDiskDevice : this.vmConfig.getDiskStorageDevices() ) {
+ this.addHddMetaData( storageDiskDevice );
+ }
+
+ // detect the operating system from the optional embedded libosinfo metadata
+ this.setOs( this.vmConfig.getLibOsInfoOsId() );
+ }
+
+ /**
+ * Adds an existing and observed storage disk device to the HDD metadata.
+ *
+ * @param storageDiskDevice existing and observed storage disk that should be added to the
+ * metadata.
+ */
+ private void addHddMetaData( DiskStorage storageDiskDevice )
+ {
+ String hddChipsetModel = null;
+ DriveBusType hddChipsetBus = VirtualizationConfigurationQemuUtils
+ .convertBusType( storageDiskDevice.getBusType() );
+ String hddImagePath = storageDiskDevice.getStorageSource();
+
+ this.hdds.add( new HardDisk( hddChipsetModel, hddChipsetBus, hddImagePath ) );
+ }
+
+ /**
+ * Detects the operating system by the specified libosinfo operating system identifier.
+ *
+ * @param osId libosinfo operating system identifier.
+ */
+ private OperatingSystem detectOperatingSystem( String osId )
+ {
+ OperatingSystem os = null;
+
+ if ( osId != null && !osId.isEmpty() ) {
+ // lookup operating system identifier in the libosinfo database
+ final Os osLookup = LibOsInfo.lookupOs( osId );
+
+ // check if entry in the database was found
+ if ( osLookup != null ) {
+ // operating system entry was found
+ // so determine OpenSLX OS name with the smallest distance to the libosinfo OS name
+ final LevenshteinDistance distance = new LevenshteinDistance( 2, 1, 1 );
+ int smallestDistance = Integer.MAX_VALUE;
+
+ // get name of the OS and combine it with the optional available architecture
+ String osLookupOsName = osLookup.getName();
+ final int osArchSize = VirtualizationConfigurationQemuUtils.getOsArchSize( this.vmConfig.getOsArch() );
+
+ if ( osArchSize > 0 ) {
+ // append architecture size in bit if information is available from the specified architecture
+ osLookupOsName += " (" + osArchSize + " Bit)";
+ }
+
+ for ( final OperatingSystem osCandidate : this.osList ) {
+ final int currentDistance = distance.calculateDistance( osLookupOsName, osCandidate.getOsName() );
+
+ if ( currentDistance < smallestDistance ) {
+ // if the distance is smaller save the current distance and operating system as best candidate
+ smallestDistance = currentDistance;
+ os = osCandidate;
+ }
+ }
+ }
+ }
+
+ return os;
+ }
+
+ @Override
+ public void transformEditable() throws VirtualizationConfigurationException
+ {
+ }
+
+ public void transformOsLoader() throws VirtualizationConfigurationException
+ {
+ final String sourceOsLoader = this.vmConfig.getOsLoader();
+ final String sourceOsArch = this.vmConfig.getOsArch();
+ final String sourceOsMachine = this.vmConfig.getOsMachine();
+
+ // transform OS loader for local editing
+ // check if OS loader is specified
+ if ( sourceOsLoader != null && !sourceOsLoader.isEmpty() ) {
+ // OS loader is specified so transform path to specified firmware path
+ // First, lookup QEMU firmware loader for target
+ String targetOsLoader = null;
+ try {
+ targetOsLoader = QemuFirmwareUtil.lookupTargetOsLoaderDefaultFwSpecDir( sourceOsLoader, sourceOsArch,
+ sourceOsMachine );
+ } catch ( FirmwareException e ) {
+ throw new VirtualizationConfigurationException( e.getLocalizedMessage() );
+ }
+
+ // Second, set target QEMU firmware loader if specified
+ if ( targetOsLoader != null && !targetOsLoader.isEmpty() ) {
+ this.vmConfig.setOsLoader( targetOsLoader );
+ }
+ }
+ }
+
+ @Override
+ public boolean addEmptyHddTemplate()
+ {
+ return this.addHddTemplate( "", null, null );
+ }
+
+ @Override
+ public boolean addHddTemplate( File diskImage, String hddMode, String redoDir )
+ {
+ return this.addHddTemplate( diskImage.getAbsolutePath(), hddMode, redoDir );
+ }
+
+ @Override
+ public boolean addHddTemplate( String diskImagePath, String hddMode, String redoDir )
+ {
+ int index = this.vmConfig.getDiskStorageDevices().size() - 1;
+ index = ( index > 0 ) ? index : 0;
+ return this.addHddTemplate( index, diskImagePath, hddMode, redoDir );
+ }
+
+ /**
+ * Adds hard disk drive (HDD) to the QEMU virtual machine configuration.
+ *
+ * @param index current index of HDD to be added to the virtual machine configuration.
+ * @param diskImagePath path to the virtual disk image for the HDD.
+ * @param hddMode operation mode of the HDD.
+ * @param redoDir directory for the redo log if an independent non-persistent
+ * <code>hddMode</code> is set.
+ * @return result state of adding the HDD.
+ */
+ public boolean addHddTemplate( int index, String diskImagePath, String hddMode, String redoDir )
+ {
+ ArrayList<DiskStorage> storageDiskDevices = this.vmConfig.getDiskStorageDevices();
+ DiskStorage storageDiskDevice = VirtualizationConfigurationQemuUtils.getArrayIndex( storageDiskDevices, index );
+
+ if ( storageDiskDevice == null ) {
+ // HDD does not exist, so create new storage (HDD) device
+ final BusType devBusType = BusType.VIRTIO;
+ final String targetDevName = VirtualizationConfigurationQemuUtils.createDeviceName( this.vmConfig,
+ devBusType );
+ storageDiskDevice = this.vmConfig.addDiskStorageDevice();
+ storageDiskDevice.setReadOnly( false );
+ storageDiskDevice.setBusType( devBusType );
+ storageDiskDevice.setTargetDevice( targetDevName );
+
+ if ( diskImagePath == null || diskImagePath.isEmpty() ) {
+ storageDiskDevice.removeStorage();
+ } else {
+ storageDiskDevice.setStorage( StorageType.FILE, diskImagePath );
+ }
+
+ // add new created HDD to the metadata of the QemuMetaData object, too
+ this.addHddMetaData( storageDiskDevice );
+ } else {
+ // HDD exists, so update existing storage (HDD) device
+ if ( diskImagePath == null || diskImagePath.isEmpty() ) {
+ storageDiskDevice.removeStorage();
+ } else {
+ storageDiskDevice.setStorage( StorageType.FILE, diskImagePath );
+ }
+ }
+
+ return true;
+ }
+
+ @Override
+ public boolean addDefaultNat()
+ {
+ // since network interface was not filtered during VM upload,
+ // do not add or configure any network interface here
+ return true;
+ }
+
+ @Override
+ public void setOs( String vendorOsId )
+ {
+ final OperatingSystem os = this.detectOperatingSystem( vendorOsId );
+ this.setOs( os );
+ }
+
+ @Override
+ public boolean addDisplayName( String name )
+ {
+ this.vmConfig.setName( name );
+
+ final boolean statusName = this.vmConfig.getName().equals( name );
+
+ return statusName;
+ }
+
+ @Override
+ public boolean addRam( int mem )
+ {
+ // convert given memory in MiB to memory in bytes for Libvirt XML Domain API functions
+ final BigInteger memory = DomainUtils.decodeMemory( Integer.toString( mem ), "MiB" );
+
+ this.vmConfig.setMemory( memory );
+ this.vmConfig.setCurrentMemory( memory );
+
+ final boolean isMemorySet = this.vmConfig.getMemory().equals( memory );
+ final boolean isCurrentMemorySet = this.vmConfig.getCurrentMemory().equals( memory );
+
+ return isMemorySet && isCurrentMemorySet;
+ }
+
+ @Override
+ public void addFloppy( int index, String image, boolean readOnly )
+ {
+ ArrayList<DiskFloppy> floppyDiskDevices = this.vmConfig.getDiskFloppyDevices();
+ DiskFloppy floppyDiskDevice = VirtualizationConfigurationQemuUtils.getArrayIndex( floppyDiskDevices, index );
+
+ if ( floppyDiskDevice == null ) {
+ // floppy device does not exist, so create new floppy device
+ final BusType devBusType = BusType.FDC;
+ final String targetDevName = VirtualizationConfigurationQemuUtils.createDeviceName( this.vmConfig,
+ devBusType );
+ floppyDiskDevice = this.vmConfig.addDiskFloppyDevice();
+ floppyDiskDevice.setBusType( devBusType );
+ floppyDiskDevice.setTargetDevice( targetDevName );
+ floppyDiskDevice.setReadOnly( readOnly );
+
+ if ( image == null || image.isEmpty() ) {
+ floppyDiskDevice.removeStorage();
+ } else {
+ floppyDiskDevice.setStorage( StorageType.FILE, image );
+ }
+ } else {
+ // floppy device exists, so update existing floppy device
+ floppyDiskDevice.setReadOnly( readOnly );
+
+ if ( image == null || image.isEmpty() ) {
+ floppyDiskDevice.removeStorage();
+ } else {
+ floppyDiskDevice.setStorage( StorageType.FILE, image );
+ }
+ }
+ }
+
+ @Override
+ public boolean addCdrom( String image )
+ {
+ int index = this.vmConfig.getDiskCdromDevices().size() - 1;
+ index = ( index > 0 ) ? index : 0;
+ return this.addCdrom( index, image );
+ }
+
+ /**
+ * Adds CDROM drive to the QEMU virtual machine configuration.
+ *
+ * @param index current index of CDROM drive to be added to the virtual machine configuration.
+ * @param image path to a virtual image that will be inserted as CDROM into the drive.
+ * @return result state of adding the CDROM drive.
+ */
+ public boolean addCdrom( int index, String image )
+ {
+ ArrayList<DiskCdrom> cdromDiskDevices = this.vmConfig.getDiskCdromDevices();
+ DiskCdrom cdromDiskDevice = VirtualizationConfigurationQemuUtils.getArrayIndex( cdromDiskDevices, index );
+
+ if ( cdromDiskDevice == null ) {
+ // CDROM device does not exist, so create new CDROM device
+ final BusType devBusType = BusType.SATA;
+ final String targetDevName = VirtualizationConfigurationQemuUtils.createDeviceName( this.vmConfig,
+ devBusType );
+ cdromDiskDevice = this.vmConfig.addDiskCdromDevice();
+ cdromDiskDevice.setBusType( devBusType );
+ cdromDiskDevice.setTargetDevice( targetDevName );
+ cdromDiskDevice.setReadOnly( true );
+
+ if ( image == null ) {
+ cdromDiskDevice.setStorage( StorageType.BLOCK, CDROM_DEFAULT_PHYSICAL_DRIVE );
+ } else {
+ if ( image.isEmpty() ) {
+ cdromDiskDevice.removeStorage();
+ } else {
+ cdromDiskDevice.setStorage( StorageType.FILE, image );
+ }
+ }
+ } else {
+ // CDROM device exists, so update existing CDROM device
+ cdromDiskDevice.setReadOnly( true );
+
+ if ( image == null ) {
+ cdromDiskDevice.setStorage( StorageType.BLOCK, CDROM_DEFAULT_PHYSICAL_DRIVE );
+ } else {
+ if ( image.isEmpty() ) {
+ cdromDiskDevice.removeStorage();
+ } else {
+ cdromDiskDevice.setStorage( StorageType.FILE, image );
+ }
+ }
+ }
+
+ return true;
+ }
+
+ @Override
+ public boolean addCpuCoreCount( int nrOfCores )
+ {
+ this.vmConfig.setVCpu( nrOfCores );
+
+ boolean isVCpuSet = this.vmConfig.getVCpu() == nrOfCores;
+
+ return isVCpuSet;
+ }
+
+ class QemuGfxModel extends VirtOptionValue
+ {
+ public QemuGfxModel( Video.Model model, String displayName )
+ {
+ super( model.toString(), displayName );
+ }
+
+ @Override
+ public void apply()
+ {
+ final ArrayList<Video> videoDevices = vmConfig.getVideoDevices();
+
+ if ( videoDevices.isEmpty() ) {
+ // add new video device with disabled acceleration to VM configuration
+ final Video videoDevice = vmConfig.addVideoDevice();
+ videoDevice.setModel( Video.Model.fromString( this.getId() ) );
+ videoDevice.set2DAcceleration( false );
+ videoDevice.set3DAcceleration( false );
+ } else {
+ // change graphics model of existing video devices
+ for ( final Video videoDevice : videoDevices ) {
+ // remove all old model-related XML attributes
+ videoDevice.removeXmlElement( "model" );
+ // set new model
+ videoDevice.setModel( Video.Model.fromString( this.getId() ) );
+ }
+ }
+ }
+
+ @Override
+ public boolean isActive()
+ {
+ final ArrayList<Video> videoDevices = vmConfig.getVideoDevices();
+ boolean isActive = true;
+
+ for ( final Video videoDevice : videoDevices ) {
+ if ( !videoDevice.getModel().toString().equals( this.getId() ) ) {
+ isActive = false;
+ break;
+ }
+ }
+
+ return isActive;
+ }
+ }
+
+ class QemuGfxType extends VirtOptionValue
+ {
+ public QemuGfxType( String id, String displayName )
+ {
+ super( id, displayName );
+ }
+
+ @Override
+ public void apply()
+ {
+ ArrayList<Graphics> graphicDevices = vmConfig.getGraphicDevices();
+ ArrayList<Video> videoDevices = vmConfig.getVideoDevices();
+ final boolean accelerationEnabled = this.id.equals( "true" );
+
+ boolean acceleratedGraphicsAvailable = false;
+
+ if ( graphicDevices.isEmpty() ) {
+ // add new graphics device with enabled acceleration to VM configuration
+ GraphicsSpice graphicSpiceDevice = vmConfig.addGraphicsSpiceDevice();
+ graphicSpiceDevice.setOpenGl( true );
+ acceleratedGraphicsAvailable = true;
+ } else {
+ // enable graphic acceleration of existing graphics devices
+ for ( Graphics graphicDevice : graphicDevices ) {
+ // set hardware acceleration for SPICE based graphics output
+ // other graphic devices do not support hardware acceleration
+ if ( graphicDevice instanceof GraphicsSpice ) {
+ GraphicsSpice.class.cast( graphicDevice ).setOpenGl( true );
+ acceleratedGraphicsAvailable = true;
+ }
+ }
+ }
+
+ // only configure hardware acceleration of video card(s) if graphics with hardware acceleration is available
+ if ( acceleratedGraphicsAvailable ) {
+ if ( videoDevices.isEmpty() ) {
+ // add new video device with enabled acceleration to VM configuration
+ Video videoDevice = vmConfig.addVideoDevice();
+ videoDevice.setModel( Video.Model.VIRTIO );
+ videoDevice.set2DAcceleration( true );
+ videoDevice.set3DAcceleration( true );
+ } else {
+ // enable graphic acceleration of existing graphics and video devices
+ for ( Video videoDevice : videoDevices ) {
+ // set hardware acceleration for Virtio GPUs
+ // other GPUs do not support hardware acceleration
+ if ( videoDevice.getModel() == Video.Model.VIRTIO ) {
+ videoDevice.set2DAcceleration( accelerationEnabled );
+ videoDevice.set3DAcceleration( accelerationEnabled );
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public boolean isActive()
+ {
+ ArrayList<Graphics> graphicsDevices = vmConfig.getGraphicDevices();
+ ArrayList<Video> videoDevices = vmConfig.getVideoDevices();
+
+ boolean acceleratedGraphicsAvailable = false;
+ boolean acceleratedVideoDevAvailable = false;
+
+ // search for hardware accelerated graphics
+ for ( Graphics graphicDevice : graphicsDevices ) {
+ // only SPICE based graphic devices support hardware acceleration
+ if ( graphicDevice instanceof GraphicsSpice ) {
+ acceleratedGraphicsAvailable = true;
+ break;
+ }
+ }
+
+ // search for hardware accelerated video devices
+ for ( Video videoDevice : videoDevices ) {
+ // only Virtio based video devices support hardware acceleration
+ if ( videoDevice.getModel() == Video.Model.VIRTIO ) {
+ acceleratedVideoDevAvailable = true;
+ break;
+ }
+ }
+
+ // hardware acceleration is available if at least one accelerated graphics and video device is available
+ if ( acceleratedGraphicsAvailable && acceleratedVideoDevAvailable ) {
+ return this.id.equals( "true" );
+ } else {
+ return this.id.equals( "false" );
+ }
+ }
+ }
+
+ @Override
+ public void setVirtualizerVersion( Version type )
+ {
+ if ( type != null ) {
+ final String osMachine = this.vmConfig.getOsMachine();
+ final String osMachineName = VirtualizationConfigurationQemuUtils.getOsMachineName( osMachine );
+
+ if ( osMachineName != null && !osMachineName.isEmpty() ) {
+ final String modifiedOsMachineVersion = VirtualizationConfigurationQemuUtils.getOsMachineVersion( type );
+ final String modifiedOsMachine = VirtualizationConfigurationQemuUtils.getOsMachine( osMachineName,
+ modifiedOsMachineVersion );
+ this.vmConfig.setOsMachine( modifiedOsMachine );
+ }
+ }
+ }
+
+ @Override
+ public Version getVirtualizerVersion()
+ {
+ final String osMachine = this.vmConfig.getOsMachine();
+ final Version uncheckedVersion = VirtualizationConfigurationQemuUtils.getOsMachineVersion( osMachine );
+ final Version checkedVersion;
+
+ if ( uncheckedVersion == null ) {
+ checkedVersion = null;
+ } else {
+ checkedVersion = Version.getInstanceByMajorMinorFromVersions( uncheckedVersion.getMajor(),
+ uncheckedVersion.getMinor(), this.getVirtualizer().getSupportedVersions() );
+ }
+
+ return checkedVersion;
+ }
+
+ class QemuNicModel extends VirtOptionValue
+ {
+ private final int cardIndex;
+
+ public QemuNicModel( int cardIndex, Interface.Model model, String displayName )
+ {
+ super( model.toString(), displayName ); // XXX: toString/fromString would disappear if
+ this.cardIndex = cardIndex; // this were AbstractConfigurableOption<T extends Enum<T>>
+ }
+
+ @Override
+ public void apply()
+ {
+ ArrayList<Interface> networkDevices = vmConfig.getInterfaceDevices();
+ Interface networkDevice = VirtualizationConfigurationQemuUtils.getArrayIndex( networkDevices, cardIndex );
+
+ if ( networkDevice != null ) {
+ networkDevice.setModel( Interface.Model.fromString( id ) );
+ }
+ }
+
+ @Override
+ public boolean isActive()
+ {
+ ArrayList<Interface> networkDevices = vmConfig.getInterfaceDevices();
+ Interface networkDevice = VirtualizationConfigurationQemuUtils.getArrayIndex( networkDevices, cardIndex );
+
+ if ( networkDevice == null ) {
+ // network interface device is not present
+ return Util.isEmptyString( this.id ); // XXX: would be more explicit with enum.NONE
+ }
+ // get model of existing network interface device
+ Interface.Model networkDeviceModel = networkDevice.getModel();
+ if ( networkDeviceModel == null ) {
+ return Util.isEmptyString( this.id ); // see above
+ }
+ // Success
+ return networkDeviceModel.toString().equals( this.id ); // XXX: enum would allow simple ==
+ }
+ }
+
+ class QemuSoundCardModel extends VirtOptionValue
+ {
+ public QemuSoundCardModel( Sound.Model id, String displayName )
+ {
+ super( id.toString(), displayName );
+ }
+
+ @Override
+ public void apply()
+ {
+ ArrayList<Sound> soundDevices = vmConfig.getSoundDevices();
+ Sound.Model soundDeviceModel = Sound.Model.fromString( this.id );
+
+ if ( soundDevices.isEmpty() ) {
+ // create new sound device with 'soundDeviceModel' hardware
+ Sound soundDevice = vmConfig.addSoundDevice();
+ soundDevice.setModel( soundDeviceModel );
+ } else {
+ // update sound device model type of existing sound devices
+ for ( Sound soundDevice : soundDevices ) {
+ soundDevice.setModel( soundDeviceModel );
+ }
+ }
+ }
+
+ @Override
+ public boolean isActive()
+ {
+ ArrayList<Sound> soundDevices = vmConfig.getSoundDevices();
+
+ if ( soundDevices.isEmpty() ) {
+ // the VM configuration does not contain a sound card device
+ return Util.isEmptyString( this.id );
+ }
+ // the VM configuration at least one sound card device, so return the type of the first one
+ Sound.Model soundDeviceModel = soundDevices.get( 0 ).getModel();
+ return soundDeviceModel != null && soundDeviceModel.toString().equals( this.id );
+ }
+
+ }
+
+ class QemuUsbSpeed extends VirtOptionValue
+ {
+ public QemuUsbSpeed( ControllerUsb.Model id, String displayName )
+ {
+ super( id.toString(), displayName );
+ }
+
+ @Override
+ public void apply()
+ {
+ ArrayList<ControllerUsb> usbControllerDevices = vmConfig.getUsbControllerDevices();
+ ControllerUsb.Model usbControllerModel = ControllerUsb.Model.fromString( this.id );
+
+ if ( usbControllerDevices.isEmpty() ) {
+ // add new USB controller with specified speed 'usbControllerModel'
+ ControllerUsb usbControllerDevice = vmConfig.addControllerUsbDevice();
+ usbControllerDevice.setModel( usbControllerModel );
+ } else {
+ // update model of all USB controller devices to support the maximum speed
+ for ( ControllerUsb usbControllerDevice : usbControllerDevices ) {
+ usbControllerDevice.setModel( usbControllerModel );
+ }
+ }
+ }
+
+ @Override
+ public boolean isActive()
+ {
+ ArrayList<ControllerUsb> usbControllerDevices = vmConfig.getUsbControllerDevices();
+
+ for ( ControllerUsb usbControllerDevice : usbControllerDevices ) {
+ ControllerUsb.Model usbControllerModel = usbControllerDevice.getModel();
+
+ // TODO Need something to map from chip to usb speed. But this is conceptually broken anyways since
+ // it's modeled after vmware, where you only cannot configure different controllers at the same time
+ // anyways XXX
+ if ( usbControllerModel.toString().equals( this.id ) )
+ return true;
+ }
+
+ return false;
+ }
+ }
+
+ @Override
+ public byte[] getConfigurationAsByteArray()
+ {
+ String configuration = this.vmConfig.toString();
+
+ if ( configuration == null ) {
+ return null;
+ } else {
+ // append newline at the end of the XML content to match the structure of an original Libvirt XML file
+ //configuration += LibvirtXmlDocument.LINE_SEPARATOR;
+ return configuration.getBytes( StandardCharsets.UTF_8 );
+ }
+ }
+
+ @Override
+ public boolean addEthernet( EtherType type )
+ {
+ int index = this.vmConfig.getInterfaceDevices().size() - 1;
+ index = ( index > 0 ) ? index : 0;
+ return this.addEthernet( index, type );
+ }
+
+ /**
+ * Adds an ethernet card to the QEMU virtual machine configuration.
+ *
+ * @param index current index of the ethernet card to be added to the virtual machine
+ * configuration.
+ * @param type card model of the ethernet card.
+ * @return result state of adding the ethernet card.
+ */
+ public boolean addEthernet( int index, EtherType type )
+ {
+ ArrayList<Interface> interfaceDevices = this.vmConfig.getInterfaceDevices();
+ Interface interfaceDevice = VirtualizationConfigurationQemuUtils.getArrayIndex( interfaceDevices, index );
+
+ final Interface.Model defaultNetworkDeviceModel = Interface.Model.VIRTIO_NET_PCI;
+
+ if ( interfaceDevice == null ) {
+ // network interface device does not exist, so create new network interface device
+ switch ( type ) {
+ case BRIDGED:
+ // add network bridge interface device
+ interfaceDevice = this.vmConfig.addInterfaceBridgeDevice();
+ interfaceDevice.setModel( defaultNetworkDeviceModel );
+ interfaceDevice.setSource( VirtualizationConfigurationQemu.NETWORK_BRIDGE_LAN_DEFAULT );
+ break;
+ case HOST_ONLY:
+ // add network interface device with link to the isolated host network
+ interfaceDevice = this.vmConfig.addInterfaceBridgeDevice();
+ interfaceDevice.setModel( defaultNetworkDeviceModel );
+ interfaceDevice.setSource( VirtualizationConfigurationQemu.NETWORK_BRIDGE_HOST_ONLY_DEFAULT );
+ break;
+ case NAT:
+ // add network interface device with link to the NAT network
+ interfaceDevice = this.vmConfig.addInterfaceBridgeDevice();
+ interfaceDevice.setModel( defaultNetworkDeviceModel );
+ interfaceDevice.setSource( VirtualizationConfigurationQemu.NETWORK_BRIDGE_NAT_DEFAULT );
+ break;
+ }
+ } else {
+ // network interface device exists, so update existing network interface device
+ switch ( type ) {
+ case BRIDGED:
+ interfaceDevice.setType( Interface.Type.BRIDGE );
+ interfaceDevice.setSource( VirtualizationConfigurationQemu.NETWORK_BRIDGE_LAN_DEFAULT );
+ break;
+ case HOST_ONLY:
+ interfaceDevice.setType( Interface.Type.BRIDGE );
+ interfaceDevice.setSource( VirtualizationConfigurationQemu.NETWORK_BRIDGE_HOST_ONLY_DEFAULT );
+ break;
+ case NAT:
+ interfaceDevice.setType( Interface.Type.BRIDGE );
+ interfaceDevice.setSource( VirtualizationConfigurationQemu.NETWORK_BRIDGE_NAT_DEFAULT );
+ break;
+ }
+ }
+
+ return true;
+ }
+
+ @Override
+ public void transformNonPersistent() throws VirtualizationConfigurationException
+ {
+ // NOT implemented yet
+ }
+
+ @Override
+ public void transformPrivacy() throws VirtualizationConfigurationException
+ {
+ // removes all referenced storage files of all specified CDROMs, Floppy drives and HDDs
+ this.vmConfig.removeDiskDevicesStorage();
+
+ // remove specified NVRAM file of OS loader (firmware)
+ this.vmConfig.removeOsNvram();
+ }
+
+ @Override
+ public void registerVirtualHW()
+ {
+ // XXX Add missing qemu-only types/models
+ List<VirtOptionValue> list;
+ // @formatter:off
+ list = new ArrayList<>();
+ //list.add( new QemuSoundCardModel( Sound.Model.NONE, SoundCard.NONE ) ); // XXX TODO
+ list.add( new QemuSoundCardModel( Sound.Model.ICH9, SoundCard.DEFAULT ) );
+ list.add( new QemuSoundCardModel( Sound.Model.SB16, SoundCard.SOUND_BLASTER ) );
+ list.add( new QemuSoundCardModel( Sound.Model.ES1370, SoundCard.ES ) );
+ list.add( new QemuSoundCardModel( Sound.Model.AC97, SoundCard.AC ) );
+ list.add( new QemuSoundCardModel( Sound.Model.ICH9, SoundCard.HD_AUDIO ) );
+ configurableOptions.add( new ConfigurableOptionGroup( ConfigurationGroups.SOUND_CARD_MODEL, list ) );
+
+ list = new ArrayList<>();
+ list.add( new QemuGfxModel( Video.Model.VGA, "VGA" ) );
+ list.add( new QemuGfxModel( Video.Model.QXL, "QXL" ) );
+ list.add( new QemuGfxModel( Video.Model.VMVGA, "VMware VGA" ) );
+ list.add( new QemuGfxModel( Video.Model.VIRTIO, "virtio-gpu" ) );
+ configurableOptions.add( new ConfigurableOptionGroup( ConfigurationGroups.GFX_MODEL, list ) );
+
+ list = new ArrayList<>();
+ list.add( new QemuGfxType( "false", "2D" ) );
+ list.add( new QemuGfxType( "true", "3D" ) );
+ configurableOptions.add( new ConfigurableOptionGroup( ConfigurationGroups.GFX_TYPE, list ) );
+
+ list = new ArrayList<>();
+ // XXX Represent NONE; can add missing models now with new approach (add human readable strings)
+ list.add( new QemuNicModel( 0, Interface.Model.VIRTIO, Ethernet.AUTO ) );
+ list.add( new QemuNicModel( 0, Interface.Model.PCNET, Ethernet.PCNETPCI2 ) );
+ list.add( new QemuNicModel( 0, Interface.Model.E1000, Ethernet.E1000 ) );
+ list.add( new QemuNicModel( 0, Interface.Model.E1000E, Ethernet.E1000E ) );
+ list.add( new QemuNicModel( 0, Interface.Model.VMXNET3, Ethernet.VMXNET3 ) );
+ list.add( new QemuNicModel( 0, Interface.Model.VIRTIO_NET_PCI, Ethernet.PARAVIRT ) );
+ configurableOptions.add( new ConfigurableOptionGroup( ConfigurationGroups.NIC_MODEL, list ) );
+
+ list = new ArrayList<>();
+ list.add( new QemuUsbSpeed( ControllerUsb.Model.NONE, Usb.NONE ) );
+ list.add( new QemuUsbSpeed( ControllerUsb.Model.ICH9_UHCI1, Usb.USB1_1 ) );
+ list.add( new QemuUsbSpeed( ControllerUsb.Model.ICH9_EHCI1, Usb.USB2_0 ) );
+ list.add( new QemuUsbSpeed( ControllerUsb.Model.QEMU_XHCI, Usb.USB3_0 ) );
+ configurableOptions.add( new ConfigurableOptionGroup( ConfigurationGroups.USB_SPEED, list ) );
+ // @formatter:on
+ }
+
+ @Override
+ public String getFileNameExtension()
+ {
+ return VirtualizationConfigurationQemu.FILE_NAME_EXTENSION;
+ }
+
+ @Override
+ public void validate() throws VirtualizationConfigurationException
+ {
+ try {
+ this.vmConfig.validateXml();
+ } catch ( LibvirtXmlValidationException e ) {
+ throw new VirtualizationConfigurationException( e.getLocalizedMessage() );
+ }
+ }
+
+ @Override
+ public void disableUsb()
+ {
+ new QemuUsbSpeed( ControllerUsb.Model.NONE, Usb.NONE ).apply();
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationQemuUtils.java b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationQemuUtils.java
new file mode 100644
index 0000000..86216a0
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationQemuUtils.java
@@ -0,0 +1,404 @@
+package org.openslx.virtualization.configuration;
+
+import java.util.ArrayList;
+import java.util.function.Predicate;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.openslx.libvirt.domain.Domain;
+import org.openslx.libvirt.domain.device.Disk;
+import org.openslx.libvirt.domain.device.Disk.BusType;
+import org.openslx.virtualization.Version;
+import org.openslx.virtualization.configuration.VirtualizationConfiguration.DriveBusType;
+
+/**
+ * Collection of utils to convert data types from bwLehrpool to Libvirt and vice versa.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class VirtualizationConfigurationQemuUtils
+{
+ /**
+ * Separator symbol between Libvirt/QEMU machine name and machine version.
+ */
+ private static final String OS_MACHINE_NAME_VERSION_SEPARATOR = "-";
+
+ /**
+ * Converts a Libvirt disk device bus type to a VM metadata driver bus type.
+ *
+ * @param busType Libvirt disk device bus type.
+ * @return VM metadata bus type of the disk drive.
+ */
+ public static DriveBusType convertBusType( Disk.BusType busType )
+ {
+ DriveBusType type = null;
+
+ if ( busType == null )
+ return null;
+
+ switch ( busType ) {
+ case IDE:
+ type = DriveBusType.IDE;
+ break;
+ case SATA:
+ type = DriveBusType.SATA;
+ break;
+ case SCSI:
+ type = DriveBusType.SCSI;
+ break;
+ default:
+ type = null;
+ break;
+ }
+
+ return type;
+ }
+
+ /**
+ * Converts a VM metadata driver bus type to a Libvirt disk device bus type.
+ *
+ * @param busType VM metadata bus type of the disk drive.
+ * @return Libvirt disk device bus type.
+ */
+ public static Disk.BusType convertBusType( DriveBusType busType )
+ {
+ Disk.BusType type = null;
+
+ switch ( busType ) {
+ case IDE:
+ type = BusType.IDE;
+ break;
+ case NVME:
+ type = null;
+ break;
+ case SATA:
+ type = BusType.SATA;
+ break;
+ case SCSI:
+ type = BusType.SCSI;
+ break;
+ }
+
+ return type;
+ }
+
+ /**
+ * Returns an item from a given {@link ArrayList}.
+ *
+ * The item is selected by a given index. If the item is not available within the
+ * {@link ArrayList}, <code>null</code> is returned.
+ *
+ * @param <T> type of the {@link ArrayList}.
+ * @param array {@link ArrayList} of type <code>T</code>.
+ * @param index selects the item from the {@link ArrayList}.
+ * @return selected item of the {@link ArrayList}.
+ */
+ public static <T> T getArrayIndex( ArrayList<T> array, int index )
+ {
+ T ret;
+
+ try {
+ ret = array.get( index );
+ } catch ( IndexOutOfBoundsException e ) {
+ ret = null;
+ }
+
+ return ret;
+ }
+
+ /**
+ * Creates an alphabetical device name constructed from a device prefix and a device number.
+ *
+ * @param devicePrefix prefix of the constructed device name.
+ * @param deviceNumber number of the device.
+ * @return alphabetical device name.
+ */
+ private static String createAlphabeticalDeviceName( String devicePrefix, int deviceNumber )
+ {
+ if ( deviceNumber < 0 || deviceNumber >= ( 'z' - 'a' ) ) {
+ String errorMsg = "Device number is out of range to be able to create a valid device name.";
+ throw new IllegalArgumentException( errorMsg );
+ }
+
+ return devicePrefix + Character.valueOf( (char) ( 'a' + deviceNumber ) ).toString();
+ }
+
+ /**
+ * Creates an alphabetical device name for a disk device with a bus <i>type</i> that is unique in
+ * a Libvirt domain XML configuration.
+ *
+ * @param config Libvirt domain XML configuration.
+ * @param type device type for device name.
+ * @return alphabetical device name.
+ */
+ public static String createDeviceName( final Domain config, final BusType type ) throws IllegalArgumentException
+ {
+ final String devicePrefix;
+ final int deviceNumber;
+
+ switch ( type ) {
+ case FDC:
+ devicePrefix = "fd";
+ break;
+ case IDE:
+ devicePrefix = "hd";
+ break;
+ case SATA:
+ devicePrefix = "sd";
+ break;
+ case VIRTIO:
+ devicePrefix = "vd";
+ break;
+ default:
+ return null;
+ }
+
+ final Predicate<Disk> bySpecifiedBusType = d -> d.getBusType() == type;
+ deviceNumber = Long.valueOf( config.getDiskDevices().stream().filter( bySpecifiedBusType ).count() ).intValue();
+
+ return VirtualizationConfigurationQemuUtils.createAlphabeticalDeviceName( devicePrefix, deviceNumber );
+ }
+
+ /**
+ * Data container to store a Libvirt/QEMU machine name with version information.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ static class OsMachineNameAndVersion
+ {
+ /**
+ * Stores the machine name.
+ */
+ final private String osMachineName;
+
+ /**
+ * Stores the machine version.
+ */
+ final private Version osMachineVersion;
+
+ /**
+ * Creates a data container for a machine name with version information.
+ *
+ * @param osMachineName name of the machine.
+ * @param osMachineVersion version of the machine.
+ */
+ public OsMachineNameAndVersion( String osMachineName, Version osMachineVersion )
+ {
+ this.osMachineName = osMachineName;
+ this.osMachineVersion = osMachineVersion;
+ }
+
+ /**
+ * Returns the machine name.
+ *
+ * @return machine name.
+ */
+ public String getOsMachineName()
+ {
+ return this.osMachineName;
+ }
+
+ /**
+ * Returns the version information.
+ *
+ * @return version information.
+ */
+ public Version getOsMachineVersion()
+ {
+ return this.osMachineVersion;
+ }
+ }
+
+ /**
+ * Parses a machine name with version information from a Libvirt/QEMU machine description.
+ *
+ * @param osMachine Libvirt/QEMU machine description as {@link String}.
+ * @return data container containing the parsed machine name with version information.
+ */
+ private static OsMachineNameAndVersion parseOsMachineNameAndVersion( String osMachine )
+ {
+ final String osMachineName;
+ final Version osMachineVersion;
+
+ if ( osMachine == null || osMachine.isEmpty() ) {
+ // there is no machine description given, so we can not parse anything
+ osMachineName = null;
+ osMachineVersion = null;
+ } else {
+ // create regular expression based matcher to extract machine name and version number
+ final Pattern osMachineNameAndVersionPattern = Pattern.compile( "^([a-z0-9\\-]+)"
+ + VirtualizationConfigurationQemuUtils.OS_MACHINE_NAME_VERSION_SEPARATOR + "([0-9]+).([0-9]+)$" );
+ final Matcher osMachineNameAndVersionMatcher = osMachineNameAndVersionPattern.matcher( osMachine );
+
+ final boolean matches = osMachineNameAndVersionMatcher.find();
+
+ if ( matches ) {
+ // get results of regular expression based matcher
+ osMachineName = osMachineNameAndVersionMatcher.group( 1 );
+ final String osMachineMajorString = osMachineNameAndVersionMatcher.group( 2 );
+ final String osMachineMinorString = osMachineNameAndVersionMatcher.group( 3 );
+
+ // create version representation
+ final short osMachineMajor = Short.valueOf( osMachineMajorString );
+ final short osMachineMinor = Short.valueOf( osMachineMinorString );
+ osMachineVersion = new Version( osMachineMajor, osMachineMinor );
+ } else {
+ osMachineName = null;
+ osMachineVersion = null;
+ }
+ }
+
+ return new OsMachineNameAndVersion( osMachineName, osMachineVersion );
+ }
+
+ /**
+ * Parses a machine name from a Libvirt/QEMU machine description.
+ *
+ * @param osMachine Libvirt/QEMU machine description as {@link String}.
+ * @return parsed machine name.
+ */
+ public static String getOsMachineName( String osMachine )
+ {
+ final OsMachineNameAndVersion machineNameAndVersion = VirtualizationConfigurationQemuUtils
+ .parseOsMachineNameAndVersion( osMachine );
+ return machineNameAndVersion.getOsMachineName();
+ }
+
+ /**
+ * Parses a machine version from a Libvirt/QEMU machine description.
+ *
+ * @param osMachine Libvirt/QEMU machine description as {@link String}.
+ * @return parsed machine version.
+ */
+ public static Version getOsMachineVersion( String osMachine )
+ {
+ final OsMachineNameAndVersion machineNameAndVersion = VirtualizationConfigurationQemuUtils
+ .parseOsMachineNameAndVersion( osMachine );
+ return machineNameAndVersion.getOsMachineVersion();
+ }
+
+ /**
+ * Combines a machine name with a machine version and returns a Libvirt/QEMU machine description.
+ *
+ * @param osMachineName name of the machine.
+ * @param osMachineVersion version of the machine.
+ * @return Libvirt/QEMU machine description.
+ */
+ public static String getOsMachine( String osMachineName, String osMachineVersion )
+ {
+ return osMachineName + VirtualizationConfigurationQemuUtils.OS_MACHINE_NAME_VERSION_SEPARATOR + osMachineVersion;
+ }
+
+ /**
+ * Converts a {@link Version} to a Libvirt/QEMU machine version.
+ *
+ * @param version Libvirt/QEMU machine version as {@link Version}.
+ * @return Libvirt/QEMU machine version.
+ */
+ public static String getOsMachineVersion( Version version )
+ {
+ return String.format( "%d.%d", version.getMajor(), version.getMinor() );
+ }
+
+ /**
+ * Returns the size of a given architecture {@link String}.
+ *
+ * @param osArch Libvirt/QEMU machine architecture as {@link String}.
+ * @return Size of the Libvirt/QEMU machine architecture.
+ */
+ public static int getOsArchSize( String osArch )
+ {
+ final int archSize;
+
+ if ( osArch == null || osArch.isEmpty() ) {
+ archSize = 0;
+ } else {
+ switch ( osArch ) {
+ case "alpha":
+ archSize = 64;
+ break;
+ case "armv6l":
+ archSize = 32;
+ break;
+ case "armv7l":
+ archSize = 32;
+ break;
+ case "aarch64":
+ archSize = 64;
+ break;
+ case "cris":
+ archSize = 32;
+ break;
+ case "i686":
+ archSize = 32;
+ break;
+ case "m68k":
+ archSize = 32;
+ break;
+ case "microblaze":
+ archSize = 32;
+ break;
+ case "microblazeel":
+ archSize = 32;
+ break;
+ case "mips":
+ archSize = 32;
+ break;
+ case "mipsel":
+ archSize = 32;
+ break;
+ case "mips64":
+ archSize = 64;
+ break;
+ case "mips64el":
+ archSize = 64;
+ break;
+ case "ppc":
+ archSize = 32;
+ break;
+ case "ppc64":
+ archSize = 64;
+ break;
+ case "ppc64le":
+ archSize = 64;
+ break;
+ case "riscv32":
+ archSize = 32;
+ break;
+ case "riscv64":
+ archSize = 64;
+ break;
+ case "s390x":
+ archSize = 64;
+ break;
+ case "sh4":
+ archSize = 32;
+ break;
+ case "sh4eb":
+ archSize = 64;
+ break;
+ case "sparc":
+ archSize = 32;
+ break;
+ case "sparc64":
+ archSize = 64;
+ break;
+ case "x86_64":
+ archSize = 64;
+ break;
+ case "xtensa":
+ archSize = 32;
+ break;
+ case "xtensaeb":
+ archSize = 32;
+ break;
+ default:
+ archSize = 0;
+ }
+ }
+
+ return archSize;
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationUtils.java b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationUtils.java
new file mode 100644
index 0000000..2427001
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationUtils.java
@@ -0,0 +1,52 @@
+package org.openslx.virtualization.configuration;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.openslx.bwlp.thrift.iface.OperatingSystem;
+
+/**
+ * Utilities to set up and edit virtualization configurations.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public final class VirtualizationConfigurationUtils
+{
+ /**
+ * Returns an operating system from a given list of operating systems determined by the
+ * virtualizer specific operating system parameters.
+ *
+ * @param osList list of available operating systems.
+ * @param virtId virtualizer identifier, e.g. <code>vmware</code> for VMware
+ * @param virtOsId operating system identifier used by the virtualizer, eg.
+ * <code>windows7-64</code> for 64bit Windows 7 on VMware.
+ */
+ public static OperatingSystem getOsOfVirtualizerFromList( List<OperatingSystem> osList, String virtId,
+ String virtOsId )
+ {
+ OperatingSystem os = null;
+
+ for ( final OperatingSystem osCandidate : osList ) {
+ final Map<String, String> osVirtualizerMapping = osCandidate.getVirtualizerOsId();
+ if ( osVirtualizerMapping != null ) {
+ for ( final Entry<String, String> entry : osVirtualizerMapping.entrySet() ) {
+ // check if suitable OS has been found
+ if ( entry.getKey().equals( virtId ) && entry.getValue().equals( virtOsId ) ) {
+ // save OS and exit inner loop since OS has been found
+ os = osCandidate;
+ break;
+ }
+ }
+
+ // exit outer loop if OS has been found
+ if ( os != null ) {
+ break;
+ }
+ }
+ }
+
+ return os;
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationVirtualBox.java b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationVirtualBox.java
new file mode 100644
index 0000000..153fffa
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationVirtualBox.java
@@ -0,0 +1,601 @@
+package org.openslx.virtualization.configuration;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.nio.ByteBuffer;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.openslx.bwlp.thrift.iface.OperatingSystem;
+import org.openslx.thrifthelper.TConst;
+import org.openslx.util.Util;
+import org.openslx.virtualization.Version;
+import org.openslx.virtualization.configuration.VirtualizationConfigurationVirtualboxFileFormat.MatchMode;
+import org.openslx.virtualization.hardware.ConfigurationGroups;
+import org.openslx.virtualization.hardware.Ethernet;
+import org.openslx.virtualization.hardware.SoundCard;
+import org.openslx.virtualization.hardware.Usb;
+import org.openslx.virtualization.hardware.VirtOptionValue;
+import org.openslx.virtualization.virtualizer.VirtualizerVirtualBox;
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+public class VirtualizationConfigurationVirtualBox extends VirtualizationConfiguration
+{
+ /**
+ * File name extension for VirtualBox virtualization configuration files..
+ */
+ public static final String FILE_NAME_EXTENSION = "vbox";
+
+ private static final Logger LOGGER = LogManager.getLogger( VirtualizationConfigurationVirtualBox.class );
+
+ private final VirtualizationConfigurationVirtualboxFileFormat config;
+
+ public static enum EthernetType
+ {
+ NAT( "vboxnet1" ), BRIDGED( "vboxnet0" ), HOST_ONLY( "vboxnet2" );
+
+ public final String vnet;
+
+ private EthernetType( String vnet )
+ {
+ this.vnet = vnet;
+ }
+ }
+
+ public VirtualizationConfigurationVirtualBox( List<OperatingSystem> osList, File file )
+ throws IOException, VirtualizationConfigurationException
+ {
+ super( new VirtualizerVirtualBox(), osList );
+ this.config = new VirtualizationConfigurationVirtualboxFileFormat( file );
+ init();
+ }
+
+ public VirtualizationConfigurationVirtualBox( List<OperatingSystem> osList, byte[] vmContent, int length )
+ throws IOException, VirtualizationConfigurationException
+ {
+ super( new VirtualizerVirtualBox(), osList );
+ this.config = new VirtualizationConfigurationVirtualboxFileFormat( vmContent, length );
+ init();
+ }
+
+ private void init()
+ {
+ displayName = config.getDisplayName();
+ setOs( config.getOsName() );
+ this.isMachineSnapshot = config.isMachineSnapshot();
+ for ( HardDisk hardDisk : config.getHdds() ) {
+ hdds.add( hardDisk );
+ }
+ }
+
+ private void disableEnhancedNetworkAdapters()
+ {
+ final NodeList disableAdapters = this.config.findNodes( "/VirtualBox/Machine/Hardware/Network/Adapter[not(@slot='0')]" );
+
+ if ( disableAdapters != null ) {
+ for ( int i = 0; i < disableAdapters.getLength(); i++ ) {
+ final Element disableAdapter = (Element)disableAdapters.item( i );
+ disableAdapter.setAttribute( "enabled", "false" );
+ }
+ }
+ }
+
+ private void removeEnhancedNetworkAdapters()
+ {
+ final NodeList removeAdapters = this.config.findNodes( "/VirtualBox/Machine/Hardware/Network/Adapter[not(@slot='0')]" );
+
+ if ( removeAdapters != null ) {
+ for ( int i = 0; i < removeAdapters.getLength(); i++ ) {
+ final Node removeAdapter = removeAdapters.item( i );
+ removeAdapter.getParentNode().removeChild( removeAdapter );
+ }
+ }
+ }
+
+ @Override
+ public void transformEditable() throws VirtualizationConfigurationException
+ {
+ this.disableEnhancedNetworkAdapters();
+ }
+
+ @Override
+ public void transformPrivacy() throws VirtualizationConfigurationException
+ {
+ config.addPlaceHolders();
+ }
+
+ @Override
+ public byte[] getConfigurationAsByteArray()
+ {
+ return config.toString( true ).getBytes( StandardCharsets.UTF_8 );
+ }
+
+ @Override
+ public boolean addEmptyHddTemplate()
+ {
+ return this.addHddTemplate( VirtualizationConfigurationVirtualboxFileFormat.DUMMY_VALUE,
+ VirtualizationConfigurationVirtualboxFileFormat.DUMMY_VALUE,
+ VirtualizationConfigurationVirtualboxFileFormat.DUMMY_VALUE );
+ }
+
+ @Override
+ public boolean addHddTemplate( String diskImage, String hddMode, String redoDir )
+ {
+ config.changeAttribute( "/VirtualBox/Machine/MediaRegistry/HardDisks/HardDisk", "location", diskImage, MatchMode.FIRST_ONLY );
+ config.changeAttribute( "/VirtualBox/Machine", "snapshotFolder", redoDir, MatchMode.FIRST_ONLY );
+ return true;
+ }
+
+ @Override
+ public boolean addHddTemplate( File diskImage, String hddMode, String redoDir )
+ {
+ String diskImagePath = diskImage.getName();
+ config.changeAttribute( "/VirtualBox/Machine/MediaRegistry/HardDisks/HardDisk", "location", diskImagePath, MatchMode.FIRST_ONLY );
+
+ UUID newhdduuid = UUID.randomUUID();
+
+ // patching the new uuid in the vbox config file here
+ String vboxUUid = "{" + newhdduuid.toString() + "}";
+ config.changeAttribute( "/VirtualBox/Machine/MediaRegistry/HardDisks/HardDisk", "uuid", vboxUUid, MatchMode.FIRST_ONLY );
+ config.changeAttribute( config.storageControllersPath() + "/StorageController/AttachedDevice/Image", "uuid",
+ vboxUUid, MatchMode.FIRST_ONLY );
+
+ // the order of the UUID is BIG_ENDIAN but we need to change the order of the first 8 Bytes
+ // to be able to write them to the vdi file... the PROBLEM here is that the first 8
+ // are in LITTLE_ENDIAN order in pairs of 4-2-2 not the whole 8 so just changing the
+ // order when we are adding them to the bytebuffer won't help
+ //
+ // the following is a workaround that works
+ ByteBuffer buffer = ByteBuffer.wrap( new byte[ 16 ] );
+ buffer.putLong( newhdduuid.getMostSignificantBits() );
+ buffer.putLong( newhdduuid.getLeastSignificantBits() );
+ byte[] oldOrder = buffer.array();
+ // make a coppy here because the last 8 Bytes don't need to change position
+ byte[] bytesToWrite = Arrays.copyOf( oldOrder, oldOrder.length );
+ // use an offset int[] to help with the shuffle
+ int[] offsets = { 3, 2, 1, 0, 5, 4, 7, 6 };
+ for ( int index = 0; index < 8; index++ ) {
+ bytesToWrite[index] = oldOrder[offsets[index]];
+ }
+ try ( RandomAccessFile file = new RandomAccessFile( diskImage, "rw" ) ) {
+ file.seek( 392 );
+ file.write( bytesToWrite, 0, 16 );
+ } catch ( Exception e ) {
+ LOGGER.warn( "could not patch new uuid in the vdi", e );
+ }
+
+ // we need a new machine uuid
+ UUID newMachineUuid = UUID.randomUUID();
+ if ( newMachineUuid.equals( newhdduuid ) ) {
+ LOGGER.warn( "The new Machine UUID is the same as the new HDD UUID; tying again...this vm might not start" );
+ newMachineUuid = UUID.randomUUID();
+ }
+ String machineUUid = "{" + newMachineUuid.toString() + "}";
+ return config.changeAttribute( "/VirtualBox/Machine", "uuid", machineUUid, MatchMode.EXACTLY_ONE );
+ }
+
+ @Override
+ public boolean addDefaultNat()
+ {
+ final boolean status;
+
+ final Node adapterSlot0 = config.findNodes( "/VirtualBox/Machine/Hardware/Network/Adapter[@slot='0']" ).item( 0 );
+ if ( adapterSlot0 != null ) {
+ // remove all child node to wipe existing networking mode
+ final NodeList adapterSlot0SettingNodes = adapterSlot0.getChildNodes();
+ while ( adapterSlot0.getChildNodes().getLength() > 0 ) {
+ adapterSlot0.removeChild( adapterSlot0SettingNodes.item( 0 ) );
+ }
+
+ // add networking mode 'NAT'
+ if ( config.addNewNode( "/VirtualBox/Machine/Hardware/Network/Adapter[@slot='0']", "NAT" ) == null ) {
+ LOGGER.error( "Failed to set network adapter to NAT." );
+ status = false;
+ } else {
+ status = config.changeAttribute( "/VirtualBox/Machine/Hardware/Network/Adapter[@slot='0']", "MACAddress",
+ "080027B86D12", MatchMode.EXACTLY_ONE );
+ }
+ } else {
+ status = false;
+ }
+
+ return status;
+ }
+
+ @Override
+ public void setOs( String vendorOsId )
+ {
+ config.changeAttribute( "/VirtualBox/Machine", "OSType", vendorOsId, MatchMode.EXACTLY_ONE );
+
+ final OperatingSystem os = VirtualizationConfigurationUtils.getOsOfVirtualizerFromList( this.osList,
+ TConst.VIRT_VIRTUALBOX, vendorOsId );
+ this.setOs( os );
+ }
+
+ @Override
+ public boolean addDisplayName( String name )
+ {
+ return config.changeAttribute( "/VirtualBox/Machine", "name", name, MatchMode.EXACTLY_ONE );
+ }
+
+ @Override
+ public boolean addRam( int mem )
+ {
+ return config.changeAttribute( "/VirtualBox/Machine/Hardware/Memory", "RAMSize",
+ Integer.toString( mem ), MatchMode.EXACTLY_ONE );
+ }
+
+ @Override
+ public void addFloppy( int index, String image, boolean readOnly )
+ {
+ Element floppyController = null;
+ NodeList matches = config.findNodes( config.storageControllersPath() + "/StorageController[@name='Floppy']" );
+ if ( matches == null || matches.getLength() == 0 ) {
+ floppyController = (Element)config.addNewNode( config.storageControllersPath(), "StorageController" );
+ if ( floppyController == null ) {
+ LOGGER.error( "Failed to add <Image> to floppy device." );
+ return;
+ }
+ floppyController.setAttribute( "name", "Floppy" );
+ floppyController.setAttribute( "type", "I82078" );
+ floppyController.setAttribute( "PortCount", "1" );
+ floppyController.setAttribute( "useHostIOCache", "true" );
+ floppyController.setAttribute( "Bootable", "false" );
+ }
+ // virtualbox only allows one controller per type
+ if ( matches.getLength() > 1 ) {
+ LOGGER.error( "Multiple floppy controllers detected, this should never happen! " );
+ return;
+ }
+ // so if we had any matches, we know we have exactly one
+ if ( floppyController == null )
+ floppyController = (Element)matches.item( 0 );
+
+ // add the floppy device
+ Element floppyDevice = (Element)config.addNewNode( floppyController, "AttachedDevice" );
+ if ( floppyDevice == null ) {
+ LOGGER.error( "Failed to add <Image> to floppy device." );
+ return;
+ }
+ floppyDevice.setAttribute( "type", "Floppy" );
+ floppyDevice.setAttribute( "hotpluggable", "false" );
+ floppyDevice.setAttribute( "port", "0" );
+ floppyDevice.setAttribute( "device", Integer.toString( index ) );
+
+ // finally add the image to it, if one was given
+ if ( image != null ) {
+ Element floppyImage = (Element)config.addNewNode( floppyDevice, "Image" );
+ if ( floppyImage == null ) {
+ LOGGER.error( "Failed to add <Image> to floppy device." );
+ return;
+ }
+ floppyImage.setAttribute( "uuid",
+ VirtualizationConfigurationVirtualboxFileFormat.DUMMY_VALUE );
+ // register the image in the media registry
+ Element floppyImages = (Element)config.addNewNode( "/VirtualBox/Machine/MediaRegistry", "FloppyImages" );
+ if ( floppyImages == null ) {
+ LOGGER.error( "Failed to add <FloppyImages> to media registry." );
+ return;
+ }
+ Element floppyImageReg = (Element)config.addNewNode( "/VirtualBox/Machine/MediaRegistry/FloppyImages",
+ "Image" );
+ if ( floppyImageReg == null ) {
+ LOGGER.error( "Failed to add <Image> to floppy images in the media registry." );
+ return;
+ }
+ floppyImageReg.setAttribute( "uuid",
+ VirtualizationConfigurationVirtualboxFileFormat.DUMMY_VALUE );
+ floppyImageReg.setAttribute( "location",
+ VirtualizationConfigurationVirtualboxFileFormat.DUMMY_VALUE );
+ }
+ }
+
+ @Override
+ public boolean addCdrom( String image )
+ {
+ // TODO - done in run-virt currently
+ return false;
+ }
+
+ @Override
+ public boolean addCpuCoreCount( int nrOfCores )
+ {
+ return config.changeAttribute( "/VirtualBox/Machine/Hardware/CPU", "count",
+ Integer.toString( nrOfCores ), MatchMode.EXACTLY_ONE );
+ }
+
+ class VBoxSoundCardModel extends VirtOptionValue
+ {
+
+ public VBoxSoundCardModel( String id, String displayName )
+ {
+ super( id, displayName );
+ }
+
+ @Override
+ public void apply()
+ {
+ // XXX I guess this "present" hack will be nicer with enum too
+ if ( Util.isEmptyString( this.id ) ) {
+ config.changeAttribute( "/VirtualBox/Machine/Hardware/AudioAdapter", "enabled", "false", MatchMode.MULTIPLE );
+ return;
+ }
+ config.changeAttribute( "/VirtualBox/Machine/Hardware/AudioAdapter", "enabled", "true", MatchMode.FIRST_ONLY );
+ config.changeAttribute( "/VirtualBox/Machine/Hardware/AudioAdapter", "controller", this.id, MatchMode.FIRST_ONLY );
+ }
+
+ @Override
+ public boolean isActive()
+ {
+ Element x = (Element)config.findNodes( "/VirtualBox/Machine/Hardware/AudioAdapter" ).item( 0 );
+ if ( !x.hasAttribute( "enabled" )
+ || ( x.hasAttribute( "enabled" ) && x.getAttribute( "enabled" ).equals( "false" ) ) ) {
+ return Util.isEmptyString( this.id ); // XXX enum
+ }
+ String val = "AC97";
+ if ( x.hasAttribute( "controller" ) ) {
+ val = x.getAttribute( "controller" );
+ }
+ return val.equals( this.id );
+ }
+
+ }
+
+ class VBoxAccel3D extends VirtOptionValue
+ {
+
+ public VBoxAccel3D( String id, String displayName )
+ {
+ super( id, displayName );
+ }
+
+ @Override
+ public void apply()
+ {
+ config.changeAttribute( "/VirtualBox/Machine/Hardware/Display", "accelerate3D", this.id, MatchMode.EXACTLY_ONE );
+ }
+
+ @Override
+ public boolean isActive()
+ {
+ Element x = (Element)config.findNodes( "/VirtualBox/Machine/Hardware/Display" ).item( 0 );
+ String val = "false";
+ if ( x.hasAttribute( "accelerate3D" ) ) {
+ val = x.getAttribute( "accelerate3D" );
+ }
+ return val.equalsIgnoreCase( this.id );
+ }
+
+ }
+
+ /**
+ * Function does nothing for Virtual Box;
+ * Virtual Box accepts per default only one hardware version and is hidden from the user
+ */
+ @Override
+ public void setVirtualizerVersion( Version type )
+ {
+ }
+
+ public Version getConfigurationVersion()
+ {
+ return this.config.getVersion();
+ }
+
+ @Override
+ public Version getVirtualizerVersion()
+ {
+ // Virtual Box uses only one virtual hardware version and can't be changed
+ return null;
+ }
+
+ class VBoxNicModel extends VirtOptionValue
+ {
+
+ private final int cardIndex;
+
+ public VBoxNicModel( int cardIndex, String id, String displayName )
+ {
+ super( id, displayName );
+ this.cardIndex = cardIndex;
+ }
+
+ @Override
+ public void apply()
+ {
+ String index = Integer.toString( this.cardIndex );
+ String dev = this.id;
+ boolean present = true;
+ if ( "".equals( this.id ) ) {
+ // none type needs to have a valid value; it takes the value of pcnetcpi2;
+ // if value is left null or empty vm will not start because value is not valid
+ dev = "Am79C970A";
+ present = false;
+ }
+ config.changeAttribute( "/VirtualBox/Machine/Hardware/Network/Adapter[@slot='" + index + "']", "enabled",
+ Boolean.toString( present ), MatchMode.EXACTLY_ONE );
+ config.changeAttribute( "/VirtualBox/Machine/Hardware/Network/Adapter[@slot='" + index + "']", "type",
+ dev, MatchMode.EXACTLY_ONE );
+ }
+
+ @Override
+ public boolean isActive()
+ {
+ Element x = (Element)config.findNodes( "/VirtualBox/Machine/Hardware/Network/Adapter" ).item( 0 );
+ if ( !x.hasAttribute( "enabled" )
+ || ( x.hasAttribute( "enabled" ) && x.getAttribute( "enabled" ).equalsIgnoreCase( "false" ) ) ) {
+ return Util.isEmptyString( this.id );
+ }
+ // Has NIC
+ if ( !x.hasAttribute( "type" ) ) {
+ return "Am79C973".equals( this.id );
+ }
+ return x.getAttribute( "type" ).equals( this.id );
+ }
+
+ }
+
+ public void registerVirtualHW()
+ {
+ List<VirtOptionValue> list;
+ // none type needs to have a valid value; it takes the value of AC97; if value is left null or empty vm will not start because value is not valid
+ // TODO: Maybe just remove the entire section from the XML? Same for ethernet...
+ list = new ArrayList<>();
+ list.add( new VBoxSoundCardModel( "AC97", SoundCard.NONE ) );
+ list.add( new VBoxSoundCardModel( "SB16", SoundCard.SOUND_BLASTER ) );
+ list.add( new VBoxSoundCardModel( "HDA", SoundCard.HD_AUDIO ) );
+ list.add( new VBoxSoundCardModel( "AC97", SoundCard.AC ) );
+ configurableOptions.add( new ConfigurableOptionGroup( ConfigurationGroups.SOUND_CARD_MODEL, list ) );
+
+ list = new ArrayList<>();
+ list.add( new VBoxAccel3D( "true", "3D" ) );
+ list.add( new VBoxAccel3D( "false", "2D" ) );
+ configurableOptions.add( new ConfigurableOptionGroup( ConfigurationGroups.GFX_TYPE, list ) );
+
+ list = new ArrayList<>();
+ list.add( new VBoxNicModel( 0, "", Ethernet.NONE ) );
+ list.add( new VBoxNicModel( 0, "Am79C970A", Ethernet.PCNETPCI2 ) );
+ list.add( new VBoxNicModel( 0, "Am79C973", Ethernet.PCNETFAST3 ) );
+ list.add( new VBoxNicModel( 0, "82540EM", Ethernet.PRO1000MTD ) );
+ list.add( new VBoxNicModel( 0, "82543GC", Ethernet.PRO1000TS ) );
+ list.add( new VBoxNicModel( 0, "82545EM", Ethernet.PRO1000MTS ) );
+ list.add( new VBoxNicModel( 0, "virtio", Ethernet.PARAVIRT ) );
+ configurableOptions.add( new ConfigurableOptionGroup( ConfigurationGroups.NIC_MODEL, list ) );
+
+ list = new ArrayList<>();
+ list.add( new VBoxUsbSpeed( null, Usb.NONE ) );
+ list.add( new VBoxUsbSpeed( "OHCI", Usb.USB1_1 ) );
+ list.add( new VBoxUsbSpeed( "EHCI", Usb.USB2_0 ) );
+ list.add( new VBoxUsbSpeed( "XHCI", Usb.USB3_0 ) );
+ configurableOptions.add( new ConfigurableOptionGroup( ConfigurationGroups.USB_SPEED, list ) );
+ }
+
+ @Override
+ public boolean addEthernet( VirtualizationConfiguration.EtherType type )
+ {
+ Node hostOnlyInterfaceNode = config.addNewNode( "/VirtualBox/Machine/Hardware/Network/Adapter[@slot='0']",
+ "HostOnlyInterface" );
+ if ( hostOnlyInterfaceNode == null ) {
+ LOGGER.error( "Failed to create node for HostOnlyInterface." );
+ return false;
+ }
+ return config.addAttributeToNode( hostOnlyInterfaceNode, "name", EthernetType.valueOf( type.name() ).vnet );
+ }
+
+ @Override
+ public void transformNonPersistent() throws VirtualizationConfigurationException
+ {
+ // Cannot disable suspend
+ // https://forums.virtualbox.org/viewtopic.php?f=6&t=77169
+ // https://forums.virtualbox.org/viewtopic.php?f=8&t=80338
+ // But some other stuff that won't make sense in non-persistent mode
+ config.setExtraData( "GUI/LastCloseAction", "PowerOff" );
+ // Could use "Default" instead of "Last" above, but you won't get any confirmation dialog in that case
+ config.setExtraData( "GUI/RestrictedRuntimeHelpMenuActions", "All" );
+ config.setExtraData( "GUI/RestrictedRuntimeMachineMenuActions", "TakeSnapshot,Pause,SaveState" );
+ config.setExtraData( "GUI/RestrictedRuntimeMenus", "Help" );
+ config.setExtraData( "GUI/PreventSnapshotOperations", "true" );
+ config.setExtraData( "GUI/PreventApplicationUpdate", "true" );
+ config.setExtraData( "GUI/RestrictedCloseActions", "SaveState,PowerOffRestoringSnapshot,Detach" );
+
+ this.removeEnhancedNetworkAdapters();
+ }
+
+ class VBoxUsbSpeed extends VirtOptionValue
+ {
+
+ public VBoxUsbSpeed( String id, String displayName )
+ {
+ super( id, displayName );
+ }
+
+ @Override
+ public void apply()
+ {
+ // Wipe existing ones
+ config.removeNodes( "/VirtualBox/Machine/Hardware", "USB" );
+ if ( Util.isEmptyString( this.id ) ) {
+ // Add marker so we know it's not an old config and we really want no USB
+ Element node = config.createNodeRecursive( "/VirtualBox/OpenSLX/USB" );
+ if ( node != null ) {
+ node.setAttribute( "disabled", "true" );
+ }
+ return; // NO USB
+ }
+ Element node = config.createNodeRecursive( "/VirtualBox/Machine/Hardware/USB/Controllers/Controller" );
+ node.setAttribute( "type", this.id );
+ node.setAttribute( "name", this.id );
+ if ( this.id.equals( "EHCI" ) ) { // XXX "mechanically" ported, could make a special class for this special case
+ // If EHCI (2.0) is selected, VBox adds an OHCI controller too...
+ node = config.addNewNode( "/VirtualBox/Machine/Hardware/USB/Controllers", "Controller" );
+ node.setAttribute( "type", "OHCI" );
+ node.setAttribute( "name", "OHCI" );
+ }
+ }
+
+ @Override
+ public boolean isActive()
+ {
+ NodeList nodes = config.findNodes( "/VirtualBox/Machine/Hardware/USB/Controllers/Controller/@type" );
+ LOGGER.info( "Found USB attribute nodes:" + nodes.getLength() );
+ /* Again, we need an ugly special case here for USB 2.0, which creates two entries in the
+ * XML, one EHCI and one OHCI. If we simply look for "our" type and return true, both
+ * OHCI and EHCI would return true, and what ends up getting selected in the UI is more or
+ * less undefined. So we need to put more brains in here and special-case the whole EHCI/OHCI
+ * detection, and not return true if this.id is OHCI, and we have a controller node with type
+ * OHCI, but also another node with type EHCI...
+ */
+ boolean ohci = false, ehci = false;
+ for ( int i = 0; i < nodes.getLength(); ++i ) {
+ if ( nodes.item( i ).getNodeType() != Node.ATTRIBUTE_NODE ) {
+ LOGGER.info( "Not ATTRIBUTE type (" + nodes.item( i ).getClass().getSimpleName() + ")" );
+ continue;
+ }
+ String type = ( (Attr)nodes.item( i ) ).getValue();
+ LOGGER.info( "Found USB node with type " + type );
+ if ( type.equals( "EHCI" ) ) {
+ ehci = true;
+ } else if ( type.equals( "OHCI" ) ) {
+ ohci = true;
+ } else if ( type.equals( this.id ) )
+ return true;
+ }
+ if ( ehci && "EHCI".equals( this.id ) )
+ return true;
+ if ( ohci && !ehci && "OHCI".equals( this.id ) )
+ return true;
+ if ( config.findNodes( "/VirtualBox/OpenSLX/USB/@disabled" ).getLength() > 0 ) {
+ return Util.isEmptyString( this.id );
+ }
+ return false;
+ }
+
+ }
+
+ @Override
+ public String getFileNameExtension()
+ {
+ return VirtualizationConfigurationVirtualBox.FILE_NAME_EXTENSION;
+ }
+
+ @Override
+ public void validate() throws VirtualizationConfigurationException
+ {
+ this.config.validate();
+ }
+
+ @Override
+ public void disableUsb()
+ {
+ new VBoxUsbSpeed( null, Usb.NONE ).apply();
+ }
+}
diff --git a/src/main/java/org/openslx/util/vm/VboxConfig.java b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationVirtualboxFileFormat.java
index e9870a5..b5b3180 100644
--- a/src/main/java/org/openslx/util/vm/VboxConfig.java
+++ b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationVirtualboxFileFormat.java
@@ -1,4 +1,4 @@
-package org.openslx.util.vm;
+package org.openslx.virtualization.configuration;
import java.io.ByteArrayInputStream;
import java.io.File;
@@ -6,9 +6,15 @@ import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import javax.xml.XMLConstants;
+import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamSource;
import javax.xml.validation.Schema;
import javax.xml.validation.SchemaFactory;
@@ -17,11 +23,14 @@ import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathExpression;
import javax.xml.xpath.XPathExpressionException;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.openslx.util.Resources;
import org.openslx.util.Util;
import org.openslx.util.XmlHelper;
-import org.openslx.util.vm.VmMetaData.DriveBusType;
-import org.openslx.util.vm.VmMetaData.HardDisk;
+import org.openslx.virtualization.Version;
+import org.openslx.virtualization.configuration.VirtualizationConfiguration.DriveBusType;
+import org.openslx.virtualization.configuration.VirtualizationConfiguration.HardDisk;
import org.w3c.dom.DOMException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
@@ -32,48 +41,65 @@ import org.xml.sax.SAXException;
/**
* Class handling the parsing of a .vbox machine description file
*/
-public class VboxConfig
+public class VirtualizationConfigurationVirtualboxFileFormat
{
- private static final Logger LOGGER = Logger.getLogger( VboxConfig.class );
+ private static final Logger LOGGER = LogManager.getLogger( VirtualizationConfigurationVirtualboxFileFormat.class );
// key information set during initial parsing of the XML file
- private String osName = new String();
+ private String osName = "";
private ArrayList<HardDisk> hddsArray = new ArrayList<HardDisk>();
// XPath and DOM parsing related members
private Document doc = null;
+ /**
+ * Version of the configuration file format.
+ */
+ private Version version = null;
+
+ /**
+ * File names of XML schema files for different file format versions.
+ */
+ private final static HashMap<Version, String> FILE_FORMAT_SCHEMA_VERSIONS = new HashMap<Version, String>() {
+
+ private static final long serialVersionUID = -3163681758191475625L;
+
+ {
+ put( Version.valueOf( "1.15" ), "VirtualBox-settings_v1-15.xsd" );
+ put( Version.valueOf( "1.16" ), "VirtualBox-settings_v1-16.xsd" );
+ put( Version.valueOf( "1.17" ), "VirtualBox-settings_v1-17.xsd" );
+ put( Version.valueOf( "1.18" ), "VirtualBox-settings_v1-18.xsd" );
+ }
+ };
+
+ /**
+ * Path to the VirtualBox file format schemas within the *.jar file.
+ */
+ private final static String FILE_FORMAT_SCHEMA_PREFIX_PATH = Resources.PATH_SEPARATOR + "virtualbox"
+ + Resources.PATH_SEPARATOR + "xsd";
+
+ public static final String DUMMY_VALUE = "[dummy]";
+
// list of nodes to automatically remove when reading the vbox file
- private static String[] blacklist = {
+ private static final String[] BLACKLIST = {
"/VirtualBox/Machine/Hardware/GuestProperties",
"/VirtualBox/Machine/Hardware/VideoCapture",
"/VirtualBox/Machine/Hardware/HID",
"/VirtualBox/Machine/Hardware/LPT",
"/VirtualBox/Machine/Hardware/SharedFolders",
- "/VirtualBox/Machine/Hardware/Network/Adapter[@enabled='true']/*",
+ "/VirtualBox/Machine/Hardware/Network/Adapter[@slot='0']/*",
"/VirtualBox/Machine/ExtraData",
"/VirtualBox/Machine/StorageControllers/StorageController/AttachedDevice[not(@type='HardDisk')]",
+ "/VirtualBox/Machine/Hardware/StorageControllers/StorageController/AttachedDevice[not(@type='HardDisk')]",
"/VirtualBox/Machine/MediaRegistry/FloppyImages",
"/VirtualBox/Machine/MediaRegistry/DVDImages" };
-
- public static enum PlaceHolder
+
+ public static enum MatchMode
{
- FLOPPYUUID( "%VM_FLOPPY_UUID%" ), FLOPPYLOCATION( "%VM_FLOPPY_LOCATION%" ), CPU( "%VM_CPU_CORES%" ), MEMORY( "%VM_RAM%" ), MACHINEUUID( "%VM_MACHINE_UUID%" ), NETWORKMAC(
- "%VM_NIC_MAC%" ), HDDLOCATION( "%VM_HDD_LOCATION%" ), HDDUUID( "%VM_HDD_UUID_" );
-
- private final String holderName;
-
- private PlaceHolder( String name )
- {
- this.holderName = name;
- }
-
- @Override
- public String toString()
- {
- return holderName;
- }
- }
+ EXACTLY_ONE,
+ MULTIPLE,
+ FIRST_ONLY,
+ };
/**
* Creates a vbox configuration by constructing a DOM from the given VirtualBox machine
@@ -83,31 +109,18 @@ public class VboxConfig
*
* @param file the VirtualBox machine configuration file
* @throws IOException if an error occurs while reading the file
- * @throws UnsupportedVirtualizerFormatException if the given file is not a valid VirtualBox
+ * @throws VirtualizationConfigurationException if the given file is not a valid VirtualBox
* configuration file.
*/
- public VboxConfig( File file ) throws IOException, UnsupportedVirtualizerFormatException
+ public VirtualizationConfigurationVirtualboxFileFormat( File file ) throws IOException, VirtualizationConfigurationException
{
- // first validate xml
- try {
- SchemaFactory factory = SchemaFactory.newInstance( XMLConstants.W3C_XML_SCHEMA_NS_URI );
- InputStream xsdStream = VboxConfig.class.getResourceAsStream( "/master-sync-shared/xml/VirtualBox-settings.xsd" );
- if ( xsdStream == null ) {
- LOGGER.warn( "Cannot validate Vbox XML: No XSD found in JAR" );
- } else {
- Schema schema = factory.newSchema( new StreamSource( xsdStream ) );
- Validator validator = schema.newValidator();
- validator.validate( new StreamSource( file ) );
- }
- } catch ( SAXException e ) {
- LOGGER.error( "Selected vbox file was not validated against the XSD schema: " + e.getMessage() );
- }
- // valid xml, try to create the DOM
doc = XmlHelper.parseDocumentFromStream( new FileInputStream( file ) );
doc = XmlHelper.removeFormattingNodes( doc );
if ( doc == null )
- throw new UnsupportedVirtualizerFormatException( "Could not create DOM from given VirtualBox machine configuration file!" );
- init();
+ throw new VirtualizationConfigurationException( "Could not parse given VirtualBox machine configuration file!" );
+
+ this.parseConfigurationVersion();
+ this.init();
}
/**
@@ -116,32 +129,92 @@ public class VboxConfig
*
* @param machineDescription content of the XML file saved as a byte array.
* @param length of the machine description byte array.
- * @throws IOException if an
+ * @throws VirtualizationConfigurationException creation of VirtualBox configuration file representation failed.
*/
- public VboxConfig( byte[] machineDescription, int length ) throws UnsupportedVirtualizerFormatException
+ public VirtualizationConfigurationVirtualboxFileFormat( byte[] machineDescription, int length ) throws VirtualizationConfigurationException
{
ByteArrayInputStream is = new ByteArrayInputStream( machineDescription );
+
doc = XmlHelper.parseDocumentFromStream( is );
if ( doc == null ) {
- LOGGER.error( "Failed to create a DOM from given machine description." );
- throw new UnsupportedVirtualizerFormatException( "Could not create DOM from given machine description as. byte array." );
+ final String errorMsg = "Could not parse given VirtualBox machine description from byte array!";
+ LOGGER.debug( errorMsg );
+ throw new VirtualizationConfigurationException( errorMsg );
+ }
+
+ this.parseConfigurationVersion();
+ this.init();
+ }
+
+ public void validate() throws VirtualizationConfigurationException
+ {
+ this.validateFileFormatVersion( this.getVersion() );
+ }
+
+ public void validateFileFormatVersion( Version version ) throws VirtualizationConfigurationException
+ {
+ if ( this.getVersion() != null && this.doc != null ) {
+ // check if specified version is supported
+ final String fileName = FILE_FORMAT_SCHEMA_VERSIONS.get( version );
+
+ if ( fileName == null ) {
+ final String errorMsg = "File format version " + version.toString() + " is not supported!";
+ LOGGER.debug( errorMsg );
+ throw new VirtualizationConfigurationException( errorMsg );
+ } else {
+ // specified version is supported, so validate document with corresponding schema file
+ final InputStream schemaResource = VirtualizationConfigurationVirtualboxFileFormat
+ .getSchemaResource( fileName );
+
+ if ( schemaResource != null ) {
+ try {
+ final SchemaFactory factory = SchemaFactory.newInstance( XMLConstants.W3C_XML_SCHEMA_NS_URI );
+ final Schema schema = factory.newSchema( new StreamSource( schemaResource ) );
+ final Validator validator = schema.newValidator();
+ validator.validate( new DOMSource( this.doc ) );
+ } catch ( SAXException | IOException e ) {
+ final String errorMsg = "XML configuration is not a valid VirtualBox v" + version.toString()
+ + " configuration: " + e.getLocalizedMessage();
+ LOGGER.debug( errorMsg );
+ throw new VirtualizationConfigurationException( errorMsg );
+ }
+ }
+ }
}
- init();
+ }
+
+ private static InputStream getSchemaResource( String fileName )
+ {
+ final String schemaFilePath = FILE_FORMAT_SCHEMA_PREFIX_PATH + File.separator + fileName;
+ return VirtualizationConfigurationVirtualboxFileFormat.class.getResourceAsStream( schemaFilePath );
}
/**
* Main initialization functions parsing the document created during the constructor.
- * @throws UnsupportedVirtualizerFormatException
+ * @throws VirtualizationConfigurationException
*/
- private void init() throws UnsupportedVirtualizerFormatException
+ private void init() throws VirtualizationConfigurationException
{
+ try {
+ this.validate();
+ } catch ( VirtualizationConfigurationException e ) {
+ // do not print output of failed validation if placeholders are available
+ // since those placeholder values violate the defined UUID pattern
+ if ( !this.checkForPlaceholders() ) {
+ final String errorMsg = "XML configuration is not a valid VirtualBox v" + version.toString()
+ + " configuration: " + e.getLocalizedMessage();
+ LOGGER.debug( errorMsg );
+ }
+ }
+
if ( Util.isEmptyString( getDisplayName() ) ) {
- throw new UnsupportedVirtualizerFormatException( "Machine doesn't have a name" );
+ throw new VirtualizationConfigurationException( "Machine doesn't have a name" );
}
try {
ensureHardwareUuid();
setOsType();
fixUsb(); // Since we now support selecting specific speed
+ removeUnusedHdds();
if ( checkForPlaceholders() ) {
return;
}
@@ -154,6 +227,33 @@ public class VboxConfig
}
}
+ private void parseConfigurationVersion() throws VirtualizationConfigurationException
+ {
+ String versionText;
+ try {
+ versionText = XmlHelper.compileXPath( "/VirtualBox/@version" ).evaluate( this.doc );
+ } catch ( XPathExpressionException e ) {
+ throw new VirtualizationConfigurationException(
+ "Failed to parse the version number of the configuration file" );
+ }
+
+ if ( versionText == null || versionText.isEmpty() ) {
+ throw new VirtualizationConfigurationException( "Configuration file does not contain any version number!" );
+ } else {
+ // parse version information from textual description
+ final Pattern versionPattern = Pattern.compile( "^(\\d+\\.\\d+).*$" );
+ final Matcher versionMatcher = versionPattern.matcher( versionText );
+
+ if ( versionMatcher.find() ) {
+ this.version = Version.valueOf( versionMatcher.group( 1 ) );
+ }
+
+ if ( this.version == null ) {
+ throw new VirtualizationConfigurationException( "Configuration file version number is not valid!" );
+ }
+ }
+ }
+
private void fixUsb()
{
NodeList list = findNodes( "/VirtualBox/Machine/Hardware/USB/Controllers/Controller" );
@@ -180,27 +280,70 @@ public class VboxConfig
controller.setAttribute( "name", "EHCI" );
controller.setAttribute( "type", "EHCI" );
}
+
+ /**
+ * Remove any HDDs from MediaRegistry that aren't being used
+ */
+ private void removeUnusedHdds()
+ {
+ Set<String> existing = new HashSet<>();
+ NodeList list = findNodes( storageControllersPath() + "/StorageController/AttachedDevice/Image" );
+ if ( list != null && list.getLength() != 0 ) {
+ for ( int i = 0; i < list.getLength(); ++i ) {
+ Node item = list.item( i );
+ if ( ! ( item instanceof Element ) )
+ continue;
+ Element e = (Element)item;
+ String uuid = e.getAttribute( "uuid" );
+ if ( Util.isEmptyString( uuid ) )
+ continue;
+ existing.add( uuid );
+ }
+ }
+ // Now check registry
+ list = findNodes( "/VirtualBox/Machine/MediaRegistry/HardDisks/HardDisk" );
+ if ( list != null && list.getLength() != 0 ) {
+ for ( int i = 0; i < list.getLength(); ++i ) {
+ Node item = list.item( i );
+ if ( ! ( item instanceof Element ) )
+ continue;
+ Element e = (Element)item;
+ String uuid = e.getAttribute( "uuid" );
+ if ( !existing.contains( uuid ) ) {
+ LOGGER.info( "Removing unused HDD " + uuid + " from MediaRegistry" );
+ e.getParentNode().removeChild( e );
+ }
+ }
+ }
+ }
+
+ public String storageControllersPath()
+ {
+ if ( this.getVersion().isSmallerThan( Version.valueOf( "1.17" ) ) )
+ return "/VirtualBox/Machine/StorageControllers";
+ return "/VirtualBox/Machine/Hardware/StorageControllers";
+ }
/**
* Saves the machine's uuid as hardware uuid to prevent VMs from
* believing in a hardware change.
*
* @throws XPathExpressionException
- * @throws UnsupportedVirtualizerFormatException
+ * @throws VirtualizationConfigurationException
*/
- private void ensureHardwareUuid() throws XPathExpressionException, UnsupportedVirtualizerFormatException
+ private void ensureHardwareUuid() throws XPathExpressionException, VirtualizationConfigurationException
{
// we will need the machine uuid, so get it
- String machineUuid = XmlHelper.XPath.compile( "/VirtualBox/Machine/@uuid" ).evaluate( this.doc );
+ String machineUuid = XmlHelper.compileXPath( "/VirtualBox/Machine/@uuid" ).evaluate( this.doc );
if ( machineUuid.isEmpty() ) {
LOGGER.error( "Machine UUID empty, should never happen!" );
- throw new UnsupportedVirtualizerFormatException( "XML doesn't contain a machine uuid" );
+ throw new VirtualizationConfigurationException( "XML doesn't contain a machine uuid" );
}
NodeList hwNodes = findNodes( "/VirtualBox/Machine/Hardware" );
int count = hwNodes.getLength();
if ( count != 1 ) {
- throw new UnsupportedVirtualizerFormatException( "Zero or more '/VirtualBox/Machine/Hardware' node were found, should never happen!" );
+ throw new VirtualizationConfigurationException( "Zero or > 1 '/VirtualBox/Machine/Hardware' node were found, should never happen!" );
}
Element hw = (Element)hwNodes.item( 0 );
String hwUuid = hw.getAttribute( "uuid" );
@@ -216,44 +359,21 @@ public class VboxConfig
}
}
+ public Version getVersion()
+ {
+ return this.version;
+ }
+
/**
* Self-explanatory.
*/
public void addPlaceHolders()
{
- // placeholder for the machine uuid
- changeAttribute( "/VirtualBox/Machine", "uuid", PlaceHolder.MACHINEUUID.toString() );
-
// placeholder for the location of the virtual hdd
- changeAttribute( "/VirtualBox/Machine/MediaRegistry/HardDisks/HardDisk", "location", PlaceHolder.HDDLOCATION.toString() );
-
- // placeholder for the memory
- changeAttribute( "/VirtualBox/Machine/Hardware/Memory", "RAMSize", PlaceHolder.MEMORY.toString() );
-
- // placeholder for the CPU
- changeAttribute( "/VirtualBox/Machine/Hardware/CPU", "count", PlaceHolder.CPU.toString() );
-
- // placeholder for the MACAddress
- changeAttribute( "/VirtualBox/Machine/Hardware/Network/Adapter", "MACAddress", PlaceHolder.NETWORKMAC.toString() );
-
- NodeList hdds = findNodes( "/VirtualBox/Machine/MediaRegistry/HardDisks/HardDisk" );
- for ( int i = 0; i < hdds.getLength(); i++ ) {
- Element hdd = (Element)hdds.item( i );
- if ( hdd == null )
- continue;
- String hddUuid = hdd.getAttribute( "uuid" );
- hdd.setAttribute( "uuid", PlaceHolder.HDDUUID.toString() + i + "%" );
- NodeList images = findNodes( "/VirtualBox/Machine/StorageControllers/StorageController/AttachedDevice/Image" );
- for ( int j = 0; j < images.getLength(); j++ ) {
- Element image = (Element)images.item( j );
- if ( image == null )
- continue;
- if ( hddUuid.equals( image.getAttribute( "uuid" ) ) ) {
- image.setAttribute( "uuid", PlaceHolder.HDDUUID.toString() + i + "%" );
- break;
- }
- }
- }
+ changeAttribute( "/VirtualBox/Machine/MediaRegistry/HardDisks/HardDisk", "location", DUMMY_VALUE, MatchMode.MULTIPLE );
+ // in case it already has a snapshot
+ changeAttribute( "/VirtualBox/Machine/MediaRegistry/HardDisks/HardDisk/HardDisk", "location", DUMMY_VALUE, MatchMode.MULTIPLE );
+ changeAttribute( "/VirtualBox/Machine", "snapshotFolder", DUMMY_VALUE, MatchMode.FIRST_ONLY );
}
/**
@@ -269,7 +389,7 @@ public class VboxConfig
Element hdd = (Element)hdds.item( i );
if ( hdd == null )
continue;
- if ( hdd.getAttribute( "location" ).equals( PlaceHolder.HDDLOCATION.toString() ) ) {
+ if ( hdd.getAttribute( "location" ).equals( DUMMY_VALUE ) ) {
return true;
}
}
@@ -285,8 +405,8 @@ public class VboxConfig
private void removeBlacklistedElements() throws XPathExpressionException
{
// iterate over the blackList
- for ( String blackedTag : blacklist ) {
- XPathExpression blackedExpr = XmlHelper.XPath.compile( blackedTag );
+ for ( String blackedTag : BLACKLIST ) {
+ XPathExpression blackedExpr = XmlHelper.compileXPath( blackedTag );
NodeList blackedNodes = (NodeList)blackedExpr.evaluate( this.doc, XPathConstants.NODESET );
for ( int i = 0; i < blackedNodes.getLength(); i++ ) {
// go through the child nodes of the blacklisted ones -> why?
@@ -304,7 +424,7 @@ public class VboxConfig
public String getDisplayName()
{
try {
- return XmlHelper.XPath.compile( "/VirtualBox/Machine/@name" ).evaluate( this.doc );
+ return XmlHelper.compileXPath( "/VirtualBox/Machine/@name" ).evaluate( this.doc );
} catch ( XPathExpressionException e ) {
return "";
}
@@ -313,11 +433,11 @@ public class VboxConfig
/**
* Function finds and saves the name of the guest OS
*
- * @throws XPathExpressionException
+ * @throws XPathExpressionException failed to find and retrieve name of the guest OS.
*/
public void setOsType() throws XPathExpressionException
{
- String os = XmlHelper.XPath.compile( "/VirtualBox/Machine/@OSType" ).evaluate( this.doc );
+ String os = XmlHelper.compileXPath( "/VirtualBox/Machine/@OSType" ).evaluate( this.doc );
if ( os != null && !os.isEmpty() ) {
osName = os;
}
@@ -336,11 +456,13 @@ public class VboxConfig
/**
* Search for attached hard drives and determine their controller and their path.
*
- * @throws XPathExpressionException
+ * @throws XPathExpressionException failed to find attached hard drives and their controllers.
*/
public void setHdds() throws XPathExpressionException
{
- XPathExpression hddsExpr = XmlHelper.XPath.compile( "/VirtualBox/Machine/StorageControllers/StorageController/AttachedDevice[@type='HardDisk']/Image" );
+ final XPathExpression hddsExpr = XmlHelper.compileXPath( storageControllersPath()
+ + "/StorageController/AttachedDevice[@type='HardDisk']/Image" );
+
NodeList nodes = (NodeList)hddsExpr.evaluate( this.doc, XPathConstants.NODESET );
if ( nodes == null ) {
LOGGER.error( "Failed to find attached hard drives." );
@@ -354,7 +476,7 @@ public class VboxConfig
if ( uuid.isEmpty() )
continue;
// got uuid, check if it was registered
- XPathExpression hddsRegistered = XmlHelper.XPath.compile( "/VirtualBox/Machine/MediaRegistry/HardDisks/HardDisk[@uuid='" + uuid + "']" );
+ XPathExpression hddsRegistered = XmlHelper.compileXPath( "/VirtualBox/Machine/MediaRegistry/HardDisks/HardDisk[@uuid='" + uuid + "']" );
NodeList hddsRegisteredNodes = (NodeList)hddsRegistered.evaluate( this.doc, XPathConstants.NODESET );
if ( hddsRegisteredNodes == null || hddsRegisteredNodes.getLength() != 1 ) {
LOGGER.error( "Found hard disk with uuid '" + uuid + "' which does not appear (unique) in the Media Registry. Skipping." );
@@ -382,15 +504,18 @@ public class VboxConfig
}
String controllerMode = hddController.getAttribute( "type" );
String controllerType = hddController.getAttribute( "name" );
- DriveBusType busType = null;
- if ( controllerType.equals( "IDE" ) ) {
- busType = DriveBusType.IDE;
- } else if ( controllerType.equals( "SCSI" ) ) {
- busType = DriveBusType.SCSI;
- } else if ( controllerType.equals( "SATA" ) ) {
- busType = DriveBusType.SATA;
- } else
- continue;
+ DriveBusType busType;
+ if ( controllerType.equals( "NVMe" ) ) {
+ busType = DriveBusType.NVME;
+ } else {
+ try {
+ // This assumes the type in the xml matches our enum constants.
+ busType = DriveBusType.valueOf( controllerType );
+ } catch (Exception e) {
+ LOGGER.warn( "Skipping unknown HDD controller type '" + controllerType + "'" );
+ continue;
+ }
+ }
LOGGER.info( "Adding hard disk with controller: " + busType + " (" + controllerMode + ") from file '" + fileName + "'." );
hddsArray.add( new HardDisk( controllerMode, busType, fileName ) );
}
@@ -430,7 +555,7 @@ public class VboxConfig
{
NodeList nodes = null;
try {
- XPathExpression expr = XmlHelper.XPath.compile( xpath );
+ XPathExpression expr = XmlHelper.compileXPath( xpath );
Object nodesObject = expr.evaluate( this.doc, XPathConstants.NODESET );
nodes = (NodeList)nodesObject;
} catch ( XPathExpressionException e ) {
@@ -440,24 +565,36 @@ public class VboxConfig
}
/**
- * Function used to change the value of an attribute of given element.
- * The given xpath to the element needs to find a single node, or this function will return
- * false. If only one element was found, it will return the result of calling addAttributeToNode.
- * Note that due to the way setAttribute() works, this function to create the attribute if it
- * doesn't exists.
+ * Function used to change the value of an attribute of given element(s).
*
* @param elementXPath given as an xpath expression
* @param attribute attribute to change
* @param value to set the attribute to
+ * @param mode what to do if multiple nodes match XPath
+ * @return state of the change operation whether the attribute was changed successfully or not.
*/
- public boolean changeAttribute( String elementXPath, String attribute, String value )
+ public boolean changeAttribute( String elementXPath, String attribute, String value, MatchMode mode )
{
NodeList nodes = findNodes( elementXPath );
- if ( nodes == null || nodes.getLength() != 1 ) {
- LOGGER.error( "No unique node could be found for: " + elementXPath );
+ if ( nodes == null || nodes.getLength() == 0 ) {
+ if ( mode != MatchMode.MULTIPLE ) {
+ LOGGER.error( "No node could be found for: " + elementXPath );
+ }
return false;
}
- return addAttributeToNode( nodes.item( 0 ), attribute, value );
+ if ( nodes.getLength() != 1 && ( mode == MatchMode.EXACTLY_ONE ) ) {
+ LOGGER.error( "Multiple nodes found for: " + elementXPath );
+ return false;
+ }
+ boolean ret = true;
+ for ( int i = 0; i < nodes.getLength(); ++i ) {
+ if ( !addAttributeToNode( nodes.item( i ), attribute, value ) ) {
+ ret = false;
+ }
+ if ( mode == MatchMode.FIRST_ONLY )
+ break;
+ }
+ return ret;
}
/**
@@ -488,10 +625,10 @@ public class VboxConfig
* Adds a new node named nameOfNewNode to the given parent found by parentXPath.
*
* @param parentXPath XPath expression to the parent
- * @param nameOfnewNode name of the node to be added
+ * @param childName name of the node to be added
* @return the newly added Node
*/
- public Node addNewNode( String parentXPath, String childName )
+ public Element addNewNode( String parentXPath, String childName )
{
NodeList possibleParents = findNodes( parentXPath );
if ( possibleParents == null || possibleParents.getLength() != 1 ) {
@@ -536,13 +673,19 @@ public class VboxConfig
public void setExtraData( String key, String value )
{
- NodeList nl = findNodes( "/VirtualBox/Machine/ExtraData/ExtraDataItem[@name='" + key + "']" );
+ NodeList nl = findNodes( "/VirtualBox/Machine/ExtraData/ExtraDataItem" );
Element e = null;
- for ( int i = 0; i < nl.getLength(); ++i ) {
- Node n = nl.item( i );
- if ( n.getNodeType() == Node.ELEMENT_NODE ) {
- e = (Element)n;
- break;
+ if ( nl != null ) {
+ for ( int i = 0; i < nl.getLength(); ++i ) {
+ Node n = nl.item( i );
+ if ( n.getNodeType() == Node.ELEMENT_NODE ) {
+ final Element ne = (Element)n;
+ final String keyValue = ne.getAttribute( "name" );
+ if ( keyValue != null && keyValue.equals( key ) ) {
+ e = ne;
+ break;
+ }
+ }
}
}
if ( e == null ) {
diff --git a/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationVmware.java b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationVmware.java
new file mode 100644
index 0000000..107014f
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationVmware.java
@@ -0,0 +1,741 @@
+package org.openslx.virtualization.configuration;
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.openslx.bwlp.thrift.iface.OperatingSystem;
+import org.openslx.thrifthelper.TConst;
+import org.openslx.util.Util;
+import org.openslx.virtualization.Version;
+import org.openslx.virtualization.configuration.VirtualizationConfigurationVmwareFileFormat.ConfigEntry;
+import org.openslx.virtualization.hardware.VirtOptionValue;
+import org.openslx.virtualization.hardware.ConfigurationGroups;
+import org.openslx.virtualization.hardware.Ethernet;
+import org.openslx.virtualization.hardware.SoundCard;
+import org.openslx.virtualization.hardware.Usb;
+import org.openslx.virtualization.virtualizer.VirtualizerVmware;
+
+public class VirtualizationConfigurationVmware extends VirtualizationConfiguration
+{
+ /**
+ * File name extension for VMware virtualization configuration files.
+ */
+ public static final String FILE_NAME_EXTENSION = "vmx";
+
+ private static final Logger LOGGER = LogManager.getLogger( VirtualizationConfigurationVmware.class );
+
+ private static final Pattern HDD_PATTERN = Pattern.compile( "^(ide\\d|scsi\\d|sata\\d|nvme\\d):?(\\d?)\\.(.*)",
+ Pattern.CASE_INSENSITIVE );
+
+ /** Lowercase regex of allowed settings for stateless execution */
+ private static final Pattern STATELESS_WHITELIST_PATTERN;
+
+ /** Lowercase regex of forbidden settings when uploading (privacy concerns) */
+ private static final Pattern PRIVACY_BLACKLIST_PATTERN;
+
+ private final VirtualizationConfigurationVmwareFileFormat config;
+
+ // Init static members
+ static {
+ // LOWERCASE - Client execution whitelist
+ String[] list1 = { "^guestos", "^uuid\\.bios", "^config\\.version", "^ehci[.:]", "^mks\\.enable3d",
+ "^virtualhw\\.",
+ "^sound[.:]", "\\.pcislotnumber$", "^pcibridge", "\\.virtualdev$", "^tools\\.syncTime$",
+ "^time\\.synchronize",
+ "^bios\\.bootDelay", "^rtc\\.", "^xhci[.:]", "^usb_xhci[.:]", "\\.deviceType$", "\\.port$", "\\.parent$",
+ "^usb[.:]",
+ "^firmware", "^hpet", "^vm\\.genid",
+ "^svga\\.graphicsMemoryKB$" };
+ STATELESS_WHITELIST_PATTERN = Pattern.compile( String.join( "|", list1 ), Pattern.CASE_INSENSITIVE );
+ // LOWERCASE - Upload privacy filter
+ String[] list2 = { "^displayname$", "^extendedconfigfile$", "^gui\\.", "^nvram$", "^memsize$" };
+ PRIVACY_BLACKLIST_PATTERN = Pattern.compile( String.join( "|", list2 ), Pattern.CASE_INSENSITIVE );
+ }
+
+ public static enum EthernetType
+ {
+ NAT( "vmnet1" ), BRIDGED( "vmnet0" ), HOST_ONLY( "vmnet2" );
+
+ public final String vmnet;
+
+ private EthernetType( String vnet )
+ {
+ this.vmnet = vnet;
+ }
+ }
+
+ public VirtualizationConfigurationVmware( List<OperatingSystem> osList, File file )
+ throws IOException, VirtualizationConfigurationException
+ {
+ super( new VirtualizerVmware(), osList );
+ this.config = new VirtualizationConfigurationVmwareFileFormat( file );
+ init();
+ }
+
+ public VirtualizationConfigurationVmware( List<OperatingSystem> osList, byte[] vmxContent, int length )
+ throws VirtualizationConfigurationException
+ {
+ super( new VirtualizerVmware(), osList );
+ this.config = new VirtualizationConfigurationVmwareFileFormat( vmxContent, length ); // still unfiltered
+ init(); // now filtered
+ }
+
+ private void init()
+ {
+ Map<String, Controller> disks = new HashMap<>();
+ for ( Entry<String, ConfigEntry> entry : config.entrySet() ) {
+ handleLoadEntry( entry, disks );
+ }
+ // Fix accidentally filtered USB config if we see EHCI is present
+ if ( isSetAndTrue( "ehci.present" ) && !isSetAndTrue( "usb.present" ) ) {
+ addFiltered( "usb.present", "TRUE" );
+ }
+ // if we find this tag, we already went through the hdd's - so we're done.
+ if ( config.get( "#SLX_HDD_BUS" ) != null ) {
+ try {
+ hdds.add( new HardDisk( config.get( "#SLX_HDD_CHIP" ),
+ DriveBusType.valueOf( config.get( "#SLX_HDD_BUS" ) ), "empty" ) );
+ } catch ( Exception e ) {
+ LOGGER.debug( "Error adding HDD object when parsing #SLX_HDD_BUS. Meta-data will be incorrect.", e );
+ }
+ return;
+ }
+ // Now find the HDDs and add to list
+ for ( Entry<String, Controller> cEntry : disks.entrySet() ) {
+ Controller controller = cEntry.getValue();
+ String controllerType = cEntry.getKey();
+ if ( !controller.present )
+ continue;
+ for ( Entry<String, Device> dEntry : controller.devices.entrySet() ) {
+ String deviceId = dEntry.getKey();
+ Device device = dEntry.getValue();
+ if ( !device.present )
+ continue; // Not present
+ if ( device.deviceType != null && !device.deviceType.toLowerCase().endsWith( "disk" ) )
+ continue; // Not a HDD
+ DriveBusType bus = null;
+ if ( controllerType.startsWith( "ide" ) ) {
+ bus = DriveBusType.IDE;
+ } else if ( controllerType.startsWith( "scsi" ) ) {
+ bus = DriveBusType.SCSI;
+ } else if ( controllerType.startsWith( "sata" ) ) {
+ bus = DriveBusType.SATA;
+ } else if ( controllerType.startsWith( "nvme" ) ) {
+ bus = DriveBusType.NVME;
+ }
+ hdds.add( new HardDisk( controller.virtualDev, bus, device.filename ) );
+ // Remove original entries from VMX
+ removeEntriesStartingWith( controllerType + ":" + deviceId + "." );
+ }
+ }
+ this.isMachineSnapshot = false;
+
+ // Add HDD to cleaned vmx
+ if ( !hdds.isEmpty() ) {
+ HardDisk hdd = hdds.get( 0 );
+ addFiltered( "#SLX_HDD_BUS", hdd.bus.toString() );
+ if ( hdd.chipsetDriver != null ) {
+ addFiltered( "#SLX_HDD_CHIP", hdd.chipsetDriver );
+ }
+ }
+ }
+
+ private void removeEntriesStartingWith( String start )
+ {
+ for ( Iterator<Entry<String, ConfigEntry>> it = config.entrySet().iterator(); it.hasNext(); ) {
+ Entry<String, ConfigEntry> entry = it.next();
+ if ( entry.getKey().startsWith( start ) ) {
+ it.remove();
+ }
+ }
+ }
+
+ private void addFiltered( String key, String value )
+ {
+ config.set( key, value );
+ }
+
+ private boolean isSetAndTrue( String key )
+ {
+ String value = config.get( key );
+ return value != null && value.equalsIgnoreCase( "true" );
+ }
+
+ private void handleLoadEntry( Entry<String, ConfigEntry> entry, Map<String, Controller> disks )
+ {
+ String lowerKey = entry.getKey().toLowerCase();
+ // Dig Usable meta data
+ String value = entry.getValue().getValue();
+ if ( lowerKey.equals( "guestos" ) ) {
+ setOs( value );
+ return;
+ }
+ if ( lowerKey.equals( "displayname" ) ) {
+ displayName = value;
+ return;
+ }
+ Matcher hdd = HDD_PATTERN.matcher( entry.getKey() );
+ if ( hdd.find() ) {
+ handleHddEntry( disks, hdd.group( 1 ).toLowerCase(), hdd.group( 2 ), hdd.group( 3 ), value );
+ }
+ }
+
+ private void handleHddEntry( Map<String, Controller> disks, String controllerStr, String deviceStr, String property, String value )
+ {
+ Controller controller = disks.get( controllerStr );
+ if ( controller == null ) {
+ controller = new Controller();
+ disks.put( controllerStr, controller );
+ }
+ if ( deviceStr == null || deviceStr.isEmpty() ) {
+ // Controller property
+ if ( property.equalsIgnoreCase( "present" ) ) {
+ controller.present = Boolean.parseBoolean( value );
+ } else if ( property.equalsIgnoreCase( "virtualDev" ) ) {
+ controller.virtualDev = value;
+ }
+ return;
+ }
+ // Device property
+ Device device = controller.devices.get( deviceStr );
+ if ( device == null ) {
+ device = new Device();
+ controller.devices.put( deviceStr, device );
+ }
+ if ( property.equalsIgnoreCase( "deviceType" ) ) {
+ device.deviceType = value;
+ } else if ( property.equalsIgnoreCase( "filename" ) ) {
+ device.filename = value;
+ } else if ( property.equalsIgnoreCase( "present" ) ) {
+ device.present = Boolean.parseBoolean( value );
+ }
+ }
+
+ @Override
+ public boolean addEmptyHddTemplate()
+ {
+ return this.addHddTemplate( "%VM_DISK_PATH%", "%VM_DISK_MODE%", "%VM_DISK_REDOLOGDIR%" );
+ }
+
+ @Override
+ public boolean addHddTemplate( File diskImage, String hddMode, String redoDir )
+ {
+ return addHddTemplate( diskImage.getName(), hddMode, redoDir );
+ }
+
+ @Override
+ public boolean addHddTemplate( String diskImagePath, String hddMode, String redoDir )
+ {
+ if ( diskImagePath.isEmpty() ) {
+ LOGGER.error( "Empty disk image path given!" );
+ return false;
+ }
+
+ if ( hdds.isEmpty() ) {
+ LOGGER.warn( "No HDDs found in configuration" );
+ return false;
+ }
+
+ HardDisk hdd = hdds.get( 0 );
+
+ String chipset = hdd.chipsetDriver;
+ String prefix;
+ switch ( hdd.bus ) {
+ case SATA:
+ // Cannot happen?... use lsisas1068
+ prefix = "scsi0";
+ chipset = "lsisas1068";
+ break;
+ case IDE:
+ case SCSI:
+ case NVME:
+ prefix = hdd.bus.name().toLowerCase() + "0";
+ break;
+ default:
+ LOGGER.warn( "Unknown HDD bus type: " + hdd.bus.toString() );
+ return false;
+ }
+ // Gen
+ addFiltered( prefix + ".present", "TRUE" );
+ if ( chipset != null ) {
+ addFiltered( prefix + ".virtualDev", chipset );
+ }
+ addFiltered( prefix + ":0.present", "TRUE" );
+ addFiltered( prefix + ":0.deviceType", "disk" );
+ addFiltered( prefix + ":0.fileName", diskImagePath );
+ if ( hddMode != null ) {
+ addFiltered( prefix + ":0.mode", hddMode );
+ addFiltered( prefix + ":0.redo", "" );
+ addFiltered( prefix + ":0.redoLogDir", redoDir );
+ }
+ config.remove( "#SLX_HDD_BUS" );
+ config.remove( "#SLX_HDD_CHIP" );
+ return true;
+ }
+
+ public boolean addDefaultNat()
+ {
+ addFiltered( "ethernet0.present", "TRUE" );
+ addFiltered( "ethernet0.connectionType", "nat" );
+ return true;
+ }
+
+ public boolean addEthernet( VirtualizationConfiguration.EtherType type )
+ {
+ boolean ret = false;
+ int index = 0;
+ for ( ;; ++index ) {
+ if ( config.get( "ethernet" + index + ".present" ) == null )
+ break;
+ }
+ switch ( type ) {
+ case NAT:
+ ret = addEthernet( index, EthernetType.NAT );
+ break;
+ case BRIDGED:
+ ret = addEthernet( index, EthernetType.BRIDGED );
+ break;
+ case HOST_ONLY:
+ ret = addEthernet( index, EthernetType.HOST_ONLY );
+ break;
+ default:
+ // Should not come to this...
+ break;
+ }
+ return ret;
+ }
+
+ public boolean addEthernet( int index, EthernetType type )
+ {
+ String ether = "ethernet" + index;
+ addFiltered( ether + ".present", "TRUE" );
+ addFiltered( ether + ".connectionType", "custom" );
+ addFiltered( ether + ".vnet", type.vmnet );
+ if ( config.get( ether + ".virtualDev" ) == null ) {
+ String dev = config.get( "ethernet0.virtualDev" );
+ if ( dev != null ) {
+ addFiltered( ether + ".virtualDev", dev );
+ }
+ }
+ return true;
+ }
+
+ public void addFloppy( int index, String image, boolean readOnly )
+ {
+ String pre = "floppy" + index;
+ addFiltered( pre + ".present", "TRUE" );
+ if ( image == null ) {
+ addFiltered( pre + ".startConnected", "FALSE" );
+ addFiltered( pre + ".fileType", "device" );
+ config.remove( pre + ".fileName" );
+ config.remove( pre + ".readonly" );
+ addFiltered( pre + ".autodetect", "TRUE" );
+ } else {
+ addFiltered( pre + ".startConnected", "TRUE" );
+ addFiltered( pre + ".fileType", "file" );
+ addFiltered( pre + ".fileName", image );
+ addFiltered( pre + ".readonly", vmBoolean( readOnly ) );
+ config.remove( pre + ".autodetect" );
+ }
+ }
+
+ public boolean addCdrom( String image )
+ {
+ for ( String port : new String[] { "ide0:0", "ide0:1", "ide1:0", "ide1:1", "scsi0:1" } ) {
+ if ( !isSetAndTrue( port + ".present" ) ) {
+ addFiltered( port + ".present", "TRUE" );
+ if ( image == null ) {
+ addFiltered( port + ".autodetect", "TRUE" );
+ addFiltered( port + ".deviceType", "cdrom-raw" );
+ config.remove( port + ".fileName" );
+ } else {
+ config.remove( port + ".autodetect" );
+ addFiltered( port + ".deviceType", "cdrom-image" );
+ addFiltered( port + ".fileName", image );
+ }
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private static String vmBoolean( boolean var )
+ {
+ return Boolean.toString( var ).toUpperCase();
+ }
+
+ private static String vmInteger( int val )
+ {
+ return Integer.toString( val );
+ }
+
+ @Override
+ public void transformNonPersistent() throws VirtualizationConfigurationException
+ {
+ // Cleaned vmx construction
+ for ( Iterator<Entry<String, ConfigEntry>> it = config.entrySet().iterator(); it.hasNext(); ) {
+ Entry<String, ConfigEntry> elem = it.next();
+ if ( !STATELESS_WHITELIST_PATTERN.matcher( elem.getKey() ).find() ) {
+ it.remove();
+ }
+ }
+ addFiltered( "suspend.disabled", "TRUE" );
+ }
+
+ @Override
+ public void transformEditable() throws VirtualizationConfigurationException
+ {
+ addFiltered( "gui.applyHostDisplayScalingToGuest", "FALSE" );
+ // This is for a very old bug: Check we have at lerast USB 2.0, as
+ // a buggy dmsd removed all USB controllers
+ List<ConfigurableOptionGroup> groups = getConfigurableOptions();
+ for ( ConfigurableOptionGroup group : groups ) {
+ if ( group.groupIdentifier != ConfigurationGroups.USB_SPEED )
+ continue;
+ int currentSpeed = 0;
+ VirtOptionValue twoPointOh = null;
+ for ( VirtOptionValue option : group.availableOptions ) {
+ int s = Util.parseInt( option.getId(), 0 );
+ if ( option.isActive() && s > currentSpeed ) {
+ currentSpeed = s;
+ }
+ if ( s == 2 ) {
+ twoPointOh = option;
+ }
+ }
+ if ( currentSpeed < 3 && twoPointOh != null ) {
+ twoPointOh.apply();
+ }
+ }
+ }
+
+ @Override
+ public void transformPrivacy() throws VirtualizationConfigurationException
+ {
+ for ( Iterator<Entry<String, ConfigEntry>> it = config.entrySet().iterator(); it.hasNext(); ) {
+ Entry<String, ConfigEntry> elem = it.next();
+ String key = elem.getKey();
+ String value = elem.getValue().getValue();
+ if ( key.endsWith( ".fileName" ) && !value.startsWith( "-" )
+ && ( value.contains( "." ) || value.contains( "/" ) || value.contains( "\\" ) ) ) {
+ it.remove();
+ } else if ( PRIVACY_BLACKLIST_PATTERN.matcher( key ).find() ) {
+ it.remove();
+ }
+ }
+ }
+
+ @Override
+ public boolean addDisplayName( String name )
+ {
+ addFiltered( "displayName", name );
+ return true;
+ }
+
+ @Override
+ public boolean addRam( int mem )
+ {
+ addFiltered( "memsize", Integer.toString( mem ) );
+ return true;
+ }
+
+ public void setOs( String vendorOsId )
+ {
+ addFiltered( "guestOS", vendorOsId );
+
+ final OperatingSystem os = VirtualizationConfigurationUtils.getOsOfVirtualizerFromList( this.osList,
+ TConst.VIRT_VMWARE, vendorOsId );
+ this.setOs( os );
+ }
+
+ public byte[] getConfigurationAsByteArray()
+ {
+ return config.toString().getBytes( StandardCharsets.UTF_8 );
+ }
+
+ private static class Device
+ {
+ public boolean present = false;
+ public String deviceType = null;
+ public String filename = null;
+
+ @Override
+ public String toString()
+ {
+ return filename + " is " + deviceType + " (present: " + present + ")";
+ }
+ }
+
+ private static class Controller
+ {
+ public boolean present = true; // Seems to be implicit, seen at least for IDE...
+ public String virtualDev = null;
+ Map<String, Device> devices = new HashMap<>();
+
+ @Override
+ public String toString()
+ {
+ return virtualDev + " is (present: " + present + "): " + devices.toString();
+ }
+ }
+
+ public String getValue( String key )
+ {
+ return config.get( key );
+ }
+
+ class VmwareNoSoundCard extends VirtOptionValue
+ {
+
+ public VmwareNoSoundCard( String displayName )
+ {
+ super( "", displayName );
+ }
+
+ @Override
+ public void apply()
+ {
+ addFiltered( "sound.present", vmBoolean( false ) );
+ config.remove( "sound.virtualDev" );
+ }
+
+ @Override
+ public boolean isActive()
+ {
+ return !isSetAndTrue( "sound.present" );
+ }
+
+ }
+
+ class VmWareSoundCardModelNone extends VirtOptionValue
+ {
+
+ public VmWareSoundCardModelNone( String displayName )
+ {
+ super( "none", displayName );
+ }
+
+ @Override
+ public void apply()
+ {
+ addFiltered( "sound.present", vmBoolean( false ) );
+ addFiltered( "sound.autodetect", vmBoolean( false ) );
+ config.remove( "sound.virtualDev" );
+ }
+
+ @Override
+ public boolean isActive()
+ {
+ return !isSetAndTrue( "sound.present" );
+ }
+
+ }
+
+ class VmWareSoundCardModel extends VirtOptionValue
+ {
+
+ public VmWareSoundCardModel( String id, String displayName )
+ {
+ super( id, displayName );
+ }
+
+ @Override
+ public void apply()
+ {
+ addFiltered( "sound.present", vmBoolean( true ) );
+ addFiltered( "sound.autodetect", vmBoolean( true ) );
+ addFiltered( "sound.virtualDev", this.id );
+ }
+
+ @Override
+ public boolean isActive()
+ {
+ return isSetAndTrue( "sound.present" ) && isSetAndTrue( "sound.autodetect" )
+ && this.id.equals( config.get( "sound.virtualDev" ) );
+ }
+
+ }
+
+ class VmWareAccel3D extends VirtOptionValue
+ {
+
+ public VmWareAccel3D( String id, String displayName )
+ {
+ super( id, displayName );
+ }
+
+ @Override
+ public void apply()
+ {
+ addFiltered( "mks.enable3d", this.id );
+ }
+
+ @Override
+ public boolean isActive()
+ {
+ return Boolean.parseBoolean( this.id ) == isSetAndTrue( "mks.enable3d" );
+ }
+
+ }
+
+ public void setVirtualizerVersion( Version type )
+ {
+ addFiltered( "virtualHW.version", vmInteger( type.getMajor() ) );
+ }
+
+ public Version getVirtualizerVersion()
+ {
+ final short major = Integer.valueOf( Util.parseInt( config.get( "virtualHW.version" ), -1 ) ).shortValue();
+ return Version.getInstanceByMajorFromVersions( major, this.getVirtualizer().getSupportedVersions() );
+ }
+
+ class VmwareNicModel extends VirtOptionValue
+ {
+
+ private final int cardIndex;
+
+ public VmwareNicModel( int cardIndex, String id, String displayName )
+ {
+ super( id, displayName );
+ this.cardIndex = cardIndex;
+ }
+
+ @Override
+ public void apply()
+ {
+ if ( Util.isEmptyString( id ) ) {
+ config.remove( "ethernet" + cardIndex + ".virtualDev" );
+ } else {
+ addFiltered( "ethernet" + cardIndex + ".virtualDev", id );
+ }
+ }
+
+ @Override
+ public boolean isActive()
+ {
+ String temp = config.get( "ethernet" + cardIndex + ".virtualDev" );
+ if ( temp == null )
+ return Util.isEmptyString( this.id );
+ return temp.equals( this.id );
+ }
+
+ }
+
+ class VmWareUsbSpeed extends VirtOptionValue
+ {
+ private final String[] SPEED = { null, "usb", "ehci", "usb_xhci" };
+ private final int speed;
+
+ public VmWareUsbSpeed( int speed, String displayName )
+ {
+ super( Integer.toString( speed ), displayName );
+ this.speed = speed;
+ }
+
+ @Override
+ public void apply()
+ {
+ // XXX TODO This sucks, qnd
+ for ( int i = 1; i < SPEED.length; ++i ) {
+ String key = SPEED[i] + ".present";
+ if ( i <= speed ) {
+ // Enable desired speed class, plus all lower ones
+ addFiltered( key, "TRUE" );
+ } else {
+ config.remove( key );
+ }
+ }
+ // VMware 14+ needs this to use USB 3.0 devices at USB 3.0 ports in VMs configured for < 3.0
+ if ( speed > 0 && speed < 3 ) {
+ addFiltered( "usb.mangleUsb3Speed", "TRUE" );
+ }
+ }
+
+ @Override
+ public boolean isActive()
+ {
+ int max = 0;
+ for ( int i = 1; i < SPEED.length; ++i ) {
+ if ( isSetAndTrue( SPEED[i] + ".present" ) ) {
+ max = i;
+ }
+ }
+ return speed == max;
+ }
+
+ }
+
+ @Override
+ public boolean addCpuCoreCount( int numCores )
+ {
+ addFiltered( "numvcpus", vmInteger( numCores ) );
+ return true;
+ }
+
+ public void registerVirtualHW()
+ {
+ List<VirtOptionValue> list;
+ list = new ArrayList<>();
+ list.add( new VmWareSoundCardModelNone( SoundCard.NONE ) );
+ list.add( new VmWareSoundCardModel( "", SoundCard.DEFAULT ) );
+ list.add( new VmWareSoundCardModel( "sb16", SoundCard.SOUND_BLASTER ) );
+ list.add( new VmWareSoundCardModel( "es1371", SoundCard.ES ) );
+ list.add( new VmWareSoundCardModel( "hdaudio", SoundCard.HD_AUDIO ) );
+ configurableOptions.add( new ConfigurableOptionGroup( ConfigurationGroups.SOUND_CARD_MODEL, list ) );
+
+ list = new ArrayList<>();
+ list.add( new VmWareAccel3D( "FALSE", "2D" ) );
+ list.add( new VmWareAccel3D( "TRUE", "3D" ) );
+ configurableOptions.add( new ConfigurableOptionGroup( ConfigurationGroups.GFX_TYPE, list ) );
+
+ list = new ArrayList<>();
+ list.add( new VmwareNicModel( 0, "", Ethernet.AUTO ) );
+ list.add( new VmwareNicModel( 0, "vlance", Ethernet.PCNET32 ) );
+ list.add( new VmwareNicModel( 0, "e1000", Ethernet.E1000 ) );
+ list.add( new VmwareNicModel( 0, "e1000e", Ethernet.E1000E ) );
+ list.add( new VmwareNicModel( 0, "vmxnet", Ethernet.VMXNET ) );
+ list.add( new VmwareNicModel( 0, "vmxnet3", Ethernet.VMXNET3 ) );
+ configurableOptions.add( new ConfigurableOptionGroup( ConfigurationGroups.NIC_MODEL, list ) );
+
+ list = new ArrayList<>();
+ list.add( new VmWareUsbSpeed( 0, Usb.NONE ) );
+ list.add( new VmWareUsbSpeed( 1, Usb.USB1_1 ) );
+ list.add( new VmWareUsbSpeed( 2, Usb.USB2_0 ) );
+ list.add( new VmWareUsbSpeed( 3, Usb.USB3_0 ) );
+ configurableOptions.add( new ConfigurableOptionGroup( ConfigurationGroups.USB_SPEED, list ) );
+ }
+
+ @Override
+ public String getFileNameExtension()
+ {
+ return VirtualizationConfigurationVmware.FILE_NAME_EXTENSION;
+ }
+
+ @Override
+ public void validate() throws VirtualizationConfigurationException
+ {
+ }
+
+ @Override
+ public void disableUsb()
+ {
+ new VmWareUsbSpeed( 0, Usb.NONE ).apply();
+ }
+
+ @Override
+ public String getSuspendedFile()
+ {
+ return config.get( "checkpoint.vmState" );
+ }
+}
diff --git a/src/main/java/org/openslx/util/vm/VmwareConfig.java b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationVmwareFileFormat.java
index 20ab3ab..356a034 100644
--- a/src/main/java/org/openslx/util/vm/VmwareConfig.java
+++ b/src/main/java/org/openslx/virtualization/configuration/VirtualizationConfigurationVmwareFileFormat.java
@@ -1,4 +1,4 @@
-package org.openslx.util.vm;
+package org.openslx.virtualization.configuration;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
@@ -16,22 +16,35 @@ import java.util.TreeMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.apache.log4j.Logger;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import org.openslx.util.Util;
-public class VmwareConfig
+class KeyValuePair
{
+ public final String key;
+ public final String value;
- private static final Logger LOGGER = Logger.getLogger( VmwareConfig.class );
+ public KeyValuePair( String key, String value )
+ {
+ this.key = key;
+ this.value = value;
+ }
+}
+
+public class VirtualizationConfigurationVmwareFileFormat
+{
+
+ private static final Logger LOGGER = LogManager.getLogger( VirtualizationConfigurationVmwareFileFormat.class );
private Map<String, ConfigEntry> entries = new TreeMap<>( String.CASE_INSENSITIVE_ORDER );
- public VmwareConfig()
+ public VirtualizationConfigurationVmwareFileFormat()
{
// (void)
}
- public VmwareConfig( File file ) throws IOException, UnsupportedVirtualizerFormatException
+ public VirtualizationConfigurationVmwareFileFormat( File file ) throws IOException, VirtualizationConfigurationException
{
int todo = (int)Math.min( 100000, file.length() );
int offset = 0;
@@ -53,7 +66,7 @@ public class VmwareConfig
}
- public VmwareConfig( InputStream is ) throws IOException, UnsupportedVirtualizerFormatException
+ public VirtualizationConfigurationVmwareFileFormat( InputStream is ) throws IOException, VirtualizationConfigurationException
{
int todo = Math.max( 4000, Math.min( 100000, is.available() ) );
int offset = 0;
@@ -68,13 +81,13 @@ public class VmwareConfig
init( data, offset );
}
- public VmwareConfig( byte[] vmxContent, int length ) throws UnsupportedVirtualizerFormatException
+ public VirtualizationConfigurationVmwareFileFormat( byte[] vmxContent, int length ) throws VirtualizationConfigurationException
{
init( vmxContent, length );
}
// function is used for both .vmx and .vmdk files
- private void init( byte[] vmxContent, int length ) throws UnsupportedVirtualizerFormatException
+ private void init( byte[] vmxContent, int length ) throws VirtualizationConfigurationException
{
try {
boolean isValid = false;
@@ -84,14 +97,17 @@ public class VmwareConfig
KeyValuePair entry = parse( line );
if ( entry != null ) {
- if ( entry.key.equals( "virtualHW.version" ) || entry.key.equals( "ddb.virtualHWVersion" ) ) {
+ // TODO: This is supposed to be case insensitive.
+ // Check if there are other consequences from lowercase entries in converted vmx files.
+ if ( entry.key.equals( "virtualHW.version" ) || entry.key.equals( "ddb.virtualHWVersion" )
+ || entry.key.equals( "virtualhw.version" ) ) {
isValid = true;
}
set( entry.key, unescape( entry.value ) );
}
}
if ( !isValid ) {
- throw new UnsupportedVirtualizerFormatException( "Not in VMX format." );
+ throw new VirtualizationConfigurationException( "Not in VMX format." );
}
} catch ( IOException e ) {
LOGGER.warn( "Exception when loading vmx from byte array (how!?)", e );
@@ -101,12 +117,22 @@ public class VmwareConfig
public static BufferedReader getVmxReader( byte[] vmxContent, int length ) throws IOException
{
Charset cs = getCharset( vmxContent, length );
+ if ( cs == null )
+ cs = StandardCharsets.UTF_8; // YES BECAUSE THIS IS NOT VMX AND EVERYTHING IS SHIT
return new BufferedReader( new InputStreamReader( new ByteArrayInputStream( vmxContent, 0, length ), cs ) );
}
+ /**
+ * Get charset of config. Returns null if input doesn't look like a vmx file.
+ * @param vmxContent
+ * @param length
+ * @return
+ */
public static Charset getCharset( byte[] vmxContent, int length )
{
String csName = detectCharset( new ByteArrayInputStream( vmxContent, 0, length ) );
+ if ( csName == null )
+ return null;
Charset cs = null;
try {
cs = Charset.forName( csName );
@@ -130,8 +156,9 @@ public class VmwareConfig
return ret;
}
- public static String detectCharset( InputStream is )
+ private static String detectCharset( InputStream is )
{
+ boolean isVmware = false;
try {
BufferedReader csDetectReader = new BufferedReader( new InputStreamReader( is, StandardCharsets.ISO_8859_1 ) );
String line;
@@ -142,10 +169,15 @@ public class VmwareConfig
if ( entry.key.equals( ".encoding" ) || entry.key.equals( "encoding" ) ) {
return entry.value;
}
+ if ( entry.key.equals( "virtualHW.version" ) || entry.key.equals( "memsize" ) || entry.key.equals( "displayName") ) {
+ isVmware = true;
+ }
}
} catch ( Exception e ) {
LOGGER.warn( "Could not detect charset, fallback to latin1", e );
}
+ if ( !isVmware )
+ return null;
// Dumb fallback
return "ISO-8859-1";
}
@@ -203,51 +235,30 @@ public class VmwareConfig
return ce.value;
}
- public String toString( boolean filteredRequired, boolean generatedRequired )
+ @Override
+ public String toString()
{
- set( ".encoding", "UTF-8" ).filtered( true ).generated( true );
+ set( ".encoding", "UTF-8" );
StringBuilder sb = new StringBuilder( 300 );
for ( Entry<String, ConfigEntry> entry : entries.entrySet() ) {
ConfigEntry value = entry.getValue();
- if ( ( !filteredRequired || value.forFiltered ) && ( !generatedRequired || value.forGenerated ) ) {
- sb.append( entry.getKey() );
- sb.append( " = \"" );
- sb.append( value.getEscaped() );
- sb.append( "\"\n" );
- }
+ sb.append( entry.getKey() );
+ sb.append( " = \"" );
+ sb.append( value.getEscaped() );
+ sb.append( "\"\n" );
}
return sb.toString();
}
- @Override
- public String toString()
- {
- return toString( false, false );
- }
-
public static class ConfigEntry
{
private String value;
- private boolean forFiltered;
- private boolean forGenerated;
public ConfigEntry( String value )
{
this.value = value;
}
- public ConfigEntry filtered( boolean set )
- {
- this.forFiltered = set;
- return this;
- }
-
- public ConfigEntry generated( boolean set )
- {
- this.forGenerated = set;
- return this;
- }
-
public String getEscaped()
{
String ret = value;
diff --git a/src/main/java/org/openslx/virtualization/configuration/container/ContainerBindMount.java b/src/main/java/org/openslx/virtualization/configuration/container/ContainerBindMount.java
new file mode 100644
index 0000000..0c1788e
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/container/ContainerBindMount.java
@@ -0,0 +1,74 @@
+package org.openslx.virtualization.configuration.container;
+
+import java.util.Objects;
+
+/**
+ * This class implements a model for a bind mount entry in the docker context
+ * (eg. docker run ... --mount type=bind,source=source,target=target,options ... ). A list of objects of this class is stored in
+ * {@link ContainerMeta}.
+ */
+public class ContainerBindMount {
+
+ public enum ContainerMountType {
+ DEFAULT,
+ CONTAINER_IMAGE
+ }
+
+ private ContainerMountType mount_type = ContainerMountType.DEFAULT;
+ private String source = "";
+ private String target = "";
+ private String options = "";
+
+ public ContainerBindMount() {
+ }
+
+ public ContainerBindMount(String source, String target, String options) {
+ this(ContainerMountType.DEFAULT,source,target,options);
+ }
+
+ public ContainerBindMount(ContainerMountType mount_type, String source, String target, String options) {
+ this.mount_type = mount_type;
+ this.source = source;
+ this.target = target;
+ this.options = options;
+ }
+
+ public String getSource() {
+ return source;
+ }
+
+ public String getTarget() {
+ return target;
+ }
+
+ public void setTarget(String target) {
+ this.target = target;
+ }
+
+ public String getOptions() {
+ return options;
+ }
+
+ public void setOptions(String options) {
+ this.options = options;
+ }
+
+ public ContainerMountType getMountType() {
+ return this.mount_type;
+ }
+
+
+ @Override public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
+ ContainerBindMount that = (ContainerBindMount) o;
+ return Objects.equals(source, that.source) && Objects.equals(mount_type, that.mount_type)
+ && Objects.equals(target, that.target) && Objects.equals(options, that.options);
+ }
+
+ @Override public int hashCode() {
+ return Objects.hash(source, target, options);
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/container/ContainerDefinition.java b/src/main/java/org/openslx/virtualization/configuration/container/ContainerDefinition.java
new file mode 100644
index 0000000..825d0c3
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/container/ContainerDefinition.java
@@ -0,0 +1,195 @@
+package org.openslx.virtualization.configuration.container;
+
+import com.google.gson.Gson;
+import com.google.gson.GsonBuilder;
+import com.google.gson.stream.JsonReader;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.openslx.util.Util;
+import org.openslx.util.TarArchiveUtil.TarArchiveReader;
+import org.openslx.util.TarArchiveUtil.TarArchiveWriter;
+
+import java.io.*;
+import java.nio.ByteBuffer;
+import java.nio.charset.StandardCharsets;
+import java.util.Objects;
+
+public class ContainerDefinition {
+
+ // TODO database needs a refactoring to store container details
+ // TODO refatoring: tar.gz of this object is not useful, for smaller dockerfiles it makes the package lager.
+ // remove the containerRecipe, ContainerMeta holds in build_context the dockerfile.
+
+ protected static final Logger LOGGER = LogManager.getLogger(ContainerDefinition.class);
+
+ protected static final String CONTAINER_FILE = "dockerfile";
+ protected static final String CONTAINER_META_FILE = "container_meta.json";
+
+ /**
+ * The file to construct a real container image, could be an dockerfile or a singularity recipe.
+ */
+ public String containerRecipe = "";
+
+ /**
+ * Further container information, see {@link ContainerMeta}.
+ */
+ public ContainerMeta containerMeta;
+
+ public ContainerDefinition() {
+ containerMeta = new ContainerMeta();
+ }
+
+ /**
+ * Copy Constructor
+ *
+ * @param containerDef {@link ContainerDefinition} from which to make a deep copy.
+ */
+ public ContainerDefinition(ContainerDefinition containerDef) {
+ containerRecipe = String.valueOf(containerDef.getContainerRecipe());
+ containerMeta = new ContainerMeta(containerDef.getContainerMeta());
+ }
+
+ /**
+ * Utility function to create a {@link ContainerDefinition} object for a byte array downloaded from the server.
+ *
+ * @param rawTarData Downloaded tar.gz file from the server as a byte array.
+ * @return New object of ContainerDefinition.
+ */
+ public static ContainerDefinition fromByteArray(byte[] rawTarData) {
+
+ ContainerDefinition containerDef = new ContainerDefinition();
+
+ try {
+ TarArchiveReader tarReader = new TarArchiveReader(new ByteArrayInputStream(rawTarData), true, true);
+
+ while (tarReader.hasNextEntry()) {
+ if (tarReader.getEntryName().equals(CONTAINER_FILE))
+ containerDef.setContainerRecipe(tarReader.readCurrentEntry());
+ if (tarReader.getEntryName().equals(CONTAINER_META_FILE))
+ containerDef.setContainerMeta(tarReader.readCurrentEntry());
+ }
+ tarReader.close();
+
+ } catch (IOException e) {
+ LOGGER.error("Could not create a ContainerDefinition Object for rawTarData", e);
+ }
+
+ return containerDef;
+ }
+
+ public String getContainerRecipe() {
+ return containerRecipe;
+ }
+
+ public void setContainerRecipe(String containerRecipe) {
+ this.containerRecipe = containerRecipe;
+ }
+
+ public void setContainerRecipe(File containerRecipeFile) {
+ this.containerRecipe = readContainerRecipe(containerRecipeFile);
+ }
+
+ public void setContainerRecipe(byte[] rawContainerRecipe) {
+ this.containerRecipe = new String(rawContainerRecipe, StandardCharsets.UTF_8);
+ }
+
+ public ContainerMeta getContainerMeta() {
+ return containerMeta;
+ }
+
+ public void setContainerMeta(byte[] containerMeta) {
+ Gson gson = new GsonBuilder().create();
+ this.containerMeta = gson.fromJson(new JsonReader(
+ new InputStreamReader(new ByteArrayInputStream(containerMeta), StandardCharsets.UTF_8)),
+ ContainerMeta.class);
+ }
+
+ /**
+ * Serializes the ContainerMeta and Container Description (e.g. dockerfile) into an tar.gz archive.
+ *
+ * @return A ByteBuffer object of the container definition. Can be uploaded so satellite server.
+ */
+ public ByteBuffer toByteBuffer() {
+
+ ByteBuffer containerDef = null;
+ Gson gson = new GsonBuilder().setPrettyPrinting().create();
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ try {
+ TarArchiveWriter tarWriter = new TarArchiveWriter(baos);
+ tarWriter.writeFile(CONTAINER_META_FILE, gson.toJson(containerMeta));
+ tarWriter.writeFile(CONTAINER_FILE, containerRecipe);
+ Util.safeClose(tarWriter);
+
+ containerDef = ByteBuffer.wrap(baos.toByteArray());
+ } catch (IOException e) {
+ LOGGER.warn("Could not create a tar file", e);
+ }
+
+ return containerDef;
+ }
+
+ private String readContainerRecipe(File file) {
+ String recipe = null;
+ try {
+
+ BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
+ ByteArrayOutputStream rawFile = new ByteArrayOutputStream();
+ int count;
+ byte[] data = new byte[1024];
+ while ((count = bis.read(data)) != -1) {
+ rawFile.write(data, 0, count);
+ }
+
+ String rawRecipe = new String(rawFile.toByteArray(), StandardCharsets.UTF_8);
+
+ // replace windows by unix EOL
+ recipe = rawRecipe.replaceAll("\\r\\n", "\n");
+
+ bis.close();
+
+ } catch (IOException e) {
+ LOGGER.error("Could not read Container Recipe", e);
+ }
+ return recipe;
+ }
+
+ /**
+ * Saves containerRecipe and containerMeta at the provided location.
+ *
+ * @param destDir destination directory for containerRecipe and containerMeta.
+ */
+ public void saveLocal(File destDir) {
+ writeFile(destDir, containerRecipe, CONTAINER_FILE);
+ }
+
+ private void writeFile(File destDir, String fileContent, String filename) {
+ File output = new File(destDir, filename);
+ try {
+ FileWriter fw = new FileWriter(output);
+ fw.write(fileContent);
+ fw.flush();
+ fw.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ LOGGER.error("Could not write File", e);
+ }
+ }
+
+ public ContainerImageContext getContainerImageContext() {
+ return ContainerImageContext.fromInt(containerMeta.getContainerImageContext());
+ }
+
+ @Override public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
+ ContainerDefinition that = (ContainerDefinition) o;
+ return containerRecipe.equals(that.containerRecipe) && containerMeta.equals(that.containerMeta);
+ }
+
+ @Override public int hashCode() {
+ return Objects.hash(containerRecipe, containerMeta);
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/container/ContainerImageContext.java b/src/main/java/org/openslx/virtualization/configuration/container/ContainerImageContext.java
new file mode 100644
index 0000000..f19d419
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/container/ContainerImageContext.java
@@ -0,0 +1,10 @@
+package org.openslx.virtualization.configuration.container;
+
+public enum ContainerImageContext {
+
+ DOCKERFILE, GIT_REPOSITORY, IMAGE_REPOSITORY, DOCKER_ARCHIVE;
+
+ public static ContainerImageContext fromInt(int index) {
+ return values()[index];
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/container/ContainerMeta.java b/src/main/java/org/openslx/virtualization/configuration/container/ContainerMeta.java
new file mode 100644
index 0000000..4dbf64b
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/container/ContainerMeta.java
@@ -0,0 +1,166 @@
+package org.openslx.virtualization.configuration.container;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * ContainerMeta is used to store container specific information. An object of
+ * this class will be serialized with gson to a json file.
+ * <p>
+ * TODO rename build_context_method to container_image_context, requires update
+ * in database(json)
+ * <p>
+ * TODO rename build_context_url to build_context TODO refactoring build_context
+ * is either a dockerfile or a git url with a dockerfile.
+ */
+public class ContainerMeta {
+
+ private int build_context_method;
+ private String image_repo;
+ private String build_context_url;
+ private String image_name;
+ private String run_options;
+ private String run_command;
+ private String image_type;
+ private List<ContainerBindMount> bind_mount_config = new ArrayList<>();
+
+ public ContainerMeta() {
+
+ image_repo = "";
+ build_context_method = ContainerImageContext.DOCKERFILE.ordinal();
+ build_context_url = "";
+ image_name = "";
+ run_options = "";
+ run_command = "";
+ image_type = ContainerImageType.LECTURE.toString();
+ bind_mount_config = new ArrayList<>();
+ }
+
+ public ContainerMeta(ContainerMeta containerMeta) {
+ build_context_method = containerMeta.build_context_method;
+ build_context_url = containerMeta.build_context_url;
+ image_name = containerMeta.image_name;
+ run_options = containerMeta.run_options;
+ run_command = containerMeta.run_command;
+ image_repo = containerMeta.image_repo;
+
+ for (ContainerBindMount bm : containerMeta.bind_mount_config)
+ bind_mount_config.add(new ContainerBindMount(bm.getSource(), bm.getTarget(), bm.getOptions()));
+
+ }
+
+ public int getContainerImageContext() {
+ return build_context_method;
+ }
+
+ public void setContainerImageContext(int buildContextMethod) {
+ this.build_context_method = buildContextMethod;
+ }
+
+ public String getBuildContextUrl() {
+ return build_context_url;
+ }
+
+ public void setBuildContextUrl(String buildContextUrl) {
+ this.build_context_url = buildContextUrl;
+ }
+
+ public String getRunOptions() {
+ return run_options;
+ }
+
+ public void setRunOptions(String run_options) {
+ this.run_options = run_options;
+ }
+
+ public String getRunCommand() {
+ return this.run_command;
+ }
+
+ public void setRunCommand(String run_command) {
+ this.run_command = run_command;
+ }
+
+ public String getImageName() {
+ return image_name;
+ }
+
+ public void setImageName(String image_name) {
+ this.image_name = image_name;
+ }
+
+ public List<ContainerBindMount> getBindMountConfig() {
+ return bind_mount_config;
+ }
+
+ public void setBindMountConfig(List<ContainerBindMount> bindMountConfig) {
+ this.bind_mount_config = bindMountConfig;
+ }
+
+ public String getImageRepo() {
+ return image_repo;
+ }
+
+ public void setImageRepo(String from_image) {
+ this.image_repo = from_image;
+ }
+
+ public ContainerImageType getImageType() {
+ if (image_type == null || image_type.length() == 0)
+ return ContainerImageType.LECTURE;
+
+ // turn string representation into enum-var 'LECTURE' ->
+ // ContainerImageType.LECTURE
+ return ContainerImageType.valueOf(image_type);
+ }
+
+ public void setImageType(ContainerImageType image_type) {
+ // set constant representation of the enum-var e.g. ContainerImageType.LECTURE
+ // -> 'LECTURE'
+ this.image_type = image_type.name();
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o)
+ return true;
+ if (o == null || getClass() != o.getClass())
+ return false;
+ ContainerMeta that = (ContainerMeta) o;
+ return Objects.equals(build_context_url, that.build_context_url) && Objects.equals(image_name, that.image_name)
+ && Objects.equals(run_options, that.run_options) && Objects.equals(run_command, that.run_command)
+ && Objects.equals(bind_mount_config, that.bind_mount_config)
+ && Objects.equals(image_repo, that.image_repo) && Objects.equals(image_type, that.image_type);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(build_context_url, image_name, run_options, run_command, bind_mount_config, image_repo,
+ image_type);
+ }
+
+ public enum ContainerImageType implements org.apache.thrift.TEnum {
+ LECTURE("Lecture"), BATCH("Batch"), DATA("Data");
+
+ private final String displayLable;
+
+ ContainerImageType(String name) {
+ this.displayLable = name;
+ }
+
+ public boolean equalNames(String other) {
+ return displayLable.equals(other);
+ }
+
+ @Override
+ public String toString() {
+ return this.displayLable;
+ }
+
+ @Override
+ public int getValue() {
+ return this.ordinal();
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/data/ConfigurationDataDozModClientToDozModServer.java b/src/main/java/org/openslx/virtualization/configuration/data/ConfigurationDataDozModClientToDozModServer.java
new file mode 100644
index 0000000..8a08d05
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/data/ConfigurationDataDozModClientToDozModServer.java
@@ -0,0 +1,21 @@
+package org.openslx.virtualization.configuration.data;
+
+/**
+ * Data container to collect and store input arguments for a
+ * {@link org.openslx.virtualization.configuration.logic.ConfigurationLogicDozModClientToDozModServer}
+ * transformation.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class ConfigurationDataDozModClientToDozModServer
+{
+ /**
+ * Creates a new data container to collect and store input arguments for a
+ * {@link org.openslx.virtualization.configuration.logic.ConfigurationLogicDozModClientToDozModServer}
+ * transformation.
+ */
+ public ConfigurationDataDozModClientToDozModServer()
+ {
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/data/ConfigurationDataDozModServerToDozModClient.java b/src/main/java/org/openslx/virtualization/configuration/data/ConfigurationDataDozModServerToDozModClient.java
new file mode 100644
index 0000000..4e18d48
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/data/ConfigurationDataDozModServerToDozModClient.java
@@ -0,0 +1,116 @@
+package org.openslx.virtualization.configuration.data;
+
+import java.io.File;
+
+import org.openslx.bwlp.thrift.iface.OperatingSystem;
+
+/**
+ * Data container to collect and store input arguments for a
+ * {@link org.openslx.virtualization.configuration.logic.ConfigurationLogicDozModServerToDozModClient}
+ * transformation.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class ConfigurationDataDozModServerToDozModClient
+{
+ /**
+ * Display name for a transformation of a virtualization configuration.
+ */
+ private final String displayName;
+
+ /**
+ * Disk image file for a transformation of a virtualization configuration.
+ */
+ private final File diskImage;
+
+ /**
+ * Guest operating system for a transformation of a virtualization configuration.
+ */
+ private final OperatingSystem guestOs;
+
+ /**
+ * Virtualizer identifier for a transformation of a virtualization configuration.
+ */
+ private final String virtualizerId;
+
+ /**
+ * Total amount of available memory for a transformation of a virtualization configuration.
+ */
+ private final int totalMemory;
+
+ /**
+ * Creates a new data container to collect and store input arguments for a
+ * {@link org.openslx.virtualization.configuration.logic.ConfigurationLogicDozModServerToDozModClient}
+ * transformation.
+ *
+ * @param displayName display name for a transformation of a virtualization configuration.
+ * @param diskImage disk image file for a transformation of a virtualization configuration.
+ * @param guestOs guest operating system for a transformation of a virtualization configuration.
+ * @param virtualizerId virtualizer identifier for a transformation of a virtualization
+ * configuration.
+ * @param totalMemory total amount of available memory for a transformation of a virtualization
+ * configuration.
+ */
+ public ConfigurationDataDozModServerToDozModClient( String displayName, File diskImage, OperatingSystem guestOs,
+ String virtualizerId, int totalMemory )
+ {
+ this.displayName = displayName;
+ this.diskImage = diskImage;
+ this.guestOs = guestOs;
+ this.virtualizerId = virtualizerId;
+ this.totalMemory = totalMemory;
+ }
+
+ /**
+ * Returns the display name for a transformation of a virtualization configuration.
+ *
+ * @return display name for a transformation of a virtualization configuration.
+ */
+ public String getDisplayName()
+ {
+ return this.displayName;
+ }
+
+ /**
+ * Returns the disk image file for a transformation of a virtualization configuration.
+ *
+ * @return disk image file for a transformation of a virtualization configuration.
+ */
+ public File getDiskImage()
+ {
+ return this.diskImage;
+ }
+
+ /**
+ * Returns the guest operating system for a transformation of a virtualization configuration.
+ *
+ * @return guest operating system for a transformation of a virtualization configuration.
+ */
+ public OperatingSystem getGuestOs()
+ {
+ return this.guestOs;
+ }
+
+ /**
+ * Returns the virtualizer identifier for a transformation of a virtualization configuration.
+ *
+ * @return virtualizer identifier for a transformation of a virtualization configuration.
+ */
+ public String getVirtualizerId()
+ {
+ return this.virtualizerId;
+ }
+
+ /**
+ * Returns the total amount of available memory for a transformation of a virtualization
+ * configuration.
+ *
+ * @return total amount of available memory for a transformation of a virtualization
+ * configuration.
+ */
+ public int getTotalMemory()
+ {
+ return this.totalMemory;
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/data/ConfigurationDataDozModServerToStatelessClient.java b/src/main/java/org/openslx/virtualization/configuration/data/ConfigurationDataDozModServerToStatelessClient.java
new file mode 100644
index 0000000..65cc7ce
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/data/ConfigurationDataDozModServerToStatelessClient.java
@@ -0,0 +1,79 @@
+package org.openslx.virtualization.configuration.data;
+
+/**
+ * Data container to collect and store input arguments for a
+ * {@link org.openslx.virtualization.configuration.logic.ConfigurationLogicDozModServerToStatelessClient}
+ * transformation.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class ConfigurationDataDozModServerToStatelessClient
+{
+ /**
+ * Display name for a transformation of a virtualization configuration.
+ */
+ private final String displayName;
+
+ /**
+ * Operating system identifier for a transformation of a virtualization configuration.
+ */
+ private final String osId;
+
+ /**
+ * State whether USB access is allowed or not for a transformation of a virtualization
+ * configuration.
+ */
+ private final boolean hasUsbAccess;
+
+ /**
+ * Creates a new data container to collect and store input arguments for a
+ * {@link org.openslx.virtualization.configuration.logic.ConfigurationLogicDozModServerToStatelessClient}
+ * transformation.
+ *
+ * @param displayName display name for a transformation of a virtualization configuration.
+ * @param osId operating system identifier for a transformation of a virtualization
+ * configuration.
+ * @param hasUsbAccess state whether USB access is allowed or not for a transformation of a
+ * virtualization configuration.
+ */
+ public ConfigurationDataDozModServerToStatelessClient( String displayName, String osId, boolean hasUsbAccess )
+ {
+ this.displayName = displayName;
+ this.osId = osId;
+ this.hasUsbAccess = hasUsbAccess;
+ }
+
+ /**
+ * Returns the display name for a transformation of a virtualization configuration.
+ *
+ * @return display name for a transformation of a virtualization configuration.
+ */
+ public String getDisplayName()
+ {
+ return this.displayName;
+ }
+
+ /**
+ * Returns the operating system identifier for a transformation of a virtualization
+ * configuration.
+ *
+ * @return operating system identifier for a transformation of a virtualization configuration.
+ */
+ public String getOsId()
+ {
+ return this.osId;
+ }
+
+ /**
+ * Returns the state whether USB access is allowed or not for a transformation of a
+ * virtualization configuration.
+ *
+ * @return state whether USB access is allowed or not for a transformation of a virtualization
+ * configuration.
+ */
+ public boolean hasUsbAccess()
+ {
+ return this.hasUsbAccess;
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/logic/ConfigurationLogic.java b/src/main/java/org/openslx/virtualization/configuration/logic/ConfigurationLogic.java
new file mode 100644
index 0000000..90319e2
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/logic/ConfigurationLogic.java
@@ -0,0 +1,28 @@
+package org.openslx.virtualization.configuration.logic;
+
+import org.openslx.virtualization.configuration.VirtualizationConfiguration;
+import org.openslx.virtualization.configuration.transformation.TransformationGeneric;
+
+/**
+ * Generic transformation logic for virtualization configurations.
+ * <p>
+ * This transformation logic represents an encapsulated transformation logic to transform
+ * virtualization configurations as part of server or client implementations.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ *
+ * @param <T> type of configuration data used as input arguments for a transformation.
+ */
+public abstract class ConfigurationLogic<T> extends TransformationGeneric<VirtualizationConfiguration, T>
+{
+ /**
+ * Creates a new generic transformation logic for virtualization configurations.
+ *
+ * @param name generic transformation logic name.
+ */
+ public ConfigurationLogic( String name )
+ {
+ super( name );
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/logic/ConfigurationLogicDozModClientToDozModServer.java b/src/main/java/org/openslx/virtualization/configuration/logic/ConfigurationLogicDozModClientToDozModServer.java
new file mode 100644
index 0000000..f5d9a76
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/logic/ConfigurationLogicDozModClientToDozModServer.java
@@ -0,0 +1,76 @@
+package org.openslx.virtualization.configuration.logic;
+
+import org.openslx.virtualization.configuration.VirtualizationConfiguration;
+import org.openslx.virtualization.configuration.VirtualizationConfigurationException;
+import org.openslx.virtualization.configuration.data.ConfigurationDataDozModClientToDozModServer;
+import org.openslx.virtualization.configuration.transformation.TransformationException;
+
+/**
+ * Transformation logic for virtualization configurations between a dozmod-client and a
+ * dozmod-server.
+ * <p>
+ * This transformation logic is applied while uploading a new virtualization configuration from a
+ * dozmod-client to a dozmod-server.
+ *
+ * <pre>
+ * +------------------------------+ DozModClientToDozModServer +------------------------------+
+ * | virtualization configuration | ----------------------------â–¶ | virtualization configuration |
+ * +---------------+--------------+ transformation logic +---------------+--------------+
+ * | dozmod-client | | dozmod-server |
+ * +---------------+ +---------------+
+ * </pre>
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class ConfigurationLogicDozModClientToDozModServer
+ extends ConfigurationLogic<ConfigurationDataDozModClientToDozModServer>
+{
+ /**
+ * Name of the transformation logic for virtualization configurations.
+ */
+ private static final String CONFIGURATION_LOGIC_NAME = "Transformation of virtualization configuration during upload from DozMod client to DozMod server";
+
+ /**
+ * Creates a new transformation logic for virtualization configurations between a dozmod-client
+ * and a dozmod-server.
+ */
+ public ConfigurationLogicDozModClientToDozModServer()
+ {
+ super( ConfigurationLogicDozModClientToDozModServer.CONFIGURATION_LOGIC_NAME );
+ }
+
+ /**
+ * Validates a virtualization configuration and input arguments for a transformation.
+ *
+ * @param config virtualization configuration for the validation.
+ * @param args input arguments for the validation.
+ * @throws TransformationException validation has failed.
+ */
+ private void validateInputs( VirtualizationConfiguration config,
+ ConfigurationDataDozModClientToDozModServer args )
+ throws TransformationException
+ {
+ if ( config == null || args == null ) {
+ throw new TransformationException( "Virtualization configuration or input arguments are missing!" );
+ } else if ( config.getDisplayName() == null ) {
+ throw new TransformationException( "Display name is missing in virtualization configuration!" );
+ }
+ }
+
+ @Override
+ public void transform( VirtualizationConfiguration config,
+ ConfigurationDataDozModClientToDozModServer args )
+ throws TransformationException
+ {
+ // check if input parameters for a transformation are valid
+ this.validateInputs( config, args );
+
+ // apply the privacy filter on the given virtualization configuration
+ try {
+ config.transformPrivacy();
+ } catch ( VirtualizationConfigurationException e ) {
+ throw new TransformationException( e.getLocalizedMessage() );
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/logic/ConfigurationLogicDozModServerToDozModClient.java b/src/main/java/org/openslx/virtualization/configuration/logic/ConfigurationLogicDozModServerToDozModClient.java
new file mode 100644
index 0000000..acbf4fc
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/logic/ConfigurationLogicDozModServerToDozModClient.java
@@ -0,0 +1,197 @@
+package org.openslx.virtualization.configuration.logic;
+
+import java.util.Map;
+
+import org.openslx.bwlp.thrift.iface.OperatingSystem;
+import org.openslx.virtualization.configuration.VirtualizationConfiguration;
+import org.openslx.virtualization.configuration.VirtualizationConfigurationException;
+import org.openslx.virtualization.configuration.data.ConfigurationDataDozModServerToDozModClient;
+import org.openslx.virtualization.configuration.transformation.TransformationException;
+
+/**
+ * Transformation logic for virtualization configurations between a dozmod-server and a
+ * dozmod-client.
+ * <p>
+ * This transformation logic is applied while downloading an existing virtualization configuration
+ * from a dozmod-server to a dozmod-client.
+ *
+ * <pre>
+ * +------------------------------+ DozModServerToDozModClient +------------------------------+
+ * | virtualization configuration | ----------------------------â–¶ | virtualization configuration |
+ * +---------------+--------------+ transformation logic +---------------+--------------+
+ * | dozmod-server | | dozmod-client |
+ * +---------------+ +---------------+
+ * </pre>
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class ConfigurationLogicDozModServerToDozModClient
+ extends ConfigurationLogic<ConfigurationDataDozModServerToDozModClient>
+{
+ /**
+ * Name of the transformation logic for virtualization configurations.
+ */
+ private static final String CONFIGURATION_LOGIC_NAME = "Transformation of virtualization configuration during download from DozMod server to DozMod client";
+
+ /**
+ * Default number of CPU cores set by the configuration logic for the virtualization
+ * configuration's virtualizer.
+ */
+ private static final int CONFIGURATION_LOGIC_NUM_CPU_CORES = 1;
+
+ /**
+ * Default memory in megabytes set by the configuration logic for the virtualization
+ * configuration's virtualizer.
+ */
+ private static final int CONFIGURATION_LOGIC_MEMORY_MIN = 1024;
+
+ /**
+ * Creates a new transformation logic for virtualization configurations between a dozmod-server
+ * and a dozmod-client.
+ */
+ public ConfigurationLogicDozModServerToDozModClient()
+ {
+ super( ConfigurationLogicDozModServerToDozModClient.CONFIGURATION_LOGIC_NAME );
+ }
+
+ /**
+ * Validates a virtualization configuration and input arguments for a transformation.
+ *
+ * @param config virtualization configuration for the validation.
+ * @param args input arguments for the validation.
+ * @throws TransformationException validation has failed.
+ */
+ private void validateInputs( VirtualizationConfiguration config,
+ ConfigurationDataDozModServerToDozModClient args )
+ throws TransformationException
+ {
+ if ( config == null || args == null ) {
+ throw new TransformationException( "Virtualization configuration or input arguments are missing!" );
+ } else if ( args.getDisplayName() == null || args.getDisplayName().isEmpty() ) {
+ throw new TransformationException( "Valid display name is not specified!" );
+ } else if ( args.getDiskImage() == null || !args.getDiskImage().exists() ) {
+ throw new TransformationException( "Valid disk image file is not specified!" );
+ } else if ( ! ( args.getTotalMemory() > 0 ) ) {
+ throw new TransformationException( "Total memory amount is not specified!" );
+ }
+ }
+
+ /**
+ * Rounds a given value to the nearest factor.
+ *
+ * @param value input value for the rounding.
+ * @param nearestFactor nearest factor for the rounding.
+ * @return rounded value as a multiple of the nearest factor.
+ *
+ * @apiNote This utility method rounds the given value to an integer value and no to a floating
+ * point value.
+ */
+ private static int roundToNearest( int value, int nearestFactor )
+ {
+ return ( value / nearestFactor ) * nearestFactor;
+ }
+
+ /**
+ * Calculates the amount of memory for the virtualization configuration depending on the
+ * available resources of the dozmod-client's host system.
+ *
+ * @param totalMemory maximum memory available on the dozmod-client's host system.
+ * @param osMaxMemory maximum memory supported by the defined operating system in the
+ * virtualization configuration.
+ * @return amount of memory for the virtualization configuration in megabytes
+ */
+ private static int calculateVirtualizationMemoryOnDozmodClient( int totalMemory, int osMaxMemory )
+ {
+ // calculate the amount of memory
+ int memory = totalMemory / 2 - 512;
+
+ // increase calculated memory if lower memory limit is undercut
+ if ( memory < ConfigurationLogicDozModServerToDozModClient.CONFIGURATION_LOGIC_MEMORY_MIN ) {
+ memory = ConfigurationLogicDozModServerToDozModClient.CONFIGURATION_LOGIC_MEMORY_MIN;
+ }
+
+ // limit virtualization memory if the available host's system memory amount is smaller
+ if ( osMaxMemory > 0 && memory > osMaxMemory ) {
+ memory = osMaxMemory;
+ }
+
+ // round to nearest factor of 4, otherwise VMware virtualization configuration files are invalid
+ return ConfigurationLogicDozModServerToDozModClient.roundToNearest( memory, 4 );
+ }
+
+ @Override
+ public void transform( VirtualizationConfiguration config,
+ ConfigurationDataDozModServerToDozModClient args )
+ throws TransformationException
+ {
+ // check if input parameters for a transformation are valid
+ this.validateInputs( config, args );
+
+ // set display name
+ if ( !config.addDisplayName( args.getDisplayName() ) ) {
+ throw new TransformationException( "Can not set display name in virtualization configuration!" );
+ }
+
+ // append hard disk drive
+ if ( !config.addHddTemplate( args.getDiskImage(), null, null ) ) {
+ throw new TransformationException( "Can not configure hard disk in virtualization configuration!" );
+ }
+
+ // append default NAT interface
+ if ( !config.addDefaultNat() ) {
+ throw new TransformationException( "Can not configure NAT interface in virtualization configuration!" );
+ }
+
+ // set the guest OS if specified
+ final OperatingSystem guestOs = args.getGuestOs();
+ final String virtualizerId = args.getVirtualizerId();
+ int osMaxMemory = 0;
+
+ if ( guestOs != null && virtualizerId != null ) {
+ final Map<String, String> virtOsIdMap = guestOs.getVirtualizerOsId();
+ if ( virtOsIdMap != null ) {
+ // set guest operating system if possible
+ final String virtOsId = virtOsIdMap.get( virtualizerId );
+ if ( virtOsId != null ) {
+ config.setOs( virtOsId );
+ }
+
+ // get maximum memory of editable host for guestOs if possible
+ final int maxMemMb = guestOs.getMaxMemMb();
+ if ( maxMemMb > 0 ) {
+ osMaxMemory = maxMemMb;
+ }
+ }
+ }
+
+ // set CPU core count
+ if ( !config.addCpuCoreCount( ConfigurationLogicDozModServerToDozModClient.CONFIGURATION_LOGIC_NUM_CPU_CORES ) ) {
+ throw new TransformationException( "Can not set CPU core count in virtualization configuration!" );
+ }
+
+ // calculate and set memory
+ final int virtualizationMemory = ConfigurationLogicDozModServerToDozModClient
+ .calculateVirtualizationMemoryOnDozmodClient( args.getTotalMemory(), osMaxMemory );
+ if ( !config.addRam( virtualizationMemory ) ) {
+ throw new TransformationException( "Can not set memory in virtualization configuration!" );
+ }
+
+ // append first empty floppy drive
+ config.addFloppy( 0, null, true );
+ // append second empty floppy drive
+ config.addFloppy( 1, null, true );
+
+ // append first empty (ISO-based) CDROM drive
+ config.addCdrom( "" );
+ // append second CDROM drive connected to the host's physical drive
+ config.addCdrom( null );
+
+ // apply settings to edit virtualized system locally
+ try {
+ config.transformEditable();
+ } catch ( VirtualizationConfigurationException e ) {
+ throw new TransformationException( e.getLocalizedMessage() );
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/logic/ConfigurationLogicDozModServerToStatelessClient.java b/src/main/java/org/openslx/virtualization/configuration/logic/ConfigurationLogicDozModServerToStatelessClient.java
new file mode 100644
index 0000000..2d3e861
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/logic/ConfigurationLogicDozModServerToStatelessClient.java
@@ -0,0 +1,108 @@
+package org.openslx.virtualization.configuration.logic;
+
+import org.openslx.virtualization.configuration.VirtualizationConfiguration;
+import org.openslx.virtualization.configuration.VirtualizationConfiguration.EtherType;
+import org.openslx.virtualization.configuration.VirtualizationConfigurationException;
+import org.openslx.virtualization.configuration.data.ConfigurationDataDozModServerToStatelessClient;
+import org.openslx.virtualization.configuration.transformation.TransformationException;
+
+/**
+ * Transformation logic for virtualization configurations between a dozmod-server and a stateless
+ * client.
+ * <p>
+ * This transformation logic is applied while downloading an existing virtualization configuration
+ * from a dozmod-server to a stateless client.
+ *
+ * <pre>
+ * +------------------------------+ DozModServerToStatelessClient +------------------------------+
+ * | virtualization configuration | -------------------------------â–¶ | virtualization configuration |
+ * +---------------+--------------+ transformation logic +------------------+-----------+
+ * | dozmod-server | | stateless client |
+ * +---------------+ +------------------+
+ * </pre>
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class ConfigurationLogicDozModServerToStatelessClient
+ extends ConfigurationLogic<ConfigurationDataDozModServerToStatelessClient>
+{
+ /**
+ * Name of the transformation logic for virtualization configurations.
+ */
+ private static final String CONFIGURATION_LOGIC_NAME = "Transformation of virtualization configuration during download from DozMod server to stateless client";
+
+ /**
+ * Default type for an ethernet interface in a virtualization configuration.
+ */
+ private static final EtherType CONFIGURATION_DEFAULT_ETHERNET_TYPE = EtherType.NAT;
+
+ /**
+ * Creates a new transformation logic for virtualization configurations between a dozmod-server
+ * and a stateless client.
+ */
+ public ConfigurationLogicDozModServerToStatelessClient()
+ {
+ super( ConfigurationLogicDozModServerToStatelessClient.CONFIGURATION_LOGIC_NAME );
+ }
+
+ /**
+ * Validates a virtualization configuration and input arguments for a transformation.
+ *
+ * @param config virtualization configuration for the validation.
+ * @param args input arguments for the validation.
+ * @throws TransformationException validation has failed.
+ */
+ private void validateInputs( VirtualizationConfiguration config,
+ ConfigurationDataDozModServerToStatelessClient args )
+ throws TransformationException
+ {
+ if ( config == null || args == null ) {
+ throw new TransformationException( "Virtualization configuration or input arguments are missing!" );
+ } else if ( args.getDisplayName() == null || args.getDisplayName().isEmpty() ) {
+ throw new TransformationException( "Valid display name is not specified!" );
+ }
+ }
+
+ @Override
+ public void transform( VirtualizationConfiguration config,
+ ConfigurationDataDozModServerToStatelessClient args )
+ throws TransformationException
+ {
+ // check if input parameters for a transformation are valid
+ this.validateInputs( config, args );
+
+ // apply settings to run virtualized system in a stateless manner
+ try {
+ config.transformNonPersistent();
+ } catch ( VirtualizationConfigurationException e ) {
+ throw new TransformationException( e.getLocalizedMessage() );
+ }
+
+ // set display name of lecture
+ if ( !config.addDisplayName( args.getDisplayName() ) ) {
+ throw new TransformationException( "Can not set display name in virtualization configuration!" );
+ }
+
+ // append hard disk drive (with no referenced image as content)
+ if ( !config.addEmptyHddTemplate() ) {
+ throw new TransformationException( "Can not configure hard disk in virtualization configuration!" );
+ }
+
+ // append default NAT interface
+ if ( !config.addEthernet(
+ ConfigurationLogicDozModServerToStatelessClient.CONFIGURATION_DEFAULT_ETHERNET_TYPE ) ) {
+ throw new TransformationException( "Can not configure NAT interface in virtualization configuration!" );
+ }
+
+ // set the guest OS if specified
+ if ( args.getOsId() != null ) {
+ config.setOs( args.getOsId() );
+ }
+
+ // disable USB if necessary
+ if ( !args.hasUsbAccess() ) {
+ config.disableUsb();
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/transformation/Transformation.java b/src/main/java/org/openslx/virtualization/configuration/transformation/Transformation.java
new file mode 100644
index 0000000..af0e181
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/transformation/Transformation.java
@@ -0,0 +1,65 @@
+package org.openslx.virtualization.configuration.transformation;
+
+/**
+ * Represents a transformation that transforms (alters) a given configuration with specified input
+ * arguments.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ *
+ * @param <T> type of the configuration which will be transformed.
+ * @param <R> type of input arguments for the transformation.
+ */
+public abstract class Transformation<T, R> implements TransformationFunction<T, R>
+{
+ /**
+ * Name of the transformation.
+ */
+ private final String name;
+
+ /**
+ * State of the transformation.
+ */
+ private boolean enabled;
+
+ /**
+ * Creates a transformation.
+ *
+ * @param name comprehensible name for the transformation.
+ */
+ public Transformation( String name )
+ {
+ this.name = name;
+ this.setEnabled( true );
+ }
+
+ /**
+ * Returns the name of the transformation.
+ *
+ * @return name of the transformation.
+ */
+ public String getName()
+ {
+ return this.name;
+ }
+
+ /**
+ * Returns the state of the transformation.
+ *
+ * @return state of the transformation.
+ */
+ public boolean isEnabled()
+ {
+ return this.enabled;
+ }
+
+ /**
+ * Sets the state for the transformation.
+ *
+ * @param enabled state for the transformation.
+ */
+ public void setEnabled( boolean enabled )
+ {
+ this.enabled = enabled;
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationException.java b/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationException.java
new file mode 100644
index 0000000..72f320d
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationException.java
@@ -0,0 +1,25 @@
+package org.openslx.virtualization.configuration.transformation;
+
+/**
+ * An exception of a transformation error.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class TransformationException extends Exception
+{
+ /**
+ * Version for serialization.
+ */
+ private static final long serialVersionUID = 7293420658901349154L;
+
+ /**
+ * Creates a transformation exception including an error message.
+ *
+ * @param errorMsg message to describe the exception.
+ */
+ public TransformationException( String errorMsg )
+ {
+ super( errorMsg );
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationFunction.java b/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationFunction.java
new file mode 100644
index 0000000..b5be7a0
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationFunction.java
@@ -0,0 +1,39 @@
+package org.openslx.virtualization.configuration.transformation;
+
+/**
+ * Represents a transformation operation that transforms (alters) a given configuration with
+ * specified input arguments and returns no result.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ *
+ * @param <T> type of the configuration which will be transformed.
+ * @param <R> type of input arguments for the transformation.
+ */
+@FunctionalInterface
+public interface TransformationFunction<T, R>
+{
+ /**
+ * Transforms a given configuration with the specified input arguments.
+ *
+ * @param config configuration which will be transformed.
+ * @param args input arguments for the transformation.
+ *
+ * @throws TransformationException transformation of the configuration failed.
+ */
+ public void transform( T config, R args ) throws TransformationException;
+
+ /**
+ * Applies the transformation function {@link #transform(Object, Object)} to the given
+ * configuration and specified input arguments.
+ *
+ * @param config configuration which will be transformed.
+ * @param args input arguments for the transformation.
+ *
+ * @throws TransformationException transformation of the configuration failed.
+ */
+ public default void apply( T config, R args ) throws TransformationException
+ {
+ this.transform( config, args );
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationGeneric.java b/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationGeneric.java
new file mode 100644
index 0000000..4ad36c7
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationGeneric.java
@@ -0,0 +1,25 @@
+package org.openslx.virtualization.configuration.transformation;
+
+/**
+ * Represents a generic transformation that transforms (alters) a given configuration with specified
+ * input arguments. The generic transformation does not depend on any external states of a
+ * virtualizer.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ *
+ * @param <T> type of the configuration which will be transformed.
+ * @param <R> type of input arguments for the transformation.
+ */
+public abstract class TransformationGeneric<T, R> extends Transformation<T, R>
+{
+ /**
+ * Create a generic transformation.
+ *
+ * @param name comprehensible name for the transformation.
+ */
+ public TransformationGeneric( String name )
+ {
+ super( name );
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationManager.java b/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationManager.java
new file mode 100644
index 0000000..18d7e43
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationManager.java
@@ -0,0 +1,158 @@
+package org.openslx.virtualization.configuration.transformation;
+
+import java.util.ArrayList;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+/**
+ * A transformation manager is a class to manage several transformations and their application.
+ *
+ * Transformations can be registered at the transformation manager. The transformation manager has
+ * the ability to apply all registered transformations on a given configuration and specified input
+ * arguments.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ *
+ * @param <T> type of the configuration which will be transformed by all transformations.
+ * @param <R> type of input arguments for all transformations.
+ */
+public class TransformationManager<T, R>
+{
+ /**
+ * List of registered transformations.
+ */
+ private ArrayList<Transformation<T, R>> transformations;
+
+ /**
+ * Reference to the configuration that will be transformed (altered).
+ */
+ private T config;
+
+ /**
+ * Reference to the input arguments for all registered transformations.
+ */
+ private R args;
+
+ /**
+ * Logger instance to log messages.
+ */
+ private static final Logger LOGGER = LogManager.getLogger( TransformationManager.class );
+
+ /**
+ * Create a transformation manager.
+ *
+ * @param config configuration which will be transformed.
+ * @param args input arguments for all registered transformations.
+ */
+ public TransformationManager( T config, R args )
+ {
+ this.transformations = new ArrayList<Transformation<T, R>>();
+ this.config = config;
+ this.args = args;
+ }
+
+ /**
+ * Registers and enables a transformation.
+ *
+ * @param transformation existing transformation that will be registered and enabled.
+ */
+ public void register( Transformation<T, R> transformation )
+ {
+ this.register( transformation, true );
+ }
+
+ /**
+ * Registers a transformation and sets its state.
+ *
+ * @param transformation existing transformation that will be registered.
+ * @param enabled state for the existing transformation that will be set.
+ */
+ public void register( Transformation<T, R> transformation, boolean enabled )
+ {
+ LOGGER.debug( "Register transformation '" + transformation.getName() + "' and "
+ + ( enabled ? "enable" : "do not enable" ) + " it" );
+
+ transformation.setEnabled( enabled );
+ this.transformations.add( transformation );
+ }
+
+ /**
+ * Registers a transformation function as a new transformation and enables the registered
+ * transformation.
+ *
+ * @param name comprehensible name for the transformation.
+ * @param function transformation operation for the transformation.
+ */
+ public void register( String name, TransformationFunction<T, R> function )
+ {
+ this.register( name, function, true );
+ }
+
+ /**
+ * Registers a transformation function as a new transformation and sets the state of the
+ * registered transformation.
+ *
+ * @param name comprehensible name for the transformation.
+ * @param function transformation operation for the transformation.
+ * @param enabled state for the transformation.
+ */
+ public void register( String name, TransformationFunction<T, R> function, boolean enabled )
+ {
+ this.register( new Transformation<T, R>( name ) {
+ @Override
+ public void transform( T document, R args ) throws TransformationException
+ {
+ function.apply( document, args );
+ }
+ }, enabled );
+ }
+
+ /**
+ * Applies all registered transformations, whose state is set to <code>enabled</code>, to the
+ * referenced configuration and input arguments.
+ *
+ * @throws TransformationException transformation of the configuration failed.
+ */
+ public void transform() throws TransformationException
+ {
+ for ( Transformation<T, R> transformation : this.transformations ) {
+ LOGGER.debug( "Apply transformation '" + transformation.getName() + "'" );
+ try {
+ transformation.apply( this.config, this.args );
+ } catch ( TransformationException e ) {
+ final String errorMsg =
+ "Error in configuration filter '" + transformation.getName() + "': " + e.getLocalizedMessage();
+ throw new TransformationException( errorMsg );
+ }
+ }
+ }
+
+ /**
+ * Returns a human readable summary of all registered transformations.
+ *
+ * @return human readable summary of all registered transformations.
+ */
+ private String showTransformations()
+ {
+ String transformationSummary = "";
+ final int maxFilterNumCharacters = ( this.transformations.size() + 1 ) / 10;
+
+ for ( int i = 0; i < this.transformations.size(); i++ ) {
+ final Transformation<T, R> transformation = this.transformations.get( i );
+ final String paddedNumber = String.format( "%-" + maxFilterNumCharacters + "s", i + 1 );
+ final String transformationState = transformation.isEnabled() ? "[ active ]" : "[inactive]";
+ transformationSummary += paddedNumber + ": " + transformationState + " ";
+ transformationSummary += transformation.getName() + System.lineSeparator();
+ }
+
+ return transformationSummary;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.showTransformations();
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationSpecific.java b/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationSpecific.java
new file mode 100644
index 0000000..7038abf
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/configuration/transformation/TransformationSpecific.java
@@ -0,0 +1,44 @@
+package org.openslx.virtualization.configuration.transformation;
+
+/**
+ * Represents a specific transformation that transforms (alters) a given configuration with
+ * specified input arguments. The specific transformation depends on external states of a
+ * specified virtualizer.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ *
+ * @param <T> type of the configuration which will be transformed.
+ * @param <R> type of input arguments for the transformation.
+ * @param <H> type of the external input source.
+ */
+public abstract class TransformationSpecific<T, R, H> extends Transformation<T, R>
+{
+ /**
+ * Reference to virtualizer to query external states.
+ */
+ private final H virtualizer;
+
+ /**
+ * Create a specific transformation.
+ *
+ * @param name comprehensible name for the transformation.
+ * @param virtualizer initialized virtualizer.
+ */
+ public TransformationSpecific( String name, H virtualizer )
+ {
+ super( name );
+
+ this.virtualizer = virtualizer;
+ }
+
+ /**
+ * Returns the referenced virtualizer of the transformation.
+ *
+ * @return referenced virtualizer of the transformation.
+ */
+ public H getVirtualizer()
+ {
+ return this.virtualizer;
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/disk/DiskImage.java b/src/main/java/org/openslx/virtualization/disk/DiskImage.java
new file mode 100644
index 0000000..dfb242a
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/disk/DiskImage.java
@@ -0,0 +1,253 @@
+package org.openslx.virtualization.disk;
+
+import java.io.Closeable;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.RandomAccessFile;
+import java.util.List;
+import java.util.function.Predicate;
+
+import org.openslx.bwlp.thrift.iface.Virtualizer;
+import org.openslx.thrifthelper.TConst;
+import org.openslx.util.Util;
+import org.openslx.virtualization.Version;
+
+/**
+ * Disk image for virtual machines.
+ *
+ * @implNote This class is the abstract base class to implement various specific disk images (like
+ * QCOW2 or VMDK).
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public abstract class DiskImage implements Closeable
+{
+ /**
+ * Stores the image file of the disk.
+ */
+ private RandomAccessFile diskImage = null;
+
+ /**
+ * Creates a new disk image from an existing image file with a known disk image format.
+ *
+ * @param diskImage file to a disk storing the image content.
+ *
+ * @implNote Do not use this constructor to create a new disk image from an image file with
+ * unknown disk image format. Instead, use the factory method
+ * {@link #newInstance(File)} to probe unknown disk image files before creation.
+ */
+ protected DiskImage( RandomAccessFile diskImage )
+ {
+ this.diskImage = diskImage;
+ }
+
+ /**
+ * Returns the disk image file.
+ *
+ * @return the disk image file.
+ */
+ protected RandomAccessFile getDiskImage()
+ {
+ return this.diskImage;
+ }
+
+ /**
+ * Checks whether disk image is standalone and do not depend on other files (e.g. snapshot
+ * files).
+ *
+ * @return state whether disk image is standalone or not.
+ *
+ * @throws DiskImageException unable to check if disk image is standalone.
+ */
+ public abstract boolean isStandalone() throws DiskImageException;
+
+ /**
+ * Checks whether disk image is compressed.
+ *
+ * @return state whether disk image is compressed or not.
+ *
+ * @throws DiskImageException unable to check whether disk image is compressed.
+ */
+ public abstract boolean isCompressed() throws DiskImageException;
+
+ /**
+ * Checks whether disk image is a snapshot.
+ *
+ * @return state whether disk image is a snapshot or not.
+ *
+ * @throws DiskImageException unable to check whether disk image is a snapshot.
+ */
+ public abstract boolean isSnapshot() throws DiskImageException;
+
+ /**
+ * Returns the version of the disk image format.
+ *
+ * @return version of the disk image format.
+ *
+ * @throws DiskImageException unable to obtain version of the disk image format.
+ */
+ public abstract Version getVersion() throws DiskImageException;
+
+ /**
+ * Returns the disk image description.
+ *
+ * @return description of the disk image.
+ *
+ * @throws DiskImageException unable to obtain description of the disk image.
+ */
+ public abstract String getDescription() throws DiskImageException;
+
+ /**
+ * Returns the format of the disk image.
+ *
+ * @return format of the disk image.
+ */
+ public abstract ImageFormat getFormat();
+
+ /**
+ * Creates a new disk image from an existing image file with an unknown disk image format.
+ *
+ * @param diskImagePath file to a disk storing the image content.
+ * @return concrete disk image instance.
+ *
+ * @throws FileNotFoundException cannot find specified disk image file.
+ * @throws IOException cannot access the content of the disk image file.
+ * @throws DiskImageException disk image file has an invalid and unknown disk image format.
+ */
+ public static DiskImage newInstance( File diskImagePath )
+ throws FileNotFoundException, IOException, DiskImageException
+ {
+ // Make sure this doesn't escape the scope, in case instantiation fails - we can't know when the GC
+ // would come along and close this file, which is problematic on Windows (blocking rename/delete)
+ final RandomAccessFile fileHandle = new RandomAccessFile( diskImagePath, "r" );
+
+ try {
+ if ( DiskImageQcow2.probe( fileHandle ) ) {
+ return new DiskImageQcow2( fileHandle );
+ } else if ( DiskImageVdi.probe( fileHandle ) ) {
+ return new DiskImageVdi( fileHandle );
+ } else if ( DiskImageVmdk.probe( fileHandle ) ) {
+ return new DiskImageVmdk( fileHandle );
+ }
+ } catch ( Exception e ) {
+ Util.safeClose( fileHandle );
+ throw e;
+ }
+ Util.safeClose( fileHandle );
+ final String errorMsg = "File '" + diskImagePath.getAbsolutePath() + "' is not a valid disk image!";
+ throw new DiskImageException( errorMsg );
+ }
+
+ @Override
+ public void close() throws IOException
+ {
+ Util.safeClose( diskImage );
+ }
+
+ @Override
+ protected void finalize() throws Throwable
+ {
+ close();
+ }
+
+ /**
+ * Format of a disk image.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+ public enum ImageFormat
+ {
+ // @formatter:off
+ NONE ( "none" ),
+ QCOW2( "qcow2" ),
+ VDI ( "vdi" ),
+ VMDK ( "vmdk" );
+ // @formatter:on
+
+ /**
+ * Stores filename extension of the disk image format.
+ */
+ public final String extension;
+
+ /**
+ * Create new disk image format.
+ *
+ * @param extension filename extension of the disk image format.
+ */
+ ImageFormat( String extension )
+ {
+ this.extension = extension;
+ }
+
+ /**
+ * Returns filename extension of the disk image.
+ *
+ * @return filename extension of the disk image.
+ */
+ public String getExtension()
+ {
+ return this.extension;
+ }
+
+ /**
+ * Checks if the disk image format is supported by a virtualizer.
+ *
+ * @param supportedImageFormats list of supported disk image formats of a virtualizer.
+ * @return <code>true</code> if image type is supported by the virtualizer; otherwise
+ * <code>false</code>.
+ */
+ public boolean isSupportedbyVirtualizer( List<ImageFormat> supportedImageFormats )
+ {
+ Predicate<ImageFormat> matchDiskFormat = supportedImageFormat -> supportedImageFormat.toString()
+ .equalsIgnoreCase( this.toString() );
+ return supportedImageFormats.stream().anyMatch( matchDiskFormat );
+ }
+
+ /**
+ * Returns default (preferred) disk image format for the specified virtualizer.
+ *
+ * @param virt virtualizer for that the default disk image should be determined.
+ * @return default (preferred) disk image format.
+ */
+ public static ImageFormat defaultForVirtualizer( Virtualizer virt )
+ {
+ if ( virt == null ) {
+ return null;
+ } else {
+ return ImageFormat.defaultForVirtualizer( virt.virtId );
+ }
+ }
+
+ /**
+ * Returns default (preferred) disk image format for the specified virtualizer.
+ *
+ * @param virtId ID of a virtualizer for that the default disk image should be determined.
+ * @return default (preferred) disk image format.
+ */
+ public static ImageFormat defaultForVirtualizer( String virtId )
+ {
+ ImageFormat imgFormat = null;
+
+ if ( TConst.VIRT_DOCKER.equals( virtId ) ) {
+ imgFormat = NONE;
+ } else if ( TConst.VIRT_QEMU.equals( virtId ) ) {
+ imgFormat = QCOW2;
+ } else if ( TConst.VIRT_VIRTUALBOX.equals( virtId ) ) {
+ imgFormat = VDI;
+ } else if ( TConst.VIRT_VMWARE.equals( virtId ) ) {
+ imgFormat = VMDK;
+ }
+
+ return imgFormat;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.getExtension();
+ }
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/disk/DiskImageException.java b/src/main/java/org/openslx/virtualization/disk/DiskImageException.java
new file mode 100644
index 0000000..db62917
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/disk/DiskImageException.java
@@ -0,0 +1,25 @@
+package org.openslx.virtualization.disk;
+
+/**
+ * An exception for faulty disk image handling.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class DiskImageException extends Exception
+{
+ /**
+ * Version number for serialization.
+ */
+ private static final long serialVersionUID = 5464286488698331909L;
+
+ /**
+ * Creates a disk image exception including an error message.
+ *
+ * @param errorMsg message to describe a disk image error.
+ */
+ public DiskImageException( String errorMsg )
+ {
+ super( errorMsg );
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/disk/DiskImageQcow2.java b/src/main/java/org/openslx/virtualization/disk/DiskImageQcow2.java
new file mode 100644
index 0000000..a6b3b73
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/disk/DiskImageQcow2.java
@@ -0,0 +1,232 @@
+package org.openslx.virtualization.disk;
+
+import java.io.RandomAccessFile;
+
+import org.openslx.virtualization.Version;
+
+/**
+ * QCOW2 disk image for virtual machines.
+ *
+ * A QCOW2 disk image consists of a header, one L1 table and several L2 tables used for lookup data
+ * clusters in the file via a two-level lookup. The QCOW2 header contains the following fields:
+ *
+ * <pre>
+ * QCOW2 (version 2 and 3) header format:
+ *
+ * magic (4 byte)
+ * version (4 byte)
+ * backing_file_offset (8 byte)
+ * backing_file_size (4 byte)
+ * cluster_bits (4 byte)
+ * size (8 byte)
+ * crypt_method (4 byte)
+ * l1_size (4 byte)
+ * l1_table_offset (8 byte)
+ * refcount_table_offset (8 byte)
+ * refcount_table_clusters (4 byte)
+ * nb_snapshots (4 byte)
+ * snapshots_offset (8 byte)
+ * incompatible_features (8 byte) [*]
+ * compatible_features (8 byte) [*]
+ * autoclear_features (8 byte) [*]
+ * refcount_order (8 byte) [*]
+ * header_length (4 byte) [*]
+ *
+ * [*] these fields are only available in the QCOW2 version 3 header format
+ * </pre>
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class DiskImageQcow2 extends DiskImage
+{
+ /**
+ * Big endian representation of the big endian QCOW2 magic bytes <code>QFI\xFB</code>.
+ */
+ private static final int QCOW2_MAGIC = 0x514649fb;
+
+ /**
+ * Creates a new QCOW2 disk image from an existing QCOW2 image file.
+ *
+ * @param diskImage file to a QCOW2 disk storing the image content.
+ */
+ DiskImageQcow2( RandomAccessFile diskImage )
+ {
+ super( diskImage );
+ }
+
+ /**
+ * Probe specified file with unknown format to be a QCOW2 disk image file.
+ *
+ * @param diskImage file with unknown format that should be probed.
+ * @return state whether file is a QCOW2 disk image or not.
+ *
+ * @throws DiskImageException cannot probe specified file with unknown format.
+ */
+ public static boolean probe( RandomAccessFile diskImage ) throws DiskImageException
+ {
+ final boolean isQcow2ImageFormat;
+
+ // goto the beginning of the disk image to read the disk image
+ final int diskImageMagic = DiskImageUtils.readInt( diskImage, 0 );
+
+ // check if disk image's magic bytes can be found
+ if ( diskImageMagic == DiskImageQcow2.QCOW2_MAGIC ) {
+ isQcow2ImageFormat = true;
+ } else {
+ isQcow2ImageFormat = false;
+ }
+
+ return isQcow2ImageFormat;
+ }
+
+ @Override
+ public boolean isStandalone() throws DiskImageException
+ {
+ final RandomAccessFile diskFile = this.getDiskImage();
+ final long qcowBackingFileOffset = DiskImageUtils.readLong( diskFile, 8 );
+ final boolean qcowStandalone;
+
+ // check if QCOW2 image does not refer to any backing file
+ if ( qcowBackingFileOffset == 0 ) {
+ qcowStandalone = true;
+ } else {
+ qcowStandalone = false;
+ }
+
+ return qcowStandalone;
+ }
+
+ @Override
+ public boolean isCompressed() throws DiskImageException
+ {
+ final RandomAccessFile diskFile = this.getDiskImage();
+ final boolean qcowUseExtendedL2;
+ boolean qcowCompressed = false;
+
+ // check if QCOW2 image uses extended L2 tables
+ // extended L2 tables are only possible in QCOW2 version 3 header format
+ if ( this.getVersion().getMajor() >= Short.valueOf( "3" ) ) {
+ // read incompatible feature bits
+ final long qcowIncompatibleFeatures = DiskImageUtils.readLong( diskFile, 72 );
+
+ // support for extended L2 tables is enabled if bit 4 is set
+ qcowUseExtendedL2 = ( ( ( qcowIncompatibleFeatures & 0x000000000010 ) >>> 4 ) == 1 );
+ } else {
+ qcowUseExtendedL2 = false;
+ }
+
+ // get number of entries in L1 table
+ final int qcowL1TableSize = DiskImageUtils.readInt( diskFile, 36 );
+
+ // check if a valid L1 table is present
+ if ( qcowL1TableSize > 0 ) {
+ // QCOW2 image contains active L1 table with more than 0 entries: l1_size > 0
+ // search for first L2 table and its first entry to get compression bit
+
+ // get cluster bits to calculate the cluster size
+ final int qcowClusterBits = DiskImageUtils.readInt( diskFile, 20 );
+ final int qcowClusterSize = ( 1 << qcowClusterBits );
+
+ // entries of a L1 table have always the size of 8 byte (64 bit)
+ final int qcowL1TableEntrySize = 8;
+
+ // entries of a L2 table have either the size of 8 or 16 byte (64 or 128 bit)
+ final int qcowL2TableEntrySize = ( qcowUseExtendedL2 ) ? 16 : 8;
+
+ // calculate number of L2 table entries
+ final int qcowL2TableSize = qcowClusterSize / qcowL2TableEntrySize;
+
+ // get offset of L1 table
+ final long qcowL1TableOffset = DiskImageUtils.readLong( diskFile, 40 );
+
+ // check for each L2 table referenced from an L1 table its entries
+ // until a compressed cluster descriptor is found
+ for ( long i = 0; i < qcowL1TableSize; i++ ) {
+ // get offset of current L2 table from the current L1 table entry
+ final long qcowL1TableEntryOffset = qcowL1TableOffset + ( i * qcowL1TableEntrySize );
+ final long qcowL1TableEntry = DiskImageUtils.readLong( diskFile, qcowL1TableEntryOffset );
+
+ // extract offset (bits 9 - 55) from L1 table entry
+ final long qcowL2TableOffset = ( qcowL1TableEntry & 0x00fffffffffffe00L );
+
+ if ( qcowL2TableOffset == 0 ) {
+ // L2 table and all clusters described by this L2 table are unallocated
+ continue;
+ }
+
+ // get each L2 table entry and check if it is a compressed cluster descriptor
+ for ( long j = 0; j < qcowL2TableSize; j++ ) {
+ // get current L2 table entry
+ final long qcowL2TableEntryOffset = qcowL2TableOffset + ( j * qcowL2TableEntrySize );
+ final long qcowL2TableEntry = DiskImageUtils.readLong( diskFile, qcowL2TableEntryOffset );
+
+ // extract cluster type (standard or compressed) (bit 62)
+ boolean qcowClusterCompressed = ( ( ( qcowL2TableEntry & 0x4000000000000000L ) >>> 62 ) == 1 );
+
+ // check if QCOW2 disk image contains at least one compressed cluster descriptor
+ if ( qcowClusterCompressed ) {
+ qcowCompressed = true;
+ break;
+ }
+ }
+
+ // terminate if one compressed cluster descriptor is already found
+ if ( qcowCompressed ) {
+ break;
+ }
+ }
+ } else {
+ // QCOW2 image does not contain an active L1 table with any entry: l1_size = 0
+ qcowCompressed = false;
+ }
+
+ return qcowCompressed;
+ }
+
+ @Override
+ public boolean isSnapshot() throws DiskImageException
+ {
+ final RandomAccessFile diskFile = this.getDiskImage();
+ final int qcowNumSnapshots = DiskImageUtils.readInt( diskFile, 56 );
+ final boolean qcowSnapshot;
+
+ // check if QCOW2 image contains at least one snapshot
+ if ( qcowNumSnapshots == 0 ) {
+ qcowSnapshot = true;
+ } else {
+ qcowSnapshot = false;
+ }
+
+ return qcowSnapshot;
+ }
+
+ @Override
+ public Version getVersion() throws DiskImageException
+ {
+ final RandomAccessFile diskFile = this.getDiskImage();
+ final int qcowVersion = DiskImageUtils.readInt( diskFile, 4 );
+
+ // check QCOW2 file format version
+ if ( qcowVersion < 2 || qcowVersion > 3 ) {
+ // QCOW2 disk image does not contain a valid QCOW2 version
+ final String errorMsg = "Invalid QCOW2 version in header found!";
+ throw new DiskImageException( errorMsg );
+ }
+
+ return new Version( Integer.valueOf( qcowVersion ).shortValue() );
+ }
+
+ @Override
+ public String getDescription() throws DiskImageException
+ {
+ // QCOW2 disk image format does not support any disk description
+ return null;
+ }
+
+ @Override
+ public ImageFormat getFormat()
+ {
+ return ImageFormat.QCOW2;
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/disk/DiskImageUtils.java b/src/main/java/org/openslx/virtualization/disk/DiskImageUtils.java
new file mode 100644
index 0000000..6bcef7f
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/disk/DiskImageUtils.java
@@ -0,0 +1,144 @@
+package org.openslx.virtualization.disk;
+
+import java.io.IOException;
+import java.io.RandomAccessFile;
+
+/**
+ * Utilities to parse disk image format elements and control versions of disk images.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class DiskImageUtils
+{
+ /**
+ * Returns the size of a specified disk image file.
+ *
+ * @param diskImage file to a disk storing the image content.
+ * @return size of the disk image file in bytes.
+ *
+ * @throws DiskImageException unable to obtain the size of the disk image file.
+ */
+ public static long getImageSize( RandomAccessFile diskImage ) throws DiskImageException
+ {
+ final long imageSize;
+
+ try {
+ imageSize = diskImage.length();
+ } catch ( IOException e ) {
+ throw new DiskImageException( e.getLocalizedMessage() );
+ }
+
+ return imageSize;
+ }
+
+ /**
+ * Reads two bytes ({@link Short}) at a given <code>offset</code> from the specified disk image
+ * file.
+ *
+ * @param diskImage file to a disk storing the image content.
+ * @param offset offset in bytes for reading the two bytes.
+ * @return value of the two bytes from the disk image file as {@link Short}.
+ *
+ * @throws DiskImageException unable to read two bytes from the disk image file.
+ */
+ public static short readShort( RandomAccessFile diskImage, long offset ) throws DiskImageException
+ {
+ final long imageSize = DiskImageUtils.getImageSize( diskImage );
+ short value = 0;
+
+ if ( imageSize >= ( offset + Short.BYTES ) ) {
+ try {
+ diskImage.seek( offset );
+ value = diskImage.readShort();
+ } catch ( IOException e ) {
+ throw new DiskImageException( e.getLocalizedMessage() );
+ }
+ }
+
+ return value;
+ }
+
+ /**
+ * Reads four bytes ({@link Integer}) at a given <code>offset</code> from the specified disk
+ * image file.
+ *
+ * @param diskImage file to a disk storing the image content.
+ * @param offset offset in bytes for reading the four bytes.
+ * @return value of the four bytes from the disk image file as {@link Integer}.
+ *
+ * @throws DiskImageException unable to read four bytes from the disk image file.
+ */
+ public static int readInt( RandomAccessFile diskImage, long offset ) throws DiskImageException
+ {
+ final long imageSize = DiskImageUtils.getImageSize( diskImage );
+ int value = 0;
+
+ if ( imageSize >= ( offset + Integer.BYTES ) ) {
+ try {
+ diskImage.seek( offset );
+ value = diskImage.readInt();
+ } catch ( IOException e ) {
+ throw new DiskImageException( e.getLocalizedMessage() );
+ }
+ }
+
+ return value;
+ }
+
+ /**
+ * Reads eight bytes ({@link Long}) at a given <code>offset</code> from the specified disk image
+ * file.
+ *
+ * @param diskImage file to a disk storing the image content.
+ * @param offset offset in bytes for reading the eight bytes.
+ * @return value of the eight bytes from the disk image file as {@link Long}.
+ *
+ * @throws DiskImageException unable to read eight bytes from the disk image file.
+ */
+ public static long readLong( RandomAccessFile diskImage, long offset ) throws DiskImageException
+ {
+ final long imageSize = DiskImageUtils.getImageSize( diskImage );
+ long value = 0;
+
+ if ( imageSize >= ( offset + Long.BYTES ) ) {
+ try {
+ diskImage.seek( offset );
+ value = diskImage.readLong();
+ } catch ( IOException e ) {
+ throw new DiskImageException( e.getLocalizedMessage() );
+ }
+ }
+
+ return value;
+ }
+
+ /**
+ * Reads a variable number of bytes (<code>numBytes</code>) at a given <code>offset</code> from the specified disk image file.
+ *
+ * @param diskImage file to a disk storing the image content.
+ * @param offset offset in bytes for reading <code>numBytes</code> bytes.
+ * @param numBytes number of bytes to read at <code>offset</code>.
+ * @return read bytes from the disk image file as {@link byte[]}.
+ *
+ * @throws DiskImageException unable to read bytes from the disk image file.
+ */
+ public static byte[] readBytesAsArray( RandomAccessFile diskImage, long offset, int numBytes )
+ throws DiskImageException
+ {
+ final long imageSize = DiskImageUtils.getImageSize( diskImage );
+ byte values[] = {};
+
+ if ( imageSize >= ( offset + numBytes ) ) {
+ try {
+ diskImage.seek( offset );
+ values = new byte[ numBytes ];
+ diskImage.readFully( values );
+ } catch ( IOException e ) {
+ throw new DiskImageException( e.getLocalizedMessage() );
+ }
+ }
+
+ return values;
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/disk/DiskImageVdi.java b/src/main/java/org/openslx/virtualization/disk/DiskImageVdi.java
new file mode 100644
index 0000000..1e5b20b
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/disk/DiskImageVdi.java
@@ -0,0 +1,112 @@
+package org.openslx.virtualization.disk;
+
+import java.io.RandomAccessFile;
+import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+
+import org.openslx.virtualization.Version;
+
+/**
+ * VDI disk image for virtual machines.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class DiskImageVdi extends DiskImage
+{
+ /**
+ * Big endian representation of the little endian VDI magic bytes (signature).
+ */
+ private static final int VDI_MAGIC = 0x7f10dabe;
+ /**
+ * Just 16 null-bytes
+ */
+ private static final byte[] ZERO_UUID = new byte[16];
+
+ /**
+ * Creates a new VDI disk image from an existing VDI image file.
+ *
+ * @param diskImage file to a VDI disk storing the image content.
+ */
+ DiskImageVdi( RandomAccessFile diskImage )
+ {
+ super( diskImage );
+ }
+
+ /**
+ * Probe specified file with unknown format to be a VDI disk image file.
+ *
+ * @param diskImage file with unknown format that should be probed.
+ * @return state whether file is a VDI disk image or not.
+ *
+ * @throws DiskImageException cannot probe specified file with unknown format.
+ */
+ public static boolean probe( RandomAccessFile diskImage ) throws DiskImageException
+ {
+ final boolean isVdiImageFormat;
+
+ // goto the beginning of the disk image to read the magic bytes
+ // skip first 64 bytes (opening tag)
+ final int diskImageMagic = DiskImageUtils.readInt( diskImage, 64 );
+
+ // check if disk image's magic bytes can be found
+ if ( diskImageMagic == DiskImageVdi.VDI_MAGIC ) {
+ isVdiImageFormat = true;
+ } else {
+ isVdiImageFormat = false;
+ }
+
+ return isVdiImageFormat;
+ }
+
+ @Override
+ public boolean isStandalone() throws DiskImageException
+ {
+ // VDI does not seem to support split VDI files, so VDI files are always standalone
+ return true;
+ }
+
+ @Override
+ public boolean isCompressed() throws DiskImageException
+ {
+ // compression is done by sparsifying the disk files, there is no flag for it
+ return false;
+ }
+
+ @Override
+ public boolean isSnapshot() throws DiskImageException
+ {
+ final RandomAccessFile diskFile = this.getDiskImage();
+
+ // if parent UUID is set, the VDI file is a snapshot
+ byte[] parentUuid = DiskImageUtils.readBytesAsArray( diskFile, 440, 16 );
+
+ return !Arrays.equals( ZERO_UUID, parentUuid );
+ }
+
+ @Override
+ public Version getVersion() throws DiskImageException
+ {
+ final RandomAccessFile diskFile = this.getDiskImage();
+
+ final short vdiVersionMajor = Short.reverseBytes( DiskImageUtils.readShort( diskFile, 68 ) );
+ final short vdiVersionMinor = Short.reverseBytes( DiskImageUtils.readShort( diskFile, 70 ) );
+
+ return new Version( vdiVersionMajor, vdiVersionMinor );
+ }
+
+ @Override
+ public String getDescription() throws DiskImageException
+ {
+ final RandomAccessFile diskFile = this.getDiskImage();
+ byte[] data = DiskImageUtils.readBytesAsArray( diskFile, 84, 256 );
+ // This will replace invalid chars. Maybe use CharsetDecoder and fall back to latin1 on error
+ return new String( data, StandardCharsets.UTF_8 );
+ }
+
+ @Override
+ public ImageFormat getFormat()
+ {
+ return ImageFormat.VDI;
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/disk/DiskImageVmdk.java b/src/main/java/org/openslx/virtualization/disk/DiskImageVmdk.java
new file mode 100644
index 0000000..77986ef
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/disk/DiskImageVmdk.java
@@ -0,0 +1,282 @@
+package org.openslx.virtualization.disk;
+
+import java.io.RandomAccessFile;
+import java.nio.charset.StandardCharsets;
+
+import org.openslx.util.Util;
+import org.openslx.virtualization.configuration.VirtualizationConfigurationVmwareFileFormat;
+import org.openslx.virtualization.Version;
+import org.openslx.virtualization.configuration.VirtualizationConfigurationException;
+
+/**
+ * VMDK (sparse extent) disk image for virtual machines.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class DiskImageVmdk extends DiskImage
+{
+ /**
+ * Big endian representation of the little endian magic bytes <code>KDMV</code>.
+ */
+ private static final int VMDK_MAGIC = 0x4b444d56;
+
+ /**
+ * Size of a VMDK disk image data cluster in bytes.
+ */
+ private static final int VMDK_SECTOR_SIZE = 512;
+
+ /**
+ * Default hardware version of a VMDK disk image.
+ */
+ private static final int VMDK_DEFAULT_HW_VERSION = 10;
+
+ /**
+ * Stores disk configuration if VMDK disk image contains an embedded descriptor file.
+ */
+ private final VirtualizationConfigurationVmwareFileFormat vmdkConfig;
+
+ /**
+ * Creates a new VMDK disk image from an existing VMDK image file.
+ *
+ * @param diskImage file to a VMDK disk storing the image content.
+ *
+ * @throws DiskImageException parsing of the VMDK's embedded descriptor file failed.
+ */
+ DiskImageVmdk( RandomAccessFile diskImage ) throws DiskImageException
+ {
+ super( diskImage );
+
+ this.vmdkConfig = this.parseVmdkConfig();
+ }
+
+ /**
+ * Probe specified file with unknown format to be a VMDK disk image file.
+ *
+ * @param diskImage file with unknown format that should be probed.
+ * @return state whether file is a VMDK disk image or not.
+ *
+ * @throws DiskImageException cannot probe specified file with unknown format.
+ */
+ public static boolean probe( RandomAccessFile diskImage ) throws DiskImageException
+ {
+ final boolean isVmdkImageFormat;
+
+ // goto the beginning of the disk image to read the magic bytes
+ final int diskImageMagic = DiskImageUtils.readInt( diskImage, 0 );
+
+ // check if disk image's magic bytes can be found
+ if ( diskImageMagic == DiskImageVmdk.VMDK_MAGIC ) {
+ isVmdkImageFormat = true;
+ } else {
+ isVmdkImageFormat = false;
+ }
+
+ return isVmdkImageFormat;
+ }
+
+ /**
+ * Returns the creation type from the VMDK's embedded descriptor file.
+ *
+ * @return creation type from the VMDK's embedded descriptor file.
+ */
+ private String getCreationType()
+ {
+ final VirtualizationConfigurationVmwareFileFormat vmdkConfig = this.getVmdkConfig();
+ final String vmdkCreationType;
+
+ if ( vmdkConfig == null ) {
+ // VMDK disk image does not contain any descriptor file
+ // assume that the file is not stand alone
+ vmdkCreationType = null;
+ } else {
+ // VMDK disk image contains a descriptor file
+ // get creation type from the content of the descriptor file
+ vmdkCreationType = this.vmdkConfig.get( "createType" );
+ }
+
+ return vmdkCreationType;
+ }
+
+ /**
+ * Parse the configuration of the VMDK's embedded descriptor file.
+ *
+ * @return parsed configuration of the VMDK's embedded descriptor file.
+ *
+ * @throws DiskImageException parsing of the VMDK's embedded descriptor file failed.
+ */
+ protected VirtualizationConfigurationVmwareFileFormat parseVmdkConfig() throws DiskImageException
+ {
+ final RandomAccessFile diskFile = this.getDiskImage();
+ final VirtualizationConfigurationVmwareFileFormat vmdkConfig;
+
+ // get offset and size of descriptor file embedded into the VMDK disk image
+ final long vmdkDescriptorSectorOffset = Long.reverseBytes( DiskImageUtils.readLong( diskFile, 28 ) );
+ final long vmdkDescriptorSectorSize = Long.reverseBytes( DiskImageUtils.readLong( diskFile, 36 ) );
+
+ if ( vmdkDescriptorSectorOffset > 0 ) {
+ // get content of descriptor file embedded into the VMDK disk image
+ final long vmdkDescriptorOffset = vmdkDescriptorSectorOffset * DiskImageVmdk.VMDK_SECTOR_SIZE;
+ final long vmdkDescriptorSizeMax = vmdkDescriptorSectorSize * DiskImageVmdk.VMDK_SECTOR_SIZE;
+ final String descriptorStr = new String ( DiskImageUtils.readBytesAsArray( diskFile, vmdkDescriptorOffset,
+ Long.valueOf( vmdkDescriptorSizeMax ).intValue() ), StandardCharsets.US_ASCII );
+
+ // get final length of the content within the sectors to be able to trim all 'zero' characters
+ final int vmdkDescriptorSize = descriptorStr.indexOf( 0 );
+
+ // if final length of the content is invalid, throw an exception
+ if ( vmdkDescriptorSize > vmdkDescriptorSizeMax || vmdkDescriptorSize < 0 ) {
+ final String errorMsg = "Embedded descriptor size in VMDK disk image is invalid!";
+ throw new DiskImageException( errorMsg );
+ }
+
+ // trim all 'zero' characters at the end of the descriptor content to avoid errors during parsing
+ final String configStr = descriptorStr.substring( 0, vmdkDescriptorSize );
+
+ // create configuration instance from content of the descriptor file
+ try {
+ vmdkConfig = new VirtualizationConfigurationVmwareFileFormat( configStr.getBytes(), vmdkDescriptorSize );
+ } catch ( VirtualizationConfigurationException e ) {
+ throw new DiskImageException( e.getLocalizedMessage() );
+ }
+ } else {
+ // there is no descriptor file embedded into the VMDK disk image
+ vmdkConfig = null;
+ }
+
+ return vmdkConfig;
+ }
+
+ /**
+ * Returns parsed configuration of the VMDK's embedded descriptor file.
+ *
+ * @return parsed configuration of the VMDK's embedded descriptor file.
+ */
+ protected VirtualizationConfigurationVmwareFileFormat getVmdkConfig()
+ {
+ return this.vmdkConfig;
+ }
+
+ /**
+ * Returns the hardware version from the VMDK's embedded descriptor file.
+ *
+ * If the VMDK's embedded descriptor file does not contain any hardware version configuration
+ * entry, the default hardware version (see {@link #VMDK_DEFAULT_HW_VERSION}) is returned.
+ *
+ * @return hardware version from the VMDK's embedded descriptor file.
+ *
+ * @throws DiskImageException unable to obtain the VMDK's hardware version of the disk image
+ * format.
+ */
+ public Version getHwVersion() throws DiskImageException
+ {
+ final VirtualizationConfigurationVmwareFileFormat vmdkConfig = this.getVmdkConfig();
+ final Version hwVersion;
+
+ if ( vmdkConfig != null ) {
+ // VMDK image contains a hardware version, so return parsed hardware version
+ // if hardware version cannot be parsed, return default hardware version
+ final String hwVersionStr = vmdkConfig.get( "ddb.virtualHWVersion" );
+
+ final int hwVersionMajor = Util.parseInt( hwVersionStr, DiskImageVmdk.VMDK_DEFAULT_HW_VERSION );
+ hwVersion = new Version( Integer.valueOf( hwVersionMajor ).shortValue() );
+ } else {
+ // VMDK image does not contain any hardware version, so return default hardware version
+ final int hwVersionMajor = DiskImageVmdk.VMDK_DEFAULT_HW_VERSION;
+ hwVersion = new Version( Integer.valueOf( hwVersionMajor ).shortValue() );
+ }
+
+ return hwVersion;
+ }
+
+ @Override
+ public boolean isStandalone() throws DiskImageException
+ {
+ final String vmdkCreationType = this.getCreationType();
+ final boolean vmdkStandalone;
+
+ if ( vmdkCreationType != null ) {
+ // creation type is defined, so check if VMDK disk image is a snapshot
+ if ( this.isSnapshot() ) {
+ // VMDK disk image is a snapshot and not stand alone
+ vmdkStandalone = false;
+ } else {
+ // VMDK disk image is not a snapshot
+ // determine stand alone disk image property
+ vmdkStandalone = vmdkCreationType.equalsIgnoreCase( "streamOptimized" ) ||
+ vmdkCreationType.equalsIgnoreCase( "monolithicSparse" );
+ }
+ } else {
+ // creation type is not defined
+ // assume that the file is not stand alone
+ vmdkStandalone = false;
+ }
+
+ return vmdkStandalone;
+ }
+
+ @Override
+ public boolean isCompressed() throws DiskImageException
+ {
+ final String vmdkCreationType = this.getCreationType();
+ final boolean vmdkCompressed;
+
+ if ( vmdkCreationType != null && vmdkCreationType.equalsIgnoreCase( "streamOptimized" ) ) {
+ // creation type is defined, and VMDK disk image is compressed
+ vmdkCompressed = true;
+ } else {
+ // creation type for compression is not defined
+ // assume that the file is not compressed
+ vmdkCompressed = false;
+ }
+
+ return vmdkCompressed;
+ }
+
+ @Override
+ public boolean isSnapshot() throws DiskImageException
+ {
+ final VirtualizationConfigurationVmwareFileFormat vmdkConfig = this.getVmdkConfig();
+ final boolean vmdkSnapshot;
+
+ if ( vmdkConfig == null ) {
+ // VMDK disk image does not contain any descriptor file
+ // assume that the file is not a snapshot
+ vmdkSnapshot = false;
+ } else {
+ // get parent CID to determine snapshot disk image property
+ final String parentCid = vmdkConfig.get( "parentCID" );
+
+ if ( parentCid != null && !parentCid.equalsIgnoreCase( "ffffffff" ) ) {
+ // link to parent content identifier is defined, so VMDK disk image is a snapshot
+ vmdkSnapshot = true;
+ } else {
+ // link to parent content identifier is not defined, so VMDK disk image is not a snapshot
+ vmdkSnapshot = false;
+ }
+ }
+
+ return vmdkSnapshot;
+ }
+
+ @Override
+ public Version getVersion() throws DiskImageException
+ {
+ final RandomAccessFile diskFile = this.getDiskImage();
+ final int vmdkVersion = Integer.reverseBytes( DiskImageUtils.readInt( diskFile, 4 ) );
+
+ return new Version( Integer.valueOf( vmdkVersion ).shortValue() );
+ }
+
+ @Override
+ public String getDescription() throws DiskImageException
+ {
+ return null;
+ }
+
+ @Override
+ public ImageFormat getFormat()
+ {
+ return ImageFormat.VMDK;
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/hardware/ConfigurationGroups.java b/src/main/java/org/openslx/virtualization/hardware/ConfigurationGroups.java
new file mode 100644
index 0000000..8a0ab13
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/hardware/ConfigurationGroups.java
@@ -0,0 +1,21 @@
+package org.openslx.virtualization.hardware;
+
+public enum ConfigurationGroups
+{
+
+ NIC_MODEL( "E0VirtDev" ),
+ USB_SPEED( "maxUSBSpeed" ),
+ SOUND_CARD_MODEL( "sound" ),
+ GFX_MODEL( "graphics" ),
+ GFX_TYPE( "3DAcceleration" ),
+ HW_VERSION( "HWVersion" );
+
+ /** Identifier to use when looking up translation for this group. Should never change */
+ public final String i18n;
+
+ private ConfigurationGroups( String i18n )
+ {
+ this.i18n = i18n;
+ }
+
+}
diff --git a/src/main/java/org/openslx/virtualization/hardware/Ethernet.java b/src/main/java/org/openslx/virtualization/hardware/Ethernet.java
new file mode 100644
index 0000000..744a71d
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/hardware/Ethernet.java
@@ -0,0 +1,20 @@
+package org.openslx.virtualization.hardware;
+
+public class Ethernet
+{
+
+ public static final String AUTO = "(default)";
+ public static final String PCNET32 = "AMD PCnet32";
+ public static final String E1000 = "Intel E1000 (PCI)";
+ public static final String E1000E = "Intel E1000e (PCI-Express)";
+ public static final String VMXNET = "VMXnet";
+ public static final String VMXNET3 = "VMXnet 3";
+ public static final String PCNETPCI2 = "PCnet-PCI II";
+ public static final String PCNETFAST3 = "PCnet-FAST III";
+ public static final String PRO1000MTD = "Intel PRO/1000 MT Desktop";
+ public static final String PRO1000TS = "Intel PRO/1000 T Server";
+ public static final String PRO1000MTS = "Intel PRO/1000 MT Server";
+ public static final String PARAVIRT = "Paravirtualized Network";
+ public static final String NONE = "No Network Card";
+
+}
diff --git a/src/main/java/org/openslx/virtualization/hardware/SoundCard.java b/src/main/java/org/openslx/virtualization/hardware/SoundCard.java
new file mode 100644
index 0000000..e4065e4
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/hardware/SoundCard.java
@@ -0,0 +1,13 @@
+package org.openslx.virtualization.hardware;
+
+public class SoundCard
+{
+
+ public static final String NONE = "None";
+ public static final String DEFAULT = "(default)";
+ public static final String SOUND_BLASTER = "Sound Blaster 16";
+ public static final String ES = "ES 1371";
+ public static final String HD_AUDIO = "Intel Integrated HD Audio";
+ public static final String AC = "Intel ICH Audio Codec 97";
+
+}
diff --git a/src/main/java/org/openslx/virtualization/hardware/Usb.java b/src/main/java/org/openslx/virtualization/hardware/Usb.java
new file mode 100644
index 0000000..200bf8e
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/hardware/Usb.java
@@ -0,0 +1,11 @@
+package org.openslx.virtualization.hardware;
+
+public class Usb
+{
+
+ public static final String NONE = "None";
+ public static final String USB1_1 = "USB 1.1";
+ public static final String USB2_0 = "USB 2.0";
+ public static final String USB3_0 = "USB 3.0";
+
+}
diff --git a/src/main/java/org/openslx/virtualization/hardware/VirtOptionValue.java b/src/main/java/org/openslx/virtualization/hardware/VirtOptionValue.java
new file mode 100644
index 0000000..effc51f
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/hardware/VirtOptionValue.java
@@ -0,0 +1,42 @@
+package org.openslx.virtualization.hardware;
+
+public abstract class VirtOptionValue
+{
+
+ protected final String id;
+
+ protected final String displayName;
+
+ public VirtOptionValue( String id, String displayName )
+ {
+ this.id = id;
+ this.displayName = displayName;
+ }
+
+ public String getId()
+ {
+ return this.id;
+ }
+
+ public String getDisplayName()
+ {
+ return this.displayName;
+ }
+
+ public abstract void apply();
+
+ public abstract boolean isActive();
+
+ @Override
+ public boolean equals( Object obj )
+ {
+ if ( this == obj )
+ return true;
+ if ( obj instanceof VirtOptionValue ) {
+ VirtOptionValue other = ( (VirtOptionValue)obj );
+ return other.id == this.id || ( other.id != null && other.id.equals( this.id ) );
+ }
+ return false;
+ }
+
+}
diff --git a/src/main/java/org/openslx/virtualization/virtualizer/Virtualizer.java b/src/main/java/org/openslx/virtualization/virtualizer/Virtualizer.java
new file mode 100644
index 0000000..ff24862
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/virtualizer/Virtualizer.java
@@ -0,0 +1,68 @@
+package org.openslx.virtualization.virtualizer;
+
+import java.util.List;
+
+import org.openslx.virtualization.Version;
+import org.openslx.virtualization.disk.DiskImage.ImageFormat;
+
+/**
+ * Representation of a virtualization system.
+ *
+ * The virtualization system can be for example a virtual machine hypervisor (like VirtualBox), a
+ * container for operating systems or applications (like LXC or Docker), or a runtime environment
+ * (like Wine).
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public abstract class Virtualizer
+{
+ /**
+ * Internal data representation for the virtualizer.
+ */
+ protected final org.openslx.bwlp.thrift.iface.Virtualizer internalVirtualizer;
+
+ /**
+ * Creates a new virtualizer.
+ *
+ * @param internalVirtualizer internal data representation for the new virtualizer.
+ */
+ public Virtualizer( org.openslx.bwlp.thrift.iface.Virtualizer internalVirtualizer )
+ {
+ this.internalVirtualizer = internalVirtualizer;
+ }
+
+ /**
+ * Returns the identifier of the virtualizer.
+ *
+ * @return identifier of the virtualizer.
+ */
+ public String getId()
+ {
+ return this.internalVirtualizer.getVirtId();
+ }
+
+ /**
+ * Returns the name of the virtualizer.
+ *
+ * @return name of the virtualizer.
+ */
+ public String getName()
+ {
+ return this.internalVirtualizer.getVirtName();
+ }
+
+ /**
+ * Returns a list of supported disk image formats by the virtualizer.
+ *
+ * @return list of supported disk image formats by the virtualizer.
+ */
+ public abstract List<ImageFormat> getSupportedImageFormats();
+
+ /**
+ * Returns a list of supported versions of the virtualizer.
+ *
+ * @return list of supported versions of the virtualizer.
+ */
+ public abstract List<Version> getSupportedVersions();
+}
diff --git a/src/main/java/org/openslx/virtualization/virtualizer/VirtualizerDocker.java b/src/main/java/org/openslx/virtualization/virtualizer/VirtualizerDocker.java
new file mode 100644
index 0000000..06ac24e
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/virtualizer/VirtualizerDocker.java
@@ -0,0 +1,55 @@
+package org.openslx.virtualization.virtualizer;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.openslx.thrifthelper.TConst;
+import org.openslx.virtualization.Version;
+import org.openslx.virtualization.disk.DiskImage;
+import org.openslx.virtualization.disk.DiskImage.ImageFormat;
+
+/**
+ * Representation of the Docker virtualizer for application containers.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class VirtualizerDocker extends Virtualizer
+{
+ /**
+ * Name of the Docker virtualizer.
+ */
+ private static final String VIRTUALIZER_NAME = "Docker";
+
+ /**
+ * List of supported image formats by the Docker virtualizer.
+ */
+ private static final List<DiskImage.ImageFormat> VIRTUALIZER_SUPPORTED_IMAGE_FORMATS = Collections
+ .unmodifiableList( Arrays.asList( ImageFormat.NONE ) );
+
+ /**
+ * List of supported versions of the Docker virtualizer.
+ */
+ private static final List<Version> VIRTUALIZER_SUPPORTED_VERSIONS = null;
+
+ /**
+ * Creates a new Docker virtualizer.
+ */
+ public VirtualizerDocker()
+ {
+ super( new org.openslx.bwlp.thrift.iface.Virtualizer( TConst.VIRT_DOCKER, VirtualizerDocker.VIRTUALIZER_NAME ) );
+ }
+
+ @Override
+ public List<ImageFormat> getSupportedImageFormats()
+ {
+ return VirtualizerDocker.VIRTUALIZER_SUPPORTED_IMAGE_FORMATS;
+ }
+
+ @Override
+ public List<Version> getSupportedVersions()
+ {
+ return VirtualizerDocker.VIRTUALIZER_SUPPORTED_VERSIONS;
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/virtualizer/VirtualizerQemu.java b/src/main/java/org/openslx/virtualization/virtualizer/VirtualizerQemu.java
new file mode 100644
index 0000000..5d933bb
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/virtualizer/VirtualizerQemu.java
@@ -0,0 +1,72 @@
+package org.openslx.virtualization.virtualizer;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.openslx.thrifthelper.TConst;
+import org.openslx.virtualization.Version;
+import org.openslx.virtualization.disk.DiskImage;
+import org.openslx.virtualization.disk.DiskImage.ImageFormat;
+
+/**
+ * Representation of the QEMU virtualizer for virtual machines.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class VirtualizerQemu extends Virtualizer
+{
+ /**
+ * Name of the QEMU virtualizer.
+ */
+ private static final String VIRTUALIZER_NAME = "QEMU";
+
+ /**
+ * List of supported image formats by the QEMU virtualizer.
+ */
+ private static final List<DiskImage.ImageFormat> VIRTUALIZER_SUPPORTED_IMAGE_FORMATS = Collections
+ .unmodifiableList( Arrays.asList( ImageFormat.QCOW2, ImageFormat.VMDK, ImageFormat.VDI ) );
+
+ /**
+ * List of supported versions of the QEMU virtualizer.
+ */
+ private static final List<Version> VIRTUALIZER_SUPPORTED_VERSIONS = Collections.unmodifiableList(
+ Arrays.asList(
+ new Version( Short.valueOf( "2" ), Short.valueOf( "4" ), "QEMU 2.4" ),
+ new Version( Short.valueOf( "2" ), Short.valueOf( "5" ), "QEMU 2.5" ),
+ new Version( Short.valueOf( "2" ), Short.valueOf( "6" ), "QEMU 2.6" ),
+ new Version( Short.valueOf( "2" ), Short.valueOf( "7" ), "QEMU 2.7" ),
+ new Version( Short.valueOf( "2" ), Short.valueOf( "8" ), "QEMU 2.8" ),
+ new Version( Short.valueOf( "2" ), Short.valueOf( "9" ), "QEMU 2.9" ),
+ new Version( Short.valueOf( "3" ), Short.valueOf( "0" ), "QEMU 3.0" ),
+ new Version( Short.valueOf( "3" ), Short.valueOf( "1" ), "QEMU 3.1" ),
+ new Version( Short.valueOf( "4" ), Short.valueOf( "0" ), "QEMU 4.0" ),
+ new Version( Short.valueOf( "4" ), Short.valueOf( "1" ), "QEMU 4.1" ),
+ new Version( Short.valueOf( "4" ), Short.valueOf( "2" ), "QEMU 4.2" ),
+ new Version( Short.valueOf( "5" ), Short.valueOf( "0" ), "QEMU 5.0" ),
+ new Version( Short.valueOf( "5" ), Short.valueOf( "1" ), "QEMU 5.1" ),
+ new Version( Short.valueOf( "5" ), Short.valueOf( "2" ), "QEMU 5.2" ),
+ new Version( Short.valueOf( "6" ), Short.valueOf( "0" ), "QEMU 6.0" ),
+ new Version( Short.valueOf( "6" ), Short.valueOf( "1" ), "QEMU 6.1" ) ) );
+
+ /**
+ * Creates a new QEMU virtualizer.
+ */
+ public VirtualizerQemu()
+ {
+ super( new org.openslx.bwlp.thrift.iface.Virtualizer( TConst.VIRT_QEMU, VirtualizerQemu.VIRTUALIZER_NAME ) );
+ }
+
+ @Override
+ public List<ImageFormat> getSupportedImageFormats()
+ {
+ return VirtualizerQemu.VIRTUALIZER_SUPPORTED_IMAGE_FORMATS;
+ }
+
+ @Override
+ public List<Version> getSupportedVersions()
+ {
+ return VirtualizerQemu.VIRTUALIZER_SUPPORTED_VERSIONS;
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/virtualizer/VirtualizerVirtualBox.java b/src/main/java/org/openslx/virtualization/virtualizer/VirtualizerVirtualBox.java
new file mode 100644
index 0000000..ebb3b3f
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/virtualizer/VirtualizerVirtualBox.java
@@ -0,0 +1,56 @@
+package org.openslx.virtualization.virtualizer;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.openslx.thrifthelper.TConst;
+import org.openslx.virtualization.Version;
+import org.openslx.virtualization.disk.DiskImage;
+import org.openslx.virtualization.disk.DiskImage.ImageFormat;
+
+/**
+ * Representation of the VirtualBox virtualizer for virtual machines.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class VirtualizerVirtualBox extends Virtualizer
+{
+ /**
+ * Name of the VirtualBox virtualizer.
+ */
+ private static final String VIRTUALIZER_NAME = "VirtualBox";
+
+ /**
+ * List of supported image formats by the VirtualBox virtualizer.
+ */
+ private static final List<DiskImage.ImageFormat> VIRTUALIZER_SUPPORTED_IMAGE_FORMATS = Collections
+ .unmodifiableList( Arrays.asList( ImageFormat.VDI ) );
+
+ /**
+ * List of supported version of the VirtualBox virtualizer.
+ */
+ private static final List<Version> VIRTUALIZER_SUPPORTED_VERSIONS = null;
+
+ /**
+ * Creates a new VirtualBox virtualizer.
+ */
+ public VirtualizerVirtualBox()
+ {
+ super( new org.openslx.bwlp.thrift.iface.Virtualizer( TConst.VIRT_VIRTUALBOX,
+ VirtualizerVirtualBox.VIRTUALIZER_NAME ) );
+ }
+
+ @Override
+ public List<ImageFormat> getSupportedImageFormats()
+ {
+ return VirtualizerVirtualBox.VIRTUALIZER_SUPPORTED_IMAGE_FORMATS;
+ }
+
+ @Override
+ public List<Version> getSupportedVersions()
+ {
+ return VirtualizerVirtualBox.VIRTUALIZER_SUPPORTED_VERSIONS;
+ }
+}
diff --git a/src/main/java/org/openslx/virtualization/virtualizer/VirtualizerVmware.java b/src/main/java/org/openslx/virtualization/virtualizer/VirtualizerVmware.java
new file mode 100644
index 0000000..f94ef39
--- /dev/null
+++ b/src/main/java/org/openslx/virtualization/virtualizer/VirtualizerVmware.java
@@ -0,0 +1,73 @@
+package org.openslx.virtualization.virtualizer;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import org.openslx.thrifthelper.TConst;
+import org.openslx.virtualization.Version;
+import org.openslx.virtualization.disk.DiskImage;
+import org.openslx.virtualization.disk.DiskImage.ImageFormat;
+
+/**
+ * Representation of the VMware virtualizer for virtual machines.
+ *
+ * @author Manuel Bentele
+ * @version 1.0
+ */
+public class VirtualizerVmware extends Virtualizer
+{
+ /**
+ * Name of the VMware virtualizer.
+ */
+ private static final String VIRTUALIZER_NAME = "VMware";
+
+ /**
+ * List of supported image formats by the VMware virtualizer.
+ */
+ private static final List<DiskImage.ImageFormat> VIRTUALIZER_SUPPORTED_IMAGE_FORMATS = Collections
+ .unmodifiableList( Arrays.asList( ImageFormat.VMDK ) );
+
+ /**
+ * List of supported versions of the VMware virtualizer.
+ */
+ private static final List<Version> VIRTUALIZER_SUPPORTED_VERSIONS = Collections.unmodifiableList(
+ Arrays.asList(
+ new Version( Short.valueOf( "03" ), "Workstation 4/5, Player 1" ),
+ new Version( Short.valueOf( "04" ), "Workstation 4/5, Player 1/2, Fusion 1" ),
+ new Version( Short.valueOf( "06" ), "Workstation 6" ),
+ new Version( Short.valueOf( "07" ), "Workstation 6.5/7, Player 3, Fusion 2/3" ),
+ new Version( Short.valueOf( "08" ), "Workstation 8, Player/Fusion 4" ),
+ new Version( Short.valueOf( "09" ), "Workstation 9, Player/Fusion 5" ),
+ new Version( Short.valueOf( "10" ), "Workstation 10, Player/Fusion 6" ),
+ new Version( Short.valueOf( "11" ), "Workstation 11, Player/Fusion 7" ),
+ new Version( Short.valueOf( "12" ), "Workstation/Player 12, Fusion 8" ),
+ new Version( Short.valueOf( "14" ), "Workstation/Player 14, Fusion 10" ),
+ new Version( Short.valueOf( "15" ), "Workstation/Player 15, Fusion 11" ),
+ new Version( Short.valueOf( "16" ), "Workstation/Player 15.1, Fusion 11.1" ),
+ new Version( Short.valueOf( "17" ), "Workstation/Player 16, Fusion 12" ),
+ new Version( Short.valueOf( "18" ), "Workstation/Player 16.1, Fusion 12.1" ),
+ new Version( Short.valueOf( "19" ), "Workstation/Player 16.2, Fusion 12.2" ),
+ new Version( Short.valueOf( "20" ), "Workstation/Player 17, Fusion 13" ) ) );
+
+ /**
+ * Creates a new VMware virtualizer.
+ */
+ public VirtualizerVmware()
+ {
+ super( new org.openslx.bwlp.thrift.iface.Virtualizer( TConst.VIRT_VMWARE, VirtualizerVmware.VIRTUALIZER_NAME ) );
+ }
+
+ @Override
+ public List<ImageFormat> getSupportedImageFormats()
+ {
+ return VirtualizerVmware.VIRTUALIZER_SUPPORTED_IMAGE_FORMATS;
+ }
+
+ @Override
+ public List<Version> getSupportedVersions()
+ {
+ return VirtualizerVmware.VIRTUALIZER_SUPPORTED_VERSIONS;
+ }
+
+}