
    ܖi$                         d dl mZ d dlmZ d dlmZ d dlZd dlmZ ddl	m
Z ddlmZmZmZ dd	lmZ  ej$                  d
       G d d             Zy)    )Iterable)datetime)OptionalN)	SortedSet   )ComparableTuple)NotePropertyXsUri)	IssueTypeT)%ignore_unknown_during_deserializationc                      e Zd ZdZddddddddddd
dedee   dee   dee   dee   d	ee   d
eee      deee      deee	      deee
      deee      ddfdZe ej                  d       ej                   ej"                  j$                        defd                     Zej(                  d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                  ej4                  j6                         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                   ej"                  j$                         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                   ej"                  j$                         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"e ej:                  ej<                  j>                  d/       ej                  d0      d?d1                     Z#e#j(                  dee
   ddfd2       Z#e ej:                  ej<                  j>                  d3       ej                  d4      d@d5                     Z$e$j(                  dee   ddfd6       Z$de%fd7Z&d8e'de(fd9Z)d8e'de(fd:Z*de+fd;Z,defd<Z-y)AReleaseNotesz
    This is our internal representation of a `releaseNotesType` for a Component in a BOM.

    .. note::
        See the CycloneDX Schema definition: https://cyclonedx.org/docs/1.7/xml/#type_releaseNotesType
    N)
titlefeatured_imagesocial_imagedescription	timestampaliasestagsresolvesnotes
propertiestyper   r   r   r   r   r   r   r   r   r   returnc                    || _         || _        || _        || _        || _        || _        |xs g | _        |xs g | _        |	xs g | _        |
xs g | _	        |xs g | _
        y N)r   r   r   r   r   r   r   r   r   r   r   )selfr   r   r   r   r   r   r   r   r   r   r   s               `/var/www/html/content-pipeline/venv/lib/python3.12/site-packages/cyclonedx/model/release_note.py__init__zReleaseNotes.__init__'   si     	
,(&"}"JB	 B[b
$*       c                     | j                   S )aB  
        The software versioning type.

        It is **RECOMMENDED** that the release type use one of 'major', 'minor', 'patch', 'pre-release', or 'internal'.

        Representing all possible software release types is not practical, so standardizing on the recommended values,
        whenever possible, is strongly encouraged.

        * **major** = A major release may contain significant changes or may introduce breaking changes.
        * **minor** = A minor release, also known as an update, may contain a smaller number of changes than major
            releases.
        * **patch** = Patch releases are typically unplanned and may resolve defects or important security issues.
        * **pre-release** = A pre-release may include alpha, beta, or release candidates and typically have limited
            support. They provide the ability to preview a release prior to its general availability.
        * **internal** = Internal releases are not for public consumption and are intended to be used exclusively by the
            project or manufacturer that produced it.
        _typer   s    r   r   zReleaseNotes.type@   s    * zzr!   c                     || _         y r   r$   )r   r   s     r   r   zReleaseNotes.typeW   s	    
r!   r   c                     | j                   S )z+
        The title of the release.
        _titler&   s    r   r   zReleaseNotes.title[   s     {{r!   c                     || _         y r   r)   )r   r   s     r   r   zReleaseNotes.titlec   s	    r!      c                     | j                   S )z^
        The URL to an image that may be prominently displayed with the release note.
        _featured_imager&   s    r   r   zReleaseNotes.featured_imageg   s     ###r!   c                     || _         y r   r.   )r   r   s     r   r   zReleaseNotes.featured_imageo   s
    -r!      c                     | j                   S )z^
        The URL to an image that may be used in messaging on social media platforms.
        _social_imager&   s    r   r   zReleaseNotes.social_images   s     !!!r!   c                     || _         y r   r3   )r   r   s     r   r   zReleaseNotes.social_image{   s
    )r!      c                     | j                   S )z5
        A short description of the release.
        _descriptionr&   s    r   r   zReleaseNotes.description   s        r!   c                     || _         y r   r8   )r   r   s     r   r   zReleaseNotes.description   s
    'r!      c                     | j                   S )zR
        The date and time (timestamp) when the release note was created.
        
_timestampr&   s    r   r   zReleaseNotes.timestamp   s     r!   c                     || _         y r   r=   )r   r   s     r   r   zReleaseNotes.timestamp   s	    #r!   alias   c                     | j                   S )z
        One or more alternate names the release may be referred to. This may include unofficial terms used by
        development and marketing teams (e.g. code names).

        Returns:
            Set of `str`
        )_aliasesr&   s    r   r   zReleaseNotes.aliases   s     }}r!   c                 $    t        |      | _        y r   )r   rC   )r   r   s     r   r   zReleaseNotes.aliases   s    !'*r!   tag   c                     | j                   S )z
        One or more tags that may aid in search or retrieval of the release note.

        Returns:
            Set of `str`
        )_tagsr&   s    r   r   zReleaseNotes.tags   s     zzr!   c                 $    t        |      | _        y r   )r   rH   )r   r   s     r   r   zReleaseNotes.tags   s    t_
r!   issue	   c                     | j                   S )zr
        A collection of issues that have been resolved.

        Returns:
            Set of `IssueType`
        )	_resolvesr&   s    r   r   zReleaseNotes.resolves   s     ~~r!   c                 $    t        |      | _        y r   )r   rM   )r   r   s     r   r   zReleaseNotes.resolves   s    "8,r!   note
   c                     | j                   S )z
        Zero or more release notes containing the locale and content. Multiple note elements may be specified to support
        release notes in a wide variety of languages.

        Returns:
            Set of `Note`
        )_notesr&   s    r   r   zReleaseNotes.notes   s     {{r!   c                 $    t        |      | _        y r   )r   rR   )r   r   s     r   r   zReleaseNotes.notes   s    &r!   property   c                     | j                   S )a  
        Provides the ability to document properties in a name-value store. This provides flexibility to include data not
        officially supported in the standard without having to use additional namespaces or create extensions. Unlike
        key-value stores, properties support duplicate names, each potentially having different values.

        Returns:
            Set of `Property`
        )_propertiesr&   s    r   r   zReleaseNotes.properties   s     r!   c                 $    t        |      | _        y r   )r   rW   )r   r   s     r   r   zReleaseNotes.properties   s    $Z0r!   c                 d   t        | j                  | j                  | j                  | j                  | j
                  | j                  t        | j                        t        | j                        t        | j                        t        | j                        t        | j                        f      S r   )_ComparableTupler   r   r   r   r   r   r   r   r   r   r   r&   s    r   __comparable_tuplezReleaseNotes.__comparable_tuple   s~    IItzz4#6#68I8I4K[K[]a]k]kT\\*TYY'T]]+TZZ(T__-!
  	r!   otherc                 f    t        |t              r!| j                         |j                         k(  S y)NF)
isinstancer   _ReleaseNotes__comparable_tupler   r\   s     r   __eq__zReleaseNotes.__eq__   s,    e\***,0H0H0JJJr!   c                 p    t        |t              r!| j                         |j                         k  S t        S r   )r^   r   r_   NotImplementedr`   s     r   __lt__zReleaseNotes.__lt__   s/    e\***,u/G/G/IIIr!   c                 4    t        | j                               S r   )hashr_   r&   s    r   __hash__zReleaseNotes.__hash__  s    D++-..r!   c                 <    d| j                    d| j                   dS )Nz<ReleaseNotes type=z, title=>)r   r   r&   s    r   __repr__zReleaseNotes.__repr__  s    $TYYKx

|1EEr!   )r   zSortedSet[str])r   zSortedSet[IssueType])r   zSortedSet[Note])r   zSortedSet[Property]).__name__
__module____qualname____doc__strr   r   r   r   r   r	   r
   r    rT   serializablexml_sequence
xml_stringXmlStringSerializationTypeNORMALIZED_STRINGr   setterr   r   r   r   type_mappinghelpersXsdDateTimer   	xml_arrayXmlArraySerializationTypeNESTEDr   r   r   r   r   rZ   r_   objectboolra   rd   intrg   rj    r!   r   r   r      sF    +/*.(,%)(,+/(,26*.37++"3-+ !+ uo	+
 c]+ H%+ (3-(+ x}%+ 8I./+ '+ Xh/0+ 
+2 \q!\\DDVVWc  X " ( 
[[    \q!x}  "  \\8C= T   \q!$ $ " $ .Xe_ . . . \q!"huo " " " *% *T * * \q!!Xc] ! " ! (x} ( ( ( \|33??@\q!8H-  " A  $8H#5 $$ $ $ \LBBII7S\\DDVVW\q! " X T  ^^+x} + + + \LBBII5Q\\DDVVW\q! " X R  
[[%# %4 % % \LBBII7S\q! " T  __-)!4 - - - \LBBII6R\r" # S  \\'8D> 'd ' ' \LBBII:V\r"	  # W 	  1Xh%7 1D 1 1$4 F t 
F t 
/# /F# Fr!   r   )collections.abcr   r   typingr   py_serializablerp   sortedcontainersr   _internal.comparer   rZ   modelr	   r
   r   model.issuer   serializable_classr   r   r!   r   <module>r      sO   $ %   & & C ) ) # !  tLgF gF MgFr!   