o
    ɶdC                     @   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
d Ze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d+d* Zed,d- Zejd.d- Zed/d0 Zejd1d0 Zd2d3 Zd4d5 Zd6d7 Zd8S )9CertificateBundlez
    The contents of the certificate, properties of the certificate (and certificate version), and user-provided contextual metadata for the certificate.
    CERTIFICATE_CONTENT_PUBLIC_ONLY$CERTIFICATE_CONTENT_WITH_PRIVATE_KEYCURRENTPENDINGLATESTPREVIOUS
DEPRECATEDFAILEDc                 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S )a  
        Initializes a new CertificateBundle 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.certificates.models.CertificateBundlePublicOnly`
        * :class:`~oci.certificates.models.CertificateBundleWithPrivateKey`

        The following keyword arguments are supported (corresponding to the getters/setters of this class):

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

        :param certificate_id:
            The value to assign to the certificate_id property of this CertificateBundle.
        :type certificate_id: str

        :param certificate_name:
            The value to assign to the certificate_name property of this CertificateBundle.
        :type certificate_name: str

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

        :param serial_number:
            The value to assign to the serial_number property of this CertificateBundle.
        :type serial_number: str

        :param certificate_pem:
            The value to assign to the certificate_pem property of this CertificateBundle.
        :type certificate_pem: str

        :param cert_chain_pem:
            The value to assign to the cert_chain_pem property of this CertificateBundle.
        :type cert_chain_pem: str

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

        :param validity:
            The value to assign to the validity property of this CertificateBundle.
        :type validity: oci.certificates.models.Validity

        :param version_name:
            The value to assign to the version_name property of this CertificateBundle.
        :type version_name: str

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

        :param revocation_status:
            The value to assign to the revocation_status property of this CertificateBundle.
        :type revocation_status: oci.certificates.models.RevocationStatus

        strintdatetimeZValidityz	list[str]ZRevocationStatus)certificate_bundle_typecertificate_idcertificate_nameversion_numberserial_numbercertificate_pemcert_chain_pemtime_createdvalidityversion_namestagesrevocation_statuscertificateBundleTypeZcertificateIdZcertificateNameZversionNumberZserialNumberZcertificatePemZcertChainPemZtimeCreatedr   ZversionNamer   ZrevocationStatusN)Zswagger_typesZattribute_map_certificate_bundle_type_certificate_id_certificate_name_version_number_serial_number_certificate_pem_cert_chain_pem_time_created	_validity_version_name_stages_revocation_status)selfkwargs r-   Nusr/lib/python3.10/site-packages/oci/certificates/models/certificate_bundle.py__init__2   sL   @
zCertificateBundle.__init__c                 C   s$   | d }|dkr
dS |dkrdS 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   ZCertificateBundlePublicOnlyr   ZCertificateBundleWithPrivateKeyr   r-   )Zobject_dictionarytyper-   r-   r.   get_subtype   s   zCertificateBundle.get_subtypec                 C      | j S )a  
        **[Required]** Gets the certificate_bundle_type of this CertificateBundle.
        The type of certificate bundle, which indicates whether the private key fields are included.

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


        :return: The certificate_bundle_type of this CertificateBundle.
        :rtype: str
        )r   r+   r-   r-   r.   r         z)CertificateBundle.certificate_bundle_typec                 C   s    ddg}t ||sd}|| _dS )a&  
        Sets the certificate_bundle_type of this CertificateBundle.
        The type of certificate bundle, which indicates whether the private key fields are included.


        :param certificate_bundle_type: The certificate_bundle_type of this CertificateBundle.
        :type: str
        r   r   UNKNOWN_ENUM_VALUEN)r   r   )r+   r   allowed_valuesr-   r-   r.   r      s   


c                 C   r2   )z
        **[Required]** Gets the certificate_id of this CertificateBundle.
        The OCID of the certificate.


        :return: The certificate_id of this CertificateBundle.
        :rtype: str
        r    r3   r-   r-   r.   r         
z CertificateBundle.certificate_idc                 C   
   || _ dS )z
        Sets the certificate_id of this CertificateBundle.
        The OCID of the certificate.


        :param certificate_id: The certificate_id of this CertificateBundle.
        :type: str
        Nr7   )r+   r   r-   r-   r.   r         

c                 C   r2   )z
        **[Required]** Gets the certificate_name of this CertificateBundle.
        The name of the certificate.


        :return: The certificate_name of this CertificateBundle.
        :rtype: str
        r!   r3   r-   r-   r.   r      r8   z"CertificateBundle.certificate_namec                 C   r9   )z
        Sets the certificate_name of this CertificateBundle.
        The name of the certificate.


        :param certificate_name: The certificate_name of this CertificateBundle.
        :type: str
        Nr;   )r+   r   r-   r-   r.   r      r:   c                 C   r2   )z
        **[Required]** Gets the version_number of this CertificateBundle.
        The version number of the certificate.


        :return: The version_number of this CertificateBundle.
        :rtype: int
        r"   r3   r-   r-   r.   r      r8   z CertificateBundle.version_numberc                 C   r9   )z
        Sets the version_number of this CertificateBundle.
        The version number of the certificate.


        :param version_number: The version_number of this CertificateBundle.
        :type: int
        Nr<   )r+   r   r-   r-   r.   r     r:   c                 C   r2   )aO  
        **[Required]** Gets the serial_number of this CertificateBundle.
        A unique certificate identifier used in certificate revocation tracking, formatted as octets.
        Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF`


        :return: The serial_number of this CertificateBundle.
        :rtype: str
        r#   r3   r-   r-   r.   r     s   zCertificateBundle.serial_numberc                 C   r9   )aL  
        Sets the serial_number of this CertificateBundle.
        A unique certificate identifier used in certificate revocation tracking, formatted as octets.
        Example: `03 AC FC FA CC B3 CB 02 B8 F8 DE F5 85 E7 7B FF`


        :param serial_number: The serial_number of this CertificateBundle.
        :type: str
        Nr=   )r+   r   r-   r-   r.   r     s   
c                 C   r2   )z
        Gets the certificate_pem of this CertificateBundle.
        The certificate in PEM format.


        :return: The certificate_pem of this CertificateBundle.
        :rtype: str
        r$   r3   r-   r-   r.   r   ,  r8   z!CertificateBundle.certificate_pemc                 C   r9   )z
        Sets the certificate_pem of this CertificateBundle.
        The certificate in PEM format.


        :param certificate_pem: The certificate_pem of this CertificateBundle.
        :type: str
        Nr>   )r+   r   r-   r-   r.   r   8  r:   c                 C   r2   )z
        Gets the cert_chain_pem of this CertificateBundle.
        The certificate chain (in PEM format) for the certificate bundle.


        :return: The cert_chain_pem of this CertificateBundle.
        :rtype: str
        r%   r3   r-   r-   r.   r   D  r8   z CertificateBundle.cert_chain_pemc                 C   r9   )z
        Sets the cert_chain_pem of this CertificateBundle.
        The certificate chain (in PEM format) for the certificate bundle.


        :param cert_chain_pem: The cert_chain_pem of this CertificateBundle.
        :type: str
        Nr?   )r+   r   r-   r-   r.   r   P  r:   c                 C   r2   )a  
        **[Required]** Gets the time_created of this CertificateBundle.
        An optional property indicating when the certificate 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 CertificateBundle.
        :rtype: datetime
        r&   r3   r-   r-   r.   r   \  r4   zCertificateBundle.time_createdc                 C   r9   )a  
        Sets the time_created of this CertificateBundle.
        An optional property indicating when the certificate 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 CertificateBundle.
        :type: datetime
        Nr@   )r+   r   r-   r-   r.   r   k  s   
c                 C   r2   )z
        **[Required]** Gets the validity of this CertificateBundle.

        :return: The validity of this CertificateBundle.
        :rtype: oci.certificates.models.Validity
        r'   r3   r-   r-   r.   r   z     zCertificateBundle.validityc                 C   r9   )z
        Sets the validity of this CertificateBundle.

        :param validity: The validity of this CertificateBundle.
        :type: oci.certificates.models.Validity
        NrA   )r+   r   r-   r-   r.   r        
c                 C   r2   )z
        Gets the version_name of this CertificateBundle.
        The name of the certificate version.


        :return: The version_name of this CertificateBundle.
        :rtype: str
        r(   r3   r-   r-   r.   r     r8   zCertificateBundle.version_namec                 C   r9   )z
        Sets the version_name of this CertificateBundle.
        The name of the certificate version.


        :param version_name: The version_name of this CertificateBundle.
        :type: str
        NrD   )r+   r   r-   r-   r.   r     r:   c                 C   r2   )a  
        **[Required]** Gets the stages of this CertificateBundle.
        A list of rotation states for the certificate bundle.

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


        :return: The stages of this CertificateBundle.
        :rtype: list[str]
        r)   r3   r-   r-   r.   r     r4   zCertificateBundle.stagesc                    s0   g d |r fdd|D |dd< || _ dS )z
        Sets the stages of this CertificateBundle.
        A list of rotation states for the certificate bundle.


        :param stages: The stages of this CertificateBundle.
        :type: list[str]
        )r	   r
   r   r   r   r   c                    s   g | ]}t | sd n|qS )r5   )r   ).0xr6   r-   r.   
<listcomp>  s    z,CertificateBundle.stages.<locals>.<listcomp>NrE   )r+   r   r-   rH   r.   r     s   

c                 C   r2   )z
        Gets the revocation_status of this CertificateBundle.

        :return: The revocation_status of this CertificateBundle.
        :rtype: oci.certificates.models.RevocationStatus
        r*   r3   r-   r-   r.   r     rB   z#CertificateBundle.revocation_statusc                 C   r9   )z
        Sets the revocation_status of this CertificateBundle.

        :param revocation_status: The revocation_status of this CertificateBundle.
        :type: oci.certificates.models.RevocationStatus
        NrJ   )r+   r   r-   r-   r.   r     rC   c                 C   s   t | S N)r   r3   r-   r-   r.   __repr__  s   zCertificateBundle.__repr__c                 C   s   |d u rdS | j |j kS )NF)__dict__r+   otherr-   r-   r.   __eq__  s   zCertificateBundle.__eq__c                 C   s
   | |k S rK   r-   rN   r-   r-   r.   __ne__  s   
zCertificateBundle.__ne__N) __name__
__module____qualname____doc__Z7CERTIFICATE_BUNDLE_TYPE_CERTIFICATE_CONTENT_PUBLIC_ONLYZ<CERTIFICATE_BUNDLE_TYPE_CERTIFICATE_CONTENT_WITH_PRIVATE_KEYZSTAGES_CURRENTZSTAGES_PENDINGZSTAGES_LATESTZSTAGES_PREVIOUSZSTAGES_DEPRECATEDZSTAGES_FAILEDr/   staticmethodr1   propertyr   setterr   r   r   r   r   r   r   r   r   r   r   rL   rP   rQ   r-   r-   r-   r.   r      s    j

















	
	




	
	r   N)Zoci.utilr   r   r   Zoci.decoratorsr   objectr   r-   r-   r-   r.   <module>   s   