PatchMergeInstruction

class oci.globally_distributed_database.models.PatchMergeInstruction(**kwargs)

Bases: oci.globally_distributed_database.models.patch_instruction.PatchInstruction

An operation that recursively updates items of the selection, or adding the value if the selection is empty. If the value is not an object, it is used directly, otherwise each key-value member is used to create or update a member of the same name in the target and the same process is applied recursively for each object-typed value (similar to RFC 7396 JSON Merge Patch, except that null values are copied rather than transformed into deletions). NOT_FOUND exceptions are handled by creating the implied containing structure. To avoid referential errors if an item’s descendant is also in the selection, items of the selection are processed in order of decreasing depth.

Attributes

OPERATION_INSERT str(object=’’) -> str
OPERATION_MERGE str(object=’’) -> str
OPERATION_REMOVE str(object=’’) -> str
operation [Required] Gets the operation of this PatchInstruction.
selection [Required] Gets the selection of this PatchInstruction.
value Gets the value of this PatchMergeInstruction.

Methods

__init__(**kwargs) Initializes a new PatchMergeInstruction object with values from keyword arguments.
get_subtype(object_dictionary) Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
OPERATION_INSERT = 'INSERT'
OPERATION_MERGE = 'MERGE'
OPERATION_REMOVE = 'REMOVE'
__init__(**kwargs)

Initializes a new PatchMergeInstruction object with values from keyword arguments. The default value of the operation attribute of this class is MERGE and it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):

Parameters:
  • operation (str) – The value to assign to the operation property of this PatchMergeInstruction. Allowed values for this property are: “INSERT”, “REMOVE”, “MERGE”
  • selection (str) – The value to assign to the selection property of this PatchMergeInstruction.
  • value (object) – The value to assign to the value property of this PatchMergeInstruction.
static get_subtype(object_dictionary)

Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.

operation

[Required] Gets the operation of this PatchInstruction. The operation that need to be performed on an element inside list.

Allowed values for this property are: “INSERT”, “REMOVE”, “MERGE”

Returns:The operation of this PatchInstruction.
Return type:str
selection

[Required] Gets the selection of this PatchInstruction. The set of values to which the operation applies as a JMESPath expression for evaluation against the context resource. An operation fails if the selection yields an exception, except as otherwise specified. Note that comparisons involving non-primitive values (objects or arrays) are not supported and will always evaluate to false.

Returns:The selection of this PatchInstruction.
Return type:str
value

Gets the value of this PatchMergeInstruction. A value to be merged into the target.

Returns:The value of this PatchMergeInstruction.
Return type:object