Class PatchMoveInstruction


  • @Generated(value="OracleSDKGenerator",
               comments="API Version: 20220915")
    public final class PatchMoveInstruction
    extends PatchInstruction
    An operation that “puts” values from elsewhere in the target, functionally equivalent to a single add and then a remove.

    The first item of the selection is replaced, or created if the selection is empty. NOT_FOUND exceptions in the selection are handled by creating the implied containing structure. This operation fails if the from selection yields any exceptions, or if an item is moved to any of its descendants.
    Note: Objects should always be created or deserialized using the PatchMoveInstruction.Builder. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of the PatchMoveInstruction.Builder, which maintain a set of all explicitly set fields called PatchMoveInstruction.Builder.__explicitlySet__. The hashCode() and equals(Object) methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).

    • Method Detail

      • getFrom

        public String getFrom()
        The selection that is to be moved, with the same format and semantics as selection.
        Returns:
        the value
      • getPosition

        public PatchMoveInstruction.Position getPosition()
        Where to insert the value in an array, relative to the first item in the selection.

        If there is no such item, then “BEFORE” specifies insertion at the first position in an array and “AFTER” specifies insertion at the last position. If the first item in the selection is not the child of an array, then this field has no effect.

        Returns:
        the value
      • toString

        public String toString​(boolean includeByteArrayContents)
        Return a string representation of the object.
        Overrides:
        toString in class PatchInstruction
        Parameters:
        includeByteArrayContents - true to include the full contents of byte arrays
        Returns:
        string representation