
                         8   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  ej                  ej                   j"                  ej                   j$                  ej                   j&                         G d	 d
ej(                               Zy)zList locations.    )absolute_import)division)unicode_literals)
list_pager)base)flags)
propertiesc                   &    e Zd ZdZed        Zd Zy)ListzSList the project's locations.

  Lists all locations available for this project.
  c                     | j                   j                  d       | j                   j                  t        j                  t
        j                               y )Nz?table(locationId, metadata.hsmAvailable, metadata.ekmAvailable))display_info	AddFormat
AddUriFunccloudkms_baseMakeGetUriFuncr   LOCATION_COLLECTION)parsers    !lib/surface/kms/locations/list.pyArgsz	List.Args$   sC    
!!IK
""$$U%>%>?A    c                 @   t        j                         }t        j                         }t        j                  j
                  j                  j                  d      }|j                  d|z         }t        j                  |j                  |d|j                  d      S )NT)requiredz	projects/)name	locationspageSize)fieldlimitbatch_size_attribute)r   GetClientInstanceGetMessagesModuler	   VALUEScoreprojectGet$CloudkmsProjectsLocationsListRequestr   YieldFromListprojects_locationsr   )selfargsclientmessagesr#   requests         r   RunzList.Run+   s    ,,.F..0H$$,,00$0?G;;7" < $G ##!!jj') )r   N)__name__
__module____qualname____doc__staticmethodr   r-    r   r   r   r      s"    
 A A)r   r   N)r1   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.cloudkmsr   r   googlecloudsdk.calliopegooglecloudsdk.command_lib.kmsr   googlecloudsdk.corer	   ReleaseTracksReleaseTrackALPHABETAGAListCommandr   r3   r   r   <module>r@      s{     &  ' ' A ( 0 * D%%++T->->-C-C%%((*)4 )*)r   