
    Zj                     2    d dl mZ ddlmZ  G d de      Zy)   )GitflicArgumentError   )	APIObjectc                   l    e Zd ZdZdZg dZed        Zed        Zed        Z	ed        Z
ed        Zy	)
Webhookz/setting/webhookwebhookList)urlsecreteventsc                 :   t        | j                        j                  dk(  ry|j                  dd       }|t	        d      | j                  j
                  d   }| j                  j                   d| d| j                  j                   | j                   d| S y NProjectid#Key value argument 'id' is requiredalias/typeparent__name__getr   ownerpathr   clsargskwargs_idowner_aliass        /./modules/git/gitflic_client/objects/webhook.py_create_get_urlzWebhook._create_get_url       

$$	1**T4(C{*+PQQ****73Kjjoo&a}Acjj6F6F5GzQRSVRWXX 2    c                     t        | j                        j                  dk(  rW| j                  j                  d   }| j                  j                   d| d| j                  j
                   | j                   S y Nr   r   r   r   r   r   r   r   r   r   r   r   r   s       r    _create_list_urlzWebhook._create_list_url   e    

$$	1****73Kjjoo&a}Acjj6F6F5GzRR 2r#   c                     t        | j                        j                  dk(  rW| j                  j                  d   }| j                  j                   d| d| j                  j
                   | j                   S y r%   r&   r'   s       r    _create_create_urlzWebhook._create_create_url   r)   r#   c                 :   t        | j                        j                  dk(  ry|j                  dd       }|t	        d      | j                  j
                  d   }| j                  j                   d| d| j                  j                   | j                   d| S y r   r   r   s        r    _create_update_urlzWebhook._create_update_url"   r"   r#   c           	      <   t        | j                        j                  dk(  rz|j                  dd       }|t	        d      | j                  j
                  d   }| j                  j                   d| d| j                  j                   | j                   d| d	S y )Nr   r   r   r   r   z/deleter   r   s        r    _create_delete_urlzWebhook._create_delete_url-   s    

$$	1**T4(C{*+PQQ****73Kjjoo&a}Acjj6F6F5GzQRSVRWW^__ 2r#   N)r   
__module____qualname__r   _list_key_name_update_required_fieldsclassmethodr!   r(   r+   r-   r/    r#   r    r   r      s~    D"N9Y Y S S
 S S
 Y Y ` `r#   r   N)
exceptionsr   baser   r   r5   r#   r    <module>r8      s    - 0`i 0`r#   