
    O                        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  SSKJr  SS	KJr  SS
KJr  SSKJr  \R.                  \R0                  " \R2                  R4                  5       " S S\R6                  5      5       5       r\R0                  " \R2                  R:                  5       " S S\5      5       r\R0                  " \R2                  R>                  5       " S S\5      5       r g))Create a Cloud NetApp Volume Replication.    )absolute_import)division)unicode_literals)util)client)base)flags)labels_util)concept_parsers)logc                   t    \ rS rSrSr\R                  R                  rSSS.r	\
S 5       r\
S 5       rS rS	rg
)Create   r   z>          Create a Cloud NetApp Volume Replication.
          a(            The following command creates a Replication named NAME using the required arguments:

              $ {command} NAME --location=us-central1 --volume=vol1 --replication-schedule=EVERY_10_MINUTES --destination-volume-parameters=storage_pool=sp1,volume_id=vol2,share_name=share2
          )DESCRIPTIONEXAMPLESc                 J    [         R                  U [         R                  5      $ N)r   _ReplicationArgs_RELEASE_TRACKparsers    1lib/surface/netapp/volumes/replications/create.pyArgsCreate.Args1   s    ""66+@+@AA    c                    [         R                  " [        R                  " S5      /5      R	                  U 5        [
        R                  " US9n[        R                  " U 5        [        R                  " U 5        [        R                  " X5        [        R                  " U 5        [        R                  " U 5        [        R                  " U S5        [        R                  " U 5        g)z$Add args for creating a Replication.zThe Replication to create.)release_trackReplicationN)r   ConceptParserr
   GetReplicationPresentationSpecAddToParsernetapp_api_utilGetMessagesModulereplications_flagsAddReplicationVolumeArg$AddReplicationReplicationScheduleArg,AddReplicationDestinationVolumeParametersArg AddReplicationClusterLocationArgAddResourceAsyncFlagAddResourceDescriptionArgr   AddCreateLabelsFlags)r   r   messagess      r   r   Create._ReplicationArgs5   s     !!		-	-.J	KLk&00#H ..v6;;FCCC 77?	v&	##FM:$$V,r   c           	      :   UR                   R                  R                  5       nUR                   R                  R                  5       R	                  5       n[
        R                  " U R                  5      n[        R                  " XR                  R                  R                  5      n[        R                  " UR                  UR                  5      nUR!                  UR	                  5       UR"                  UUUR$                  UR&                  S9nUR)                  X#UR*                  U5      nUR*                  (       aW  SR-                  U R/                  5       R0                  5      n	[2        R4                  R7                  SR-                  U	5      5        U$ )z@Create a Cloud NetApp Volume Replication in the current project.)namedescriptionlabelsreplication_scheduledestination_volume_parameterscluster_locationz*gcloud {} netapp volumes replications listzLCheck the status of the new replication by listing all replications:
  $ {} )CONCEPTSreplicationParsevolumeRelativeNamereplications_clientReplicationsClientr   r   ParseCreateArgsr-   r   LabelsValuer%   ,GetReplicationReplicationScheduleEnumFromArgr3   ParseReplicationConfigr1   r4   r5   CreateReplicationasync_formatReleaseTrackprefixr   statusPrint)
selfargsreplication_ref
volume_refr   r2   replication_schedule_enumr7   resultcommands
             r   Run
Create.RunH   sM   mm//557O%%++-::<J 33D4G4GHF((oo))55F 	GG%%v	
  //))+$$6&*&H&H.. 0 K %%T[[+F {{<CC




$
$g 
jj$$*F7O Mr    N)__name__
__module____qualname____firstlineno____doc__r	   rD   GAr   detailed_helpstaticmethodr   r   rO   __static_attributes__rQ   r   r   r   r      sX     2$$''.		- B B - -$"r   r   c                   T    \ rS rSrSr\R                  R                  r\	S 5       r
Srg)
CreateBetam   r   c                 J    [         R                  U [         R                  5      $ r   )r\   r   r   r   s    r   r   CreateBeta.Argss   s    &&vz/H/HIIr   rQ   N)rR   rS   rT   rU   rV   r	   rD   BETAr   rY   r   rZ   rQ   r   r   r\   r\   m   s*    1$$)).J Jr   r\   c                   T    \ rS rSrSr\R                  R                  r\	S 5       r
Srg)CreateAlphax   r   c                 J    [         R                  U [         R                  5      $ r   )rb   r   r   r   s    r   r   CreateAlpha.Args~   s    ''0J0JKKr   rQ   N)rR   rS   rT   rU   rV   r	   rD   ALPHAr   rY   r   rZ   rQ   r   r   rb   rb   x   s*    1$$**.L Lr   rb   N)!rV   
__future__r   r   r   googlecloudsdk.api_lib.netappr   r#   2googlecloudsdk.api_lib.netapp.volumes.replicationsr   r;   googlecloudsdk.callioper	   !googlecloudsdk.command_lib.netappr
   6googlecloudsdk.command_lib.netapp.volumes.replicationsr%   $googlecloudsdk.command_lib.util.argsr   (googlecloudsdk.command_lib.util.conceptsr   googlecloudsdk.corer   DefaultUniverseOnlyReleaseTracksrD   rW   CreateCommandr   r`   r\   rf   rb   rQ   r   r   <module>rs      s    0 &  ' A \ ( 3 ^ < D # D%%(()IT I * IX D%%**+J J ,J D%%++,L* L -Lr   