
    	                        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
dZej                   ej                  ej                   j"                         G d dej$                                      Zee_        y)z>Bare Metal Solution snapshot schedule policies create command.    )absolute_import)division)unicode_literals)	BmsClient)base)flags)labels_utilzJ
          Create a Bare Metal Solution snapshot schedule policy.
        a  
          To create a policy called ``my-policy'' in project ``my-project''
          with description ``my-description'' a schedule that runs every 3
          hours and labels 'key1=value1' and 'key2=value2', run:

          $ {command} my-policy --project=my-project --description=my-description --schedule="crontab_spec=0 */3 * * *,retention_count=10,prefix=example" --labels=key1=value1,key2=value2
    )DESCRIPTIONEXAMPLESc                   &    e Zd ZdZed        Zd Zy)Createz6Create a Bare Metal Solution snapshot schedule policy.c                     t        j                  | d       t        j                  |        t        j                  |        | j                  dd       y)z Register flags for this command.T)
positionalz--descriptionzDescription of the policy.)helpN)r   $AddSnapshotSchedulePolicyArgToParser"AddSnapshotScheduleArgListToParserr	   AddCreateLabelsFlagsadd_argument)parsers    4lib/surface/bms/snapshot_schedule_policies/create.pyArgszCreate.Args/   sK     
..4!	,,V4$$V,
9  ;    c                    |j                   j                  j                         }|j                  }t	               }|j                  |t        j                  ||j                  j                  j                        ||j                        S )N)policy_resourcelabelsdescription	schedules)CONCEPTSsnapshot_schedule_policyParser   r   CreateSnapshotSchedulePolicyr	   ParseCreateArgsmessagesSnapshotSchedulePolicyLabelsValueschedule)selfargspolicyr   clients        r   Runz
Create.Run9   su    ]]3399;F""K[F..**&//88DDF-- / ! !r   N)__name__
__module____qualname____doc__staticmethodr   r+    r   r   r   r   *   s     ?; ;	!r   r   N)r/   
__future__r   r   r   %googlecloudsdk.api_lib.bms.bms_clientr   googlecloudsdk.callioper   googlecloudsdk.command_lib.bmsr   $googlecloudsdk.command_lib.util.argsr	   DETAILED_HELPHiddenReleaseTracksReleaseTrackALPHACreateCommandr   detailed_helpr1   r   r   <module>r>      s    E &  ' ; ( 0 <		  D%%++,!T ! - !2 % r   