
    <
                     ^   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	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 certificates list` command.    )absolute_import)division)unicode_literals)certificates)base)resource_args)utilan  table(
    name.scope(certificates):sort=1,
    name.segment(3):label=LOCATION,
    san_dnsnames.sansToString(undefined=''):label=SUBJECT_ALTERNATIVE_NAMES,
    description,
    scope,
    expireTime.date('%Y-%m-%d %H:%M:%S %Oz', undefined=''),
    createTime.date('%Y-%m-%d %H:%M:%S %Oz', undefined=''),
    updateTime.date('%Y-%m-%d %H:%M:%S %Oz', undefined='')
)
c                 ,    | rdj                  |       S |S )zJoins list of SANs with \n as separator..

  Args:
    sans: list of SANs.
    undefined: str, value to be returned if no SANs are found.

  Returns:
    String representation to be shown in table view.
  
)join)sans	undefineds     4lib/surface/certificate_manager/certificates/list.py_TransformSANsr   (   s     !4/i/    sansToStringc                   &    e Zd ZdZed        Zd Zy)ListzList certificates.

  List Certificate Manager certificates in the project.

  ## EXAMPLES

  To list all certificates in the project, run:

    $ {command}
  c                    t        j                  | dd       | j                  j                  t        j
                         | j                  j                  t               | j                  j                  t               y )Nzto list certificates forT)verball_default_location)
r   AddLocationResourceArgdisplay_info
AddUriFuncr	   CertificateUriFunc	AddFormat_FORMATAddTransforms_TRANSFORMS)parsers    r   Argsz	List.ArgsI   s[    ((/dL
""4#:#:;
!!'*
%%k2r   c                     t        j                         }|j                  j                  j	                         }|j                  ||j                  |j                        S )N)r   CertificateClientCONCEPTSlocationParser   limit	page_size)selfargsclientlocation_refs       r   RunzList.RunQ   sC    ++-F==))//1L;;|TZZ@@r   N)__name__
__module____qualname____doc__staticmethodr!   r-    r   r   r   r   :   s!    	 3 3Ar   r   N) )r1   
__future__r   r   r   *googlecloudsdk.api_lib.certificate_managerr   googlecloudsdk.callioper   .googlecloudsdk.command_lib.certificate_managerr   r	   r   r   r   DefaultUniverseOnlyReleaseTracksReleaseTrackALPHABETAGAListCommandr   r3   r   r   <module>r@      s    > &  ' C ( H ?
0 N
 D%%++T->->-C-C%%((*A4 A* Ar   