Class ArgumentLocations

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

    public final class ArgumentLocations
    extends java.lang.Object
    implements java.io.Serializable, StaticStructure
    The ArgumentLocations class describes which part(s) of the input to the method caused the exception.

    Some types of exceptions are caused by the value of one of the inputs to the method, possibly due to an interaction with other inputs to the method.

    This class is intended to be used as the payload to identify those inputs when the method reports exceptions like InvalidArgument or NotFound. See Error.getData().

    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
        ArgumentLocations()
      Default constructor.
      protected ArgumentLocations​(StructValue __dynamicStructureFields)  
        ArgumentLocations​(java.lang.String primary, java.util.List<java.lang.String> secondary)
      This constructor is provided for backwards compatibility purposes only.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T extends Structure>
      T
      _convertTo​(java.lang.Class<T> clazz)
      Converts this structure into an instance of the provided class structure if possible.
      java.lang.String _getCanonicalName()
      Returns the canonical name of the structure.
      static java.lang.String _getCanonicalTypeName()
      Returns the canonical type name.
      static com.vmware.vapi.bindings.type.StructType _getClassType()
      WARNING: Internal method, subject to change in future versions.
      StructValue _getDataValue()
      Returns this Structure represented in the dynamic DataValue model.
      DataValue _getDynamicField​(java.lang.String fieldName)
      Get a dynamic field value, doesn't allow access to static fields (which have getters/setters).
      java.util.Set<java.lang.String> _getDynamicFieldNames()
      Get the names of the dynamic fields in the structure.
      com.vmware.vapi.bindings.type.StructType _getType()
      WARNING: Internal method, subject to change in future versions.
      boolean _hasTypeNameOf​(java.lang.Class<? extends Structure> clazz)
      Checks if the runtime type name of this structure matches the type represented by the specified binding class.
      static ArgumentLocations _newInstance​(StructValue structValue)
      WARNING: Internal method, subject to change in future versions.
      Returns new instance of this binding class and injects the provided data value.
      WARNING: The returned object is not fully initialized.
      static ArgumentLocations _newInstance2​(StructValue structValue)
      WARNING: Internal method, subject to change in future versions.
      Serves as a versioning mechanism.
      void _setDynamicField​(java.lang.String fieldName, DataValue fieldValue)
      Sets a dynamic field value.
      protected void _updateDataValue​(StructValue structValue)  
      void _validate()
      Validates the state of the discriminated unions and HasFieldsOf restrictions (if any) in this Java language binding Structure.
      boolean equals​(java.lang.Object obj)  
      java.lang.String getPrimary()
      String describing the location of the input that triggered the exception.
      java.util.List<java.lang.String> getSecondary()
      List (possibly empty) of strings describing the locations of other inputs that caused the the primary input to trigger the exception.
      int hashCode()  
      void setPrimary​(java.lang.String primary)
      String describing the location of the input that triggered the exception.
      void setSecondary​(java.util.List<java.lang.String> secondary)
      List (possibly empty) of strings describing the locations of other inputs that caused the the primary input to trigger the exception.
      java.lang.String toString()
      Returns a string representation of this structure.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • __dynamicStructureFields

        protected StructValue __dynamicStructureFields
    • Constructor Detail

      • ArgumentLocations

        public ArgumentLocations​(java.lang.String primary,
                                 java.util.List<java.lang.String> secondary)
        This constructor is provided for backwards compatibility purposes only. Please use the Builder class instead.
      • ArgumentLocations

        public ArgumentLocations()
        Default constructor.
      • ArgumentLocations

        protected ArgumentLocations​(StructValue __dynamicStructureFields)
    • Method Detail

      • getPrimary

        public java.lang.String getPrimary()
        String describing the location of the input that triggered the exception.
        Returns:
        The current value of the property.
      • setPrimary

        public void setPrimary​(java.lang.String primary)
        String describing the location of the input that triggered the exception.
        Parameters:
        primary - New value for the property.
      • getSecondary

        public java.util.List<java.lang.String> getSecondary()
        List (possibly empty) of strings describing the locations of other inputs that caused the the primary input to trigger the exception.
        Returns:
        The current value of the property.
      • setSecondary

        public void setSecondary​(java.util.List<java.lang.String> secondary)
        List (possibly empty) of strings describing the locations of other inputs that caused the the primary input to trigger the exception.
        Parameters:
        secondary - New value for the property.
      • _getType

        public com.vmware.vapi.bindings.type.StructType _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
        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
        Returns:
        StructValue representing this structure
      • _updateDataValue

        protected void _updateDataValue​(StructValue structValue)
      • _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