
    	                         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dlm
Z
 ej                   ej                  ej                  j                         G d	 d
ej                                      Zy)z,Implements the command to export SBOM files.    )absolute_import)division)unicode_literals)base)endpoint_util)flags)	sbom_utilc                   0    e Zd ZdZdddZed        Zd Zy)Exportz*Export SBOM files to Google Cloud Storage.z{description}a            To export an SBOM file for the Artifact Registry image with URI "us-west1-docker.pkg.dev/my-project/my-repository/busy-box@sha256:abcxyz":

          $ {command} --uri=us-west1-docker.pkg.dev/my-project/my-repository/busy-box@sha256:abcxyz
          )DESCRIPTIONEXAMPLESc                     | j                   j                  d       | j                  ddd       t        j                         j                  |        y)z[Set up arguments for this command.

    Args:
      parser: An argparse.ArgumentPaser.
    yamlz--uriTa  The URI of the Artifact Registry image the SBOM is exported for. A 'gcr.io' image can also be used if redirection is enabled in Artifact Registry. Make sure 'artifactregistry.projectsettings.get' permission is granted to the current gcloud user to verify the redirection status.)requiredhelpN)display_info	AddFormatadd_argumentr   GetOptionalAALocationFlagAddToParser)parsers    $lib/surface/artifacts/sbom/export.pyArgszExport.Args)   sP     !!&)
I	  
 
##%11&9    c                     |j                   }t        j                  |      5  t        j                  |       ddd       y# 1 sw Y   yxY w)zThis is what gets called when the user runs this command.

    Args:
      args: An argparse namespace. All the arguments that were provided to this
        command invocation.
    N)locationr   
WithRegionr	   
ExportSbom)selfargsr   s      r   Runz
Export.Run>   s5     }}H		!	!(	+4  
,	+	+s   AA
N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r!    r   r   r   r      s1     3 %- : :(	!r   r   N)r%   
__future__r   r   r   googlecloudsdk.callioper   $googlecloudsdk.command_lib.artifactsr   r   r	   DefaultUniverseOnlyReleaseTracksReleaseTrackGACommandr   r(   r   r   <module>r1      se    3 &  ' ( > 6 : D%%(()*!T\\ *! * *!r   