ruạṛ
a ���f6 � @ s8 d dl mZmZmZ d dlmZ eG dd� de��ZdS )� )�formatted_flat_dict� NONE_SENTINEL�#value_allowed_none_or_none_sentinel)�init_model_state_from_kwargsc @ s| e Zd ZdZdZdZdZdd� Zedd� �Z e d d � �Zejdd � �Ze dd � �Z e jdd � �Z dd� Zdd� Zdd� ZdS )�PatchInstructionzO A single instruction to be included as part of Patch request content. �INSERT�REMOVE�MERGEc K s( ddd�| _ ddd�| _d| _d| _dS )a� Initializes a new PatchInstruction object with values from keyword arguments. This class has the following subclasses and if you are using this class as input to a service operations then you should favor using a subclass over the base class: * :class:`~oci.globally_distributed_database.models.PatchRemoveInstruction` * :class:`~oci.globally_distributed_database.models.PatchInsertInstruction` * :class:`~oci.globally_distributed_database.models.PatchMergeInstruction` The following keyword arguments are supported (corresponding to the getters/setters of this class): :param operation: The value to assign to the operation property of this PatchInstruction. Allowed values for this property are: "INSERT", "REMOVE", "MERGE" :type operation: str :param selection: The value to assign to the selection property of this PatchInstruction. :type selection: str �str)� operation� selectionr r N)Z swagger_typesZ attribute_map� _operation� _selection)�self�kwargs� r �^/usr/lib/python3.9/site-packages/oci/globally_distributed_database/models/patch_instruction.py�__init__ s ��zPatchInstruction.__init__c C s4 | d }|dkrdS |dkr dS |dkr,dS dS d S ) z� Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype. r r ZPatchRemoveInstructionr ZPatchInsertInstructionr ZPatchMergeInstructionr Nr )Zobject_dictionary�typer r r �get_subtype@ s zPatchInstruction.get_subtypec C s | j S )a2 **[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" :return: The operation of this PatchInstruction. :rtype: str )r �r r r r r S s zPatchInstruction.operationc C s* g d�}t ||�s td|� ���|| _dS )z� Sets the operation of this PatchInstruction. The operation that need to be performed on an element inside list. :param operation: The operation of this PatchInstruction. :type: str )r r r z6Invalid value for `operation`, must be None or one of N)r � ValueErrorr )r r Zallowed_valuesr r r r a s �c C s | j S )a9 **[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. __ https://jmespath.org/specification.html :return: The selection of this PatchInstruction. :rtype: str �r r r r r r r s zPatchInstruction.selectionc C s || _ dS )a2 Sets 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. __ https://jmespath.org/specification.html :param selection: The selection of this PatchInstruction. :type: str Nr )r r r r r r � s c C s t | �S �N)r r r r r �__repr__� s zPatchInstruction.__repr__c C s |d u rdS | j |j kS )NF)�__dict__�r �otherr r r �__eq__� s zPatchInstruction.__eq__c C s | |k S r r r r r r �__ne__� s zPatchInstruction.__ne__N)�__name__� __module__�__qualname__�__doc__ZOPERATION_INSERTZOPERATION_REMOVEZOPERATION_MERGEr �staticmethodr �propertyr �setterr r r r r r r r r s$ " r N)Zoci.utilr r r Zoci.decoratorsr �objectr r r r r �<module> s
cải xoăn