Ë
    ú}àiÿ  ã                   ó(   — d dl mZmZ  G d„ d«      Zy)é   )ÚerrorsÚutilsc                   ó`   — e Zd Zdd„Z	 	 d	d„Zd„ Z ej                  d«      dd„«       Zd
d„Z	y)ÚVolumeApiMixinNc                 ó    — d|rt        j                  |«      ndi}| j                  d«      }| j                  | j	                  ||¬«      d«      S )a  
        List volumes currently registered by the docker daemon. Similar to the
        ``docker volume ls`` command.

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

        Returns:
            (dict): Dictionary with list of volume objects as value of the
            ``Volumes`` key.

        Raises:
            :py:class:`docker.errors.APIError`
                If the server returns an error.

        Example:

            >>> client.api.volumes()
            {u'Volumes': [{u'Driver': u'local',
               u'Mountpoint': u'/var/lib/docker/volumes/foobar/_data',
               u'Name': u'foobar'},
              {u'Driver': u'local',
               u'Mountpoint': u'/var/lib/docker/volumes/baz/_data',
               u'Name': u'baz'}]}
        ÚfiltersNz/volumes©ÚparamsT)r   Úconvert_filtersÚ_urlÚ_resultÚ_get©Úselfr   r
   Úurls       úX/home/factor_ks/STREAMA2026/tests/venv/lib/python3.12/site-packages/docker/api/volume.pyÚvolumeszVolumeApiMixin.volumes   sM   € ð8 ¹”u×,Ñ,¨WÔ5Àdð
ˆð �i‰i˜
Ó#ˆØ�|‰|˜DŸI™I c°&˜IÓ9¸4Ó@Ð@ó    c                 ód  — | j                  d«      }|�t        |t        «      st        d«      ‚|||dœ}|�Xt	        j
                  d| j                  «      dk  rt        j                  d«      ‚t        |t        «      st        d«      ‚||d<   | j                  | j                  ||¬	«      d
«      S )aë  
        Create and register a named volume

        Args:
            name (str): Name of the volume
            driver (str): Name of the driver used to create the volume
            driver_opts (dict): Driver options as a key-value dictionary
            labels (dict): Labels to set on the volume

        Returns:
            (dict): The created volume reference object

        Raises:
            :py:class:`docker.errors.APIError`
                If the server returns an error.

        Example:

            >>> volume = client.api.create_volume(
            ...     name='foobar',
            ...     driver='local',
            ...     driver_opts={'foo': 'bar', 'baz': 'false'},
            ...     labels={"key": "value"},
            ... )
            ... print(volume)
            {u'Driver': u'local',
            u'Labels': {u'key': u'value'},
            u'Mountpoint': u'/var/lib/docker/volumes/foobar/_data',
            u'Name': u'foobar',
            u'Scope': u'local'}

        z/volumes/createz driver_opts must be a dictionary)ÚNameÚDriverÚ
DriverOptsz1.23é    z)volume labels were introduced in API 1.23zlabels must be a dictionaryÚLabels)ÚdataT)r   Ú
isinstanceÚdictÚ	TypeErrorr   Úcompare_versionÚ_versionr   ÚInvalidVersionr   Ú
_post_json)r   ÚnameÚdriverÚdriver_optsÚlabelsr   r   s          r   Úcreate_volumezVolumeApiMixin.create_volume&   s·   € ðD �i‰iÐ)Ó*ˆØÐ"¬:°kÄ4Ô+HÜÐ>Ó?Ð?ð ØØ%ñ
ˆð ÐÜ×$Ñ$ V¨T¯]©]Ó;¸aÒ?Ü×+Ñ+Ø?óð ô ˜f¤dÔ+ÜÐ =Ó>Ð>Ø#ˆD�‰Nà�|‰|˜DŸO™O¨C°d˜OÓ;¸TÓBÐBr   c                 óh   — | j                  d|«      }| j                  | j                  |«      d«      S )aæ  
        Retrieve volume info by name.

        Args:
            name (str): volume name

        Returns:
            (dict): Volume information dictionary

        Raises:
            :py:class:`docker.errors.APIError`
                If the server returns an error.

        Example:

            >>> client.api.inspect_volume('foobar')
            {u'Driver': u'local',
             u'Mountpoint': u'/var/lib/docker/volumes/foobar/_data',
             u'Name': u'foobar'}

        ú/volumes/{0}T)r   r   r   )r   r#   r   s      r   Úinspect_volumezVolumeApiMixin.inspect_volume]   s-   € ð, �i‰i˜¨Ó-ˆØ�|‰|˜DŸI™I c›N¨DÓ1Ð1r   ú1.25c                 ó¢   — i }|rt        j                  |«      |d<   | j                  d«      }| j                  | j	                  ||¬«      d«      S )a€  
        Delete unused volumes

        Args:
            filters (dict): Filters to process on the prune list.

        Returns:
            (dict): A dict containing a list of deleted volume names and
                the amount of disk space reclaimed in bytes.

        Raises:
            :py:class:`docker.errors.APIError`
                If the server returns an error.
        r   z/volumes/pruner	   T)r   r   r   r   Ú_postr   s       r   Úprune_volumeszVolumeApiMixin.prune_volumesv   sN   € ð  ˆÙÜ %× 5Ñ 5°gÓ >ˆF�9ÑØ�i‰iÐ(Ó)ˆØ�|‰|˜DŸJ™J s°6˜JÓ:¸DÓAÐAr   c                 óê   — i }|r9t        j                  | j                  d«      rt        j                  d«      ‚d|i}| j                  d||¬«      }| j                  |«      }| j                  |«       y)az  
        Remove a volume. Similar to the ``docker volume rm`` command.

        Args:
            name (str): The volume's name
            force (bool): Force removal of volumes that were already removed
                out of band by the volume driver plugin.

        Raises:
            :py:class:`docker.errors.APIError`
                If volume failed to remove.
        r+   z(force removal was introduced in API 1.25Úforcer)   r	   N)r   Ú
version_ltr    r   r!   r   Ú_deleteÚ_raise_for_status)r   r#   r0   r
   r   Úresps         r   Úremove_volumezVolumeApiMixin.remove_volumeŒ   sr   € ð ˆÙÜ×Ñ §¡¨vÔ6Ü×+Ñ+Ø>óð ð ˜uÐ%ˆFà�i‰i˜¨°VˆiÓ<ˆØ�|‰|˜CÓ ˆØ×Ñ˜tÕ$r   )N)NNNN)F)
Ú__name__Ú
__module__Ú__qualname__r   r'   r*   r   Úminimum_versionr.   r5   © r   r   r   r      sG   „ óAðB AEØ!ó5Còn2ð2 €U×Ñ˜6Ó"òBó #ðBô*%r   r   N)Ú r   r   r   r:   r   r   ú<module>r<      s   ðß ÷_%ò _%r   