o
    ëÉ¶dV  ã                   @   s8   d dl mZmZmZ d dlmZ eG dd„ deƒƒZdS )é    )Úformatted_flat_dictÚNONE_SENTINELÚ#value_allowed_none_or_none_sentinel)Úinit_model_state_from_kwargsc                   @   sò  e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZdZdZdZdZdZdd„ Zedd„ ƒZejdd„ ƒZedd„ ƒZejdd„ ƒZedd„ ƒZejdd„ ƒZedd„ ƒZejdd„ ƒZedd „ ƒZejd!d „ ƒZed"d#„ ƒZejd$d#„ ƒZed%d&„ ƒZejd'd&„ ƒZed(d)„ ƒZejd*d)„ ƒZed+d,„ ƒZejd-d,„ ƒZed.d/„ ƒZejd0d/„ ƒZed1d2„ ƒZ e jd3d2„ ƒZ ed4d5„ ƒZ!e!jd6d5„ ƒZ!ed7d8„ ƒZ"e"jd9d8„ ƒZ"ed:d;„ ƒZ#e#jd<d;„ ƒZ#ed=d>„ ƒZ$e$jd?d>„ ƒZ$d@dA„ Z%dBdC„ Z&dDdE„ Z'dFS )GÚKeyz
    Key model.
    ÚHSMÚSOFTWAREÚCREATINGÚENABLINGÚENABLEDÚ	DISABLINGÚDISABLEDÚDELETINGÚDELETEDÚPENDING_DELETIONÚSCHEDULING_DELETIONÚCANCELLING_DELETIONÚUPDATINGÚBACKUP_IN_PROGRESSÚ	RESTORINGc                 K   sª   ddddddddddddddddœ| _ d	d
ddddddddddddddœ| _d| _d| _d| _d| _d| _d| _d| _d| _	d| _
d| _d| _d| _d| _d| _d| _dS )a|  
        Initializes a new Key object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param compartment_id:
            The value to assign to the compartment_id property of this Key.
        :type compartment_id: str

        :param current_key_version:
            The value to assign to the current_key_version property of this Key.
        :type current_key_version: str

        :param defined_tags:
            The value to assign to the defined_tags property of this Key.
        :type defined_tags: dict(str, dict(str, object))

        :param display_name:
            The value to assign to the display_name property of this Key.
        :type display_name: str

        :param freeform_tags:
            The value to assign to the freeform_tags property of this Key.
        :type freeform_tags: dict(str, str)

        :param id:
            The value to assign to the id property of this Key.
        :type id: str

        :param key_shape:
            The value to assign to the key_shape property of this Key.
        :type key_shape: oci.key_management.models.KeyShape

        :param protection_mode:
            The value to assign to the protection_mode property of this Key.
            Allowed values for this property are: "HSM", "SOFTWARE", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type protection_mode: str

        :param lifecycle_state:
            The value to assign to the lifecycle_state property of this Key.
            Allowed values for this property are: "CREATING", "ENABLING", "ENABLED", "DISABLING", "DISABLED", "DELETING", "DELETED", "PENDING_DELETION", "SCHEDULING_DELETION", "CANCELLING_DELETION", "UPDATING", "BACKUP_IN_PROGRESS", "RESTORING", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type lifecycle_state: str

        :param time_created:
            The value to assign to the time_created property of this Key.
        :type time_created: datetime

        :param time_of_deletion:
            The value to assign to the time_of_deletion property of this Key.
        :type time_of_deletion: datetime

        :param vault_id:
            The value to assign to the vault_id property of this Key.
        :type vault_id: str

        :param restored_from_key_id:
            The value to assign to the restored_from_key_id property of this Key.
        :type restored_from_key_id: str

        :param replica_details:
            The value to assign to the replica_details property of this Key.
        :type replica_details: oci.key_management.models.KeyReplicaDetails

        :param is_primary:
            The value to assign to the is_primary property of this Key.
        :type is_primary: bool

        Ústrzdict(str, dict(str, object))zdict(str, str)ZKeyShapeÚdatetimeZKeyReplicaDetailsÚbool)Úcompartment_idÚcurrent_key_versionÚdefined_tagsÚdisplay_nameÚfreeform_tagsÚidÚ	key_shapeÚprotection_modeÚlifecycle_stateÚtime_createdÚtime_of_deletionÚvault_idÚrestored_from_key_idÚreplica_detailsÚ
is_primaryZcompartmentIdZcurrentKeyVersionZdefinedTagsZdisplayNameZfreeformTagsr   ZkeyShapeZprotectionModeZlifecycleStateZtimeCreatedZtimeOfDeletionZvaultIdZrestoredFromKeyIdZreplicaDetailsZ	isPrimaryN)Zswagger_typesZattribute_mapÚ_compartment_idÚ_current_key_versionÚ_defined_tagsÚ_display_nameÚ_freeform_tagsÚ_idÚ
_key_shapeÚ_protection_modeÚ_lifecycle_stateÚ_time_createdÚ_time_of_deletionÚ	_vault_idÚ_restored_from_key_idÚ_replica_detailsÚ_is_primary)ÚselfÚkwargs© r9   úAusr/lib/python3.10/site-packages/oci/key_management/models/key.pyÚ__init__N   s^   Gññ
zKey.__init__c                 C   ó   | j S )zÚ
        **[Required]** Gets the compartment_id of this Key.
        The OCID of the compartment that contains this master encryption key.


        :return: The compartment_id of this Key.
        :rtype: str
        ©r(   ©r7   r9   r9   r:   r   È   ó   
zKey.compartment_idc                 C   ó
   || _ dS )zØ
        Sets the compartment_id of this Key.
        The OCID of the compartment that contains this master encryption key.


        :param compartment_id: The compartment_id of this Key.
        :type: str
        Nr=   )r7   r   r9   r9   r:   r   Ô   ó   

c                 C   r<   )aù  
        **[Required]** Gets the current_key_version of this Key.
        The OCID of the key version used in cryptographic operations. During key rotation, the service might be
        in a transitional state where this or a newer key version are used intermittently. The `currentKeyVersion`
        property is updated when the service is guaranteed to use the new key version for all subsequent encryption operations.


        :return: The current_key_version of this Key.
        :rtype: str
        ©r)   r>   r9   r9   r:   r   à   s   zKey.current_key_versionc                 C   r@   )aü  
        Sets the current_key_version of this Key.
        The OCID of the key version used in cryptographic operations. During key rotation, the service might be
        in a transitional state where this or a newer key version are used intermittently. The `currentKeyVersion`
        property is updated when the service is guaranteed to use the new key version for all subsequent encryption operations.


        :param current_key_version: The current_key_version of this Key.
        :type: str
        NrB   )r7   r   r9   r9   r:   r   î   s   
c                 C   r<   )a­  
        Gets the defined_tags of this Key.
        Defined tags for this resource. Each key is predefined and scoped to a namespace.
        For more information, see `Resource Tags`__.
        Example: `{"Operations": {"CostCenter": "42"}}`

        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm


        :return: The defined_tags of this Key.
        :rtype: dict(str, dict(str, object))
        ©r*   r>   r9   r9   r:   r   ü   ó   zKey.defined_tagsc                 C   r@   )a¸  
        Sets the defined_tags of this Key.
        Defined tags for this resource. Each key is predefined and scoped to a namespace.
        For more information, see `Resource Tags`__.
        Example: `{"Operations": {"CostCenter": "42"}}`

        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm


        :param defined_tags: The defined_tags of this Key.
        :type: dict(str, dict(str, object))
        NrC   )r7   r   r9   r9   r:   r     ó   
c                 C   r<   )a  
        **[Required]** Gets the display_name of this Key.
        A user-friendly name for the key. It does not have to be unique, and it is changeable.
        Avoid entering confidential information.


        :return: The display_name of this Key.
        :rtype: str
        ©r+   r>   r9   r9   r:   r     s   zKey.display_namec                 C   r@   )a  
        Sets the display_name of this Key.
        A user-friendly name for the key. It does not have to be unique, and it is changeable.
        Avoid entering confidential information.


        :param display_name: The display_name of this Key.
        :type: str
        NrF   )r7   r   r9   r9   r:   r   )  s   
c                 C   r<   )a·  
        Gets the freeform_tags of this Key.
        Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
        For more information, see `Resource Tags`__.
        Example: `{"Department": "Finance"}`

        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm


        :return: The freeform_tags of this Key.
        :rtype: dict(str, str)
        ©r,   r>   r9   r9   r:   r   6  rD   zKey.freeform_tagsc                 C   r@   )aÃ  
        Sets the freeform_tags of this Key.
        Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
        For more information, see `Resource Tags`__.
        Example: `{"Department": "Finance"}`

        __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm


        :param freeform_tags: The freeform_tags of this Key.
        :type: dict(str, str)
        NrG   )r7   r   r9   r9   r:   r   F  rE   c                 C   r<   )z‘
        **[Required]** Gets the id of this Key.
        The OCID of the key.


        :return: The id of this Key.
        :rtype: str
        ©r-   r>   r9   r9   r:   r   V  r?   zKey.idc                 C   r@   )zƒ
        Sets the id of this Key.
        The OCID of the key.


        :param id: The id of this Key.
        :type: str
        NrH   )r7   r   r9   r9   r:   r   b  rA   c                 C   r<   )z 
        **[Required]** Gets the key_shape of this Key.

        :return: The key_shape of this Key.
        :rtype: oci.key_management.models.KeyShape
        ©r.   r>   r9   r9   r:   r   n  ó   zKey.key_shapec                 C   r@   )z™
        Sets the key_shape of this Key.

        :param key_shape: The key_shape of this Key.
        :type: oci.key_management.models.KeyShape
        NrI   )r7   r   r9   r9   r:   r   x  ó   
c                 C   r<   )aõ  
        Gets the protection_mode of this Key.
        The key's protection mode indicates how the key persists and where cryptographic operations that use the key are performed.
        A protection mode of `HSM` means that the key persists on a hardware security module (HSM) and all cryptographic operations are performed inside
        the HSM. A protection mode of `SOFTWARE` means that the key persists on the server, protected by the vault's RSA wrapping key which persists
        on the HSM. All cryptographic operations that use a key with a protection mode of `SOFTWARE` are performed on the server. By default,
        a key's protection mode is set to `HSM`. You can't change a key's protection mode after the key is created or imported.

        Allowed values for this property are: "HSM", "SOFTWARE", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The protection_mode of this Key.
        :rtype: str
        )r/   r>   r9   r9   r:   r    ‚  s   zKey.protection_modec                 C   s    ddg}t ||ƒsd}|| _dS )aM  
        Sets the protection_mode of this Key.
        The key's protection mode indicates how the key persists and where cryptographic operations that use the key are performed.
        A protection mode of `HSM` means that the key persists on a hardware security module (HSM) and all cryptographic operations are performed inside
        the HSM. A protection mode of `SOFTWARE` means that the key persists on the server, protected by the vault's RSA wrapping key which persists
        on the HSM. All cryptographic operations that use a key with a protection mode of `SOFTWARE` are performed on the server. By default,
        a key's protection mode is set to `HSM`. You can't change a key's protection mode after the key is created or imported.


        :param protection_mode: The protection_mode of this Key.
        :type: str
        r   r   ÚUNKNOWN_ENUM_VALUEN)r   r/   )r7   r    Úallowed_valuesr9   r9   r:   r    •  s   

c                 C   r<   )a<  
        **[Required]** Gets the lifecycle_state of this Key.
        The key's current lifecycle state.

        Example: `ENABLED`

        Allowed values for this property are: "CREATING", "ENABLING", "ENABLED", "DISABLING", "DISABLED", "DELETING", "DELETED", "PENDING_DELETION", "SCHEDULING_DELETION", "CANCELLING_DELETION", "UPDATING", "BACKUP_IN_PROGRESS", "RESTORING", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The lifecycle_state of this Key.
        :rtype: str
        )r0   r>   r9   r9   r:   r!   ¨  s   zKey.lifecycle_statec                 C   s    g d¢}t ||ƒsd}|| _dS )zÔ
        Sets the lifecycle_state of this Key.
        The key's current lifecycle state.

        Example: `ENABLED`


        :param lifecycle_state: The lifecycle_state of this Key.
        :type: str
        )r	   r
   r   r   r   r   r   r   r   r   r   r   r   rL   N)r   r0   )r7   r!   rM   r9   r9   r:   r!   ¹  s   

c                 C   r<   )aE  
        **[Required]** Gets the time_created of this Key.
        The date and time the key was created, expressed in `RFC 3339`__ timestamp format.

        Example: `2018-04-03T21:10:29.600Z`

        __ https://tools.ietf.org/html/rfc3339


        :return: The time_created of this Key.
        :rtype: datetime
        ©r1   r>   r9   r9   r:   r"   Ê  rD   zKey.time_createdc                 C   r@   )aA  
        Sets the time_created of this Key.
        The date and time the key was created, expressed in `RFC 3339`__ timestamp format.

        Example: `2018-04-03T21:10:29.600Z`

        __ https://tools.ietf.org/html/rfc3339


        :param time_created: The time_created of this Key.
        :type: datetime
        NrN   )r7   r"   r9   r9   r:   r"   Ú  rE   c                 C   r<   )aN  
        Gets the time_of_deletion of this Key.
        An optional property indicating when to delete the key, expressed in `RFC 3339`__ timestamp format.
        Example: `2019-04-03T21:10:29.600Z`

        __ https://tools.ietf.org/html/rfc3339


        :return: The time_of_deletion of this Key.
        :rtype: datetime
        ©r2   r>   r9   r9   r:   r#   ê  s   zKey.time_of_deletionc                 C   r@   )a]  
        Sets the time_of_deletion of this Key.
        An optional property indicating when to delete the key, expressed in `RFC 3339`__ timestamp format.
        Example: `2019-04-03T21:10:29.600Z`

        __ https://tools.ietf.org/html/rfc3339


        :param time_of_deletion: The time_of_deletion of this Key.
        :type: datetime
        NrO   )r7   r#   r9   r9   r:   r#   ù  s   
c                 C   r<   )z¶
        **[Required]** Gets the vault_id of this Key.
        The OCID of the vault that contains this key.


        :return: The vault_id of this Key.
        :rtype: str
        ©r3   r>   r9   r9   r:   r$     r?   zKey.vault_idc                 C   r@   )z®
        Sets the vault_id of this Key.
        The OCID of the vault that contains this key.


        :param vault_id: The vault_id of this Key.
        :type: str
        NrP   )r7   r$   r9   r9   r:   r$     rA   c                 C   r<   )zÇ
        Gets the restored_from_key_id of this Key.
        The OCID of the key from which this key was restored.


        :return: The restored_from_key_id of this Key.
        :rtype: str
        ©r4   r>   r9   r9   r:   r%      r?   zKey.restored_from_key_idc                 C   r@   )zÚ
        Sets the restored_from_key_id of this Key.
        The OCID of the key from which this key was restored.


        :param restored_from_key_id: The restored_from_key_id of this Key.
        :type: str
        NrQ   )r7   r%   r9   r9   r:   r%   ,  rA   c                 C   r<   )z¦
        Gets the replica_details of this Key.

        :return: The replica_details of this Key.
        :rtype: oci.key_management.models.KeyReplicaDetails
        ©r5   r>   r9   r9   r:   r&   8  rJ   zKey.replica_detailsc                 C   r@   )z´
        Sets the replica_details of this Key.

        :param replica_details: The replica_details of this Key.
        :type: oci.key_management.models.KeyReplicaDetails
        NrR   )r7   r&   r9   r9   r:   r&   B  rK   c                 C   r<   )zu
        Gets the is_primary of this Key.

        :return: The is_primary of this Key.
        :rtype: bool
        ©r6   r>   r9   r9   r:   r'   L  rJ   zKey.is_primaryc                 C   r@   )z~
        Sets the is_primary of this Key.

        :param is_primary: The is_primary of this Key.
        :type: bool
        NrS   )r7   r'   r9   r9   r:   r'   V  rK   c                 C   s   t | ƒS ©N)r   r>   r9   r9   r:   Ú__repr__`  s   zKey.__repr__c                 C   s   |d u rdS | j |j kS )NF)Ú__dict__©r7   Úotherr9   r9   r:   Ú__eq__c  s   z
Key.__eq__c                 C   s
   | |k S rT   r9   rW   r9   r9   r:   Ú__ne__i  s   
z
Key.__ne__N)(Ú__name__Ú
__module__Ú__qualname__Ú__doc__ZPROTECTION_MODE_HSMZPROTECTION_MODE_SOFTWAREZLIFECYCLE_STATE_CREATINGZLIFECYCLE_STATE_ENABLINGZLIFECYCLE_STATE_ENABLEDZLIFECYCLE_STATE_DISABLINGZLIFECYCLE_STATE_DISABLEDZLIFECYCLE_STATE_DELETINGZLIFECYCLE_STATE_DELETEDZ LIFECYCLE_STATE_PENDING_DELETIONZ#LIFECYCLE_STATE_SCHEDULING_DELETIONZ#LIFECYCLE_STATE_CANCELLING_DELETIONZLIFECYCLE_STATE_UPDATINGZ"LIFECYCLE_STATE_BACKUP_IN_PROGRESSZLIFECYCLE_STATE_RESTORINGr;   Úpropertyr   Úsetterr   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   rU   rY   rZ   r9   r9   r9   r:   r      s¢    z












	
	












	
	
	
	r   N)Zoci.utilr   r   r   Zoci.decoratorsr   Úobjectr   r9   r9   r9   r:   Ú<module>   s   