Ë
    €Ïæ	  ã                   ó\   — d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddlm
Z
 d„ Zd	„ Zy
)z0Attachment utils for Artifact Registry commands.é    )Úabsolute_import)Údivision)Úunicode_literals)Ú
exceptions)Údocker_util)Úrequestsc                 ó^  — | j                   s-t        | j                  j                  j	                  «       «      S t        j                  | j                   «      }t        j                  «       }t        j                  «       }|j                  |j                  j                  j                  «       ¬«      }dj                  |j                  «       ¬«      |_        |j"                  j%                  |«      }|j&                  sUt)        j*                  dj                  |j                  «       |j                  j                  j                  «       «      «      ‚t-        |j&                  «      dk7  r2t)        j*                  dj                  |j                  «       «      «      ‚|j&                  d   S )ú%Get the artifact registry Attachment.)Úparentzoci_version_name="{name}"©Únamez2OCI version name {} is not found in repository {}.é   z7OCI version name {} points to more than one attachment.r   )Úoci_version_nameÚGetAttachmentÚCONCEPTSÚ
attachmentÚParser   ÚParseDockerVersionStrr   Ú	GetClientÚGetMessagesÚCArtifactregistryProjectsLocationsRepositoriesAttachmentsListRequestÚimageÚdocker_repoÚGetRepositoryNameÚformatÚGetVersionNameÚfilterÚ+projects_locations_repositories_attachmentsÚListÚattachmentsÚar_exceptionsÚInvalidInputValueErrorÚlen)ÚargsÚoci_versionÚclientÚmessagesÚrequestÚresponses         ú;lib/googlecloudsdk/command_lib/artifacts/attachment_util.pyÚGetAttachmentToDownloadr+      si  € à	×	Ò	Ü˜Ÿ™×1Ñ1×7Ñ7Ó9Ó:Ð:ä×1Ñ1°$×2GÑ2GÓH€+Ü×ÑÓ€&Ü×!Ñ!Ó#€(Ø×XÑXØ×Ñ×*Ñ*×<Ñ<Ó>ð Yó €'ð /×5Ñ5Ø×%Ñ%Ó'ð 6ó €'„.ð ×?Ñ?×DÑDÀWÓM€(Ø	×	Ò	Ü
×
.Ñ
.Ø<×CÑCØ×&Ñ&Ó(Ø×Ñ×)Ñ)×;Ñ;Ó=ó	
óð ô 	ˆ×	Ñ	Ó !Ò#Ü
×
.Ñ
.ØA×HÑHØ×&Ñ&Ó(ó	
óð ð
 
×	Ñ	˜aÑ	 Ð ó    c                 óÌ   — t        j                  «       }t        j                  «       }|j                  | j	                  «       ¬«      }|j
                  j                  |«      }|S )r
   r   )r   r   r   ÚBArtifactregistryProjectsLocationsRepositoriesAttachmentsGetRequestÚRelativeNamer   ÚGet)Úattachment_refr&   r'   r(   r   s        r*   r   r   9   s^   € ä×ÑÓ€&Ü×!Ñ!Ó#€(Ø×WÑWØ×&Ñ&Ó(ð Xó €'ð ×AÑA×EÑEÀgÓN€*Ø	Ðr,   N)Ú__doc__Ú
__future__r   r   r   Ú googlecloudsdk.api_lib.artifactsr   r!   Ú$googlecloudsdk.command_lib.artifactsr   r   r+   r   © r,   r*   Ú<module>r7      s&   ðñ 7å &Ý Ý 'å HÝ <Ý 9ò!ó>r,   