
    7                         S r SSKJr  SSKJr  SSKJr  SSKrSSKJr  SSKJ	r	  SSKJ
r
  \
R                  " \
R                  R                  5       " S	 S
\
R                  5      5       rg)z;Command to search projects associated with the active user.    )absolute_import)division)unicode_literalsN)projects_api)arg_parsers)basec                   .    \ rS rSrSr\S 5       rS rSrg)Search   a  Search for projects matching the given query.

You can specify the maximum number of projects to list using the `--limit`
flag.

## EXAMPLES

The following command lists the last five created projects with
names starting with z, sorted by the project number (now called name)
with 2 projects listed on each page

  $ {command} --query="name:z*" --sort-by=name --limit=5 --page-size=2

To list projects that have been marked for deletion:

  $ {command} --query='state:DELETE_REQUESTED'
c           	      \   U R                   R                  S5        [        R                  R	                  U 5        [        R
                  R	                  U 5        U R                  SSS9  U R                  S[        R                  " S[        R                  SS9S	[        R                  S
S9  g )NzO
    table(
      displayName,
      name,
      parent,
      state
    )
    z--querya?            A boolean expression for the search criteria used to select the projects to return.
          If no search criteria is specified then all accessible projects will be returned.
          Query expressions can be used to restrict results based upon displayName, state
          and parent, where the operators `=` (`:`) `NOT`, `AND` and `OR` can be used along
          with the suffix wildcard symbol `*`. The `displayName` field in a query expression should
          use escaped quotes for values that include whitespace to prevent unexpected behavior.

          )helpz--page-size   T)	unlimitedFzQ            This flag specifies the maximum number of projects per page.
        )typerequire_coverage_in_testscategoryr   )display_info	AddFormatr   
LIMIT_FLAGAddToParserSORT_BY_FLAGadd_argumentr   
BoundedIntsysmaxsizeLIST_COMMAND_FLAGS)parsers    lib/surface/projects/search.pyArgsSearch.Args0   s    
!! # 	 	OO'!!&)
  
 ##As{{dC"'((      c                 T    [         R                  " UR                  UR                  S9$ )zRun the search command.)limitquery)r   r
   r#   r$   )selfargss     r   Run
Search.RunP   s    TZZtzzBBr!    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r'   __static_attributes__r)   r!   r   r
   r
      s!    $  >Cr!   r
   )r.   
__future__r   r   r   r   +googlecloudsdk.api_lib.cloudresourcemanagerr   googlecloudsdk.callioper   r   ReleaseTracksReleaseTrackALPHACommandr
   r)   r!   r   <module>r8      sY    B &  ' 
 D / ( D%%++,5CT\\ 5C -5Cr!   