
    q                        S r SSKJr  SSKJr  SSKJr  SSKJ	r	  \R                  " \R                  R                  \R                  R                  5      \R                   " S S\R                  5      5       5       rSS	S
.\l        g)zCloudLocation search command.    )
list_pager)apis)base)flagsc                   .    \ rS rSrSr\S 5       rS rSrg)Search   zSearch cloudLocations.

## EXAMPLES

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

  $ {command} --project=my-project-id
c                 0    [         R                  " U 5        g)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   AddSearchFlags)parsers    9lib/surface/cloudlocationfinder/cloud_locations/search.pyArgsSearch.Args#   s     
     c           	      z   U R                  5       [        R                   R                  :X  a  SnOSn[        R                  " SU5      n[        R
                  " SU5      nUR                  nUR                  R                  R                  5       R                  5       nUR                  R                  R                  5       R                  5       nUR                  UUR                  UUR                  S9nSUl        SUl        [         R"                  " UUSSUR                  (       d  UR$                  S	S
9$ SS	S
9$ )zRun command.

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

Returns:
  Search CloudLocations.
v1v1alphacloudlocationfinder)parentpageSizesourceCloudLocationquery r   cloudLocationsNr   )methodfieldlimitbatch_size_attribute)ReleaseTrackr   GA	core_apisGetClientInstanceGetMessagesModule!projects_locations_cloudLocationsCONCEPTSlocationParseRelativeNamesource_cloud_location?CloudlocationfinderProjectsLocationsCloudLocationsSearchRequest	page_sizer   order_byr   YieldFromListr   )	selfargsapi_versionclientmessagescloud_locations_servicer&   r)   requests	            r   Run
Search.Run-   s    d//222kk(()>LF**+@+NH$FF}}%%++-::<H++113@@B  VV1jj	 W G DJDM## $

djj' 
 15' r    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r5   __static_attributes__r7   r   r   r   r      s      ! !$r   r   z$
        Search Cloudlocations.
    z
    To search CloudLocations, run:

        $ {command} --source-cloud-location=aws-us-east-1 --query=display_name="us-east4"
    )DESCRIPTIONEXAMPLESN)r<   apitools.base.pyr   googlecloudsdk.api_lib.utilr   r!   googlecloudsdk.callioper   .googlecloudsdk.command_lib.cloudlocationfinderr   ReleaseTracksr   r    ALPHAUniverseCompatibleCommandr   detailed_helpr7   r   r   <module>rJ      s~    $ ' 9 ( @ D%%(($*;*;*A*AB8T\\ 8  C8x		 r   