
                         L   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 dd	lmZ  e	j"                  e	j$                  j&                         G d
 de	j(                               Z e	j"                  e	j$                  j,                         G d de             Zy)z%Creates a Cloud NetApp Backup Policy.    )absolute_import)division)unicode_literals)client)base)flags)labels_util)logc                   \    e Zd ZdZej
                  j                  ZdddZe	d        Z
d Zy)Create$Create a Cloud NetApp Backup Policy.zF          Creates a Backup Policy for Cloud NetApp Volumes.
          aA            The following command creates a Backup Policy named BACKUP_POLICY with all possible arguments:

              $ {command} BACKUP_POLICY --location=us-central1 --enabled=true --daily-backup-limit=3 --weekly-backup-limit=5 --monthly-backup-limit=2 --description="first backup policy" --labels=key1=val1
          )DESCRIPTIONEXAMPLESc                 .    t        j                  |        y )N)backuppolicies_flagsAddBackupPolicyCreateArgs)parsers    ,lib/surface/netapp/backup_policies/create.pyArgszCreate.Args.   s    226:    c           	         |j                   j                  j                         }t        j                  | j
                        }t        j                  ||j                  j                  j                        }|j                  |j                         |j                  |j                  |j                  |j                   |j"                  |      }|j%                  ||j&                  |      }|j&                  rWdj)                  | j+                         j,                        }t.        j0                  j3                  dj)                  |             |S )z;Create a Cloud NetApp Backup Policy in the current project.)nameenableddaily_backup_limitweekly_backup_limitmonthly_backup_limitdescriptionlabelsz%gcloud {} netapp backup-policies listzQCheck the status of the new backup policy by listing all backup policies:
  $ {} )CONCEPTSbackup_policyParsebackuppolicies_clientBackupPoliciesClient_RELEASE_TRACKr	   ParseCreateArgsmessagesBackupPolicyLabelsValueParseBackupPolicyRelativeNamer   r   r   r   r   CreateBackupPolicyasync_formatReleaseTrackprefixr
   statusPrint)selfargsbackuppolicy_refr   r   r    resultcommands           r   Runz
Create.Run2   s   }}2288:"778K8KLF((foo**668F ,,**,22 44!66$$ - M &&$++}F {{7>>




$
$g 
jj  &w Mr   N)__name__
__module____qualname____doc__r   r.   GAr$   detailed_helpstaticmethodr   r7    r   r   r   r      s@    ,$$''.		- ; ;r   r   c                   <    e Zd ZdZej
                  j                  Zy)
CreateBetar   N)r8   r9   r:   r;   r   r.   BETAr$   r?   r   r   rA   rA   P   s    ,$$)).r   rA   N)r;   
__future__r   r   r   -googlecloudsdk.api_lib.netapp.backup_policiesr   r"   googlecloudsdk.callioper   1googlecloudsdk.command_lib.netapp.backup_policiesr   r   $googlecloudsdk.command_lib.util.argsr	   googlecloudsdk.corer
   ReleaseTracksr.   r<   CreateCommandr   rB   rA   r?   r   r   <module>rK      s    , &  ' Y ( [ < # D%%(()/T / */d D%%**+* * ,*r   