
    1                         d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ	 ddl
mZ ddlmZ  G d d	ej                        Zy
)z&List the import jobs within a keyring.    )absolute_import)division)unicode_literals)
list_pager)base)flagsc                   &    e Zd ZdZed        Zd Zy)Lista  Lists import jobs within a keyring.

  Lists all import jobs within the given keyring.

  ## EXAMPLES

  The following command lists a maximum of five import jobs within the
  keyring 'fellowship' and location 'global':

    $ {command} --keyring=fellowship --location=global
  c                     t        j                  | d       t        j                  | d       | j                  j	                  d       y )Nz
import jobz
        table(
          name,
          state,
          import_method,
          protection_level,
          labels.list())
    )r   AddKeyRingFlagAddLocationFlagdisplay_info	AddFormat)parsers    #lib/surface/kms/import_jobs/list.pyArgsz	List.Args(   s;    	.	&,/
!! # 	    c                    t        j                         }t        j                         }t        j                  |      }|j                  |j                               }t        j                  |j                  |d|j                  d      S )N)parent
importJobspageSize)fieldlimitbatch_size_attribute)cloudkms_baseGetClientInstanceGetMessagesModuler   ParseKeyRingName6CloudkmsProjectsLocationsKeyRingsImportJobsListRequestRelativeNamer   YieldFromList&projects_locations_keyRings_importJobsr   )selfargsclientmessageskey_ring_refrequests         r   RunzList.Run5   s~    ,,.F..0H))$/LMM((* N ,G ##55jj') )r   N)__name__
__module____qualname____doc__staticmethodr   r)    r   r   r
   r
      s     
 
	 
	)r   r
   N)r-   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.cloudkmsr   r   googlecloudsdk.calliopegooglecloudsdk.command_lib.kmsr   ListCommandr
   r/   r   r   <module>r6      s1    - &  ' ' A ( 0()4 ()r   