Class UnexpectedInput

  • All Implemented Interfaces:
    StaticStructure, Structure, java.io.Serializable

    public class UnexpectedInput
    extends Error
    implements java.io.Serializable, StaticStructure
    The UnexpectedInput exception indicates that the request contained a parameter or property whose name is not known by the server.

    Every method expects parameters with known names. Some of those parameters may be (or contain) classes, and the method expects those classes to contain properties with known names. If the method receives parameters or properties with names that is does not expect, this exception may be reported.

    This exception can be reported by the API infrastructure for any method, but it is specific to the API infrastructure, and should never be reported by the implementation of any method.

    Examples:

    • A client using stubs generated from the interface specification for version2 of a interface invokes the method passing one or more parameters that were added in version2, but they are communicating with a server that only supports version1 of the interface.
    • A client provides an unexpected parameter or property name when invoking the method using a dynamic interface (for example REST).
    See Also:
    Serialized Form
    • Constructor Detail

      • UnexpectedInput

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

        public UnexpectedInput()
        Default constructor.
      • UnexpectedInput

        protected UnexpectedInput​(StructValue __dynamicStructureFields)
      • UnexpectedInput

        protected UnexpectedInput​(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
        Overrides:
        _getType in class Error
        Returns:
        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
        Overrides:
        _getDataValue in class Error
        Returns:
        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
Overrides:
_validate in class Error