
    
                         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	  G d d	      Z
e	j                   e	j                  e	j                  j                         G d
 de	j                                      Zy)z5Implementation of migration job objects list command.    )absolute_import)division)unicode_literals)objects)resource_args)basec                       e Zd ZdZd Zy)_MigrationJobObjectInfoz>Container for migration job object data using in list display.c                    |j                   | _         |j                  | _        |j                  |j                  nd | _        |j                  | _        |j
                  | _        |j                  | _        |j                  | _	        y )N)
namesourceObjectsource_objecterrorstatephase
createTimecreate_time
updateTimeupdate_time)selfmessages     .lib/surface/database_migration/objects/list.py__init__z _MigrationJobObjectInfo.__init__   sc    DI --D")--";DJDJDJ))D))D    N)__name__
__module____qualname____doc__r    r   r   r
   r
      s
    F*r   r
   c                   &    e Zd ZdZed        Zd Zy)Lista  List a DMS migration job objects.

  List migration job objects.

  ## API REFERENCE
    This command uses the database-migration/v1 API. The full documentation
    for this API can be found at: https://cloud.google.com/database-migration/

  ## EXAMPLES
    To list all objects in a migration job and location 'us-central1',
    run:

        $ {command} --migration-job=mj --region=us-central1
  c                 j    t        j                  |dd       |j                  j                  d       y)z Register flags for this command.zto list migration job objectsF)
positionalz
            table(
              source_object,
              state:label=STATE,
              phase:label=PHASE,
              error:label=ERROR
            )
          N)r   AddOnlyMigrationJobResourceArgsdisplay_info	AddFormat)clsparsers     r   Argsz	List.Args9   s5     11/E !! # r   c                     t        j                  | j                               }|j                  j                  j                         }|j                  ||      }|D cg c]  }t        |       c}S c c}w )zRuns the command.

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

    Returns:
      An iterator over objects containing migration job objects data.
    )r   ObjectsClientReleaseTrackCONCEPTSmigration_jobParser!   r
   )r   argsobjects_clientmigration_job_refobjos         r   RunzList.RunH   sg     **4+<+<+>?N3399;


/
6C0341#A&444s   A3N)r   r   r   r   classmethodr)   r5   r   r   r   r!   r!   '   s       5r   r!   N)r   
__future__r   r   r   )googlecloudsdk.api_lib.database_migrationr   r   googlecloudsdk.callioper   r
   DefaultUniverseOnlyReleaseTracksr,   GAListCommandr!   r   r   r   <module>r>      sn    < &  ' = C (
* 
* D%%((),54 ,5 * ,5r   