
                             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KJr  SS	KJr  S
r " S S\
R                  5      rg)z+service-management operations list command.    )absolute_import)division)unicode_literals)
list_pager)services_util)base)arg_parsers)common_flagsa  Apply a Boolean filter _EXPRESSION_ to each resource item to be listed.
If the expression evaluates as True then that item is listed.

The available filter fields are startTime and done. Unrecognized fields will
cause an error.

startTime is an ISO 8601 datetime and supports >=, >, <=, and < operators. The
datetime value must be wrapped in quotation marks. For example:

  --filter='startTime < "2017-03-20T16:02:32"'

done is a boolean value and supports = and != operators.c                   .    \ rS rSrSr\S 5       rS rSrg)List.   a  List operations for a project.

This command will list operations for a service, optionally matching
a particular filter.

## EXAMPLES
To list all operations for a service named
`api.endpoints.proj.cloud.goog`, run:

  $ {command} --service=api.endpoints.proj.cloud.goog

To list only operations which are complete, add the `--filter` argument
with a status filter:

  $ {command} --service=api.endpoints.proj.cloud.goog --filter='done = true'

To list only operations begun after a certain point in time, add the
`--filter` argument with an ISO 8601 datetime startTime filter:

  $ {command} --service=api.endpoints.proj.cloud.goog --filter='startTime >= "2017-02-01"'
c                     [         R                  " SSS9R                  U 5        [        R                  R                  U 5        U R                  SS[        S9  U R                  R                  S5        U R                  R                  S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.
zfor which to list operationsz	--service)suffix	flag_namez--filter
EXPRESSION)metavarhelpz4table(name, done, metadata.startTime.date(tz=LOCAL))N)r
   producer_service_flagAddToParserr   FILTER_FLAGRemoveFromParseradd_argument_FILTER_HELPdisplay_info	AddFormatAddCacheUpdater)parsers    (lib/surface/endpoints/operations/list.pyArgs	List.ArgsG   s     &&-*{62%%f-
L   !!>@
''-    c           	         [         R                  " 5       n[         R                  " 5       n[        R                  " UR
                  5      nSR                  U5      nUR                  (       a%  USR                  UR                  5      -  nSUl        UR                  US9n[        R                  " UR                  UUR                  SUR                  SS9$ )zRun 'service-management operations list'.

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

Returns:
  The list of operations for this project.
zserviceName="{0}"z
 AND ({0})N)filterpageSize
operations)limitbatch_size_attribute
batch_sizefield)r   GetMessagesModuleGetClientInstancer	   GetServiceNameFromArgserviceformatr#   &ServicemanagementOperationsListRequestr   YieldFromListr%   r&   	page_size)selfargsmessagesclientr-   
msg_filtermsgs          r   RunList.Run[   s     ..0H,,.F//=G$++G4J{{L''44jdk

9
9
9
LC##jj'>> r!    N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r8   __static_attributes__r:   r!   r   r   r   .   s     . . .&r!   r   N)r?   
__future__r   r   r   apitools.base.pyr    googlecloudsdk.api_lib.endpointsr   googlecloudsdk.callioper   $googlecloudsdk.command_lib.endpointsr	   r
   r   ListCommandr   r:   r!   r   <module>rH      s=     2 &  ' ' : ( < = H4 Hr!   