o
    ɶd3                     @   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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d"d# Zd$d% Zd&d' Zd(S ))SecretVersionzR
    The details of the secret version, excluding the contents of the secret.
    BASE64CURRENTPENDINGLATESTPREVIOUS
DEPRECATEDc              	   K   sd   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 SecretVersion object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

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

        :param name:
            The value to assign to the name property of this SecretVersion.
        :type name: str

        :param secret_id:
            The value to assign to the secret_id property of this SecretVersion.
        :type secret_id: str

        :param stages:
            The value to assign to the stages property of this SecretVersion.
            Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type stages: list[str]

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

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

        :param time_of_current_version_expiry:
            The value to assign to the time_of_current_version_expiry property of this SecretVersion.
        :type time_of_current_version_expiry: datetime

        :param version_number:
            The value to assign to the version_number property of this SecretVersion.
        :type version_number: int

        strz	list[str]datetimeint)content_typename	secret_idstagestime_createdtime_of_deletiontime_of_current_version_expiryversion_numberZcontentTyper   ZsecretIdr   ZtimeCreatedZtimeOfDeletionZtimeOfCurrentVersionExpiryZversionNumberN)
Zswagger_typesZattribute_map_content_type_name
_secret_id_stages_time_created_time_of_deletion_time_of_current_version_expiry_version_number)selfkwargs r"   Cusr/lib/python3.10/site-packages/oci/vault/models/secret_version.py__init__*   s4   +
zSecretVersion.__init__c                 C      | j S )a|  
        Gets the content_type of this SecretVersion.
        The content type of the secret version's secret contents.

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


        :return: The content_type of this SecretVersion.
        :rtype: str
        )r   r    r"   r"   r#   r   s      zSecretVersion.content_typec                 C   s   dg}t ||s
d}|| _dS )z
        Sets the content_type of this SecretVersion.
        The content type of the secret version's secret contents.


        :param content_type: The content_type of this SecretVersion.
        :type: str
        r   UNKNOWN_ENUM_VALUEN)r   r   )r    r   allowed_valuesr"   r"   r#   r      s   


c                 C   r%   )z
        Gets the name of this SecretVersion.
        The name of the secret version. A name is unique across versions of a secret.


        :return: The name of this SecretVersion.
        :rtype: str
        r   r&   r"   r"   r#   r         
zSecretVersion.namec                 C   
   || _ dS )z
        Sets the name of this SecretVersion.
        The name of the secret version. A name is unique across versions of a secret.


        :param name: The name of this SecretVersion.
        :type: str
        Nr*   )r    r   r"   r"   r#   r         

c                 C   r%   )z
        Gets the secret_id of this SecretVersion.
        The OCID of the secret.


        :return: The secret_id of this SecretVersion.
        :rtype: str
        r   r&   r"   r"   r#   r      r+   zSecretVersion.secret_idc                 C   r,   )z
        Sets the secret_id of this SecretVersion.
        The OCID of the secret.


        :param secret_id: The secret_id of this SecretVersion.
        :type: str
        Nr.   )r    r   r"   r"   r#   r      r-   c                 C   r%   )a  
        Gets the stages of this SecretVersion.
        A list of possible rotation states for the secret version. A secret version marked `CURRENT` is currently in use. A secret version
        marked `PENDING` is staged and available for use, but has not been applied on the target system and, therefore, has not been rotated
        into current, active use. The secret most recently uploaded to a vault is always marked `LATEST`. (The first version of a secret is
        always marked as both `CURRENT` and `LATEST`.) A secret version marked `PREVIOUS` is the secret version that was most recently marked
        `CURRENT`, before the last secret version rotation. A secret version marked `DEPRECATED` is neither current, pending, nor the previous
        one in use. Only secret versions marked `DEPRECATED` can be scheduled for deletion.

        Allowed values for items in this list are: "CURRENT", "PENDING", "LATEST", "PREVIOUS", "DEPRECATED", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The stages of this SecretVersion.
        :rtype: list[str]
        r   r&   r"   r"   r#   r      s   zSecretVersion.stagesc                    s0   g d |r fdd|D |dd< || _ dS )a  
        Sets the stages of this SecretVersion.
        A list of possible rotation states for the secret version. A secret version marked `CURRENT` is currently in use. A secret version
        marked `PENDING` is staged and available for use, but has not been applied on the target system and, therefore, has not been rotated
        into current, active use. The secret most recently uploaded to a vault is always marked `LATEST`. (The first version of a secret is
        always marked as both `CURRENT` and `LATEST`.) A secret version marked `PREVIOUS` is the secret version that was most recently marked
        `CURRENT`, before the last secret version rotation. A secret version marked `DEPRECATED` is neither current, pending, nor the previous
        one in use. Only secret versions marked `DEPRECATED` can be scheduled for deletion.


        :param stages: The stages of this SecretVersion.
        :type: list[str]
        )r   r	   r
   r   r   c                    s   g | ]}t | sd n|qS )r(   )r   ).0xr)   r"   r#   
<listcomp>   s    z(SecretVersion.stages.<locals>.<listcomp>Nr/   )r    r   r"   r2   r#   r      s   
c                 C   r%   )af  
        Gets the time_created of this SecretVersion.
        A optional property indicating when the secret version was created, expressed in `RFC 3339`__ timestamp format.
        Example: `2019-04-03T21:10:29.600Z`

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


        :return: The time_created of this SecretVersion.
        :rtype: datetime
        r   r&   r"   r"   r#   r      r'   zSecretVersion.time_createdc                 C   r,   )aq  
        Sets the time_created of this SecretVersion.
        A optional property indicating when the secret version was created, expressed in `RFC 3339`__ timestamp format.
        Example: `2019-04-03T21:10:29.600Z`

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


        :param time_created: The time_created of this SecretVersion.
        :type: datetime
        Nr4   )r    r   r"   r"   r#   r         
c                 C   r%   )am  
        Gets the time_of_deletion of this SecretVersion.
        An optional property indicating when to delete the secret version, 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 SecretVersion.
        :rtype: datetime
        r   r&   r"   r"   r#   r     r'   zSecretVersion.time_of_deletionc                 C   r,   )a|  
        Sets the time_of_deletion of this SecretVersion.
        An optional property indicating when to delete the secret version, 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 SecretVersion.
        :type: datetime
        Nr6   )r    r   r"   r"   r#   r     r5   c                 C   r%   )a  
        Gets the time_of_current_version_expiry of this SecretVersion.
        An optional property indicating when the current secret version will expire, expressed in `RFC 3339`__ timestamp format.
        Example: `2019-04-03T21:10:29.600Z`

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


        :return: The time_of_current_version_expiry of this SecretVersion.
        :rtype: datetime
        r   r&   r"   r"   r#   r   %  r'   z,SecretVersion.time_of_current_version_expiryc                 C   r,   )a  
        Sets the time_of_current_version_expiry of this SecretVersion.
        An optional property indicating when the current secret version will expire, expressed in `RFC 3339`__ timestamp format.
        Example: `2019-04-03T21:10:29.600Z`

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


        :param time_of_current_version_expiry: The time_of_current_version_expiry of this SecretVersion.
        :type: datetime
        Nr7   )r    r   r"   r"   r#   r   4  r5   c                 C   r%   )z
        Gets the version_number of this SecretVersion.
        The version number of the secret.


        :return: The version_number of this SecretVersion.
        :rtype: int
        r   r&   r"   r"   r#   r   C  r+   zSecretVersion.version_numberc                 C   r,   )z
        Sets the version_number of this SecretVersion.
        The version number of the secret.


        :param version_number: The version_number of this SecretVersion.
        :type: int
        Nr8   )r    r   r"   r"   r#   r   O  r-   c                 C   s   t | S N)r   r&   r"   r"   r#   __repr__[  s   zSecretVersion.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r    otherr"   r"   r#   __eq__^  s   zSecretVersion.__eq__c                 C   s
   | |k S r9   r"   r<   r"   r"   r#   __ne__d  s   
zSecretVersion.__ne__N)__name__
__module____qualname____doc__ZCONTENT_TYPE_BASE64ZSTAGES_CURRENTZSTAGES_PENDINGZSTAGES_LATESTZSTAGES_PREVIOUSZSTAGES_DEPRECATEDr$   propertyr   setterr   r   r   r   r   r   r   r:   r>   r?   r"   r"   r"   r#   r      sX    I















r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r"   r"   r"   r#   <module>   s   