
    \	                     D   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 dd	l
mZ dd
lmZ  ej                  ej                   j"                  ej                   j$                  ej                   j&                         G d dej(                               Zy)z6List command for gcloud debug logpoints command group.    )absolute_import)division)unicode_literals)arg_parsers)base)flags)
taxonomies)util)
propertiesc                   0    e Zd ZdZdddZed        Zd Zy)Importz>Export a file with serialized taxonomies to a certain project.zP
          Export a file with serialized taxonomies to a certain project.
      z
          To parse and import the taxonomies contained in '/tmp/taxonomies.json'
          to your project within location LOCATION:

            $ {command} "/tmp/taxonomies.json" --location="LOCATION"
      )DESCRIPTIONEXAMPLESc                 ~    t        j                  | d       | j                  dt        j                         dd       y )Nz!Location to import taxonomies to.r	   
TAXONOMIESz9            File containing serialized taxonomy.
        )typemetavarhelp)r   AddLocationResourceArgadd_argumentr   YAMLFileContents)parsers    -lib/surface/data_catalog/taxonomies/import.pyArgszImport.Args/   s=    	  )LM
))+	      c                 ,   t        j                  | j                               }t        j                  j
                  j                  j                         |_        t        j                  |j                  |      |_        t        j                  ||      S )zRun the import command.)r   GetVersionLabelReleaseTrackr   VALUEScoreprojectGetproject_valr
   ProcessTaxonomiesFromYAMLr	   r   )selfargsversion_labels      r   Runz
Import.Run:   sm    ))$*;*;*=>M!((--5599;D44T__5BDDOT=11r   N)__name__
__module____qualname____doc__detailed_helpstaticmethodr   r(    r   r   r   r      s2     G

	
-  2r   r   N)r,   
__future__r   r   r   googlecloudsdk.callioper   r   'googlecloudsdk.command_lib.data_catalogr   2googlecloudsdk.command_lib.data_catalog.taxonomiesr	   r
   googlecloudsdk.corer   ReleaseTracksr   ALPHABETAGACommandr   r/   r   r   <module>r:      s|     = &  ' / ( 9 I C * D%%++T->->-C-C%%((* 2T\\  2* 2r   