
    3
                     ,     " S  S5      r  " S S5      rg)c                   ^    \ rS rSrSrSrSS jrS rS rS r	\
S	 5       r\
S
 5       rS rSrg)Model   z>
A base class for representing a single object on the server.
IdNc                 R    X l         X0l        Xl        U R                  c  0 U l        g g N)client
collectionattrs)selfr
   r   r	   s       )lib/third_party/docker/models/resource.py__init__Model.__init__   s+     % 
::DJ     c                 P    SU R                   R                   SU R                   S3$ )N<z: >)	__class____name__short_idr   s    r   __repr__Model.__repr__   s&    4>>**+2dmm_A>>r   c                 l    [        XR                  5      =(       a    U R                  UR                  :H  $ r   )
isinstancer   id)r   others     r   __eq__Model.__eq__   s#    %0HTWW5HHr   c                 ^    [        U R                  R                   SU R                   35      $ )N:)hashr   r   r   r   s    r   __hash__Model.__hash__   s'    t~~../q	:;;r   c                 L    U R                   R                  U R                  5      $ )z
The ID of the object.
)r
   getid_attributer   s    r   r   Model.id   s    
 zz~~d//00r   c                      U R                   SS $ )z3
The ID of the object, truncated to 12 characters.
N   )r   r   s    r   r   Model.short_id#   s    
 wws|r   c                 p    U R                   R                  U R                  5      nUR                  U l        g)zP
Load this object from the server again and update ``attrs`` with the
new data.
N)r	   r%   r   r
   )r   	new_models     r   reloadModel.reload*   s'    
 OO''0	__
r   r
   r   r	   )NNN)r   
__module____qualname____firstlineno____doc__r&   r   r   r   r"   propertyr   r   r-   __static_attributes__ r   r   r   r      sP     L
?I< 1 1  %r   r   c                   H    \ rS rSrSrSrSS jrS rS rS r	SS jr
S	 rS
rg)
Collection3   zO
A base class for representing all objects of a particular type on the
server.
Nc                     Xl         g r   r   )r   r   s     r   r   Collection.__init__<   s	     r   c                 ^    [        SR                  U R                  R                  5      5      e)Nzk'{}' object is not callable. You might be trying to use the old (pre-2.0) API - use docker.APIClient if so.)	TypeErrorformatr   r   )r   argskwargss      r   __call__Collection.__call__A   s(    :VDNN++,. 	.r   c                     [         er   NotImplementedErrorr   s    r   listCollection.listG       !!r   c                     [         er   rE   )r   keys     r   r%   Collection.getJ   rI   r   c                     [         er   rE   r   r
   s     r   createCollection.createM   rI   r   c                 
   [        U[        5      (       a  U R                  Ul        Xl        U$ [        U[        5      (       a  U R                  XR                  U S9$ [        SU R
                  R                  < SU< 35      e)z*
Create a model from a set of attributes.
r/   zCan't create z from )r   r   r   r	   dictmodel	Exceptionr   rN   s     r   prepare_modelCollection.prepare_modelP   sl     eU##;;EL#Lt$$::E++$:OO!ZZ00%9 : :r   r;   r   )r   r0   r1   r2   r3   rS   r   rB   rG   r%   rO   rU   r5   r6   r   r   r8   r8   3   s,     E
.""":r   r8   N)r   r8   r6   r   r   <module>rW      s   /% /%d): ):r   