
                             S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSK
Jr  SSKJr  \	R                  \	R                  " \	R                   R"                  \	R                   R$                  5       " S	 S
\	R&                  5      5       5       rg)z)Create command for Backup for GKE backup.    )absolute_import)division)unicode_literals)util)base)resource_args)labels_utilc                   .    \ rS rSrSr\S 5       rS rSrg)Create   al  Creates a backup.

Creates a Backup for GKE backup.

## EXAMPLES

To create a backup ``my-backup'' in project ``my-project'' in location
``us-central1'' under backup plan ``my-backup-plan'', run:

  $ {command} my-backup --project=my-project --location=us-central1
  --backup-plan=my-backup-plan

To create a backup ``my-backup'' in project ``my-project'' in location
``us-central1'' under backup plan ``my-backup-plan'' and not wait for the
resulting operation to finish, run:

  $ {command} my-backup --project=my-project --location=us-central1
  --backup-plan=my-backup-plan --async

To create a backup ``my-backup'' in project ``my-project'' in location
``us-central1'' under backup plan ``my-backup-plan'' and wait for the Backup
 to complete, run:

  $ {command} my-backup --project=my-project --location=us-central1
  --backup-plan=my-backup-plan --wait-for-completion
c                 P   [         R                  " U 5        U R                  SS9nUR                  SSSSSS9  UR                  SSSSS	S9  U R                  S
[        SS SS9  U R                  S[
        SS SS9  U R                  S[
        SS SS9  [        R                  " U 5        g )NT)mutexz--asyncF
store_truezNReturn immediately, without waiting for the operation in progress to complete.)requiredactiondefaulthelpz--wait-for-completionz(Wait for the created backup to complete.z--descriptionz7Optional text description for the backup being created.)typer   r   r   z--retain-daysa  
        Retain days specifies the desired number of days from the createTime of
        this backup after which it will be automatically deleted.
        If not specified or set to 0, it means the backup will NOT be automatically
        deleted.
        Manual creation of a backup with this field unspecified causes the service
        to use the value of backupPlan.retentionPolicy.backupRetainDays.
        Creation of a Backup with this field set to a value SMALLER than
        delete_lock_days results in an invalid response from the service.
        This field may ONLY be increased in an Update request, or an invalid
        response will be returned by the service immediately.
        Default to 0 if not provided.
        z--delete-lock-daysa  
        Delete lock days specifies the number of days from the createTime of this
        Backup before which deletion will be blocked. Must be >= the value in
        the backup plan. If not specified, inherited from the backup plan.
        Manual creation of a backup with this field unspecified causes the
        service to use the value of backupPlan.RetentionPolicy.backupDeleteBlockDays.
        Creation of a backup with this field set to a value SMALLER than
        backupPlan.RetentionPolicy.backupDeleteBlockDays results in an invalid
        response from the service.
        This field MUST be an int value between 0-90(inclusive).
        This field may only be INCREASED in an update command, or an invalid
        response will be returned by the service.
        )r   AddBackupArg	add_groupadd_argumentstrintr	   AddCreateLabelsFlags)parsergroups     6lib/surface/container/backup_restore/backups/create.pyArgsCreate.Args9   s    v&4(E	]   
7  9 F  H   $   $ $$V,    c                    [         R                  " U5      nUR                  R                  R	                  5       nUR                  S5      (       a6  [        R                  " UUR                  UUR                  UR                  S9$ [        R                  " UUR                  UUR                  UR                  S9  UR                  S5      (       d  / $ [        R                  " UR                  5       5      $ )Nasync)descriptionlabelsretain_daysdelete_lock_dayswait_for_completion)r	   GetUpdateLabelsDictFromArgsCONCEPTSbackupParseIsSpecifiedapi_utilCreateBackupr#   r%   r&   CreateBackupAndWaitForLROWaitForBackupToFinishRelativeName)selfargsr$   
backup_refs       r   Run
Create.Runv   s    44T:F%%++-J  ""
&&&&002 2 &&$$$$..0 122i))**A*A*CDDr     N)	__name__
__module____qualname____firstlineno____doc__staticmethodr   r5   __static_attributes__r7   r    r   r   r      s"    6 :- :-xEr    r   N)r<   
__future__r   r   r   /googlecloudsdk.api_lib.container.backup_restorer   r-   googlecloudsdk.callioper   3googlecloudsdk.command_lib.container.backup_restorer   $googlecloudsdk.command_lib.util.argsr	   DefaultUniverseOnlyReleaseTracksReleaseTrackALPHABETACreateCommandr   r7   r    r   <module>rJ      sz    0 &  ' L ( M < D%%++T->->-C-CDkET kE E kEr    