
    
                     P   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$                  j&                  ej$                  j(                  ej$                  j*                         G d dej,                               Zy)z9`gcloud certificate-manager maps entries create` command.    )absolute_import)division)unicode_literals)certificate_map_entries)base)flags)resource_args)util)labels_util)logc                   &    e Zd ZdZed        Zd Zy)CreatezCreate a certificate map entry.

  This command creates a certificate map entry.

  ## EXAMPLES

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

    $ {command} simple-entry --map=simple-map --certificates=simple-cert
  c                     t        j                  | d       t        j                  |        t	        j
                  | d       t	        j                  |        t	        j                  |        y )Nz	to create)
entry_verbcertificate map entry)r	   1AddCertificateMapEntryAndCertificatesResourceArgsr   AddCreateLabelsFlagsr   AddDescriptionFlagToParserAddMapEntryMatcherFlagsToParserAddAsyncFlagToParser)parsers    6lib/surface/certificate_manager/maps/entries/create.pyArgszCreate.Args,   sP    CC;($$V,	$$V-DE	))&1	v&    c                 R   t        j                         }|j                  j                  j	                         }|j                         }|j                  j                  j	                         }t        j                  ||j                  j                  j                        }|j                  ||j                  |j                  ||j                  |      }t!        j"                  ||j$                        }t'        j(                  |j+                         d|j$                         |S )N)hostname	cert_refsdescriptionlabels)is_asyncr   )r   CertificateMapEntryClientCONCEPTSentryParseParentcertificatesr   ParseCreateArgsmessagesCertificateMapEntryLabelsValuer   certificateMapEntriesIdr   r   r
   WaitForOperationasync_r   CreatedResourceName)	selfargsclient	entry_refmap_refr   r   responseoperation_responses	            r   Runz
Create.Run5   s    $>>@F##))+I G**002I((foo11==?F }}))$$  H ..x$++N1DKKIr   N)__name__
__module____qualname____doc__staticmethodr   r7    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   ReleaseTracksReleaseTrackALPHABETAGACreateCommandr   r=   r   r   <module>rJ      s    @ &  ' N ( @ H ? < # D%%++T->->-C-C%%((*'T '*'r   