Ë
    daºig[  ã                   ó^   — d dl Z ddlmZ d dlmZ  e j                  e«      Z G d„ de«      Zy)é    Né   )ÚAtlassianRestAPI)Ú
deprecatedc                   ó¢  ‡ — e Zd ZdZˆ f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	 	 	 	 	 	 	 	 	 d1d„Zd„ Z	 	 d2d„Zd„ Zd„ Zd3d„Z edd¬«      d„ «       Zd„ Zd2d„Z	 	 	 	 	 	 	 d4d„Zd„ Z edd ¬«      d!„ «       Zd"„ Z d#„ Z! edd$¬«      d%„ «       Z"d&„ Z#d'„ Z$d(„ Z%d)„ Z&d5d*„Z'	 	 	 	 	 	 	 d6d+„Z(d,„ Z)d-„ Z*d7d.„Z+d/„ Z,d0„ Z-ˆ xZ.S )8ÚInsightzInsight for Jira API wrapper.c                 ó‚   •— d|d<   |j                  d«      r | j                  |i |¤Ž\  }}t        t        | �  |i |¤Ž y)zn
        Initialize Insight()

        :param args:
        :param kwargs:
        :return: Insight()
        zrest/insight/1.0Úapi_rootÚcloudN)ÚgetÚ_Insight__cloud_initÚsuperr   Ú__init__)ÚselfÚargsÚkwargsÚ	__class__s      €úI/var/www/timesheet/venv/lib/python3.12/site-packages/atlassian/insight.pyr   zInsight.__init__   sJ   ø€ ð 0ˆˆzÑà�:‰:�gÔØ,˜4×,Ñ,¨dÐ=°fÑ=‰LˆD�&ÜŒg�tÑ% tÐ6¨vÓ6ó    c                 ó|   — |d= t        |i |¤Ž}d|j                  «       › d�|d<   d|d<   d|d<   ddd	œ| _        ||fS )
z
        Creates an InsightCloud specific version of Insight()

        Returns:
            Insight(AtlassianRestAPI)
        r
   z/jsm/insight/workspace/z/v1/r	   zhttps://api.atlassian.comÚurlTzapplication/json)ÚAcceptzContent-Type)r   Ú_Insight__get_workspace_idÚdefault_headers)r   r   r   Útemps       r   Ú__cloud_initzInsight.__cloud_init   sb   € ð �7ˆOÜ˜Ð' Ñ'ˆà6°t×7NÑ7NÓ7PÐ6QÐQUÐVˆˆzÑà3ˆˆu‰àˆˆw‰à*<ÐN`ÑaˆÔØ�Vˆ|Ðr   c                 óR   — | j                  d| j                  ¬«      }|d   d   d   S )Nú%rest/servicedeskapi/insight/workspace©ÚheadersÚvaluesr   ÚworkspaceId)r   r   )r   Úresults     r   Ú__get_workspace_idzInsight.__get_workspace_id1   s8   € Ø—‘Ø3Ø×(Ñ(ð ó 
ˆð �hÑ Ñ" =Ñ1Ð1r   c                 ór   — | j                  d| j                  ¬«      }|d   D �cg c]  }|d   ‘Œ	 c}S c c}w )zJ
        Returns all Insight workspace Ids.
        :return: List
        r   r   r    r!   )r   Úexperimental_headers)r   r"   Úis      r   Ú_get_insight_workspace_idsz"Insight._get_insight_workspace_ids8   sC   € ð
 —‘Ø3Ø×-Ñ-ð ó 
ˆð +1°Ñ*:Ö; Q��-Ó Ò;Ð;ùÒ;s   ¥4c                 óF   — t        t        | j                  «       «      «      S )zN
        Returns the first Insight workspace ID.
        :return: str
        )ÚnextÚiterr'   ©r   s    r   Ú_get_insight_workspace_idz!Insight._get_insight_workspace_idC   s   € ô
 ”D˜×8Ñ8Ó:Ó;Ó<Ð<r   c                 ó†   — | j                   rt        ‚| j                  | j                  d|› �«      }| j	                  |«      S )aU  
        Get Attachment info
        Example output:
        [
            {
                "id": 1,
                "author": "admin",
                "mimeType": "image/png",
                "filename": "astronaut.png",
                "filesize": "490 B",
                "created": "2019-11-27T11:42:22.283Z",
                "comment": "",
                "commentOutput": "",
                "url": "http://jira/rest/insight/1.0/attachments/1"
            }
        ]

        :param object_id Object ID
        :return list of object
            id: required(string)
            author: (string)
            mimeType: (string)
            filename: required(string)
            filesize: (string)
            created: required(datetime)
            comment: (string)
            commentOutput: (string)
            url: required(string)
        zattachments/object/©r
   ÚNotImplementedErrorÚ
url_joinerr	   r   ©r   Ú	object_idr   s      r   Úget_attachments_of_objectsz"Insight.get_attachments_of_objectsK   s@   € ð< �:Š:Ü%Ð%Ø�o‰oØ�M‰MØ! ) Ð-ó
ˆð �x‰x˜‹}Ðr   c                 óâ   — | j                   rt        ‚t        j                  d«       d|› �}t	        |d«      5 }d|i}| j                  || j                  |¬«      cddd«       S # 1 sw Y   yxY w)zž
        Add attachment to Object
        :param object_id: int
        :param filename: str, name, if file in current directory or full path to file
        zAdding attachment...z$rest/insight/1.0/attachments/object/ÚrbÚfile)r   ÚfilesN)r
   r/   ÚlogÚinfoÚopenÚpostÚno_check_headers)r   r2   Úfilenamer   Ú
attachmentr7   s         r   Úupload_attachment_to_objectz#Insight.upload_attachment_to_objectq   sq   € ð �:Š:Ü%Ð%Ü�‰Ð'Ô(Ø4°Y°KÐ@ˆÜ�(˜DÓ!ð 	N ZØ˜ZÐ(ˆEØ—9‘9˜S¨$×*?Ñ*?Àu�9ÓM÷	N÷ 	Nò 	Nús   ¹"A%Á%A.c                 ó|   — | j                   rt        ‚t        j                  d«       d|› �}| j	                  |«      S )zL
        Add attachment to Object
        :param attachment_id: int
        zDeleting attachment...zrest/insight/1.0/attachments/)r
   r/   r8   r9   Údelete)r   Úattachment_idr   s      r   Údelete_attachmentzInsight.delete_attachment   s9   € ð
 �:Š:Ü%Ð%Ü�‰Ð)Ô*Ø-¨m¨_Ð=ˆØ�{‰{˜3ÓÐr   c                 ó\   — | j                   rt        ‚|||dœ}d}| j                  ||¬«      S )a  
        Add comment to Object

        :param comment: str
        :param object_id: int - Object ID
        :param role: int - Role ID
            0	Insight Users
            1	Insight Managers
            2	Insight Administrators
            3	Insight Developers
        :return:
        {
            "created": "2019-11-27T12:37:41.492Z",
            "updated": "2019-11-27T12:37:41.492Z",
            "id": 1,
            "actor": {
                "avatarUrl": "https://www.gravatar.com/avatar/64e1b8d34f425d19e1ee2ea7236d3028?d=mm&s=48",
                "displayName": "admin",
                "name": "admin",
                "key": "admin",
                "renderedLink": "<a href="/jira/secure/ViewProfile.jspa?name=admin">admin</a>",
                "isDeleted": false
            },
            "role": 0,
            "comment": "A comment to be added",
            "commentOutput": "A comment to be added",
            "objectId": 1,
            "canEdit": true,
            "canDelete": true
        }
        )ÚcommentÚobjectIdÚrolezrest/insight/1.0/comment/create©Úparams)r
   r/   r;   )r   rE   r2   rG   rI   r   s         r   Úadd_comment_to_objectzInsight.add_comment_to_objectŒ   s6   € ð@ �:Š:Ü%Ð%Ø$°)ÀTÑJˆØ/ˆØ�y‰y˜ VˆyÓ,Ð,r   c                 óR   — | j                   rt        ‚d|› �}| j                  |«      S )zb
        The object id to fetch comments from

        :param object_id:
        :return:
        z rest/insight/1.0/comment/object/)r
   r/   r   r1   s      r   Úget_comment_of_objectzInsight.get_comment_of_object²   s+   € ð �:Š:Ü%Ð%Ø0°°Ð<ˆØ�x‰x˜‹}Ðr   c                 ób   — | j                  | j                  d|› �«      }| j                  |«      S )a4  
        Load a single icon by id

        :param icon_id:
        :return:
        {
            "id": 1,
            "name": "Delete",
            "url16": "http://jira/rest/insight/1.0/icon/1/icon.png?size=16",
            "url48": "http://jira/rest/insight/1.0/icon/1/icon.png?size=48"
        }
        zicon/©r0   r	   r   )r   Úicon_idr   s      r   Úget_icon_by_idzInsight.get_icon_by_idÀ   s-   € ð �o‰o˜dŸm™m¨u°W°IÐ->Ó?ˆØ�x‰x˜‹}Ðr   c                 ó\   — | j                  | j                  d«      }| j                  |«      S )z=
        All existing global icons

        :return:
        zicon/globalrN   ©r   r   s     r   Úget_all_global_iconszInsight.get_all_global_iconsÐ   s&   € ð �o‰o˜dŸm™m¨]Ó;ˆØ�x‰x˜‹}Ðr   c                 ób   — | j                  | j                  d|› �«      }| j                  |«      S )zw
        The id of the import configuration that should be started

        :param import_id:
        :return:
        zimport/start/©r0   r	   r;   ©r   Ú	import_idr   s      r   Ústart_import_configurationz"Insight.start_import_configurationÛ   s3   € ð �o‰oØ�M‰MØ˜I˜;Ð'ó
ˆð �y‰y˜‹~Ðr   c                 ó€   — | j                   rt        ‚| j                  | j                  d«      }| j	                  |«      S )ú_
        Should the reindex clean the index before doing the reindex

        :return:
        zindex/reindex/start©r
   r/   r0   r	   r;   rR   s     r   Úreindex_insightzInsight.reindex_insightê   s4   € ð �:Š:Ü%Ð%Ø�o‰o˜dŸm™mÐ-BÓCˆØ�y‰y˜‹~Ðr   c                 ó€   — | j                   rt        ‚| j                  | j                  d«      }| j	                  |«      S )rZ   zindex/reindex/currentnoder[   rR   s     r   Úreindex_current_node_insightz$Insight.reindex_current_node_insightõ   s4   € ð �:Š:Ü%Ð%Ø�o‰o˜dŸm™mÐ-HÓIˆØ�y‰y˜‹~Ðr   c                 óÄ   — |||dœ}|r||d<   ||d<   ||d<   ||d<   ||d<   |	|d<   |
|d<   |r||d	<   | j                  | j                  d
«      }| j                  ||¬«      S )aÏ  
        Resource dedicated to finding objects based on the Insight Query Language (IQL)

        :param iql:
        :param object_schema_id:
        :param page:
        :param order_by_attribute_id:
        :param order_asc:
        :param result_per_page:
        :param include_attributes:
        :param include_attributes_deep:
        :param include_type_attributes:
        :param include_extended_info:
        :param extended:
        :return:
        )ÚiqlÚobjectSchemaIdÚpageÚorderByAttributeIdÚorderAscÚresultPerPageÚincludeAttributesÚincludeAttributesDeepÚincludeTypeAttributesÚincludeExtendedInfoÚextendedúiql/objectsrH   rN   )r   r`   Úobject_schema_idrb   Úorder_by_attribute_idÚ	order_ascÚresult_per_pageÚinclude_attributesÚinclude_attributes_deepÚinclude_type_attributesÚinclude_extended_inforj   rI   r   s                 r   r`   zInsight.iql  s“   € ð< Ð0@È$ÑOˆÙ Ø+@ˆFÐ'Ñ(Ø&ˆˆzÑØ"1ˆˆÑØ&8ˆÐ"Ñ#Ø*AˆÐ&Ñ'Ø*AˆÐ&Ñ'Ø(=ˆÐ$Ñ%ÙØ!)ˆF�:ÑØ�o‰o˜dŸm™m¨]Ó;ˆØ�x‰x˜ FˆxÓ+Ð+r   c                 ób   — | j                  | j                  d|› �«      }| j                  |«      S )zM
        Load one object

        :param object_id:
        :return:
        úobject/rN   r1   s      r   Ú
get_objectzInsight.get_object/  s-   € ð �o‰o˜dŸm™m¨w°y°kÐ-BÓCˆØ�x‰x˜‹}Ðr   c                 ót   — ||||dœ}| j                  | j                  d|› �«      }| j                  ||¬«      S )zÓ
        Update an existing object in Insight

        :param object_id:
        :param object_type_id:
        :param attributes:
        :param has_avatar:
        :param avatar_uuid:
        :return:
        ©Ú
attributesÚobjectTypeIdÚ
avatarUUIDÚ	hasAvatarru   ©Údata)r0   r	   Úput)r   r2   Úobject_type_idry   Ú
has_avatarÚavatar_uuidÚbodyr   s           r   Úupdate_objectzInsight.update_object9  sG   € ð& %Ø*Ø%Ø#ñ	
ˆð �o‰o˜dŸm™m¨w°y°kÐ-BÓCˆØ�x‰x˜ $ˆxÓ'Ð'r   c                 ób   — | j                  | j                  d|› �«      }| j                  |«      S )zZ
        Delete the referenced object

        :param object_id:
        :return:
        ru   )r0   r	   rA   r1   s      r   Údelete_objectzInsight.delete_objectT  s.   € ð �o‰o˜dŸm™m¨w°y°kÐ-BÓCˆØ�{‰{˜3ÓÐr   c                 ód   — | j                  | j                  d|› d�«      }| j                  |«      S )zf
        List all attributes for the given object

        :param object_id:
        :return:
        ru   ú/attributesrN   r1   s      r   Úget_object_attributeszInsight.get_object_attributes^  s/   € ð �o‰o˜dŸm™m¨w°y°kÀÐ-MÓNˆØ�x‰x˜‹}Ðr   c                 ór   — ||dœ}| j                  | j                  d|› d�«      }| j                  ||¬«      S )z™
        Retrieve the history entries for this object

        :param object_id:
        :param asc:
        :param abbreviate:
        :return:
        )ÚascÚ
abbreviateru   z/historyrH   rN   )r   r2   r‹   rŒ   rI   r   s         r   Úget_object_historyzInsight.get_object_historyh  s>   € ð ¨JÑ7ˆØ�o‰o˜dŸm™m¨w°y°kÀÐ-JÓKˆØ�x‰x˜ FˆxÓ+Ð+r   z3.29.0zUse get_object_reference_info())ÚversionÚreasonc                 ó&   — | j                  |«       y)z)Let's use the get_object_reference_info()N)Úget_object_reference_info)r   r2   s     r   Úget_object_referenceinfoz Insight.get_object_referenceinfou  s   € ð 	×&Ñ& yÕ1r   c                 ód   — | j                  | j                  d|› d�«      }| j                  |«      S )z_
        Find all references for an object

        :param object_id:
        :return:
        ru   z/referenceinforN   r1   s      r   r‘   z!Insight.get_object_reference_infoz  s/   € ð �o‰o˜dŸm™m¨w°y°kÀÐ-PÓQˆØ�x‰x˜‹}Ðr   c                 ón   — ||||dœ}| j                  | j                  d«      }| j                  ||¬«      S )zÄ
        Create a new object in Insight

        :param object_type_id:
        :param attributes:
        :param has_avatar:
        :param avatar_uuid:
        :return:
        :return:
        rx   zobject/creater}   rU   )r   r€   ry   r�   r‚   r~   r   s          r   Úcreate_objectzInsight.create_object„  s@   € ð %Ø*Ø%Ø#ñ	
ˆð �o‰o˜dŸm™m¨_Ó=ˆØ�y‰y˜ 4ˆyÓ(Ð(r   c                 ó¶   — ||||	|
dœ}|�||d<   |�||d<   |�||d<   |�||d<   |�||d<   | j                  | j                  d«      }| j                  ||¬«      S )	a¯  
        A filter object that is used to find a paginated result set based on an object type and an IQL query

        :param iql:
        :param object_type_id:
        :param page:
        :param results_per_page:
        :param order_by_type_attr_id:
        :param asc:
        :param object_id:
        :param object_schema_id:
        :param include_attributes:
        :param attributes_to_display:
        :return:
        )rz   r`   ÚresultsPerPagerb   r‹   ÚattributesToDisplayrf   ra   ÚorderByTypeAttrIdrF   rk   r}   rU   )r   r`   r€   Úresults_per_pageÚorder_by_type_attr_idr2   rl   rp   Úattributes_to_displayrb   r‹   r~   r   s                r   Úcreate_object_navlist_iqlz!Insight.create_object_navlist_iql˜  s—   € ð: +ØØ.ØØñ
ˆð !Ð,Ø*?ˆDÐ&Ñ'ØÐ)Ø(:ˆDÐ$Ñ%ØÐ'Ø%5ˆDÐ!Ñ"Ø Ð,Ø(=ˆDÐ$Ñ%ØÐ Ø(ˆD�ÑØ�o‰o˜dŸm™m¨]Ó;ˆØ�y‰y˜ 4ˆyÓ(Ð(r   c                 ód   — | j                  | j                  d|› d�«      }| j                  |«      S )zn
        Relation between Jira issues and Insight objects

        :param object_id:
        :return:
        zobjectconnectedtickets/z/ticketsrN   r1   s      r   Úget_object_connected_ticketsz$Insight.get_object_connected_ticketsÉ  s5   € ð �o‰oØ�M‰MØ% i [°Ð9ó
ˆð �x‰x˜‹}Ðr   z3.29.1zUse list_object_schema()c                 ó"   — | j                  «       S ©N)Úlist_object_schemar+   s    r   Úlist_objectschemazInsight.list_objectschema×  s   € à×&Ñ&Ó(Ð(r   c                 ó\   — | j                  | j                  d«      }| j                  |«      S )aã  
        Resource to find object schemas in Insight
        :return:
        {
            "objectschemas": [
            {
                "id": 1,
                "name": "Test",
                "objectSchemaKey": "TEST",
                "status": "Ok",
                "created": "2019-11-26T08:05:46.894Z",
                "updated": "2019-11-26T08:05:46.894Z",
                "objectCount": 2,
                "objectTypeCount": 3
            }
            ]
        }
        zobjectschema/listrN   rR   s     r   r¢   zInsight.list_object_schemaÛ  s'   € ð& �o‰o˜dŸm™mÐ-@ÓAˆØ�x‰x˜‹}Ðr   c                 ó   — t         ‚r¡   ©r/   )r   Úobject_schema_keyÚdescriptions      r   Úcreate_object_schemazInsight.create_object_schemañ  s   € Ü!Ð!r   zUse get_objectschema()c                 ó&   — | j                  |¬«      S )N)Ú	schema_id)Úget_objectschema©r   r«   s     r   r¬   zInsight.get_objectschemaô  s   € à×$Ñ$¨yÐ$Ó9Ð9r   c                 ób   — | j                  | j                  d|› �«      }| j                  |«      S )z?
        Find a schema by id
        :param schema_id:
        zobjectschema/rN   )r   r«   r   s      r   Úget_object_schemazInsight.get_object_schemaø  s-   € ð
 �o‰o˜dŸm™m¨}¸Y¸KÐ-HÓIˆØ�x‰x˜‹}Ðr   c                 ó   — t         ‚)z)
        Update an object schema
        r¦   r­   s     r   Úupdate_object_schemazInsight.update_object_schema   ó
   € ô "Ð!r   c                 ó   — t         ‚)z"
        Delete a schema

        r¦   r­   s     r   Údelete_object_schemazInsight.delete_object_schema  s
   € ô
 "Ð!r   c                 ó   — t         ‚)zH
        Find all object type attributes for this object schema
        r¦   r­   s     r   Úget_object_schema_attributesz$Insight.get_object_schema_attributes  r²   r   c                 ó  — t        t        «       j                  «       «      }t        «       }|j	                  |D ��ci c]  \  }}|€Œ	|dvsŒ||“Œ c}}«       | j                  | j                  › d|› d�|¬«      S c c}}w )aV  
        Find all object types for this object schema
        https://developer.atlassian.com/cloud/assets/rest/api-group-objectschema/#api-objectschema-id-objecttypes-flat-get
        Args:
            schema_id (str): id of the object schema
            query (bool, optional): Object Type Names to search for, defaults to None (Use API default)
            exclude (str, optional): Exclude objects with this name, defaults to None (Use API default)
            includeObjectCounts (bool, optional): Populate objectCount attribute for each object type, defaults to None (Use API default)
        r­   z/objectschema/z/objecttypes/flatrH   )ÚlistÚlocalsÚitemsÚdictÚupdater   r	   )	r   r«   ÚqueryÚexcludeÚincludeObjectCountsr   rI   ÚkÚvs	            r   Ú#get_object_schema_object_types_flatz+Insight.get_object_schema_object_types_flat  s}   € ô ”f“h—n‘nÓ&Ó'ˆÜ“ˆØ�‰¨×c¡  1°!±-ÀAÐMbÒDb�q˜!‘tÓcÔdØ�x‰xØ�}‰}ˆo˜^¨I¨;Ð6GÐHØð ó 
ð 	
ùó ds   ¼
A<
ÁA<
ÁA<
c	                 ó  — t        t        «       j                  «       «      }	t        «       }
|
j	                  |	D ��ci c]  \  }}|€Œ	|dvsŒ||“Œ c}}«       | j                  | j                  › d|› d�| j                  |
¬«      S c c}}w )aß  
        Find all attributes for this object type
        https://developer.atlassian.com/cloud/insight/rest/api-group-objecttype/#api-objecttype-id-attributes-get
        Args:
            type_id (str): id of the object type
            only_value_editable (bool, optional): only return editable values, defaults to None (Use API default)
            order_by_name (bool, optional): values, defaults to None (Use API default)
            query (str, optional): Not documented in API, defaults to None (Use API default)
            include_values_exist (bool, optional): Include only where values exist, defaults to None (Use API default)
            exclude_parent_attributes (bool, optional): Exclude parent attributes, defaults to None (Use API default)
            include_children (bool, optional): include attributes from children, defaults to None (Use API default)
            order_by_required (bool, optional): Order by required fields, defaults to None (Use API default)
        )r   Útype_idz/objecttype/rˆ   )r   rI   )r¸   r¹   rº   r»   r¼   r   r	   r%   )r   rÄ   Úonly_value_editableÚorder_by_namer½   Úinclude_values_existÚexclude_parent_attributesÚinclude_childrenÚorder_by_requiredr   rI   rÀ   rÁ   s                r   Úget_object_type_attributesz"Insight.get_object_type_attributes%  s…   € ô2 ”f“h—n‘nÓ&Ó'ˆÜ“ˆØ�‰¨×a¡  1°!±-ÀAÐM`ÒD`�q˜!‘tÓaÔbà�x‰xØ�}‰}ˆo˜\¨'¨°+Ð>Ø×-Ñ-Øð ó 
ð 	
ùó bs   ¼
B
ÁB
ÁB
c                 ó€   — | j                   rt        ‚| j                  | j                  d«      }| j	                  |«      S )zA
        Show ongoing insight processes
        :return:
        z)progress/category/insight-reindex/reindexr.   rR   s     r   Úget_progress_of_reindexzInsight.get_progress_of_reindexY  s4   € ð
 �:Š:Ü%Ð%Ø�o‰o˜dŸm™mÐ-XÓYˆØ�x‰x˜‹}Ðr   c                 ó†   — | j                   rt        ‚| j                  | j                  d|› �«      }| j	                  |«      S )zÏ
        Show ongoing insight processes
        :type import_id: int: The id of the import source configuration
                              that the progress should be fetched for
        :return:
        zprogress/category/imports/r.   rV   s      r   Úget_progress_of_importzInsight.get_progress_of_importc  s;   € ð �:Š:Ü%Ð%Ø�o‰o˜dŸm™mÐ/IÈ)ÈÐ-UÓVˆØ�x‰x˜‹}Ðr   c                 óÒ   — | j                  d«      }|rdnd}d|||D �cg c]  }d|i‘Œ c}igii}d||D �cg c]  }d|i‘Œ c}ii}| j                  |› d|› �|¬«      S c c}w c c}w )	aY  
        Set the value of an Insight field.
        Args:
            key (str): Jira issue key, eg. SFT-446
            field_id (str): The internal Jira name of the Insight field, e.g. customfield_10200
            insight_keys (list): List of Insight objects to associate with the field. Limited
                to 20 objects. If the field only takes a single object pass a single value list.
            add (bool, optional): Add to the existing field rather than setting the field value.
                Defaults to False.
        Returns:
            [type]: The insight object updated.
        ÚissueÚaddÚsetr¼   ÚkeyÚfieldsú/r}   )Úresource_urlr   )	r   rÔ   Úfield_idÚinsight_keysrÒ   Úbase_urlÚactionr&   r~   s	            r   Úupdate_issue_insight_fieldz"Insight.update_issue_insight_field|  s’   € ð ×$Ñ$ WÓ-ˆÙ‘ 5ˆàØ˜F¸Ö$F°A e¨Q¢ZÒ$FÐGÐHðð
ˆð
 ˜8¸,Ö%G°Q u¨a¢jÒ%GÐHÐIˆØ�x‰x˜8˜* A c UÐ+°$ˆxÓ7Ð7ùò	 %Gùò &Hs
   ŸA
·A$c                 ó(   — d}| j                  |«      S )a"  
        Check for duplicate attribute values in Insight objects with cardinality maximum 1
        used for Data Center
        link: https://confluence.atlassian.com/jirakb/duplicated-attribute-values-in-insight-objects-with-cardinality-maximum-1-1114816155.html
        :return:
        ú>rest/insight/1.0/health/consistency/duplicates/attributevalues)r   rR   s     r   Ú check_duplicate_attribute_valuesz(Insight.check_duplicate_attribute_values“  s   € ð OˆØ�x‰x˜‹}Ðr   c                 ó(   — d}| j                  |«      S )a  
        Delete duplicate attribute values in Insight objects with cardinality maximum 1
        used for Data Center
        link: https://confluence.atlassian.com/jirakb/duplicated-attribute-values-in-insight-objects-with-cardinality-maximum-1-1114816155.html
        :return:
        rÞ   )rA   rR   s     r   Ú!delete_duplicate_attribute_valuesz)Insight.delete_duplicate_attribute_values�  s   € ð OˆØ�{‰{˜3ÓÐr   )	r   NTé   Tr   FFN)FÚ )FT)NNNNNr   r   )NNN)NNNNNNN)F)/Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r'   r,   r3   r?   rC   rJ   rL   rP   rS   rX   r\   r^   r`   rv   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á   Ú__classcell__)r   s   @r   r   r   
   st  ø„ Ù'ô7òò(2ò	<ò=ò$òLNò	 ò$-òL
òò òò	ò	ð" Ø"ØØØØ !Ø %Ø#Øó*,òZð Øó(ò6 òó,ñ ˜Ð)JÔKñ2ó Lð2òó)ð2 #ØØØØ"ØØó.)òbñ ˜Ð)CÔDñ)ó Eð)òò,"ñ ˜Ð)AÔBñ:ó Cð:òò"ò"ò"ó
ð* !ØØØ!Ø"&ØØó!
òhò
ó28ò.ö r   r   )ÚloggingÚrest_clientr   r   Ú	getLoggerrä   r8   r   © r   r   ú<module>rí      s/   ðã å )Ý !à€g×Ñ˜Ó!€ô[
 Ðõ [
 r   