
                         L   d Z ddlmZ ddlmZ ddlmZ ddlZddlmZ ddlm	Z	 ddl
mZ d	 Ze	j                   e	j                  e	j                  j                   e	j                  j"                  e	j                  j$                         G d
 de	j&                                      Zy)z)Command for spanner backup schedule list.    )absolute_import)division)unicode_literalsN)backup_schedules)base)resource_argsc                     d| v ryd| v ryy)zATransforms the backup type spec field to a human readable string.fullBackupSpecFULLincrementalBackupSpecINCREMENTALUNSPECIFIED )schedules    ,lib/surface/spanner/backup_schedules/list.py_TransformBackupTypeSpecr      s    !(*	    c                   N    e Zd ZdZd ej
                  d      iZed        Zd Z	y)Listz$List Cloud Spanner backup schedules.EXAMPLESz        To list Cloud Spanner backup schedules, run:

          $ {command} --instance=instance-id --database=database-id
        c                     t        j                  | dd       | j                  j                  d       | j                  j	                  dt
        i       y)aW  Args is called by calliope to gather arguments for this command.

    Please add arguments in alphabetical order except for no- or a clear- pair
    for that argument which can follow the argument itself.

    Args:
      parser: An argparse parser that you can use to add arguments that go on
        the command line after this command.
    zin which to list schedulesF)
positionala>  
          table(
            name.basename(),
            backup_type_spec():label=BACKUP_TYPE,
            spec.cronSpec.text:label=CRON,
            retentionDuration,
            encryptionConfig.encryptionType,
            encryptionConfig.kmsKeyName,
            encryptionConfig.kmsKeyNames
          )
        backup_type_specN)r   AddDatabaseResourceArgdisplay_info	AddFormatAddTransformsr   )parsers    r   Argsz	List.Args5   sU     ((,@
!! 
# 
 %%4' r   c                 p    t        j                  |j                  j                  j	                               S )zThis is what gets called when the user runs this command.

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

    Returns:
      Some value that we want to have printed later.
    )r   r   CONCEPTSdatabaseParse)selfargss     r   RunzList.RunQ   s(       !7!7!=!=!?@@r   N)
__name__
__module____qualname____doc__textwrapdedentdetailed_helpstaticmethodr   r&   r   r   r   r   r   &   s?    
 - /(// # -  6
Ar   r   )r*   
__future__r   r   r   r+   googlecloudsdk.api_lib.spannerr   googlecloudsdk.callioper   "googlecloudsdk.command_lib.spannerr   r   DefaultUniverseOnlyReleaseTracksReleaseTrackALPHABETAGAListCommandr   r   r   r   <module>r:      s    0 &  '  ; ( < T..33T5F5F5I5I1A4 1A 1Ar   