o
     {g                     @   sL   d dl Z ddlmZ e jdkrd dlmZ nd dlmZ G dd deZdS )    N   )BaseResource)   r   )quotec                       sb   e Zd Zg dZdgZdgZddgZddgZ fdd	Zd
d Z	dd Z
dd ZdddZ  ZS )	Formation)idcommandtypesizequantityattached
created_at
updated_atr   r	   c                    s   d | _ tt|   d S )N)appsuperr   __init__self	__class__ u/var/www/bot.gig.net.ua/public_html/telegram/P1/HellBot/venv/lib/python3.10/site-packages/heroku3/models/formation.pyr      s   zFormation.__init__c                 C   s   d | j| jS )Nz<formation '{0} - {1}'>)formatr	   r   r   r   r   r   __repr__   s   zFormation.__repr__c                 C      | j |dS )z6Scales the given process to the given number of dynos.)r   update)r   r   r   r   r   scale      zFormation.scalec                 C   r   )z'Resizes the Dynos to the multiple given)r
   r   )r   r
   r   r   r   resize   r   zFormation.resizeNc                 C   s   |s
|dks
|s
J i }|r||d< |s|dkr||d< | j jdd| jjdt| jf| j |d}|  | j | j 	|j
dtS )	Nr   r
   r   PATCHapps	formation)methodresourcedatazutf-8)_h_http_resourcer   r   r   r	   _resource_serializeraise_for_status_process_item_resource_deserializecontentdecoder   )r   r
   r   payloadrr   r   r   r   #   s   
zFormation.update)NN)__name__
__module____qualname___strs_ints_bools_dates_pksr   r   r   r   r   __classcell__r   r   r   r   r      s    r   )sys r   version_infourllib.parser   urllibr   r   r   r   r   <module>   s    
