
                             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SK	J
r
  SS	0r\R                  \R                  " \R                  R                  5       " S
 S\R                   5      5       5       r\\l        g)zBImplementation of gcloud Procurement consumer orders list command.    )absolute_import)division)unicode_literals)apis)base)resource_argsEXAMPLESaO  
        The filter is a query string that can match a selected set of attributes
        with string values. For example:

            $ {command} --filter "display_name=TEST"

        Supported query attributes are the following:

            * `display_name`

        If the query contains special characters other than letters, underscore,
        or digits, the phrase must be quoted with double quotes. For example,
        where the display name needs to be quoted because it contains the
        special character colon:

            $ {command} --filter "display_name=\"foo:bar\""

        Queries can be combined with AND, OR, and NOT to form more complex
        queries. They can also be grouped to force a desired evaluation order.
        For example:

            $ {command} --filter "display_name=foo OR display_name=bar"
        c                   .    \ rS rSrSr\S 5       rS rSrg)List5   z>Returns the List of Order objects resulting from the List API.c                     [         R                  " U S5        U R                  S[        SS9  U R                  SSS9  U R                  SS	S9  g
)zfRegister flags for this command.

Args:
  parser: argparse.ArgumentParser to register arguments with.
z0Parent Cloud Billing account to list orders for.z--page-sizez%Maximum number of resources per page.)typehelpz--page-tokenz/Token that specifies the next page in the list.)r   z--filterz$Filter that limits the list request.N)r   AddBillingAccountResourceArgadd_argumentint)parsers    8lib/surface/commerce_procurement/consumer/orders/list.pyArgs	List.Args:   sk     ..BD
C'N  Q
?  B @  C    c                     UR                   R                  R                  5       n[        R                  R                  UR                  5       UR                  UR                  UR                  5      nSUl	        U$ )zRuns the command.

Args:
  args: The arguments that were provided to this command invocation.

Returns:
  List of orders and next token if applicable.
 )
CONCEPTSbilling_accountParser   Ordersr   RelativeName	page_size
page_tokenfilter)selfargsbilling_account_refresults       r   RunList.RunK   s_     --77==?[[1>>@"nndoot{{LF
 DKMr    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r&   __static_attributes__r(   r   r   r   r   5   s!     GC C r   r   N)r-   
__future__r   r   r   +googlecloudsdk.api_lib.commerce_procurementr   googlecloudsdk.callioper   /googlecloudsdk.command_lib.commerce_procurementr   DETAILED_HELPHiddenReleaseTracksReleaseTrackALPHACommandr   detailed_helpr(   r   r   <module>r;      s{    I &  ' < ( I 	8 D%%++,$4<< $ - $N # r   