
    	                     n   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 ddlmZ ej"                   ej$                  ej&                  j(                  ej&                  j*                  ej&                  j,                         G d dej.                                      Zy)z1`gcloud certificate-manager maps create` command.    )absolute_import)division)unicode_literals)certificate_maps)base)flags)resource_args)util)labels_util)logc                   &    e Zd ZdZed        Zd Zy)CreatezCreate a certificate map.

  This command creates a certificate map.

  ## EXAMPLES

  To create a certificate map with name simple-map, run:

    $ {command} simple-map
  c                     t        j                  | d       t        j                  |        t	        j
                  | d       t	        j                  |        t	        j                  |        y )Nz	to createcertificate map)r	   AddCertificateMapResourceArgr   AddCreateLabelsFlagsr   AddDescriptionFlagToParserAddAsyncFlagToParserGetTags)parsers    .lib/surface/certificate_manager/maps/create.pyArgszCreate.Args-   sK    ..v{C$$V,	$$V->?	v&	MM&    c                 \   t        j                         }|j                  j                  j	                         }|j                         }t        j                  ||j                  j                  j                        }t        j                  ||j                  j                  j                        }|j                  ||j                  |j                   ||      }t#        j$                  ||j&                        }t)        j*                  |j-                         d|j&                         |S )N)descriptionlabelstags)is_asyncr   )r   CertificateMapClientCONCEPTSmapParseParentr   ParseCreateArgsmessagesCertificateMapLabelsValuer   GetTagsFromArgs	TagsValuer   certificateMapsIdr   r
   WaitForOperationasync_r   CreatedResourceName)	selfargsclientmap_reflocation_refr   r   responseoperation_responses	            r   Runz
Create.Run5   s    224Fmm%%'G>>#L((foo,,88:F  v'E'E'O'OPD}}!!$$  H ..x$++N(9DKKPr   N)__name__
__module____qualname____doc__staticmethodr   r6    r   r   r   r      s     	  r   r   N)r:   
__future__r   r   r   *googlecloudsdk.api_lib.certificate_managerr   googlecloudsdk.callioper   .googlecloudsdk.command_lib.certificate_managerr   r	   r
   $googlecloudsdk.command_lib.util.argsr   googlecloudsdk.corer   DefaultUniverseOnlyReleaseTracksReleaseTrackALPHABETAGACreateCommandr   r<   r   r   <module>rJ      s    8 &  ' G ( @ H ? < # D%%++T->->-C-C%%((*$T $* $r   