Class NotAllowedInCurrentState

  • All Implemented Interfaces:
    StaticStructure, Structure,

    public class NotAllowedInCurrentState
    extends Error
    implements, StaticStructure
    The NotAllowedInCurrentState exception indicates that the requested method is not allowed with a resource or service in its current state. This could be because the method is performing a configuration change that is not allowed in the current state or because method itself is not allowed in the current state.


    • Trying to add a virtual device that cannot be hot plugged to a running virtual machine.
    • Trying to upgrade the virtual hardware version for a suspended virtual machine.
    • Trying to power off, reset, or suspend a virtual machine that is not powered on.


    • Trying to power off a virtual machine that is in the process of being powered on. The ResourceBusy exception would be used instead.
    See Also:
    Serialized Form
    • Constructor Detail

      • NotAllowedInCurrentState

        public NotAllowedInCurrentState​(java.util.List<LocalizableMessage> messages,
                                        Structure data)
        This constructor is provided for backwards compatibility purposes only. Please use the Builder class instead.
      • NotAllowedInCurrentState

        public NotAllowedInCurrentState()
        Default constructor.
      • NotAllowedInCurrentState

        protected NotAllowedInCurrentState​(StructValue __dynamicStructureFields)
      • NotAllowedInCurrentState

        protected NotAllowedInCurrentState​(StructValue __dynamicStructureFields,
                                           Error.Type errorType)
    • Method Detail

      • _getType

        public com.vmware.vapi.bindings.type.ErrorType _getType()
        Description copied from interface: StaticStructure
        WARNING: Internal method, subject to change in future versions. Returns StructType instance representing the static bindings type for this Structure.
        Specified by:
        _getType in interface StaticStructure
        _getType in class Error
        the static bindings StructType
      • _getDataValue

        public StructValue _getDataValue()
        Description copied from interface: Structure
        Returns this Structure represented in the dynamic DataValue model.

        Attempts to change the returned StructValue representation are not required to change the state of this structure. Actually the behavior is implementation dependent and is unspecified. In general the returned value shouldn't be changed.

        Specified by:
        _getDataValue in interface Structure
        _getDataValue in class Error
        StructValue representing this structure
      • _validate

        public void _validate()
        Description copied from interface: StaticStructure
        Validates the state of the discriminated unions and HasFieldsOf restrictions (if any) in this Java language binding Structure.

        More precisely, for each union: given value of the discriminant/tag field (@UnionTag in the IDL) of an union in this structure, validates that:

      • all fields of the union required for that value of the discriminant are set
      • fields of the union that are not allowed for that value of the discriminant are not set
      • any other fields of the structure (not participating in the union) do not affect the validation result
Specified by:
_validate in interface StaticStructure
_validate in class Error