
    
                     j   d Z ddlmZ ddlmZ ddlmZ ddl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ddZdeiZe	j"                   e	j$                  e	j&                  j(                  e	j&                  j*                  e	j&                  j,                         G d de	j.                                      Zy)z7`gcloud certificate-manager maps entries list` command.    )absolute_import)division)unicode_literalsN)certificate_map_entries)base)resource_args)utilztable(
    name.scope(certificateMapEntries):sort=1,
    description,
    hostname,
    matcher,
    certificates.certNamesToIDs(undefined=''),
    state,
    createTime.date('%Y-%m-%d %H:%M:%S %Oz', undefined='')
)
zUprojects/([a-z0-9-]{1,63})/locations/([a-z0-9-]{1,63})/certificates/([a-z0-9-]{1,63})c                     | s|S g }| D ]@  }t        j                  t        |      }|j                  |r|j	                  d      n|       B |rdj                  |      S |S )z3Transforms fully qualified cert names to their IDs.   
)rematch_CERT_NAME_REGEXappendgroupjoin)
cert_names	undefinedresultnamer   s        4lib/surface/certificate_manager/maps/entries/list.py_TransformCertificateNamesr   +   s[    	&dHH%t,E
MME%++a.t4  %6	3)3    certNamesToIDsc                   &    e Zd ZdZed        Zd Zy)ListzList certificate map entries.

  List Certificate Manager certificate map entries in the certificate map.

  ## EXAMPLES

  To list all certificate map entries in the certificate map, run:

    $ {command} --map=simple-map
  c                    t        j                  | dd       | j                  j                  t        j
                         | j                  j                  t               | j                  j                  t               y )Nzto list map entries forF)
positional)
r   AddCertificateMapResourceArgdisplay_info
AddUriFuncr	   CertificateMapEntryUriFunc	AddFormat_FORMATAddTransforms_TRANSFORMS)parsers    r   Argsz	List.ArgsJ   sZ    ..)e=
""4#B#BC
!!'*
%%k2r   c                     t        j                         }|j                  j                  j	                         }|j                  ||j                  |j                        S )N)r   CertificateMapEntryClientCONCEPTSmapParser   limit	page_size)selfargsclientmap_refs       r   RunzList.RunR   sC    $>>@Fmm%%'G;;w

DNN;;r   N)__name__
__module____qualname____doc__staticmethodr(   r4    r   r   r   r   ;   s     	 3 3<r   r   ) )r8   
__future__r   r   r   r   *googlecloudsdk.api_lib.certificate_managerr   googlecloudsdk.callioper   .googlecloudsdk.command_lib.certificate_managerr   r	   r$   r   r   r&   DefaultUniverseOnlyReleaseTracksReleaseTrackALPHABETAGAListCommandr   r:   r   r   <module>rG      s    > &  ' 	 N ( H ?
 k 4 0
 D%%++T->->-C-C%%((*<4 <* <r   