
    ܖi                        d Z ddlmZ ddlmZ ddlmZ ddlmZmZ ddl	Z
ddlmZ dd	lmZ dd
lmZmZ ddlmZmZ ddlmZ e
j0                   G d dee             Ze
j0                   G d dee             Ze
j0                   G d dee             Ze
j0                   G d dee             Ze
j0                   G d dee             Ze
j0                   G d dee             Ze
j0                   G d dee             Z e
j0                   G d dee             Z! e
jD                  d       G d  d!             Z# e
jD                  d       G d" d#             Z$e
j0                   G d$ d%ee             Z%e
j0                   G d& d'ee             Z& e
jD                  d       G d( d)             Z' e
jD                  d       G d* d+             Z(e
j0                   G d, d-ee             Z) e
jD                  d       G d. d/             Z* e
jD                  d       G d0 d1             Z+ e
jD                  d       G d2 d3             Z, e
jD                  d       G d4 d5             Z-y)6z
This set of classes represents cryptoPropertiesType Complex Type in the CycloneDX standard.

.. note::
    Introduced in CycloneDX v1.6

.. note::
    See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    )Iterable)datetime)Enum)AnyOptionalN)	SortedSet   )ComparableTuple)(InvalidNistQuantumSecurityLevelException)InvalidRelatedCryptoMaterialSizeException)SchemaVersion1Dot6SchemaVersion1Dot7   )BomRefc                        e Zd ZdZdZdZdZdZy)CryptoAssetTypea,  
    This is our internal representation of the cryptoPropertiesType.assetType ENUM type within the CycloneDX standard.

    .. note::
        Introduced in CycloneDX v1.6

    .. note::
        See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    	algorithmcertificateprotocolzrelated-crypto-materialN)__name__
__module____qualname____doc__	ALGORITHMCERTIFICATEPROTOCOLRELATED_CRYPTO_MATERIAL     Z/var/www/html/content-pipeline/venv/lib/python3.12/site-packages/cyclonedx/model/crypto.pyr   r   *   s     IKH7r   r   c                   L    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y)CryptoPrimitiveaD  
    This is our internal representation of the cryptoPropertiesType.algorithmProperties.primitive ENUM type within the
    CycloneDX standard.

    .. note::
        Introduced in CycloneDX v1.6

    .. note::
        See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    aezblock-ciphercombinerdrbghashkdfkemz	key-agreemacpke	signaturezstream-cipherxofotherunknownN)r   r   r   r   AEBLOCK_CIPHERCOMBINERDRBGHASHKDFKEM	KEY_AGREEMACPKE	SIGNATURESTREAM_CIPHERXOFOTHERUNKNOWNr   r   r    r"   r"   <   sT    	 
B!LHDD
C
CI
C
CI#M
CEGr   r"   c                   (    e Zd ZdZdZdZdZdZdZdZ	y)	CryptoExecutionEnvironmentaO  
    This is our internal representation of the cryptoPropertiesType.algorithmProperties.executionEnvironment ENUM type
    within the CycloneDX standard.

    .. note::
        Introduced in CycloneDX v1.6

    .. note::
        See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    hardwarezsoftware-encrypted-ramzsoftware-plain-ramzsoftware-teer-   r.   N)
r   r   r   r   HARDWARESOFTWARE_ENCRYPTED_RAMSOFTWARE_PLAIN_RAMSOFTWARE_TEEr<   r=   r   r   r    r?   r?   [   s)    	 H5-!LEGr   r?   c                   H    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y)CryptoImplementationPlatformaQ  
    This is our internal representation of the cryptoPropertiesType.algorithmProperties.implementationPlatform ENUM type
    within the CycloneDX standard.

    .. note::
        Introduced in CycloneDX v1.6

    .. note::
        See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    zarmv7-azarmv7-mzarmv8-azarmv8-mzarmv9-azarmv9-mgenericppc64ppc64les390xx86_32x86_64r-   r.   N)r   r   r   r   ARMV7_AARMV7_MARMV8_AARMV8_MARMV9_AARMV9_MGENERICPPC64PPC64LES390XX86_32X86_64r<   r=   r   r   r    rF   rF   q   sO    	 GGGGGGGEGEFFEGr   rF   c                       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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 y) CryptoCertificationLevelaM  
    This is our internal representation of the cryptoPropertiesType.algorithmProperties.certificationLevel ENUM type
    within the CycloneDX standard.

    .. note::
        Introduced in CycloneDX v1.6

    .. note::
        See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    nonezfips140-1-l1zfips140-1-l2zfips140-1-l3zfips140-1-l4zfips140-2-l1zfips140-2-l2zfips140-2-l3zfips140-2-l4zfips140-3-l1zfips140-3-l2zfips140-3-l3zfips140-3-l4zcc-eal1zcc-eal1+zcc-eal2zcc-eal2+zcc-eal3zcc-eal3+zcc-eal4zcc-eal4+zcc-eal5zcc-eal5+zcc-eal6zcc-eal6+zcc-eal7zcc-eal7+r-   r.   N)!r   r   r   r   NONEFIPS140_1_L1FIPS140_1_L2FIPS140_1_L3FIPS140_1_L4FIPS140_2_L1FIPS140_2_L2FIPS140_2_L3FIPS140_2_L4FIPS140_3_L1FIPS140_3_L2FIPS140_3_L3FIPS140_3_L4CC_EAL1CC_EAL1_PLUSCC_EAL2CC_EAL2_PLUSCC_EAL3CC_EAL3_PLUSCC_EAL4CC_EAL4_PLUSCC_EAL5CC_EAL5_PLUSCC_EAL6CC_EAL6_PLUSCC_EAL7CC_EAL7_PLUSr<   r=   r   r   r    rZ   rZ      s    	 D!L!L!L!L!L!L!L!L!L!L!L!LGLGLGLGLGLGLGLEGr   rZ   c                   4    e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zd
Zy)
CryptoModea?  
    This is our internal representation of the cryptoPropertiesType.algorithmProperties.mode ENUM type
    within the CycloneDX standard.

    .. note::
        Introduced in CycloneDX v1.6

    .. note::
        See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    cbcccmcfbctrecbgcmofbr-   r.   N)r   r   r   r   CBCCCMCFBCTRECBGCMOFBr<   r=   r   r   r    rx   rx      s6    	 C
C
C
C
C
C
CEGr   rx   c                   ,    e Zd ZdZdZdZdZdZdZdZ	dZ
y	)
CryptoPaddingaB  
    This is our internal representation of the cryptoPropertiesType.algorithmProperties.padding ENUM type
    within the CycloneDX standard.

    .. note::
        Introduced in CycloneDX v1.6

    .. note::
        See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    pkcs5pkcs7pkcs1v15oaeprawr-   r.   N)r   r   r   r   PKCS5PKCS7PKCS1V15OAEPRAWr<   r=   r   r   r    r   r      s,    	 EEHD
CEGr   r   c                   D    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y)CryptoFunctionaY  
    This is our internal representation of the cryptoPropertiesType.algorithmProperties.cryptoFunctions.cryptoFunction
    ENUM type within the CycloneDX standard.

    .. note::
        Introduced in CycloneDX v1.6

    .. note::
        See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    decapsulatedecryptdigestencapsulateencryptgenerate	keyderivekeygensigntagverifyr-   r.   N)r   r   r   r   DECAPSULATEDECRYPTDIGESTENCAPSULATEENCRYPTGENERATE	KEYDERIVEKEYGENSIGNTAGVERIFYr<   r=   r   r   r    r   r      sJ    	  KGFKGHIFD
CFEGr   r   T)%ignore_unknown_during_deserializationc                   H   e Zd ZdZdddddddddddddee   dee   dee   dee   dee   d	ee	e
      d
ee   dee   dee	e      dee   dee   ddfdZe ej$                  d      dee   fd              Zej(                  dee   ddfd       Ze ej$                  d      dee   fd              Zej(                  dee   ddfd       Ze ej$                  d      dee   fd              Zej(                  dee   ddfd       Ze ej$                  d      dee   fd              Zej(                  dee   ddfd       Ze ej$                  d      dee   fd              Zej(                  dee   ddfd       Ze ej2                  d       ej4                  e       ej4                  e       ej:                  ej<                  j>                  d        ej$                  d!      d:d"                                          Z e j(                  d	e	e
   ddfd#       Z e ej$                  d$      dee   fd%              Z!e!j(                  d
ee   ddfd&       Z!e ej$                  d'      dee   fd(              Z"e"j(                  dee   ddfd)       Z"e ej:                  ej<                  jF                  d*        ej$                  d+      d;d,                     Z$e$j(                  de	e   ddfd-       Z$e ej$                  d.      dee   fd/              Z%e%j(                  dee   ddfd0       Z%e ej$                  d1      dee   fd2              Z&e&j(                  dee   ddfd3       Z&de'fd4Z(d5e)de*fd6Z+d5e)de*fd7Z,defd8Z-defd9Z.y)<AlgorithmPropertiesa:  
    This is our internal representation of the cryptoPropertiesType.algorithmProperties ENUM type within the CycloneDX
    standard.

    .. note::
        Introduced in CycloneDX v1.6

    .. note::
        See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    N	primitiveparameter_set_identifiercurveexecution_environmentimplementation_platformcertification_levelsmodepaddingcrypto_functionsclassical_security_levelnist_quantum_security_levelr   r   r   r   r   r   r   r   r   r   r   returnc                    || _         || _        || _        || _        || _        |xs g | _        || _        || _        |	xs g | _        |
| _	        || _
        y Nr   )selfr   r   r   r   r   r   r   r   r   r   r   s               r    __init__zAlgorithmProperties.__init__  sb     #(@%
%:"'>$$8$>B!	 0 6B(@%+F(r   r   c                     | j                   S )aY  
        Cryptographic building blocks used in higher-level cryptographic systems and protocols.

        Primitives represent different cryptographic routines: deterministic random bit generators (drbg, e.g. CTR_DRBG
        from NIST SP800-90A-r1), message authentication codes (mac, e.g. HMAC-SHA-256), blockciphers (e.g. AES),
        streamciphers (e.g. Salsa20), signatures (e.g. ECDSA), hash functions (e.g. SHA-256),
        public-key encryption schemes (pke, e.g. RSA), extended output functions (xof, e.g. SHAKE256),
        key derivation functions (e.g. pbkdf2), key agreement algorithms (e.g. ECDH),
        key encapsulation mechanisms (e.g. ML-KEM), authenticated encryption (ae, e.g. AES-GCM) and the combination of
        multiple algorithms (combiner, e.g. SP800-56Cr2).

        Returns:
            `CryptoPrimitive` or `None`
        
_primitiver   s    r    r   zAlgorithmProperties.primitive1  s    " r   c                     || _         y r   r   )r   r   s     r    r   zAlgorithmProperties.primitiveD  	    #r   r	   c                     | j                   S )a  
        An identifier for the parameter set of the cryptographic algorithm. Examples: in AES128, '128' identifies the
        key length in bits, in SHA256, '256' identifies the digest length, '128' in SHAKE128 identifies its maximum
        security level in bits, and 'SHA2-128s' identifies a parameter set used in SLH-DSA (FIPS205).

        Returns:
            `str` or `None`
        _parameter_set_identifierr   s    r    r   z,AlgorithmProperties.parameter_set_identifierH  s     ---r   c                     || _         y r   r   )r   r   s     r    r   z,AlgorithmProperties.parameter_set_identifierU  
    )A&r      c                     | j                   S )a  
        The specific underlying Elliptic Curve (EC) definition employed which is an indicator of the level of security
        strength, performance and complexity. Absent an authoritative source of curve names, CycloneDX recommends use
        of curve names as defined at https://neuromancer.sk/std/, the source from which can be found at
        https://github.com/J08nY/std-curves.

        Returns:
            `str` or `None`
        _curver   s    r    r   zAlgorithmProperties.curveY  s     {{r   c                     || _         y r   r   )r   r   s     r    r   zAlgorithmProperties.curveg  	    r      c                     | j                   S )z
        The target and execution environment in which the algorithm is implemented in.

        Returns:
             `CryptoExecutionEnvironment` or `None`
        _execution_environmentr   s    r    r   z)AlgorithmProperties.execution_environmentk       ***r   c                     || _         y r   r   )r   r   s     r    r   z)AlgorithmProperties.execution_environmentv  
    &;#r   c                     | j                   S )z
        The target platform for which the algorithm is implemented. The implementation can be 'generic', running on
        any platform or for a specific platform.

        Returns:
             `CryptoImplementationPlatform` or `None`
        _implementation_platformr   s    r    r   z+AlgorithmProperties.implementation_platformz       ,,,r   c                     || _         y r   r   )r   r   s     r    r   z+AlgorithmProperties.implementation_platform  
    (?%r   certificationLevel)
child_name   c                     | j                   S )a7  
        The certification that the implementation of the cryptographic algorithm has received, if any. Certifications
        include revisions and levels of FIPS 140 or Common Criteria of different Extended Assurance Levels (CC-EAL).

        Returns:
            `Iterable[CryptoCertificationLevel]`
        )_certification_levelsr   s    r    r   z(AlgorithmProperties.certification_levels  s     )))r   c                 $    t        |      | _        y r   )r   r   )r   r   s     r    r   z(AlgorithmProperties.certification_levels  s    %./C%D"r      c                     | j                   S )z
        The mode of operation in which the cryptographic algorithm (block cipher) is used.

        Returns:
             `CryptoMode` or `None`
        _moder   s    r    r   zAlgorithmProperties.mode       zzr   c                     || _         y r   r   )r   r   s     r    r   zAlgorithmProperties.mode  	    
r      c                     | j                   S )z
        The padding scheme that is used for the cryptographic algorithm.

        Returns:
             `CryptoPadding` or `None`
        _paddingr   s    r    r   zAlgorithmProperties.padding       }}r   c                     || _         y r   r   )r   r   s     r    r   zAlgorithmProperties.padding  	    r   cryptoFunction	   c                     | j                   S )z
        The cryptographic functions implemented by the cryptographic algorithm.

        Returns:
            `Iterable[CryptoFunction]`
        )_crypto_functionsr   s    r    r   z$AlgorithmProperties.crypto_functions       %%%r   c                 $    t        |      | _        y r   )r   r   )r   r   s     r    r   z$AlgorithmProperties.crypto_functions  s    !*+;!<r   
   c                     | j                   S )z
        The classical security level that a cryptographic algorithm provides (in bits).

        Returns:
            `int` or `None`
        _classical_security_levelr   s    r    r   z,AlgorithmProperties.classical_security_level  s     ---r   c                     || _         y r   r   )r   r   s     r    r   z,AlgorithmProperties.classical_security_level  r   r      c                     | j                   S )aU  
        The NIST security strength category as defined in
        https://csrc.nist.gov/projects/post-quantum-cryptography/post-quantum-cryptography-standardization/
        evaluation-criteria/security-(evaluation-criteria). A value of 0 indicates that none of the categories are met.

        Returns:
            `int` or `None`
        )_nist_quantum_security_levelr   s    r    r   z/AlgorithmProperties.nist_quantum_security_level  s     000r   c                 @    ||dk  s|dkD  rt        d      || _        y )Nr   r   z5NIST Quantum Security Level must be (0 <= value <= 6))r   r   )r   r   s     r    r   z/AlgorithmProperties.nist_quantum_security_level  s3    &2'!+*Q.:G  -H)r   c                 .   t        | j                  | j                  | j                  | j                  | j
                  t        | j                        | j                  | j                  t        | j                        | j                  | j                  f      S r   )_ComparableTupler   r   r   r   r   r   r   r   r   r   r   r   s    r    __comparable_tuplez&AlgorithmProperties.__comparable_tuple  sy    NND::DJJHbHb((*:4;T;T*UW[W`W`bfbnbnT223T5R5RTXTtTt!
  	r   r-   c                 f    t        |t              r!| j                         |j                         k(  S yNF)
isinstancer   &_AlgorithmProperties__comparable_tupler   r-   s     r    __eq__zAlgorithmProperties.__eq__  -    e01**,0H0H0JJJr   c                 p    t        |t              r!| j                         |j                         k  S t        S r   )r  r   r  NotImplementedr  s     r    __lt__zAlgorithmProperties.__lt__  0    e01**,u/G/G/IIIr   c                 4    t        | j                               S r   )r&   r  r   s    r    __hash__zAlgorithmProperties.__hash__      D++-..r   c                 <    d| j                    d| j                   dS )Nz<AlgorithmProperties primitive=z, execution_environment=>)r   r   r   s    r    __repr__zAlgorithmProperties.__repr__  s&    00@@XY]YsYsXttuvvr   )r   z#SortedSet[CryptoCertificationLevel])r   zSortedSet[CryptoFunction])/r   r   r   r   r   r"   strr?   rF   r   rZ   rx   r   r   intr   propertyserializablexml_sequencer   setterr   r   r   r   	json_nameviewr   r   	xml_arrayXmlArraySerializationTypeFLATr   r   r   NESTEDr   r   r   r  r  objectboolr  r  r  r  r   r   r    r   r   
  s   	 0426#FJJNMQ%)+/?C2659GO,G #+3-G }	G
  ((BCG "**F!GG 'x0H'IJG z"G -(G #8N#;<G #+3-G &.c]G 
G4 \q!8O4  " " $8O#< $ $ $ \q!	.(3- 	. " 	. $$B# BSW B %B \q!
x} 
 " 
 \\8C= T   \q!+x0J'K + " + !!<8D^;_ <dh < "< \q!-2N)O - " - ##@xHd?e @jn @ $@ \01\)*\)*\LBBGGThi\q!* " j + + 2 *   EBZ9[ E`d E !E \q!hz*  "  
[[*- $   \q!-0  "  ^^ x6  4     \LBBIIVfg\q!& " h & =.1I =d = = \r".(3- . # . $$B# BSW B %B \r"	1Xc] 	1 # 	1 !''HxPS} HY] H (H$4 F t 
F t 
/# /w# wr   r   c                      e Zd ZdZddddddddddee   dee   dee   dee   dee   d	ee   d
ee   dee   ddfdZe	 e
j                  d      dee   fd              Zej                  dee   ddfd       Ze	 e
j                  d      dee   fd              Zej                  dee   ddfd       Ze	 e
j                  e
j                   j"                         e
j                  d      dee   fd                     Zej                  dee   ddfd       Ze	 e
j                  e
j                   j"                         e
j                  d      dee   fd                     Zej                  dee   ddfd       Ze	 e
j                  e       e
j                  d      dee   fd                     Zej                  dee   ddfd       Ze	 e
j                  e       e
j                  d      dee   fd                     Zej                  d	ee   ddfd       Ze	 e
j                  d       dee   fd!              Zej                  d
ee   ddfd"       Ze	 e
j                  d#      dee   fd$              Zej                  dee   ddfd%       Zdefd&Zd'edefd(Zd'edefd)Zdefd*Zdefd+Z y),CertificatePropertiesa>  
    This is our internal representation of the `cryptoPropertiesType.certificateProperties` complex type within
    CycloneDX standard.

    .. note::
        Introduced in CycloneDX v1.6


    .. note::
        See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    Nsubject_nameissuer_namenot_valid_beforenot_valid_aftersignature_algorithm_refsubject_public_key_refcertificate_formatcertificate_extensionr%  r&  r'  r(  r)  r*  r+  r,  r   c                t    || _         || _        || _        || _        || _        || _        || _        || _        y r   r$  )	r   r%  r&  r'  r(  r)  r*  r+  r,  s	            r    r   zCertificateProperties.__init__  sD     )& 0.'>$&<#"4%:"r   r   c                     | j                   S )ze
        The subject name for the certificate.

        Returns:
            `str` or `None`
        _subject_namer   s    r    r%  z"CertificateProperties.subject_name-  s     !!!r   c                     || _         y r   r/  )r   r%  s     r    r%  z"CertificateProperties.subject_name8  s
    )r      c                     | j                   S )zd
        The issuer name for the certificate.

        Returns:
            `str` or `None`
        _issuer_namer   s    r    r&  z!CertificateProperties.issuer_name<  s        r   c                     || _         y r   r4  )r   r&  s     r    r&  z!CertificateProperties.issuer_nameG  
    'r      c                     | j                   S )z
        The date and time according to ISO-8601 standard from which the certificate is valid.

        Returns:
            `datetime` or `None`
        _not_valid_beforer   s    r    r'  z&CertificateProperties.not_valid_beforeK  r   r   c                     || _         y r   r:  )r   r'  s     r    r'  z&CertificateProperties.not_valid_beforeW  s
    !1r   (   c                     | j                   S )z
        The date and time according to ISO-8601 standard from which the certificate is not valid anymore.

        Returns:
            `datetime` or `None`
        _not_valid_afterr   s    r    r(  z%CertificateProperties.not_valid_after[       $$$r   c                     || _         y r   r?  )r   r(  s     r    r(  z%CertificateProperties.not_valid_afterg  
     /r   2   c                     | j                   S )z~
        The bom-ref to signature algorithm used by the certificate.

        Returns:
            `BomRef` or `None`
        _signature_algorithm_refr   s    r    r)  z-CertificateProperties.signature_algorithm_refk  r   r   c                     || _         y r   rF  )r   r)  s     r    r)  z-CertificateProperties.signature_algorithm_refw  r   r   <   c                     | j                   S )zp
        The bom-ref to the public key of the subject.

        Returns:
            `BomRef` or `None`
        _subject_public_key_refr   s    r    r*  z,CertificateProperties.subject_public_key_ref{  s     +++r   c                     || _         y r   rK  )r   r*  s     r    r*  z,CertificateProperties.subject_public_key_ref  
    '=$r   F   c                     | j                   S )z
        The format of the certificate. Examples include X.509, PEM, DER, and CVC.

        Returns:
            `str` or `None`
        _certificate_formatr   s    r    r+  z(CertificateProperties.certificate_format  s     '''r   c                     || _         y r   rQ  )r   r+  s     r    r+  z(CertificateProperties.certificate_format  s
    #5 r   P   c                     | j                   S )z
        The file extension of the certificate. Examples include crt, pem, cer, der, and p12.

        Returns:
            `str` or `None`
        _certificate_extensionr   s    r    r,  z+CertificateProperties.certificate_extension  r   r   c                     || _         y r   rV  )r   r,  s     r    r,  z+CertificateProperties.certificate_extension  r   r   c                     t        | j                  | j                  | j                  | j                  | j
                  | j                  f      S r   )r  r%  r&  r'  r(  r+  r,  r   s    r    r  z(CertificateProperties.__comparable_tuple  sF    t//1F1FH\H\##T%?%?!
  	r   r-   c                 f    t        |t              r!| j                         |j                         k(  S yr  )r  r#  (_CertificateProperties__comparable_tupler  s     r    r  zCertificateProperties.__eq__  s-    e23**,0H0H0JJJr   c                 p    t        |t              r!| j                         |j                         k  S t        S r   )r  r#  r[  r  r  s     r    r  zCertificateProperties.__lt__  s0    e23**,u/G/G/IIIr   c                 4    t        | j                               S r   )r&   r[  r   s    r    r  zCertificateProperties.__hash__  r  r   c                 <    d| j                    d| j                   dS )Nz$<CertificateProperties subject_name=z, certificate_format=r  )r%  r+  r   s    r    r  zCertificateProperties.__repr__  s(    5d6G6G5HH]^b^u^u]vvwxxr   )!r   r   r   r   r   r  r   r   r   r  r  r  r%  r  r&  type_mappinghelpersXsdDateTimer'  r(  r)  r*  r+  r,  r  r[  r   r!  r  r  r  r  r  r   r   r    r#  r#    sk   
 '+%)/3.24837,0/3;sm; c]; #8,	;
 "(+; "*&!1; !) 0; %SM;  (}; 
;( \r""hsm " # " *# *4 * * \r"!Xc] ! # ! (x} ( ( ( \|33??@\r"&(8"4 & # A & 2(1C 2 2 2 \|33??@\r"%(!3 % # A % 0x/A 0d 0 0 \v&\r"-&)9 - # ' - ##@x?O @TX @ $@ \v&\r",(8 , # ' , "">Xf=M >RV > #> \r"(HSM ( # ( 6Xc] 6t 6 6 \r"+x} + # + !!<8C= <T < "<$4 F t 
F t 
/# /y# yr   r#  c                   \    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ZdZdZdZy)RelatedCryptoMaterialTypeaK  
    This is our internal representation of the cryptoPropertiesType.relatedCryptoMaterialProperties.type ENUM type
    within the CycloneDX standard.

    .. note::
        Introduced in CycloneDX v1.6

    .. note::
        See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    zadditional-data
ciphertext
credentialr   zinitialization-vectorkeynoncepasswordzprivate-keyz
public-keysaltz
secret-keyseedzshared-secretr+   r   tokenr-   r.   N)r   r   r   r   ADDITIONAL_DATA
CIPHERTEXT
CREDENTIALr   INITIALIZATION_VECTORKEYNONCEPASSWORDPRIVATE_KEY
PUBLIC_KEYSALT
SECRET_KEYSEEDSHARED_SECRETr9   r   TOKENr<   r=   r   r   r    rc  rc    si    	 (OJJF3
CEHKJDJD#MI
CEEGr   rc  c                   (    e Zd ZdZdZdZdZdZdZdZ	y)	RelatedCryptoMaterialStateaL  
    This is our internal representation of the cryptoPropertiesType.relatedCryptoMaterialProperties.state ENUM type
    within the CycloneDX standard.

    .. note::
        Introduced in CycloneDX v1.6

    .. note::
        See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    activecompromiseddeactivated	destroyedzpre-activation	suspendedN)
r   r   r   r   ACTIVECOMPROMISEDDEACTIVATED	DESTROYEDPRE_ACTIVATION	SUSPENDEDr   r   r    r{  r{    s'    	 FKKI%NIr   r{  c                      e Zd ZdZddddee   dee   ddfdZe e	j                  d      dee   fd	              Zej                  dee   ddfd
       Ze e	j                  e       e	j                  d      dee   fd                     Zej                  dee   ddfd       ZdefdZdedefdZdedefdZdefdZdefdZy)RelatedCryptoMaterialSecuredByaR  
    This is our internal representation of the `cryptoPropertiesType.relatedCryptoMaterialProperties.securedBy` complex
    type within CycloneDX standard.

    .. note::
        Introduced in CycloneDX v1.6


    .. note::
        See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    N	mechanismalgorithm_refr  r  r   c                     || _         || _        y r   r  )r   r  r  s      r    r   z'RelatedCryptoMaterialSecuredBy.__init__  s    
 #*r   r   c                     | j                   S )z
        Specifies the mechanism by which the cryptographic asset is secured by.
        Examples include HSM, TPM, XGX, Software, and None.

        Returns:
            `str` or `None`
        
_mechanismr   s    r    r  z(RelatedCryptoMaterialSecuredBy.mechanism  s     r   c                     || _         y r   r  )r   r  s     r    r  z(RelatedCryptoMaterialSecuredBy.mechanism  r   r   r2  c                     | j                   S )z`
        The bom-ref to the algorithm.

        Returns:
            `BomRef` or `None`
        _algorithm_refr   s    r    r  z,RelatedCryptoMaterialSecuredBy.algorithm_ref       """r   c                     || _         y r   r  r   r  s     r    r  z,RelatedCryptoMaterialSecuredBy.algorithm_ref*  
    +r   c                 D    t        | j                  | j                  f      S r   )r  r  r  r   s    r    r  z1RelatedCryptoMaterialSecuredBy.__comparable_tuple.  s#    NND..!
  	r   r-   c                 f    t        |t              r!| j                         |j                         k(  S yr  )r  r  1_RelatedCryptoMaterialSecuredBy__comparable_tupler  s     r    r  z%RelatedCryptoMaterialSecuredBy.__eq__3  s-    e;<**,0H0H0JJJr   c                 p    t        |t              r!| j                         |j                         k  S t        S r   )r  r  r  r  r  s     r    r  z%RelatedCryptoMaterialSecuredBy.__lt__8  s0    e;<**,u/G/G/IIIr   c                 4    t        | j                               S r   )r&   r  r   s    r    r  z'RelatedCryptoMaterialSecuredBy.__hash__=  r  r   c                 <    d| j                    d| j                   dS )Nz*<RelatedCryptoMaterialSecuredBy mechanism=z, algorithm_ref=r  r  r   s    r    r  z'RelatedCryptoMaterialSecuredBy.__repr__@  s&    ;DNN;KK[\`\n\n[oopqqr   )r   r   r   r   r   r  r   r   r  r  r  r  r  r_  r  r  r  r   r!  r  r  r  r  r  r   r   r    r  r    s]   
 $(*.+C=+  '+ 
	+ \r"8C=  #  $8C= $T $ $ \v&\r"#x/ # # ' # ,8F+; , , ,$4 
F t 
F t 
/# /r# rr   r  c                      e Zd ZdZddddddddddddddee   dee   dee   dee   dee	   d	ee	   d
ee	   dee	   dee   dee
   dee   dee   ddfdZe ej                  d      dee   fd              Zej"                  dee   ddfd       Ze ej                  d      dee   fd              Zej"                  dee   ddfd       Ze ej                  d      dee   fd              Zej"                  dee   ddfd       Ze ej(                  e       ej                  d      dee   fd                     Zej"                  dee   ddfd       Ze ej(                  ej,                  j.                         ej                  d      dee	   fd                     Zej"                  dee	   ddfd        Ze ej(                  ej,                  j.                         ej                  d!      dee	   fd"                     Zej"                  d	ee	   ddfd#       Ze ej(                  ej,                  j.                         ej                  d$      dee	   fd%                     Zej"                  d
ee	   ddfd&       Ze ej(                  ej,                  j.                         ej                  d'      dee	   fd(                     Zej"                  dee	   ddfd)       Ze ej                  d*      dee   fd+              Zej"                  dee   ddfd,       Ze ej                  d-      dee
   fd.              Zej"                  dee
   ddfd/       Ze ej                  d0      dee   fd1              Zej"                  dee   ddfd2       Ze ej                  d3      dee   fd4              Zej"                  dee   ddfd5       Zde fd6Z!d7e"de#fd8Z$d7e"de#fd9Z%de
fd:Z&defd;Z'y)<RelatedCryptoMaterialPropertiesaH  
    This is our internal representation of the `cryptoPropertiesType.relatedCryptoMaterialProperties` complex type
    within CycloneDX standard.

    .. note::
        Introduced in CycloneDX v1.6


    .. note::
        See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    Ntypeidstater  creation_dateactivation_dateupdate_dateexpiration_datevaluesizeformat
secured_byr  r  r  r  r  r  r  r  r  r  r  r  r   c                    || _         || _        || _        || _        || _        || _        || _        || _        |	| _        |
| _	        || _
        || _        y r   r  )r   r  r  r  r  r  r  r  r  r  r  r  r  s                r    r   z(RelatedCryptoMaterialProperties.__init__R  s]     	
**.&.
	$r   r   c                     | j                   S )zS
        The type for the related cryptographic material.

        Returns
        _typer   s    r    r  z$RelatedCryptoMaterialProperties.typen  s     zzr   c                     || _         y r   r  r   r  s     r    r  z$RelatedCryptoMaterialProperties.typex  r   r   r2  c                     | j                   S )zj
        The optional unique identifier for the related cryptographic material.

        :return:
        _idr   s    r    r  z"RelatedCryptoMaterialProperties.id|  s     xxr   c                     || _         y r   r  )r   r  s     r    r  z"RelatedCryptoMaterialProperties.id  s	    r   r8  c                     | j                   S )z
        The key state as defined by NIST SP 800-57.

        Returns:
             `RelatedCryptoMaterialState` or `None`
        _stater   s    r    r  z%RelatedCryptoMaterialProperties.state       {{r   c                     || _         y r   r  )r   r  s     r    r  z%RelatedCryptoMaterialProperties.state  r   r   r=  c                     | j                   S )z
        The bom-ref to the algorithm used to generate the related cryptographic material.

        Returns:
            `BomRef` or `None`
        r  r   s    r    r  z-RelatedCryptoMaterialProperties.algorithm_ref  r  r   c                     || _         y r   r  r  s     r    r  z-RelatedCryptoMaterialProperties.algorithm_ref  r  r   rD  c                     | j                   S )z
        The date and time (timestamp) when the related cryptographic material was created.

        Returns:
            `datetime` or `None`
        _creation_dater   s    r    r  z-RelatedCryptoMaterialProperties.creation_date  r  r   c                     || _         y r   r  )r   r  s     r    r  z-RelatedCryptoMaterialProperties.creation_date  r  r   rI  c                     | j                   S )z
        The date and time (timestamp) when the related cryptographic material was activated.

        Returns:
            `datetime` or `None`
        _activation_dater   s    r    r  z/RelatedCryptoMaterialProperties.activation_date  rA  r   c                     || _         y r   r  )r   r  s     r    r  z/RelatedCryptoMaterialProperties.activation_date  rC  r   rO  c                     | j                   S )z
        The date and time (timestamp) when the related cryptographic material was updated.

        Returns:
            `datetime` or `None`
        _update_dater   s    r    r  z+RelatedCryptoMaterialProperties.update_date          r   c                     || _         y r   r  )r   r  s     r    r  z+RelatedCryptoMaterialProperties.update_date  r7  r   rT  c                     | j                   S )z
        The date and time (timestamp) when the related cryptographic material expires.

        Returns:
            `datetime` or `None`
        _expiration_dater   s    r    r  z/RelatedCryptoMaterialProperties.expiration_date  rA  r   c                     || _         y r   r  )r   r  s     r    r  z/RelatedCryptoMaterialProperties.expiration_date  rC  r   Z   c                     | j                   S )zs
        The associated value of the cryptographic material.

        Returns:
            `str` or `None`
        _valuer   s    r    r  z%RelatedCryptoMaterialProperties.value  r  r   c                     || _         y r   r  )r   r  s     r    r  z%RelatedCryptoMaterialProperties.value  r   r   d   c                     | j                   S )zo
        The size of the cryptographic asset (in bits).

        Returns:
             `int` or `None`
        )_sizer   s    r    r  z$RelatedCryptoMaterialProperties.size  r   r   c                 6    |r|dk  rt        d      || _        y )Nr   zSize must be greater than zero)r   r  )r   r  s     r    r  z$RelatedCryptoMaterialProperties.size  s    D1H;<\]]
r   n   c                     | j                   S )z
        The format of the related cryptographic material (e.g. P8, PEM, DER).

        Returns:
            `str` or `None`
        _formatr   s    r    r  z&RelatedCryptoMaterialProperties.format	  s     ||r   c                     || _         y r   r  )r   r  s     r    r  z&RelatedCryptoMaterialProperties.format  s	    r   x   c                     | j                   S )z
        The mechanism by which the cryptographic asset is secured by.

        Returns:
            `RelatedCryptoMaterialSecuredBy` or `None`
        _secured_byr   s    r    r  z*RelatedCryptoMaterialProperties.secured_by  s     r   c                     || _         y r   r  )r   r  s     r    r  z*RelatedCryptoMaterialProperties.secured_by#  
    %r   c                     t        | j                  | j                  | j                  | j                  | j
                  | j                  | j                  | j                  | j                  | j                  | j                  | j                  f      S r   )r  r  r  r  r  r  r  r  r  r  r  r  r  r   s    r    r  z2RelatedCryptoMaterialProperties.__comparable_tuple'  sl    IItww

D,>,>@R@RTXThThd22DJJ		4;;X\XgXg!
  	r   r-   c                 f    t        |t              r!| j                         |j                         k(  S yr  )r  r  2_RelatedCryptoMaterialProperties__comparable_tupler  s     r    r  z&RelatedCryptoMaterialProperties.__eq__-  s-    e<=**,0H0H0JJJr   c                 p    t        |t              r!| j                         |j                         k  S t        S r   )r  r  r  r  r  s     r    r  z&RelatedCryptoMaterialProperties.__lt__2  s0    e<=**,u/G/G/IIIr   c                 4    t        | j                               S r   )r&   r  r   s    r    r  z(RelatedCryptoMaterialProperties.__hash__7  r  r   c                 V    d| j                    d| j                   d| j                   dS )Nz&<RelatedCryptoMaterialProperties type=z, id=z state=r  )r  r  r  r   s    r    r  z(RelatedCryptoMaterialProperties.__repr__:  s/    7		{%yPWX\XbXbWccdeer   )(r   r   r   r   r   rc  r  r{  r   r   r  r  r   r  r  r  r  r  r  r  r_  r  r`  ra  r  r  r  r  r  r  r  r  r  r  r   r!  r  r  r  r  r   r   r    r  r  D  sb   
 59 6:*.,0.2*..2#" $?C%01% SM% 23	%
  '%  )% "(+% h'% "(+% }% sm% % ;<% 
%8 \r"h89  #  
[[";<    \r"HSM  #  YYXc] t   \r"x :;  #  \\8$>? D   \v&\r"#x/ # # ' # ,8F+; , , , \|33??@\r"#x1 # # A # ,8H+= ,$ , , \|33??@\r"%(!3 % # A % 0x/A 0d 0 0 \|33??@\r"!Xh/ ! # A ! (x'9 (d ( ( \|33??@\r"%(!3 % # A % 0x/A 0d 0 0 \r"x}  #  \\8C= T   \s#hsm  $  
[[# 4  
 \s#  $  ]]Xc] t   \s# H%CD   $   &X.L%M &RV & &$4 F t 
F t 
/# /f# fr   r  c                   0    e Zd ZdZdZdZdZdZdZdZ	dZ
d	Zy
)ProtocolPropertiesTypea>  
    This is our internal representation of the cryptoPropertiesType.protocolProperties.type ENUM type
    within the CycloneDX standard.

    .. note::
        Introduced in CycloneDX v1.6

    .. note::
        See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    ikeipsecsshsstptlswpar-   r.   N)r   r   r   r   IKEIPSECSSHSSTPTLSWPAr<   r=   r   r   r    r  r  >  s1    	 CE
CD
C
CEGr   r  c            	          e Zd ZdZdddddee   deee      deee      ddfdZe	 e
j                  d	      dee   fd
              Zej                  dee   ddfd       Ze	 e
j                  e
j                  j                   d       e
j                  d      dd                     Zej                  dee   ddfd       Ze	 e
j                  e
j                  j                   d       e
j                  d      dd                     Zej                  dee   ddfd       ZdefdZdedefdZdedefdZdefdZdefdZy)ProtocolPropertiesCipherSuiteaT  
    This is our internal representation of the `cryptoPropertiesType.protocolProperties.cipherSuites.cipherSuite`
    complex type within CycloneDX standard.

    .. note::
        Introduced in CycloneDX v1.6


    .. note::
        See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    Nname
algorithmsidentifiersr  r  r  r   c                >    || _         |xs g | _        |xs g | _        y r   r  )r   r  r  r  s       r    r   z&ProtocolPropertiesCipherSuite.__init__d  s$     	$*&,"r   r   c                     | j                   S )z
        A common name for the cipher suite. For example: TLS_DHE_RSA_WITH_AES_128_CCM.

        Returns:
            `str` or `None`
        _namer   s    r    r  z"ProtocolPropertiesCipherSuite.namen  r   r   c                     || _         y r   r  )r   r  s     r    r  z"ProtocolPropertiesCipherSuite.namey  r   r   r   r2  c                     | j                   S )z
        A list BomRefs to algorithms related to the cipher suite.

        Returns:
            `Iterable[BomRef]` or `None`
        )_algorithmsr   s    r    r  z(ProtocolPropertiesCipherSuite.algorithms}  s     r   c                 $    t        |      | _        y r   )r   r  )r   r  s     r    r  z(ProtocolPropertiesCipherSuite.algorithms  s    $Z0r   
identifierc                     | j                   S )z
        A list of common identifiers for the cipher suite. Examples include 0xC0 and 0x9E.

        Returns:
            `Iterable[str]` or `None`
        )_identifiersr   s    r    r  z)ProtocolPropertiesCipherSuite.identifiers  r  r   c                 $    t        |      | _        y r   )r   r  )r   r  s     r    r  z)ProtocolPropertiesCipherSuite.identifiers      %k2r   c                 ~    t        | j                  t        | j                        t        | j                        f      S r   )r  r  r  r  r   s    r    r  z0ProtocolPropertiesCipherSuite.__comparable_tuple  s5    II'8:J4K[K[:\!
  	r   r-   c                 f    t        |t              r!| j                         |j                         k(  S yr  )r  r  0_ProtocolPropertiesCipherSuite__comparable_tupler  s     r    r  z$ProtocolPropertiesCipherSuite.__eq__  s-    e:;**,0H0H0JJJr   c                 p    t        |t              r!| j                         |j                         k  S t        S r   )r  r  r  r  r  s     r    r  z$ProtocolPropertiesCipherSuite.__lt__  s0    e:;**,u/G/G/IIIr   c                 4    t        | j                               S r   )r&   r  r   s    r    r  z&ProtocolPropertiesCipherSuite.__hash__  r  r   c                 "    d| j                    dS )Nz$<ProtocolPropertiesCipherSuite name=r  )r  r   s    r    r  z&ProtocolPropertiesCipherSuite.__repr__  s    5dii[BBr   r   zSortedSet[BomRef])r   zSortedSet[str])r   r   r   r   r   r  r   r   r   r  r  r  r  r  r  r  r  r  r  r  r  r   r!  r  r   r  r  r  r  r   r   r    r  r  V  s   
 #15/3	-sm- Xf-.- hsm,	-
 
- \r"hsm  #  
[[# 4   \LBBII;W\r"  # X   1Xf%5 1$ 1 1 \LBBII<X\r"! # Y ! 3x} 3 3 3$4 
F t 
C D 
/# /C# Cr   r  c                   t   e Zd ZdZddddddddeee      deee      deee      deee      dee   d	eee      d
dfdZe	 e
j                  d      d$d              Zej                  dee   d
dfd       Ze	 e
j                  d      d$d              Zej                  dee   d
dfd       Ze	 e
j                  d      d$d              Zej                  dee   d
dfd       Ze	 e
j                  d      d$d              Zej                  dee   d
dfd       Ze	 e
j                  d      d
ee   fd              Zej                  dee   d
dfd       Ze	 e
j                  d      d$d              Zej                  d	ee   d
dfd       Zd
efdZded
efd Zded
efd!Zd
efd"Zd
efd#Zy)%Ikev2TransformTypesaO  
    This is our internal representation of the `cryptoPropertiesType.protocolProperties.ikev2TransformTypes`
    complex type within CycloneDX standard.

    .. note::
        Introduced in CycloneDX v1.6


    .. note::
        See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    Nencrprfintegkeesnauthr  r  r  r  r  r  r   c                    |xs g | _         |xs g | _        |xs g | _        |xs g | _        || _        |xs g | _        y r   r  )r   r  r  r  r  r  r  s          r    r   zIkev2TransformTypes.__init__  sB     JB	9"[b
(JB	r   r   c                     | j                   S )zu
        Transform Type 1: encryption algorithms.

        Returns:
            `Iterable[BomRef]` or `None`
        )_encrr   s    r    r  zIkev2TransformTypes.encr  r   r   c                 $    t        |      | _        y r   )r   r  )r   r  s     r    r  zIkev2TransformTypes.encr      t_
r   r2  c                     | j                   S )zv
        Transform Type 2: pseudorandom functions.

        Returns:
            `Iterable[BomRef]` or `None`
        )_prfr   s    r    r  zIkev2TransformTypes.prf       yyr   c                 $    t        |      | _        y r   )r   r  )r   r  s     r    r  zIkev2TransformTypes.prf  s    cN	r   r8  c                     | j                   S )zt
        Transform Type 3: integrity algorithms.

        Returns:
            `Iterable[BomRef]` or `None`
        )_integr   s    r    r  zIkev2TransformTypes.integ  r  r   c                 $    t        |      | _        y r   )r   r#  )r   r  s     r    r  zIkev2TransformTypes.integ  s    &r   r=  c                     | j                   S )z
        Transform Type 4: Key Exchange Method (KE) per RFC9370, formerly called Diffie-Hellman Group (D-H).

        Returns:
            `Iterable[BomRef]` or `None`
        )_ker   s    r    r  zIkev2TransformTypes.ke  s     xxr   c                 $    t        |      | _        y r   )r   r&  )r   r  s     r    r  zIkev2TransformTypes.ke	  s    R=r   rD  c                     | j                   S )zx
        Specifies if an Extended Sequence Number (ESN) is used.

        Returns:
            `bool` or `None`
        _esnr   s    r    r  zIkev2TransformTypes.esn  r   r   c                     || _         y r   r)  )r   r  s     r    r  zIkev2TransformTypes.esn  	    	r   rI  c                     | j                   S )zi
        IKEv2 Authentication method.

        Returns:
            `Iterable[BomRef]` or `None`
        )_authr   s    r    r  zIkev2TransformTypes.auth  r   r   c                 $    t        |      | _        y r   )r   r.  )r   r  s     r    r  zIkev2TransformTypes.auth'  r  r   c           
          t        t        | j                        t        | j                        t        | j                        t        | j                        | j
                  t        | j                        f      S r   )r  r  r  r  r  r  r  r   s    r    r  z&Ikev2TransformTypes.__comparable_tuple+  sW    TYY'TXX&TZZ(TWW%HHTYY'!
  	r   r-   c                 f    t        |t              r!| j                         |j                         k(  S yr  )r  r  &_Ikev2TransformTypes__comparable_tupler  s     r    r  zIkev2TransformTypes.__eq__5  r	  r   c                 p    t        |t              r!| j                         |j                         k  S t        S r   )r  r  r2  r  r  s     r    r  zIkev2TransformTypes.__lt__:  r  r   c                 4    t        | j                               S r   )r&   r2  r   s    r    r  zIkev2TransformTypes.__hash__?  r  r   c                 "    d| j                    dS )Nz<Ikev2TransformTypes esn=r  )r  r   s    r    r  zIkev2TransformTypes.__repr__B  s    *488*A66r   r  )r   r   r   r   r   r   r   r!  r   r  r  r  r  r  r  r  r  r  r  r  r2  r   r  r  r  r  r  r  r   r   r    r  r    s   
 ,0*.,0)-"+/x'( hv&' ()	
 Xf%& d^ x'( 
  \r" #  
[[%&) %d % % \r" #  	ZZ#x' #D # # \r" #  \\'8F+ ' ' ' \r" #  YY!Xf% !$ ! ! \r"Xd^  #  	ZZx~ $   \r" #  
[[%&) %d % %$4 F t 
F t 
/# /7# 7r   r  c                      e Zd ZdZdddddddee   dee   deee      dee	   deee
      d	dfd
Ze ej                  d      d	ee   fd              Zej                   dee   d	dfd       Ze ej                  d      d	ee   fd              Zej                   dee   d	dfd       Ze ej$                  ej&                  j(                  d       ej                  d      d"d                     Zej                   dee   d	dfd       Ze ej                  d      d	ee	   fd              Zej                   dee	   d	dfd       Ze ej$                  ej&                  j.                  d       ej0                  d      d#d                     Zej                   dee
   d	dfd       Zd	efdZded	efdZded	efdZd	e fd Z!d	efd!Z"y)$ProtocolPropertiesa;  
    This is our internal representation of the `cryptoPropertiesType.protocolProperties` complex type within
    CycloneDX standard.

    .. note::
        Introduced in CycloneDX v1.6


    .. note::
        See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    Nr  versioncipher_suitesikev2_transform_typescrypto_refsr  r9  r:  r;  r<  r   c                Z    || _         || _        |xs g | _        || _        |xs g | _        y r   r8  )r   r  r9  r:  r;  r<  s         r    r   zProtocolProperties.__init__T  s4     	*0b%:"&,"r   r   c                     | j                   S )zn
        The concrete protocol type.

        Returns:
            `ProtocolPropertiesType` or `None`
        r  r   s    r    r  zProtocolProperties.typeb  r   r   c                     || _         y r   r  r  s     r    r  zProtocolProperties.typem  r   r   r2  c                     | j                   S )z
        The version of the protocol. Examples include 1.0, 1.2, and 1.99.

        Returns:
            `str` or `None`
        _versionr   s    r    r9  zProtocolProperties.versionq  r   r   c                     || _         y r   rA  )r   r9  s     r    r9  zProtocolProperties.version|  r   r   cipherSuiter8  c                     | j                   S )z
        A list of cipher suites related to the protocol.

        Returns:
            `Iterable[ProtocolPropertiesCipherSuite]`
        )_cipher_suitesr   s    r    r:  z ProtocolProperties.cipher_suites  r  r   c                 $    t        |      | _        y r   )r   rF  )r   r:  s     r    r:  z ProtocolProperties.cipher_suites  s    '6r   r=  c                     | j                   S )z
        The IKEv2 transform types supported (types 1-4), defined in RFC7296 section 3.3.2, and additional properties.

        Returns:
            `Ikev2TransformTypes` or `None`
        _ikev2_transform_typesr   s    r    r;  z(ProtocolProperties.ikev2_transform_types  r   r   c                     || _         y r   rI  )r   r;  s     r    r;  z(ProtocolProperties.ikev2_transform_types  r   r   	cryptoRefcryptoRefArrayc                     | j                   S )zs
        A list of protocol-related cryptographic assets.

        Returns:
            `Iterable[BomRef]`
        )_crypto_refsr   s    r    r<  zProtocolProperties.crypto_refs  r  r   c                 $    t        |      | _        y r   )r   rO  )r   r<  s     r    r<  zProtocolProperties.crypto_refs  r  r   c           	          t        | j                  | j                  t        | j                        | j                  t        | j
                        f      S r   )r  r  r9  r:  r;  r<  r   s    r    r  z%ProtocolProperties.__comparable_tuple  sG    IILLT//0&&T--.!
  	r   r-   c                 f    t        |t              r!| j                         |j                         k(  S yr  )r  r7  %_ProtocolProperties__comparable_tupler  s     r    r  zProtocolProperties.__eq__  s-    e/0**,0H0H0JJJr   c                 p    t        |t              r!| j                         |j                         k  S t        S r   )r  r7  rS  r  r  s     r    r  zProtocolProperties.__lt__  s0    e/0**,u/G/G/IIIr   c                 4    t        | j                               S r   )r&   rS  r   s    r    r  zProtocolProperties.__hash__  r  r   c                 <    d| j                    d| j                   dS )Nz<ProtocolProperties type=z
, version=r  )r  r9  r   s    r    r  zProtocolProperties.__repr__  s    *499+Z~QOOr   )r   z(SortedSet[ProtocolPropertiesCipherSuite]r  )#r   r   r   r   r   r  r  r   r  r  r   r   r  r  r  r  r  r9  r  r  r  r:  r;  r  r  r<  r  rS  r   r!  r  r  r  r  r  r   r   r    r7  r7  F  s   
 26!%KO?C26--.- #-  )F GH	-
  ((;<- hv./- 
- \r"h56  #  
[["89 d   \r"#  #  ^^ x}       \LBBII=Y\r"# # Z # 784Q+R 7W[ 7 7 \r"+x0C'D + # + !!<8DW;X <]a < "< \LBBGGU\,-! . V ! 3x'7 3D 3 3$4 F t 
F t 
/# /P# Pr   r7  c                      e Zd ZdZddddddddee   dee   dee   dee   dee	   d	ee
   d
dfdZe ej                  d      d
ee   fd              Zej                   dee   d
dfd       Ze ej                  d      d
ee   fd              Zej                   dee   d
dfd       Ze ej                  d      d
ee   fd              Zej                   dee   d
dfd       Ze ej                  d      d
ee   fd              Zej                   dee   d
dfd       Ze ej                  d      d
ee	   fd              Zej                   dee	   d
dfd       Ze ej                  d      d
ee
   fd              Zej                   d	ee
   d
dfd       Zd
efdZded
efd Zded
efd!Zd
efd"Zd
e
fd#Zy)$CryptoPropertiesa$  
    This is our internal representation of the `cryptoPropertiesType` complex type within CycloneDX standard.

    .. note::
        Introduced in CycloneDX v1.6


    .. note::
        See the CycloneDX Schema for hashType: https://cyclonedx.org/docs/1.7/xml/#type_cryptoPropertiesType
    N
asset_typealgorithm_propertiescertificate_properties"related_crypto_material_propertiesprotocol_propertiesoidrZ  r[  r\  r]  r^  r_  r   c                X    || _         || _        || _        || _        || _        || _        y r   rY  )r   rZ  r[  r\  r]  r^  r_  s          r    r   zCryptoProperties.__init__  s2     %$8!&<#2T/#6 r   r   c                     | j                   S )a  
        Cryptographic assets occur in several forms. Algorithms and protocols are most commonly implemented in
        specialized cryptographic libraries. They may however also be 'hardcoded' in software components. Certificates
        and related cryptographic material like keys, tokens, secrets or passwords are other cryptographic assets to be
        modelled.

        Returns:
            `CryptoAssetType`
        _asset_typer   s    r    rZ  zCryptoProperties.asset_type  s     r   c                     || _         y r   rb  )r   rZ  s     r    rZ  zCryptoProperties.asset_type  r  r   r2  c                     | j                   S )z
        Additional properties specific to a cryptographic algorithm.

        Returns:
            `AlgorithmProperties` or `None`
        _algorithm_propertiesr   s    r    r[  z%CryptoProperties.algorithm_properties  s     )))r   c                     || _         y r   rf  )r   r[  s     r    r[  z%CryptoProperties.algorithm_properties  s
    %9"r   r8  c                     | j                   S )z
        Properties for cryptographic assets of asset type 'certificate'.

        Returns:
            `CertificateProperties` or `None`
        _certificate_propertiesr   s    r    r\  z'CryptoProperties.certificate_properties  s     +++r   c                     || _         y r   rj  )r   r\  s     r    r\  z'CryptoProperties.certificate_properties  rN  r   r=  c                     | j                   S )z
        Properties for cryptographic assets of asset type 'relatedCryptoMaterial'.

        Returns:
            `RelatedCryptoMaterialProperties` or `None`
        #_related_crypto_material_propertiesr   s    r    r]  z3CryptoProperties.related_crypto_material_properties  s     777r   c                     || _         y r   rn  )r   r]  s     r    r]  z3CryptoProperties.related_crypto_material_properties!  s    
 4V0r   rD  c                     | j                   S )z
        Properties specific to cryptographic assets of type: 'protocol'.

        Returns:
            `ProtocolProperties` or `None`
        _protocol_propertiesr   s    r    r^  z$CryptoProperties.protocol_properties(  s     (((r   c                     || _         y r   rr  )r   r^  s     r    r^  z$CryptoProperties.protocol_properties3  s
    $7!r   rI  c                     | j                   S )zw
        The object identifier (OID) of the cryptographic asset.

        Returns:
            `str` or `None`
        _oidr   s    r    r_  zCryptoProperties.oid7  r   r   c                     || _         y r   rv  )r   r_  s     r    r_  zCryptoProperties.oidB  r,  r   c                     t        | j                  | j                  | j                  | j                  | j
                  | j                  f      S r   )r  rZ  r[  r\  r]  r^  r_  r   s    r    r  z#CryptoProperties.__comparable_tupleF  sF    OO%%''33$$HH!
  	r   r-   c                 f    t        |t              r!| j                         |j                         k(  S yr  )r  rX  #_CryptoProperties__comparable_tupler  s     r    r  zCryptoProperties.__eq__P  s-    e-.**,0H0H0JJJr   c                 p    t        |t              r!| j                         |j                         k  S t        S r   )r  rX  r{  r  r  s     r    r  zCryptoProperties.__lt__U  s0    e-.**,u/G/G/IIIr   c                 4    t        | j                               S r   )r&   r{  r   s    r    r  zCryptoProperties.__hash__Z  r  r   c                 <    d| j                    d| j                   dS )Nz<CryptoProperties asset_type=z, oid=r  )rZ  r_  r   s    r    r  zCryptoProperties.__repr__]  s     .t.?vdhhZqQQr   ) r   r   r   r   r   r   r   r#  r  r7  r  r   r  r  r  rZ  r  r[  r\  r]  r^  r_  r  r{  r   r!  r  r   r  r  r  r  r   r   r    rX  rX    s-   	 15>BBFX\<@!_- '':; !))> ?	
 -55T,U &&89 c] 
  \r"
 H_5 
  # 
  &Xo%> &4 & & \r"*h/B&C * # *   :BU9V :[_ : !: \r",1F(G , # , "">XF[=\ >ae > #> \r"8H=\4] 8 # 8 (..V,45T,UV 
V /V \r")X.@%A ) # ) 8x@R7S 8X\ 8  8 \r"Xc]  #  	ZZx}   $4 F t 
C D 
/# /R# Rr   rX  ).r   collections.abcr   r   enumr   typingr   r   py_serializabler  sortedcontainersr   _internal.comparer
   r  exception.modelr   r   schema.schemar   r   bom_refr   serializable_enumr  r   r"   r?   rF   rZ   rx   r   r   serializable_classr   r#  rc  r{  r  r  r  r  r  r7  rX  r   r   r    <module>r     s  $ %     & & C q B  8c4 8  8" c4   < d   * 3   : *sD *  *Z d   0 C   , S$   8 !  tL}w }w M}w@ !  tLqy qy Mqyh T   D d   ( !  tLHr Hr MHrV !  tLvf vf Mvfr S$   . !  tLYC YC MYCx !  tLO7 O7 MO7d !  tLP P MPD !  tLTR TR MTRr   