
    5                     L    S SK Jr  SSKJrJr   " S S\5      r " S S\5      rg)	   )	APIClient   )Model
Collectionc                   8    \ rS rSrSrSrS r\S 5       rS r	Sr
g)	Secret   z	A secret.IDc                 P    SU R                   R                   SU R                   S3$ )N<z: 'z'>)	__class____name__nameselfs    (lib/third_party/docker/models/secrets.py__repr__Secret.__repr__	   s&    4>>**+3tyyk<<    c                 &    U R                   S   S   $ )NSpecName)attrsr   s    r   r   Secret.name   s    zz&!&))r   c                 `    U R                   R                  R                  U R                  5      $ )zi
Remove this secret.

Raises:
    :py:class:`docker.errors.APIError`
        If secret failed to remove.
)clientapiremove_secretidr   s    r   removeSecret.remove   s!     {{,,TWW55r    N)r   
__module____qualname____firstlineno____doc__id_attributer   propertyr   r    __static_attributes__r"   r   r   r   r      s(    L= * *6r   r   c                   d    \ rS rSrSr\rS r\R                  R                  \l        S r
S rSrg)SecretCollection   zSecrets on the Docker server.c                     U R                   R                  R                  " S0 UD6nUR                  S5      UR	                  S0 5      S'   U R                  U5      $ )Nr   r   r   r"   )r   r   create_secretget
setdefaultprepare_model)r   kwargsobjs      r   createSecretCollection.create   sL    kkoo++5f5-3ZZ-?vr"6*!!#&&r   c                 j    U R                  U R                  R                  R                  U5      5      $ )a  
Get a secret.

Args:
    secret_id (str): Secret ID.

Returns:
    (:py:class:`Secret`): The secret.

Raises:
    :py:class:`docker.errors.NotFound`
        If the secret does not exist.
    :py:class:`docker.errors.APIError`
        If the server returns an error.
)r1   r   r   inspect_secret)r   	secret_ids     r   r/   SecretCollection.get%   s(      !!$++//"@"@"KLLr   c                     U R                   R                  R                  " S0 UD6nU Vs/ s H  o0R                  U5      PM     sn$ s  snf )a  
List secrets. Similar to the ``docker secret ls`` command.

Args:
    filters (dict): Server-side list filtering options.

Returns:
    (list of :py:class:`Secret`): The secrets.

Raises:
    :py:class:`docker.errors.APIError`
        If the server returns an error.
r"   )r   r   secretsr1   )r   r2   respr3   s       r   listSecretCollection.list7   s@     {{&&003784C""3'4888s   Ar"   N)r   r#   r$   r%   r&   r   modelr4   r   r.   r/   r=   r)   r"   r   r   r+   r+      s/    'E' ,,44FNM$9r   r+   N)r   r   resourcer   r   r   r+   r"   r   r   <module>rA      s#     '6U 6,+9z +9r   