
    d
                     \    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r
S	 rS
 rg)z!Utils for transfer list commands.    )absolute_import)division)unicode_literalsN)arg_parsers)log   c           	          U R                  S[        R                  " S[        R                  SS9SS9  U R                  S[        R                  " S[        R                  SS9[
        SS	9  g
)z@Inheriting from ListCommand adds flags transfer needs to modify.z--limit   T)	unlimitedz5Return the first items from the API up to this limit.)typehelpz--page-sizez1Retrieve batches of this many items from the API.)r   defaultr   N)add_argumentr   
BoundedIntsysmaxsize_TRANSFER_LIST_PAGE_SIZE)parsers    4lib/googlecloudsdk/command_lib/transfer/list_util.pyadd_common_list_flagsr      sg    !!!S[[DAB  D 	!!!S[[DA&>	  @    c                    / nU  HQ  nUR                  U5        [        U5      [        :  d  M)  [        R                  R                  5         U" X#5        / nMS     U(       a&  [        R                  R                  5         U" X#5        SUl        g)a  Gcloud's built-in display logic has issues with enormous lists.

Args:
  resource_iterator (iterable): Likely an instance of Apitools
    list_pager.YieldFromList but can also be a List.
  command_display_function (func): The self.Display function built into
    classes inheriting from base.Command.
  command_args (argparse.Namespace): The args object passed to self.Display
    and self.Run of commands inheriting from base.Command.
N)appendlenr   r   statusPrintformat)resource_iteratorcommand_display_functioncommand_argsresource_listresources        r   !print_transfer_resources_iteratorr#   +   ss    , -#h"
=55	jj|;m $ JJ\9 ,r   )__doc__
__future__r   r   r   r   googlecloudsdk.callioper   googlecloudsdk.corer   r   r   r#    r   r   <module>r)      s/    ( &  ' 
 / #  
@#r   