
    
                        d 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                   G d dej                                      Zdd	d
e_        y)zCloudLocation list command.    )
list_pager)apis)base)flagsc                   &    e Zd ZdZed        Zd Zy)ListzList cloudLocations.

  ## EXAMPLES

  To list all cloudLocations for `projects/my-project-id`, run:

    $ {command} --project=my-project-id
  c                 .    t        j                  |        y)zArgs is called by calliope to gather arguments for this command.

    Args:
      parser: An argparse parser that you can use to add arguments that go on
        the command line after this command. Positional arguments are allowed.
    N)r   AddListFlags)parsers    7lib/surface/cloudlocationfinder/cloud_locations/list.pyArgsz	List.Args#   s     
v    c                    | j                         t        j                   j                  k(  rd}nd}t        j                  d|      }t        j
                  d|      }|j                  }|j                  j                  j                         j                         }|j                  ||j                  |j                        }d|_        d|_        t        j                   ||d|j                  s|j"                  d	      S dd	      S )
zRun command.

    Args:
      args: argparse.Namespace, The arguments that this command was invoked
        with.

    Returns:
      List of CloudLocations for specified project.
    v1v1alphacloudlocationfinder)parentpageSizefilter cloudLocationsNr   )fieldlimitbatch_size_attribute)ReleaseTrackr   GA	core_apisGetClientInstanceGetMessagesModule!projects_locations_cloudLocationsCONCEPTSlocationParseRelativeName=CloudlocationfinderProjectsLocationsCloudLocationsListRequest	page_sizer   	sorted_byr   YieldFromListr   )selfargsapi_versionclientmessagescloud_locations_servicer"   requests           r   RunzList.Run-   s     d//222kk(()>LF**+@+NH$FF}}%%++-::<HNN^^;; 	O 	
  DKDN## $djj'  26' r   N)__name__
__module____qualname____doc__staticmethodr   r0    r   r   r   r      s       !r   r   z1
        Request for listing Cloudlocations.
    z;
    To list CloudLocations, run:

        $ {command}
    )DESCRIPTIONEXAMPLESN)r4   apitools.base.pyr   googlecloudsdk.api_lib.utilr   r   googlecloudsdk.callioper   .googlecloudsdk.command_lib.cloudlocationfinderr   ReleaseTracksr   r   ALPHAUniverseCompatibleListCommandr   detailed_helpr6   r   r   <module>rB      s    " ' 9 ( @ D%%(($*;*;*A*AB54 5  C5r		 r   