ó
    €Ïÿ  ã                   óž   • 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S
KJr   " S S\	R                   5      rg)z-The gcloud firestore operations list command.é    )Úabsolute_import)Údivision)Úunicode_literals)Ú
operations)Úrewrite_backend)Úbase)Úflags)Ú
properties)Úresource_projection_specc                   ó<   • \ rS rSrSrSS0r\S 5       rS rS r	Sr
g	)
ÚListé   a  List pending Cloud Firestore admin operations and their status.

Filters are case-sensitive and have the following syntax:

  field = value [AND [field = value]] ...

Only the logical `AND` operator is
supported; space-separated items are treated as having an implicit `AND`
operator.
ÚEXAMPLESzÄ          To retrieve information about recent operations, run:

            $ {command}

          To only list operations that are done, run:

            $ {command} --filter="done:true"
      c                 óè   • [         R                  R                  U [        R                  5        [         R
                  R                  U [        R                  5        [        R                  " U 5        g)z Register flags for this command.N)r   ÚPAGE_SIZE_FLAGÚ
SetDefaultr   ÚDEFAULT_PAGE_SIZEÚ
LIMIT_FLAGr	   ÚAddDatabaseIdFlag)Úparsers    Ú(lib/surface/firestore/operations/list.pyÚArgsÚ	List.Args6   sH   € ô 	×Ñ×"Ñ" 6¬:×+GÑ+GÔHÜ‡OO×Ñ˜v¤z×'CÑ'CÔDÜ	×Ò˜FÕ#ó    c                 óþ   • U R                  UR                  U5      u  p#X!l        [        R                  " [        R
                  R                  R                  R                  SS9UR                  UR                  US9$ )NT)Úrequired)ÚprojectÚdatabaseÚlimitÚoperation_filter)Ú_ConvertFilterÚfilterr   ÚListOperationsr
   ÚVALUESÚcorer   ÚGetr   r   )ÚselfÚargsÚfrontend_filterÚbackend_filters       r   ÚRunÚList.Run=   sg   € Ø&*×&9Ñ&9¸$¿+¹+ÀtÓ&LÑ#€Oà!„KÜ×$Ò$Ü×!Ñ!×&Ñ&×.Ñ.×2Ñ2¸DÐ2ÐAØ—‘Øj‰jØ'ñ	)ð )r   c                 ó¼   • [         R                  " 5       nUR                  5       n[        R                  " UR
                  UR                  S9nUR                  XS9$ )a8  Translates user-provided filter spec into one our backend understands.

Args:
  expression: a filter spec to translate
  args: the args namespace object
Returns:
  A tuple of string filter specs. The first is the frontend spec for post
  filtering, the second is a spec that the Firestore Admin API understands.
)ÚsymbolsÚaliases)Údefaults)r   ÚOperationsRewriteBackendÚGetDisplayInfor   ÚProjectionSpecÚ
transformsr/   ÚRewrite)r'   Ú
expressionr(   Úoperation_rewrite_backendÚdisplay_infor0   s         r   r!   ÚList._ConvertFilterG   sW   € ô !0× HÒ HÓ JÐØ×&Ñ&Ó(€LÜ'×6Ò6Ø×'Ñ'°×1EÑ1EñG€Hà$×,Ñ,¨ZÐ,ÐKÐKr   © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Údetailed_helpÚstaticmethodr   r+   r!   Ú__static_attributes__r:   r   r   r   r      s7   † ñ	ð ð
ð€-ð ñ$ó ð$ò)õLr   r   N)r?   Ú
__future__r   r   r   Ú googlecloudsdk.api_lib.firestorer   r   Úgooglecloudsdk.callioper   Ú$googlecloudsdk.command_lib.firestorer	   Úgooglecloudsdk.corer
   Úgooglecloudsdk.core.resourcer   ÚListCommandr   r:   r   r   Ú<module>rJ      s9   ðñ 4å &Ý Ý 'å 7Ý <Ý (Ý 6Ý *Ý Aô8Lˆ4×Ñõ 8Lr   