
                         H   S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  Sr
SS jrS	\0r\R                  \R                  " \R                  R                   \R                  R"                  \R                  R$                  5       " S
 S\R&                  5      5       5       rg)z/`gcloud certificate-manager maps list` command.    )certificate_maps)base)resource_args)util)resource_transformztable(
    name.scope(certificateMaps):sort=1,
    gclbTargets.gclbTargetsToString(undefined='-'):label=ENDPOINTS,
    description,
    createTime.date('%Y-%m-%d %H:%M:%S %Oz', undefined='-')
)
c           	      p   U (       d  U$ / nU  H  n[         R                  " USS5      nUc  Us  $ U Hd  n[         R                  " USS5      n[         R                  " USS5      nUb  Uc  M;  U H#  nUR                  SR                  Xh5      5        M%     Mf     M     U(       a  SR	                  U5      $ U$ )a%  Transforms GclbTargets to more compact form.

It uses following format: IP_1:port_1\nIP_2:port_2\n...IP_n:port_n.

Args:
  targets: GclbTargets API representation.
  undefined: str, value to be returned if no IP:port pair is found.

Returns:
  String representation to be shown in table view.
	ipConfigsN	ipAddressportsz{}:{}
)r   GetKeyValueappendformatjoin)	targets	undefinedresulttarget
ip_configs	ip_config
ip_addressr   ports	            ,lib/surface/certificate_manager/maps/list.py_TransformGclbTargetsr   "   s     
&f#//TJJ	%11)[$Oj ,,YFe		u}$gnnZ67   	  %6	3)3    gclbTargetsToStringc                   .    \ rS rSrSr\S 5       rS rSrg)ListD   zList certificate maps.

List Certificate Manager maps in the project.

## EXAMPLES

To list all certificate maps in the project, run:

  $ {command}
c                     [         R                  " U SSS9  U R                  R                  [        R
                  5        U R                  R                  [        5        U R                  R                  [        5        g )Nzto list maps forF)verball_default_location)
r   AddLocationResourceArgdisplay_info
AddUriFuncr   CertificateMapUriFunc	AddFormat_FORMATAddTransforms_TRANSFORMS)parsers    r   Args	List.ArgsS   s[    (('eE
""4#=#=>
!!'*
%%k2r   c                     [         R                  " 5       nUR                  R                  R	                  5       nUR                  X1R                  UR                  5      $ )N)r   CertificateMapClientCONCEPTSlocationParser   limit	page_size)selfargsclientlocation_refs       r   RunList.Run[   sA    224F==))//1L;;|ZZ@@r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr,   r9   __static_attributes__r;   r   r   r   r   D   s!    	 3 3Ar   r   N) )r@   *googlecloudsdk.api_lib.certificate_managerr   googlecloudsdk.callioper   .googlecloudsdk.command_lib.certificate_managerr   r   googlecloudsdk.core.resourcer   r(   r   r*   DefaultUniverseOnlyReleaseTracksReleaseTrackALPHABETAGAListCommandr   r;   r   r   <module>rO      s    6 H ( H ? ;4< 0
 D%%++T->->-C-C%%((*A4 A* Ar   