cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tall...@apache.org
Subject [08/60] [abbrv] Applied Tina's patches for removing the xapi jar
Date Tue, 08 Apr 2014 12:25:23 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e9c81c78/deps/XenServerJava/src/com/xensource/xenapi/Types.java
----------------------------------------------------------------------
diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Types.java b/deps/XenServerJava/src/com/xensource/xenapi/Types.java
deleted file mode 100644
index 50f49a0..0000000
--- a/deps/XenServerJava/src/com/xensource/xenapi/Types.java
+++ /dev/null
@@ -1,13529 +0,0 @@
-/*
- * Copyright (c) Citrix Systems, Inc.
- * All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 
- *   1) Redistributions of source code must retain the above copyright
- *      notice, this list of conditions and the following disclaimer.
- * 
- *   2) Redistributions in binary form must reproduce the above
- *      copyright notice, this list of conditions and the following
- *      disclaimer in the documentation and/or other materials
- *      provided with the distribution.
- * 
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
- * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-package com.xensource.xenapi;
-
-import java.util.Date;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Set;
-import java.util.LinkedHashSet;
-import java.io.IOException;
-
-import java.util.regex.Pattern;
-import java.util.regex.Matcher;
-
-import org.apache.xmlrpc.XmlRpcException;
-
-/**
- * This class holds vital marshalling functions, enum types and exceptions.
- * 
- * @author Citrix Systems, Inc.
- */
-public class Types
-{
-    /**
-     * Interface for all Record classes
-     */
-    public static interface Record
-    {
-        /**
-         * Convert a Record to a Map
-         */
-        Map<String, Object> toMap();
-    }
-
-    /**
-     * Helper method.
-     */
-    private static String[] ObjectArrayToStringArray(Object[] objArray)
-    {
-        String[] result = new String[objArray.length];
-        for (int i = 0; i < objArray.length; i++)
-        {
-            result[i] = (String) objArray[i];
-        }
-        return result;
-    }
-
-    /**
-     * Base class for all XenAPI Exceptions
-     */
-    public static class XenAPIException extends IOException {
-        public final String shortDescription;
-        public final String[] errorDescription;
-
-        XenAPIException(String shortDescription)
-        {
-            this.shortDescription = shortDescription;
-            this.errorDescription = null;
-        }
-
-        XenAPIException(String[] errorDescription)
-        {
-            this.errorDescription = errorDescription;
-
-            if (errorDescription.length > 0)
-            {
-                shortDescription = errorDescription[0];
-            } else
-            {
-                shortDescription = "";
-            }
-        }
-
-        public String toString()
-        {
-            if (errorDescription == null)
-            {
-                return shortDescription;
-            } else if (errorDescription.length == 0)
-            {
-                return "";
-            }
-            StringBuilder sb = new StringBuilder();
-            for (int i = 0; i < errorDescription.length - 1; i++)
-            {
-                sb.append(errorDescription[i]);
-            }
-            sb.append(errorDescription[errorDescription.length - 1]);
-
-            return sb.toString();
-        }
-    }
-    /**
-     * Thrown if the response from the server contains an invalid status.
-     */
-    public static class BadServerResponse extends XenAPIException
-    {
-        public BadServerResponse(Map response)
-        {
-            super(ObjectArrayToStringArray((Object[]) response.get("ErrorDescription")));
-        }
-    }
-
-    public static class BadAsyncResult extends XenAPIException
-    {
-        public final String result;
-
-        public BadAsyncResult(String result)
-        {
-            super(result);
-            this.result = result;
-        }
-    }
-
-    /*
-     * A call has been made which should not be made against this version of host.
-     * Probably the host is out of date and cannot handle this call, or is
-     * unable to comply with the details of the call.
-     */
-    public static class VersionException extends XenAPIException
-    {
-        public final String result;
-
-        public VersionException(String result)
-        {
-            super(result);
-            this.result = result;
-        }
-    }
-
-    private static String parseResult(String result) throws BadAsyncResult
-    {
-        Pattern pattern = Pattern.compile("<value>(.*)</value>");
-        Matcher matcher = pattern.matcher(result);
-        matcher.find();
-
-        if (matcher.groupCount() != 1)
-        {
-            throw new Types.BadAsyncResult("Can't interpret: " + result);
-        }
-
-        return matcher.group(1);
-    }
-      /**
-     * Checks the provided server response was successful. If the call failed, throws a XenAPIException. If the server
-     * returned an invalid response, throws a BadServerResponse. Otherwise, returns the server response as passed in.
-     */
-    static Map checkResponse(Map response) throws XenAPIException, BadServerResponse
-    {
-        if (response.get("Status").equals("Success"))
-        {
-            return response;
-        }
-
-        if (response.get("Status").equals("Failure"))
-        {
-            String[] ErrorDescription = ObjectArrayToStringArray((Object[]) response.get("ErrorDescription"));
-
-            if (ErrorDescription[0].equals("CANNOT_DESTROY_DISASTER_RECOVERY_TASK"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CannotDestroyDisasterRecoveryTask(p1);
-            }
-            if (ErrorDescription[0].equals("IMPORT_ERROR_ATTACHED_DISKS_NOT_FOUND"))
-            {
-                throw new Types.ImportErrorAttachedDisksNotFound();
-            }
-            if (ErrorDescription[0].equals("COULD_NOT_IMPORT_DATABASE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CouldNotImportDatabase(p1);
-            }
-            if (ErrorDescription[0].equals("HOST_CANNOT_ATTACH_NETWORK"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.HostCannotAttachNetwork(p1, p2);
-            }
-            if (ErrorDescription[0].equals("VM_INCOMPATIBLE_WITH_THIS_HOST"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
-                throw new Types.VmIncompatibleWithThisHost(p1, p2, p3);
-            }
-            if (ErrorDescription[0].equals("SESSION_INVALID"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.SessionInvalid(p1);
-            }
-            if (ErrorDescription[0].equals("XEN_VSS_REQ_ERROR_CREATING_SNAPSHOT"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.XenVssReqErrorCreatingSnapshot(p1, p2);
-            }
-            if (ErrorDescription[0].equals("VM_REVERT_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.VmRevertFailed(p1, p2);
-            }
-            if (ErrorDescription[0].equals("CPU_FEATURE_MASKING_NOT_SUPPORTED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CpuFeatureMaskingNotSupported(p1);
-            }
-            if (ErrorDescription[0].equals("HA_LOST_STATEFILE"))
-            {
-                throw new Types.HaLostStatefile();
-            }
-            if (ErrorDescription[0].equals("VM_CANNOT_DELETE_DEFAULT_TEMPLATE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmCannotDeleteDefaultTemplate(p1);
-            }
-            if (ErrorDescription[0].equals("AUTH_ENABLE_FAILED_PERMISSION_DENIED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.AuthEnableFailedPermissionDenied(p1);
-            }
-            if (ErrorDescription[0].equals("TOO_BUSY"))
-            {
-                throw new Types.TooBusy();
-            }
-            if (ErrorDescription[0].equals("BACKUP_SCRIPT_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.BackupScriptFailed(p1);
-            }
-            if (ErrorDescription[0].equals("HOST_NOT_LIVE"))
-            {
-                throw new Types.HostNotLive();
-            }
-            if (ErrorDescription[0].equals("LICENSE_EXPIRED"))
-            {
-                throw new Types.LicenseExpired();
-            }
-            if (ErrorDescription[0].equals("VM_REQUIRES_NETWORK"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.VmRequiresNetwork(p1, p2);
-            }
-            if (ErrorDescription[0].equals("LOCATION_NOT_UNIQUE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.LocationNotUnique(p1, p2);
-            }
-            if (ErrorDescription[0].equals("VGPU_TYPE_NOT_SUPPORTED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.VgpuTypeNotSupported(p1, p2);
-            }
-            if (ErrorDescription[0].equals("HOST_HAS_NO_MANAGEMENT_IP"))
-            {
-                throw new Types.HostHasNoManagementIp();
-            }
-            if (ErrorDescription[0].equals("XEN_VSS_REQ_ERROR_CREATING_SNAPSHOT_XML_STRING"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.XenVssReqErrorCreatingSnapshotXmlString(p1, p2);
-            }
-            if (ErrorDescription[0].equals("CANNOT_PLUG_BOND_SLAVE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CannotPlugBondSlave(p1);
-            }
-            if (ErrorDescription[0].equals("VGPU_TYPE_NOT_ENABLED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.VgpuTypeNotEnabled(p1, p2);
-            }
-            if (ErrorDescription[0].equals("CANNOT_FIND_OEM_BACKUP_PARTITION"))
-            {
-                throw new Types.CannotFindOemBackupPartition();
-            }
-            if (ErrorDescription[0].equals("PIF_ALREADY_BONDED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.PifAlreadyBonded(p1);
-            }
-            if (ErrorDescription[0].equals("RESTORE_INCOMPATIBLE_VERSION"))
-            {
-                throw new Types.RestoreIncompatibleVersion();
-            }
-            if (ErrorDescription[0].equals("SESSION_AUTHENTICATION_FAILED"))
-            {
-                throw new Types.SessionAuthenticationFailed();
-            }
-            if (ErrorDescription[0].equals("PIF_BOND_NEEDS_MORE_MEMBERS"))
-            {
-                throw new Types.PifBondNeedsMoreMembers();
-            }
-            if (ErrorDescription[0].equals("HA_HEARTBEAT_DAEMON_STARTUP_FAILED"))
-            {
-                throw new Types.HaHeartbeatDaemonStartupFailed();
-            }
-            if (ErrorDescription[0].equals("INVALID_VALUE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.InvalidValue(p1, p2);
-            }
-            if (ErrorDescription[0].equals("INVALID_IP_ADDRESS_SPECIFIED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.InvalidIpAddressSpecified(p1);
-            }
-            if (ErrorDescription[0].equals("LICENSE_CANNOT_DOWNGRADE_WHILE_IN_POOL"))
-            {
-                throw new Types.LicenseCannotDowngradeWhileInPool();
-            }
-            if (ErrorDescription[0].equals("VMS_FAILED_TO_COOPERATE"))
-            {
-                throw new Types.VmsFailedToCooperate();
-            }
-            if (ErrorDescription[0].equals("HOST_DISABLED_UNTIL_REBOOT"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.HostDisabledUntilReboot(p1);
-            }
-            if (ErrorDescription[0].equals("SYSTEM_STATUS_RETRIEVAL_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.SystemStatusRetrievalFailed(p1);
-            }
-            if (ErrorDescription[0].equals("PIF_INCOMPATIBLE_PRIMARY_ADDRESS_TYPE"))
-            {
-                throw new Types.PifIncompatiblePrimaryAddressType();
-            }
-            if (ErrorDescription[0].equals("IMPORT_ERROR_PREMATURE_EOF"))
-            {
-                throw new Types.ImportErrorPrematureEof();
-            }
-            if (ErrorDescription[0].equals("PROVISION_ONLY_ALLOWED_ON_TEMPLATE"))
-            {
-                throw new Types.ProvisionOnlyAllowedOnTemplate();
-            }
-            if (ErrorDescription[0].equals("VBD_NOT_REMOVABLE_MEDIA"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VbdNotRemovableMedia(p1);
-            }
-            if (ErrorDescription[0].equals("GPU_GROUP_CONTAINS_NO_PGPUS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.GpuGroupContainsNoPgpus(p1);
-            }
-            if (ErrorDescription[0].equals("HA_HOST_CANNOT_SEE_PEERS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
-                throw new Types.HaHostCannotSeePeers(p1, p2, p3);
-            }
-            if (ErrorDescription[0].equals("AUTH_ENABLE_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.AuthEnableFailed(p1);
-            }
-            if (ErrorDescription[0].equals("HOST_NAME_INVALID"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.HostNameInvalid(p1);
-            }
-            if (ErrorDescription[0].equals("WLB_XENSERVER_CONNECTION_REFUSED"))
-            {
-                throw new Types.WlbXenserverConnectionRefused();
-            }
-            if (ErrorDescription[0].equals("XEN_VSS_REQ_ERROR_NO_VOLUMES_SUPPORTED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.XenVssReqErrorNoVolumesSupported(p1, p2);
-            }
-            if (ErrorDescription[0].equals("HOST_NOT_ENOUGH_FREE_MEMORY"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.HostNotEnoughFreeMemory(p1, p2);
-            }
-            if (ErrorDescription[0].equals("CANNOT_EVACUATE_HOST"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CannotEvacuateHost(p1);
-            }
-            if (ErrorDescription[0].equals("VM_IS_PART_OF_AN_APPLIANCE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.VmIsPartOfAnAppliance(p1, p2);
-            }
-            if (ErrorDescription[0].equals("VDI_IS_A_PHYSICAL_DEVICE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VdiIsAPhysicalDevice(p1);
-            }
-            if (ErrorDescription[0].equals("SR_VDI_LOCKING_FAILED"))
-            {
-                throw new Types.SrVdiLockingFailed();
-            }
-            if (ErrorDescription[0].equals("PIF_VLAN_EXISTS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.PifVlanExists(p1);
-            }
-            if (ErrorDescription[0].equals("HOSTS_NOT_COMPATIBLE"))
-            {
-                throw new Types.HostsNotCompatible();
-            }
-            if (ErrorDescription[0].equals("VM_IS_PROTECTED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmIsProtected(p1);
-            }
-            if (ErrorDescription[0].equals("HA_POOL_IS_ENABLED_BUT_HOST_IS_DISABLED"))
-            {
-                throw new Types.HaPoolIsEnabledButHostIsDisabled();
-            }
-            if (ErrorDescription[0].equals("V6D_FAILURE"))
-            {
-                throw new Types.V6dFailure();
-            }
-            if (ErrorDescription[0].equals("DEVICE_DETACH_TIMEOUT"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.DeviceDetachTimeout(p1, p2);
-            }
-            if (ErrorDescription[0].equals("LICENSE_PROCESSING_ERROR"))
-            {
-                throw new Types.LicenseProcessingError();
-            }
-            if (ErrorDescription[0].equals("PIF_VLAN_STILL_EXISTS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.PifVlanStillExists(p1);
-            }
-            if (ErrorDescription[0].equals("VM_REBOOTED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmRebooted(p1);
-            }
-            if (ErrorDescription[0].equals("OBJECT_NOLONGER_EXISTS"))
-            {
-                throw new Types.ObjectNolongerExists();
-            }
-            if (ErrorDescription[0].equals("CERTIFICATE_LIBRARY_CORRUPT"))
-            {
-                throw new Types.CertificateLibraryCorrupt();
-            }
-            if (ErrorDescription[0].equals("DUPLICATE_VM"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.DuplicateVm(p1);
-            }
-            if (ErrorDescription[0].equals("CERTIFICATE_ALREADY_EXISTS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CertificateAlreadyExists(p1);
-            }
-            if (ErrorDescription[0].equals("CERTIFICATE_CORRUPT"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CertificateCorrupt(p1);
-            }
-            if (ErrorDescription[0].equals("SM_PLUGIN_COMMUNICATION_FAILURE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.SmPluginCommunicationFailure(p1);
-            }
-            if (ErrorDescription[0].equals("WLB_DISABLED"))
-            {
-                throw new Types.WlbDisabled();
-            }
-            if (ErrorDescription[0].equals("GPU_GROUP_CONTAINS_PGPU"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.GpuGroupContainsPgpu(p1);
-            }
-            if (ErrorDescription[0].equals("VDI_NOT_IN_MAP"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VdiNotInMap(p1);
-            }
-            if (ErrorDescription[0].equals("LICENCE_RESTRICTION"))
-            {
-                throw new Types.LicenceRestriction();
-            }
-            if (ErrorDescription[0].equals("TOO_MANY_PENDING_TASKS"))
-            {
-                throw new Types.TooManyPendingTasks();
-            }
-            if (ErrorDescription[0].equals("VM_SNAPSHOT_WITH_QUIESCE_TIMEOUT"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmSnapshotWithQuiesceTimeout(p1);
-            }
-            if (ErrorDescription[0].equals("VDI_INCOMPATIBLE_TYPE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.VdiIncompatibleType(p1, p2);
-            }
-            if (ErrorDescription[0].equals("VIF_IN_USE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.VifInUse(p1, p2);
-            }
-            if (ErrorDescription[0].equals("VMPP_ARCHIVE_MORE_FREQUENT_THAN_BACKUP"))
-            {
-                throw new Types.VmppArchiveMoreFrequentThanBackup();
-            }
-            if (ErrorDescription[0].equals("IMPORT_INCOMPATIBLE_VERSION"))
-            {
-                throw new Types.ImportIncompatibleVersion();
-            }
-            if (ErrorDescription[0].equals("INVALID_EDITION"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.InvalidEdition(p1);
-            }
-            if (ErrorDescription[0].equals("AUTH_SERVICE_ERROR"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.AuthServiceError(p1);
-            }
-            if (ErrorDescription[0].equals("XEN_VSS_REQ_ERROR_ADDING_VOLUME_TO_SNAPSET_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.XenVssReqErrorAddingVolumeToSnapsetFailed(p1, p2);
-            }
-            if (ErrorDescription[0].equals("PERMISSION_DENIED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.PermissionDenied(p1);
-            }
-            if (ErrorDescription[0].equals("DEVICE_ALREADY_EXISTS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.DeviceAlreadyExists(p1);
-            }
-            if (ErrorDescription[0].equals("SR_UUID_EXISTS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.SrUuidExists(p1);
-            }
-            if (ErrorDescription[0].equals("VM_HAS_VGPU"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmHasVgpu(p1);
-            }
-            if (ErrorDescription[0].equals("TOO_MANY_STORAGE_MIGRATES"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.TooManyStorageMigrates(p1);
-            }
-            if (ErrorDescription[0].equals("HA_IS_ENABLED"))
-            {
-                throw new Types.HaIsEnabled();
-            }
-            if (ErrorDescription[0].equals("CANNOT_DESTROY_SYSTEM_NETWORK"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CannotDestroySystemNetwork(p1);
-            }
-            if (ErrorDescription[0].equals("OPENVSWITCH_NOT_ACTIVE"))
-            {
-                throw new Types.OpenvswitchNotActive();
-            }
-            if (ErrorDescription[0].equals("NOT_IMPLEMENTED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.NotImplemented(p1);
-            }
-            if (ErrorDescription[0].equals("VBD_NOT_UNPLUGGABLE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VbdNotUnpluggable(p1);
-            }
-            if (ErrorDescription[0].equals("VM_CRASHED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmCrashed(p1);
-            }
-            if (ErrorDescription[0].equals("VM_BAD_POWER_STATE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
-                throw new Types.VmBadPowerState(p1, p2, p3);
-            }
-            if (ErrorDescription[0].equals("FEATURE_REQUIRES_HVM"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.FeatureRequiresHvm(p1);
-            }
-            if (ErrorDescription[0].equals("IMPORT_ERROR_UNEXPECTED_FILE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.ImportErrorUnexpectedFile(p1, p2);
-            }
-            if (ErrorDescription[0].equals("SR_NOT_EMPTY"))
-            {
-                throw new Types.SrNotEmpty();
-            }
-            if (ErrorDescription[0].equals("JOINING_HOST_CANNOT_HAVE_VMS_WITH_CURRENT_OPERATIONS"))
-            {
-                throw new Types.JoiningHostCannotHaveVmsWithCurrentOperations();
-            }
-            if (ErrorDescription[0].equals("VDI_NOT_MANAGED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VdiNotManaged(p1);
-            }
-            if (ErrorDescription[0].equals("VM_HALTED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmHalted(p1);
-            }
-            if (ErrorDescription[0].equals("COULD_NOT_FIND_NETWORK_INTERFACE_WITH_SPECIFIED_DEVICE_NAME_AND_MAC_ADDRESS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.CouldNotFindNetworkInterfaceWithSpecifiedDeviceNameAndMacAddress(p1, p2);
-            }
-            if (ErrorDescription[0].equals("SR_BACKEND_FAILURE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
-                throw new Types.SrBackendFailure(p1, p2, p3);
-            }
-            if (ErrorDescription[0].equals("RESTORE_TARGET_MISSING_DEVICE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.RestoreTargetMissingDevice(p1);
-            }
-            if (ErrorDescription[0].equals("VM_IS_TEMPLATE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmIsTemplate(p1);
-            }
-            if (ErrorDescription[0].equals("HA_OPERATION_WOULD_BREAK_FAILOVER_PLAN"))
-            {
-                throw new Types.HaOperationWouldBreakFailoverPlan();
-            }
-            if (ErrorDescription[0].equals("VMPP_HAS_VM"))
-            {
-                throw new Types.VmppHasVm();
-            }
-            if (ErrorDescription[0].equals("HANDLE_INVALID"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.HandleInvalid(p1, p2);
-            }
-            if (ErrorDescription[0].equals("POOL_JOINING_HOST_MUST_HAVE_PHYSICAL_MANAGEMENT_NIC"))
-            {
-                throw new Types.PoolJoiningHostMustHavePhysicalManagementNic();
-            }
-            if (ErrorDescription[0].equals("DEVICE_ALREADY_ATTACHED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.DeviceAlreadyAttached(p1);
-            }
-            if (ErrorDescription[0].equals("NOT_SUPPORTED_DURING_UPGRADE"))
-            {
-                throw new Types.NotSupportedDuringUpgrade();
-            }
-            if (ErrorDescription[0].equals("OPERATION_PARTIALLY_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.OperationPartiallyFailed(p1);
-            }
-            if (ErrorDescription[0].equals("OTHER_OPERATION_IN_PROGRESS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.OtherOperationInProgress(p1, p2);
-            }
-            if (ErrorDescription[0].equals("PIF_CANNOT_BOND_CROSS_HOST"))
-            {
-                throw new Types.PifCannotBondCrossHost();
-            }
-            if (ErrorDescription[0].equals("PATCH_PRECHECK_FAILED_WRONG_SERVER_VERSION"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
-                throw new Types.PatchPrecheckFailedWrongServerVersion(p1, p2, p3);
-            }
-            if (ErrorDescription[0].equals("CANNOT_PLUG_VIF"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CannotPlugVif(p1);
-            }
-            if (ErrorDescription[0].equals("POOL_AUTH_ENABLE_FAILED_DOMAIN_LOOKUP_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.PoolAuthEnableFailedDomainLookupFailed(p1, p2);
-            }
-            if (ErrorDescription[0].equals("NOT_ALLOWED_ON_OEM_EDITION"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.NotAllowedOnOemEdition(p1);
-            }
-            if (ErrorDescription[0].equals("PATCH_PRECHECK_FAILED_UNKNOWN_ERROR"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.PatchPrecheckFailedUnknownError(p1, p2);
-            }
-            if (ErrorDescription[0].equals("CRL_CORRUPT"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CrlCorrupt(p1);
-            }
-            if (ErrorDescription[0].equals("POOL_JOINING_EXTERNAL_AUTH_MISMATCH"))
-            {
-                throw new Types.PoolJoiningExternalAuthMismatch();
-            }
-            if (ErrorDescription[0].equals("JOINING_HOST_SERVICE_FAILED"))
-            {
-                throw new Types.JoiningHostServiceFailed();
-            }
-            if (ErrorDescription[0].equals("CHANGE_PASSWORD_REJECTED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.ChangePasswordRejected(p1);
-            }
-            if (ErrorDescription[0].equals("PIF_UNMANAGED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.PifUnmanaged(p1);
-            }
-            if (ErrorDescription[0].equals("VM_DUPLICATE_VBD_DEVICE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
-                throw new Types.VmDuplicateVbdDevice(p1, p2, p3);
-            }
-            if (ErrorDescription[0].equals("RESTORE_SCRIPT_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.RestoreScriptFailed(p1);
-            }
-            if (ErrorDescription[0].equals("WLB_XENSERVER_TIMEOUT"))
-            {
-                throw new Types.WlbXenserverTimeout();
-            }
-            if (ErrorDescription[0].equals("MAC_DOES_NOT_EXIST"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.MacDoesNotExist(p1);
-            }
-            if (ErrorDescription[0].equals("HOST_ITS_OWN_SLAVE"))
-            {
-                throw new Types.HostItsOwnSlave();
-            }
-            if (ErrorDescription[0].equals("AUTH_DISABLE_FAILED_WRONG_CREDENTIALS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.AuthDisableFailedWrongCredentials(p1);
-            }
-            if (ErrorDescription[0].equals("HA_TOO_FEW_HOSTS"))
-            {
-                throw new Types.HaTooFewHosts();
-            }
-            if (ErrorDescription[0].equals("VM_ASSIGNED_TO_PROTECTION_POLICY"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.VmAssignedToProtectionPolicy(p1, p2);
-            }
-            if (ErrorDescription[0].equals("MAP_DUPLICATE_KEY"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
-                String p4 = ErrorDescription.length > 4 ? ErrorDescription[4] : "";
-                throw new Types.MapDuplicateKey(p1, p2, p3, p4);
-            }
-            if (ErrorDescription[0].equals("HOST_MASTER_CANNOT_TALK_BACK"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.HostMasterCannotTalkBack(p1);
-            }
-            if (ErrorDescription[0].equals("VM_CHECKPOINT_RESUME_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmCheckpointResumeFailed(p1);
-            }
-            if (ErrorDescription[0].equals("CRL_NAME_INVALID"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CrlNameInvalid(p1);
-            }
-            if (ErrorDescription[0].equals("EVENT_FROM_TOKEN_PARSE_FAILURE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.EventFromTokenParseFailure(p1);
-            }
-            if (ErrorDescription[0].equals("CANNOT_ENABLE_REDO_LOG"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CannotEnableRedoLog(p1);
-            }
-            if (ErrorDescription[0].equals("PIF_DEVICE_NOT_FOUND"))
-            {
-                throw new Types.PifDeviceNotFound();
-            }
-            if (ErrorDescription[0].equals("LICENSE_DOES_NOT_SUPPORT_POOLING"))
-            {
-                throw new Types.LicenseDoesNotSupportPooling();
-            }
-            if (ErrorDescription[0].equals("OPERATION_BLOCKED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.OperationBlocked(p1, p2);
-            }
-            if (ErrorDescription[0].equals("VM_NO_CRASHDUMP_SR"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmNoCrashdumpSr(p1);
-            }
-            if (ErrorDescription[0].equals("HOST_EVACUATE_IN_PROGRESS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.HostEvacuateInProgress(p1);
-            }
-            if (ErrorDescription[0].equals("SYSTEM_STATUS_MUST_USE_TAR_ON_OEM"))
-            {
-                throw new Types.SystemStatusMustUseTarOnOem();
-            }
-            if (ErrorDescription[0].equals("HA_NO_PLAN"))
-            {
-                throw new Types.HaNoPlan();
-            }
-            if (ErrorDescription[0].equals("HOST_UNKNOWN_TO_MASTER"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.HostUnknownToMaster(p1);
-            }
-            if (ErrorDescription[0].equals("AUTH_ENABLE_FAILED_WRONG_CREDENTIALS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.AuthEnableFailedWrongCredentials(p1);
-            }
-            if (ErrorDescription[0].equals("OPERATION_NOT_ALLOWED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.OperationNotAllowed(p1);
-            }
-            if (ErrorDescription[0].equals("USER_IS_NOT_LOCAL_SUPERUSER"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.UserIsNotLocalSuperuser(p1);
-            }
-            if (ErrorDescription[0].equals("HA_FAILED_TO_FORM_LIVESET"))
-            {
-                throw new Types.HaFailedToFormLiveset();
-            }
-            if (ErrorDescription[0].equals("WLB_CONNECTION_RESET"))
-            {
-                throw new Types.WlbConnectionReset();
-            }
-            if (ErrorDescription[0].equals("HOST_CD_DRIVE_EMPTY"))
-            {
-                throw new Types.HostCdDriveEmpty();
-            }
-            if (ErrorDescription[0].equals("EVENTS_LOST"))
-            {
-                throw new Types.EventsLost();
-            }
-            if (ErrorDescription[0].equals("PROVISION_FAILED_OUT_OF_SPACE"))
-            {
-                throw new Types.ProvisionFailedOutOfSpace();
-            }
-            if (ErrorDescription[0].equals("LICENSE_FILE_DEPRECATED"))
-            {
-                throw new Types.LicenseFileDeprecated();
-            }
-            if (ErrorDescription[0].equals("SUBJECT_ALREADY_EXISTS"))
-            {
-                throw new Types.SubjectAlreadyExists();
-            }
-            if (ErrorDescription[0].equals("VM_HOST_INCOMPATIBLE_VERSION"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.VmHostIncompatibleVersion(p1, p2);
-            }
-            if (ErrorDescription[0].equals("HOST_BROKEN"))
-            {
-                throw new Types.HostBroken();
-            }
-            if (ErrorDescription[0].equals("NOT_IN_EMERGENCY_MODE"))
-            {
-                throw new Types.NotInEmergencyMode();
-            }
-            if (ErrorDescription[0].equals("ROLE_NOT_FOUND"))
-            {
-                throw new Types.RoleNotFound();
-            }
-            if (ErrorDescription[0].equals("MAC_STILL_EXISTS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.MacStillExists(p1);
-            }
-            if (ErrorDescription[0].equals("HA_HOST_IS_ARMED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.HaHostIsArmed(p1);
-            }
-            if (ErrorDescription[0].equals("JOINING_HOST_CANNOT_HAVE_RUNNING_VMS"))
-            {
-                throw new Types.JoiningHostCannotHaveRunningVms();
-            }
-            if (ErrorDescription[0].equals("DOMAIN_BUILDER_ERROR"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
-                throw new Types.DomainBuilderError(p1, p2, p3);
-            }
-            if (ErrorDescription[0].equals("HA_CONSTRAINT_VIOLATION_NETWORK_NOT_SHARED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.HaConstraintViolationNetworkNotShared(p1);
-            }
-            if (ErrorDescription[0].equals("HOST_CANNOT_DESTROY_SELF"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.HostCannotDestroySelf(p1);
-            }
-            if (ErrorDescription[0].equals("WLB_INTERNAL_ERROR"))
-            {
-                throw new Types.WlbInternalError();
-            }
-            if (ErrorDescription[0].equals("FIELD_TYPE_ERROR"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.FieldTypeError(p1);
-            }
-            if (ErrorDescription[0].equals("DEVICE_ALREADY_DETACHED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.DeviceAlreadyDetached(p1);
-            }
-            if (ErrorDescription[0].equals("GPU_GROUP_CONTAINS_VGPU"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.GpuGroupContainsVgpu(p1);
-            }
-            if (ErrorDescription[0].equals("DEVICE_DETACH_REJECTED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
-                throw new Types.DeviceDetachRejected(p1, p2, p3);
-            }
-            if (ErrorDescription[0].equals("SR_UNKNOWN_DRIVER"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.SrUnknownDriver(p1);
-            }
-            if (ErrorDescription[0].equals("HOSTS_NOT_HOMOGENEOUS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.HostsNotHomogeneous(p1);
-            }
-            if (ErrorDescription[0].equals("VDI_CONTAINS_METADATA_OF_THIS_POOL"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.VdiContainsMetadataOfThisPool(p1, p2);
-            }
-            if (ErrorDescription[0].equals("SR_NOT_SHARABLE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.SrNotSharable(p1, p2);
-            }
-            if (ErrorDescription[0].equals("POOL_AUTH_ENABLE_FAILED_DUPLICATE_HOSTNAME"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.PoolAuthEnableFailedDuplicateHostname(p1, p2);
-            }
-            if (ErrorDescription[0].equals("HA_NOT_ENABLED"))
-            {
-                throw new Types.HaNotEnabled();
-            }
-            if (ErrorDescription[0].equals("SR_ATTACH_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.SrAttachFailed(p1);
-            }
-            if (ErrorDescription[0].equals("MESSAGE_PARAMETER_COUNT_MISMATCH"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
-                throw new Types.MessageParameterCountMismatch(p1, p2, p3);
-            }
-            if (ErrorDescription[0].equals("VM_MEMORY_SIZE_TOO_LOW"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmMemorySizeTooLow(p1);
-            }
-            if (ErrorDescription[0].equals("POOL_JOINING_HOST_MUST_HAVE_SAME_PRODUCT_VERSION"))
-            {
-                throw new Types.PoolJoiningHostMustHaveSameProductVersion();
-            }
-            if (ErrorDescription[0].equals("VM_REQUIRES_IOMMU"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmRequiresIommu(p1);
-            }
-            if (ErrorDescription[0].equals("POOL_AUTH_ENABLE_FAILED_PERMISSION_DENIED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.PoolAuthEnableFailedPermissionDenied(p1, p2);
-            }
-            if (ErrorDescription[0].equals("VM_REQUIRES_VDI"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.VmRequiresVdi(p1, p2);
-            }
-            if (ErrorDescription[0].equals("JOINING_HOST_CONNECTION_FAILED"))
-            {
-                throw new Types.JoiningHostConnectionFailed();
-            }
-            if (ErrorDescription[0].equals("NETWORK_ALREADY_CONNECTED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.NetworkAlreadyConnected(p1, p2);
-            }
-            if (ErrorDescription[0].equals("HOST_HAS_RESIDENT_VMS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.HostHasResidentVms(p1);
-            }
-            if (ErrorDescription[0].equals("SESSION_NOT_REGISTERED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.SessionNotRegistered(p1);
-            }
-            if (ErrorDescription[0].equals("DB_UNIQUENESS_CONSTRAINT_VIOLATION"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
-                throw new Types.DbUniquenessConstraintViolation(p1, p2, p3);
-            }
-            if (ErrorDescription[0].equals("SR_INDESTRUCTIBLE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.SrIndestructible(p1);
-            }
-            if (ErrorDescription[0].equals("WLB_XENSERVER_MALFORMED_RESPONSE"))
-            {
-                throw new Types.WlbXenserverMalformedResponse();
-            }
-            if (ErrorDescription[0].equals("VDI_NOT_AVAILABLE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VdiNotAvailable(p1);
-            }
-            if (ErrorDescription[0].equals("SR_FULL"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.SrFull(p1, p2);
-            }
-            if (ErrorDescription[0].equals("CANNOT_FETCH_PATCH"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CannotFetchPatch(p1);
-            }
-            if (ErrorDescription[0].equals("HOST_IN_EMERGENCY_MODE"))
-            {
-                throw new Types.HostInEmergencyMode();
-            }
-            if (ErrorDescription[0].equals("IMPORT_ERROR_SOME_CHECKSUMS_FAILED"))
-            {
-                throw new Types.ImportErrorSomeChecksumsFailed();
-            }
-            if (ErrorDescription[0].equals("XENAPI_MISSING_PLUGIN"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.XenapiMissingPlugin(p1);
-            }
-            if (ErrorDescription[0].equals("AUTH_ALREADY_ENABLED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.AuthAlreadyEnabled(p1, p2);
-            }
-            if (ErrorDescription[0].equals("VALUE_NOT_SUPPORTED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
-                throw new Types.ValueNotSupported(p1, p2, p3);
-            }
-            if (ErrorDescription[0].equals("TRANSPORT_PIF_NOT_CONFIGURED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.TransportPifNotConfigured(p1);
-            }
-            if (ErrorDescription[0].equals("PATCH_PRECHECK_FAILED_VM_RUNNING"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.PatchPrecheckFailedVmRunning(p1);
-            }
-            if (ErrorDescription[0].equals("SR_HAS_PBD"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.SrHasPbd(p1);
-            }
-            if (ErrorDescription[0].equals("INVALID_DEVICE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.InvalidDevice(p1);
-            }
-            if (ErrorDescription[0].equals("VGPU_TYPE_NOT_COMPATIBLE_WITH_RUNNING_TYPE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
-                throw new Types.VgpuTypeNotCompatibleWithRunningType(p1, p2, p3);
-            }
-            if (ErrorDescription[0].equals("ACTIVATION_WHILE_NOT_FREE"))
-            {
-                throw new Types.ActivationWhileNotFree();
-            }
-            if (ErrorDescription[0].equals("VDI_READONLY"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VdiReadonly(p1);
-            }
-            if (ErrorDescription[0].equals("VDI_IS_NOT_ISO"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.VdiIsNotIso(p1, p2);
-            }
-            if (ErrorDescription[0].equals("HOST_DISABLED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.HostDisabled(p1);
-            }
-            if (ErrorDescription[0].equals("WLB_CONNECTION_REFUSED"))
-            {
-                throw new Types.WlbConnectionRefused();
-            }
-            if (ErrorDescription[0].equals("VBD_NOT_EMPTY"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VbdNotEmpty(p1);
-            }
-            if (ErrorDescription[0].equals("CANNOT_FIND_STATE_PARTITION"))
-            {
-                throw new Types.CannotFindStatePartition();
-            }
-            if (ErrorDescription[0].equals("INTERFACE_HAS_NO_IP"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.InterfaceHasNoIp(p1);
-            }
-            if (ErrorDescription[0].equals("JOINING_HOST_CANNOT_HAVE_RUNNING_OR_SUSPENDED_VMS"))
-            {
-                throw new Types.JoiningHostCannotHaveRunningOrSuspendedVms();
-            }
-            if (ErrorDescription[0].equals("AUTH_ENABLE_FAILED_DOMAIN_LOOKUP_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.AuthEnableFailedDomainLookupFailed(p1);
-            }
-            if (ErrorDescription[0].equals("INVALID_FEATURE_STRING"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.InvalidFeatureString(p1);
-            }
-            if (ErrorDescription[0].equals("CANNOT_CONTACT_HOST"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CannotContactHost(p1);
-            }
-            if (ErrorDescription[0].equals("MAC_INVALID"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.MacInvalid(p1);
-            }
-            if (ErrorDescription[0].equals("VBD_IS_EMPTY"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VbdIsEmpty(p1);
-            }
-            if (ErrorDescription[0].equals("POOL_AUTH_ENABLE_FAILED_INVALID_OU"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.PoolAuthEnableFailedInvalidOu(p1, p2);
-            }
-            if (ErrorDescription[0].equals("MESSAGE_METHOD_UNKNOWN"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.MessageMethodUnknown(p1);
-            }
-            if (ErrorDescription[0].equals("PIF_DOES_NOT_ALLOW_UNPLUG"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.PifDoesNotAllowUnplug(p1);
-            }
-            if (ErrorDescription[0].equals("PATCH_PRECHECK_FAILED_PREREQUISITE_MISSING"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.PatchPrecheckFailedPrerequisiteMissing(p1, p2);
-            }
-            if (ErrorDescription[0].equals("VDI_MISSING"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.VdiMissing(p1, p2);
-            }
-            if (ErrorDescription[0].equals("WLB_XENSERVER_AUTHENTICATION_FAILED"))
-            {
-                throw new Types.WlbXenserverAuthenticationFailed();
-            }
-            if (ErrorDescription[0].equals("JOINING_HOST_CANNOT_CONTAIN_SHARED_SRS"))
-            {
-                throw new Types.JoiningHostCannotContainSharedSrs();
-            }
-            if (ErrorDescription[0].equals("RESTORE_TARGET_MGMT_IF_NOT_IN_BACKUP"))
-            {
-                throw new Types.RestoreTargetMgmtIfNotInBackup();
-            }
-            if (ErrorDescription[0].equals("VM_SNAPSHOT_WITH_QUIESCE_NOT_SUPPORTED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.VmSnapshotWithQuiesceNotSupported(p1, p2);
-            }
-            if (ErrorDescription[0].equals("PIF_IS_PHYSICAL"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.PifIsPhysical(p1);
-            }
-            if (ErrorDescription[0].equals("DOMAIN_EXISTS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.DomainExists(p1, p2);
-            }
-            if (ErrorDescription[0].equals("VM_OLD_PV_DRIVERS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
-                throw new Types.VmOldPvDrivers(p1, p2, p3);
-            }
-            if (ErrorDescription[0].equals("IS_TUNNEL_ACCESS_PIF"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.IsTunnelAccessPif(p1);
-            }
-            if (ErrorDescription[0].equals("SR_REQUIRES_UPGRADE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.SrRequiresUpgrade(p1);
-            }
-            if (ErrorDescription[0].equals("ROLE_ALREADY_EXISTS"))
-            {
-                throw new Types.RoleAlreadyExists();
-            }
-            if (ErrorDescription[0].equals("XEN_VSS_REQ_ERROR_INIT_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.XenVssReqErrorInitFailed(p1, p2);
-            }
-            if (ErrorDescription[0].equals("CRL_DOES_NOT_EXIST"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CrlDoesNotExist(p1);
-            }
-            if (ErrorDescription[0].equals("INVALID_PATCH"))
-            {
-                throw new Types.InvalidPatch();
-            }
-            if (ErrorDescription[0].equals("LICENSE_DOES_NOT_SUPPORT_XHA"))
-            {
-                throw new Types.LicenseDoesNotSupportXha();
-            }
-            if (ErrorDescription[0].equals("AUTH_IS_DISABLED"))
-            {
-                throw new Types.AuthIsDisabled();
-            }
-            if (ErrorDescription[0].equals("XEN_VSS_REQ_ERROR_PROV_NOT_LOADED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.XenVssReqErrorProvNotLoaded(p1, p2);
-            }
-            if (ErrorDescription[0].equals("VM_HVM_REQUIRED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmHvmRequired(p1);
-            }
-            if (ErrorDescription[0].equals("WLB_MALFORMED_REQUEST"))
-            {
-                throw new Types.WlbMalformedRequest();
-            }
-            if (ErrorDescription[0].equals("VM_BIOS_STRINGS_ALREADY_SET"))
-            {
-                throw new Types.VmBiosStringsAlreadySet();
-            }
-            if (ErrorDescription[0].equals("POOL_AUTH_DISABLE_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.PoolAuthDisableFailed(p1, p2);
-            }
-            if (ErrorDescription[0].equals("VM_HAS_PCI_ATTACHED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmHasPciAttached(p1);
-            }
-            if (ErrorDescription[0].equals("VM_SNAPSHOT_WITH_QUIESCE_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmSnapshotWithQuiesceFailed(p1);
-            }
-            if (ErrorDescription[0].equals("WLB_UNKNOWN_HOST"))
-            {
-                throw new Types.WlbUnknownHost();
-            }
-            if (ErrorDescription[0].equals("SR_DEVICE_IN_USE"))
-            {
-                throw new Types.SrDeviceInUse();
-            }
-            if (ErrorDescription[0].equals("DISK_VBD_MUST_BE_READWRITE_FOR_HVM"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.DiskVbdMustBeReadwriteForHvm(p1);
-            }
-            if (ErrorDescription[0].equals("DUPLICATE_PIF_DEVICE_NAME"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.DuplicatePifDeviceName(p1);
-            }
-            if (ErrorDescription[0].equals("PATCH_PRECHECK_FAILED_ISO_MOUNTED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.PatchPrecheckFailedIsoMounted(p1);
-            }
-            if (ErrorDescription[0].equals("PATCH_PRECHECK_FAILED_WRONG_SERVER_BUILD"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
-                throw new Types.PatchPrecheckFailedWrongServerBuild(p1, p2, p3);
-            }
-            if (ErrorDescription[0].equals("VM_NOT_RESIDENT_HERE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.VmNotResidentHere(p1, p2);
-            }
-            if (ErrorDescription[0].equals("TASK_CANCELLED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.TaskCancelled(p1);
-            }
-            if (ErrorDescription[0].equals("VM_TOO_MANY_VCPUS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmTooManyVcpus(p1);
-            }
-            if (ErrorDescription[0].equals("SUBJECT_CANNOT_BE_RESOLVED"))
-            {
-                throw new Types.SubjectCannotBeResolved();
-            }
-            if (ErrorDescription[0].equals("VM_MISSING_PV_DRIVERS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmMissingPvDrivers(p1);
-            }
-            if (ErrorDescription[0].equals("PATCH_APPLY_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.PatchApplyFailed(p1);
-            }
-            if (ErrorDescription[0].equals("SLAVE_REQUIRES_MANAGEMENT_INTERFACE"))
-            {
-                throw new Types.SlaveRequiresManagementInterface();
-            }
-            if (ErrorDescription[0].equals("HOST_IS_LIVE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.HostIsLive(p1);
-            }
-            if (ErrorDescription[0].equals("VM_NO_SUSPEND_SR"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmNoSuspendSr(p1);
-            }
-            if (ErrorDescription[0].equals("XEN_VSS_REQ_ERROR_START_SNAPSHOT_SET_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.XenVssReqErrorStartSnapshotSetFailed(p1, p2);
-            }
-            if (ErrorDescription[0].equals("EVENT_SUBSCRIPTION_PARSE_FAILURE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.EventSubscriptionParseFailure(p1);
-            }
-            if (ErrorDescription[0].equals("VM_TO_IMPORT_IS_NOT_NEWER_VERSION"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
-                throw new Types.VmToImportIsNotNewerVersion(p1, p2, p3);
-            }
-            if (ErrorDescription[0].equals("DEFAULT_SR_NOT_FOUND"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.DefaultSrNotFound(p1);
-            }
-            if (ErrorDescription[0].equals("UUID_INVALID"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.UuidInvalid(p1, p2);
-            }
-            if (ErrorDescription[0].equals("CANNOT_CREATE_STATE_FILE"))
-            {
-                throw new Types.CannotCreateStateFile();
-            }
-            if (ErrorDescription[0].equals("VM_REQUIRES_GPU"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.VmRequiresGpu(p1, p2);
-            }
-            if (ErrorDescription[0].equals("LICENSE_CHECKOUT_ERROR"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.LicenseCheckoutError(p1);
-            }
-            if (ErrorDescription[0].equals("HOST_IS_SLAVE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.HostIsSlave(p1);
-            }
-            if (ErrorDescription[0].equals("HOST_STILL_BOOTING"))
-            {
-                throw new Types.HostStillBooting();
-            }
-            if (ErrorDescription[0].equals("PGPU_NOT_COMPATIBLE_WITH_GPU_GROUP"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.PgpuNotCompatibleWithGpuGroup(p1, p2);
-            }
-            if (ErrorDescription[0].equals("XMLRPC_UNMARSHAL_FAILURE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.XmlrpcUnmarshalFailure(p1, p2);
-            }
-            if (ErrorDescription[0].equals("MESSAGE_REMOVED"))
-            {
-                throw new Types.MessageRemoved();
-            }
-            if (ErrorDescription[0].equals("NETWORK_CONTAINS_PIF"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.NetworkContainsPif(p1);
-            }
-            if (ErrorDescription[0].equals("WLB_XENSERVER_UNKNOWN_HOST"))
-            {
-                throw new Types.WlbXenserverUnknownHost();
-            }
-            if (ErrorDescription[0].equals("DEVICE_ATTACH_TIMEOUT"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.DeviceAttachTimeout(p1, p2);
-            }
-            if (ErrorDescription[0].equals("PATCH_ALREADY_EXISTS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.PatchAlreadyExists(p1);
-            }
-            if (ErrorDescription[0].equals("PGPU_IN_USE_BY_VM"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.PgpuInUseByVm(p1);
-            }
-            if (ErrorDescription[0].equals("AUTH_ENABLE_FAILED_UNAVAILABLE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.AuthEnableFailedUnavailable(p1);
-            }
-            if (ErrorDescription[0].equals("CANNOT_ADD_VLAN_TO_BOND_SLAVE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CannotAddVlanToBondSlave(p1);
-            }
-            if (ErrorDescription[0].equals("VDI_LOCATION_MISSING"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.VdiLocationMissing(p1, p2);
-            }
-            if (ErrorDescription[0].equals("POOL_AUTH_DISABLE_FAILED_WRONG_CREDENTIALS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.PoolAuthDisableFailedWrongCredentials(p1, p2);
-            }
-            if (ErrorDescription[0].equals("VM_FAILED_SHUTDOWN_ACKNOWLEDGMENT"))
-            {
-                throw new Types.VmFailedShutdownAcknowledgment();
-            }
-            if (ErrorDescription[0].equals("CERTIFICATE_NAME_INVALID"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CertificateNameInvalid(p1);
-            }
-            if (ErrorDescription[0].equals("UNKNOWN_BOOTLOADER"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.UnknownBootloader(p1, p2);
-            }
-            if (ErrorDescription[0].equals("VM_ATTACHED_TO_MORE_THAN_ONE_VDI_WITH_TIMEOFFSET_MARKED_AS_RESET_ON_BOOT"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmAttachedToMoreThanOneVdiWithTimeoffsetMarkedAsResetOnBoot(p1);
-            }
-            if (ErrorDescription[0].equals("INTERNAL_ERROR"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.InternalError(p1);
-            }
-            if (ErrorDescription[0].equals("MESSAGE_DEPRECATED"))
-            {
-                throw new Types.MessageDeprecated();
-            }
-            if (ErrorDescription[0].equals("CANNOT_FIND_PATCH"))
-            {
-                throw new Types.CannotFindPatch();
-            }
-            if (ErrorDescription[0].equals("VM_UNSAFE_BOOT"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmUnsafeBoot(p1);
-            }
-            if (ErrorDescription[0].equals("VM_MIGRATE_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
-                String p4 = ErrorDescription.length > 4 ? ErrorDescription[4] : "";
-                throw new Types.VmMigrateFailed(p1, p2, p3, p4);
-            }
-            if (ErrorDescription[0].equals("JOINING_HOST_CANNOT_BE_MASTER_OF_OTHER_HOSTS"))
-            {
-                throw new Types.JoiningHostCannotBeMasterOfOtherHosts();
-            }
-            if (ErrorDescription[0].equals("IMPORT_ERROR_CANNOT_HANDLE_CHUNKED"))
-            {
-                throw new Types.ImportErrorCannotHandleChunked();
-            }
-            if (ErrorDescription[0].equals("POOL_AUTH_ENABLE_FAILED_WRONG_CREDENTIALS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.PoolAuthEnableFailedWrongCredentials(p1, p2);
-            }
-            if (ErrorDescription[0].equals("ONLY_ALLOWED_ON_OEM_EDITION"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.OnlyAllowedOnOemEdition(p1);
-            }
-            if (ErrorDescription[0].equals("HOST_IN_USE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
-                throw new Types.HostInUse(p1, p2, p3);
-            }
-            if (ErrorDescription[0].equals("VM_CHECKPOINT_SUSPEND_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmCheckpointSuspendFailed(p1);
-            }
-            if (ErrorDescription[0].equals("PATCH_ALREADY_APPLIED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.PatchAlreadyApplied(p1);
-            }
-            if (ErrorDescription[0].equals("DEVICE_NOT_ATTACHED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.DeviceNotAttached(p1);
-            }
-            if (ErrorDescription[0].equals("POOL_AUTH_ENABLE_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.PoolAuthEnableFailed(p1, p2);
-            }
-            if (ErrorDescription[0].equals("VDI_IN_USE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.VdiInUse(p1, p2);
-            }
-            if (ErrorDescription[0].equals("HOST_NOT_DISABLED"))
-            {
-                throw new Types.HostNotDisabled();
-            }
-            if (ErrorDescription[0].equals("FEATURE_RESTRICTED"))
-            {
-                throw new Types.FeatureRestricted();
-            }
-            if (ErrorDescription[0].equals("VM_REQUIRES_SR"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.VmRequiresSr(p1, p2);
-            }
-            if (ErrorDescription[0].equals("BOOTLOADER_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.BootloaderFailed(p1, p2);
-            }
-            if (ErrorDescription[0].equals("PIF_HAS_NO_NETWORK_CONFIGURATION"))
-            {
-                throw new Types.PifHasNoNetworkConfiguration();
-            }
-            if (ErrorDescription[0].equals("PIF_TUNNEL_STILL_EXISTS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.PifTunnelStillExists(p1);
-            }
-            if (ErrorDescription[0].equals("IMPORT_ERROR_FAILED_TO_FIND_OBJECT"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.ImportErrorFailedToFindObject(p1);
-            }
-            if (ErrorDescription[0].equals("VDI_NEEDS_VM_FOR_MIGRATE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VdiNeedsVmForMigrate(p1);
-            }
-            if (ErrorDescription[0].equals("SR_OPERATION_NOT_SUPPORTED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.SrOperationNotSupported(p1);
-            }
-            if (ErrorDescription[0].equals("VM_SNAPSHOT_WITH_QUIESCE_PLUGIN_DEOS_NOT_RESPOND"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmSnapshotWithQuiescePluginDeosNotRespond(p1);
-            }
-            if (ErrorDescription[0].equals("XAPI_HOOK_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                String p3 = ErrorDescription.length > 3 ? ErrorDescription[3] : "";
-                String p4 = ErrorDescription.length > 4 ? ErrorDescription[4] : "";
-                throw new Types.XapiHookFailed(p1, p2, p3, p4);
-            }
-            if (ErrorDescription[0].equals("REDO_LOG_IS_ENABLED"))
-            {
-                throw new Types.RedoLogIsEnabled();
-            }
-            if (ErrorDescription[0].equals("HOST_OFFLINE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.HostOffline(p1);
-            }
-            if (ErrorDescription[0].equals("CRL_ALREADY_EXISTS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CrlAlreadyExists(p1);
-            }
-            if (ErrorDescription[0].equals("SSL_VERIFY_ERROR"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.SslVerifyError(p1);
-            }
-            if (ErrorDescription[0].equals("AUTH_UNKNOWN_TYPE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.AuthUnknownType(p1);
-            }
-            if (ErrorDescription[0].equals("PIF_HAS_NO_V6_NETWORK_CONFIGURATION"))
-            {
-                throw new Types.PifHasNoV6NetworkConfiguration();
-            }
-            if (ErrorDescription[0].equals("HA_SHOULD_BE_FENCED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.HaShouldBeFenced(p1);
-            }
-            if (ErrorDescription[0].equals("OUT_OF_SPACE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.OutOfSpace(p1);
-            }
-            if (ErrorDescription[0].equals("SR_HAS_NO_PBDS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.SrHasNoPbds(p1);
-            }
-            if (ErrorDescription[0].equals("RBAC_PERMISSION_DENIED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.RbacPermissionDenied(p1, p2);
-            }
-            if (ErrorDescription[0].equals("HA_HOST_CANNOT_ACCESS_STATEFILE"))
-            {
-                throw new Types.HaHostCannotAccessStatefile();
-            }
-            if (ErrorDescription[0].equals("WLB_TIMEOUT"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.WlbTimeout(p1);
-            }
-            if (ErrorDescription[0].equals("HA_ABORT_NEW_MASTER"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.HaAbortNewMaster(p1);
-            }
-            if (ErrorDescription[0].equals("PIF_CONFIGURATION_ERROR"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                String p2 = ErrorDescription.length > 2 ? ErrorDescription[2] : "";
-                throw new Types.PifConfigurationError(p1, p2);
-            }
-            if (ErrorDescription[0].equals("VM_HAS_TOO_MANY_SNAPSHOTS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmHasTooManySnapshots(p1);
-            }
-            if (ErrorDescription[0].equals("PATCH_IS_APPLIED"))
-            {
-                throw new Types.PatchIsApplied();
-            }
-            if (ErrorDescription[0].equals("MIRROR_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.MirrorFailed(p1);
-            }
-            if (ErrorDescription[0].equals("AUTH_DISABLE_FAILED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.AuthDisableFailed(p1);
-            }
-            if (ErrorDescription[0].equals("PIF_IS_MANAGEMENT_INTERFACE"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.PifIsManagementInterface(p1);
-            }
-            if (ErrorDescription[0].equals("CERTIFICATE_DOES_NOT_EXIST"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CertificateDoesNotExist(p1);
-            }
-            if (ErrorDescription[0].equals("NETWORK_CONTAINS_VIF"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.NetworkContainsVif(p1);
-            }
-            if (ErrorDescription[0].equals("CANNOT_RESET_CONTROL_DOMAIN"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.CannotResetControlDomain(p1);
-            }
-            if (ErrorDescription[0].equals("WLB_AUTHENTICATION_FAILED"))
-            {
-                throw new Types.WlbAuthenticationFailed();
-            }
-            if (ErrorDescription[0].equals("WLB_URL_INVALID"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.WlbUrlInvalid(p1);
-            }
-            if (ErrorDescription[0].equals("HA_CONSTRAINT_VIOLATION_SR_NOT_SHARED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.HaConstraintViolationSrNotShared(p1);
-            }
-            if (ErrorDescription[0].equals("VM_NO_VCPUS"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmNoVcpus(p1);
-            }
-            if (ErrorDescription[0].equals("VM_HAS_CHECKPOINT"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VmHasCheckpoint(p1);
-            }
-            if (ErrorDescription[0].equals("VBD_TRAY_LOCKED"))
-            {
-                String p1 = ErrorDescription.length > 1 ? ErrorDescription[1] : "";
-                throw new Types.VbdTrayLocked(p1);
-            }
-          

<TRUNCATED>

Mime
View raw message