
    *                     F   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  \R                  \R                  " \R                  R                   5       " S S\R"                  5      5       5       r\R                  " \R                  R&                  5       " S	 S
\5      5       rg)z(Updates a Cloud NetApp Volume QuotaRule.    )client)base)flags)labels_util)logc                   d    \ rS rSrSr\R                  R                  rSSS.r	\
S 5       rS rSrg	)
Update   z'Update a Cloud NetApp Volume QuotaRule.zY          Update a Cloud NetApp Volume QuotaRule and its specified parameters.
          z          The following command updates a QuotaRule named NAME and its specified parameters:

              $ {command} NAME --location=us-central1 --description="new" --disk-limit-mib=100 --update-labels=key2=val2 --volume=vol1
          )DESCRIPTIONEXAMPLESc                 0    [         R                  " U 5        g )N)quota_rules_flagsAddQuotaRuleUpdateArgs)parsers    0lib/surface/netapp/volumes/quota_rules/update.pyArgsUpdate.Args+   s    ,,V4    c                 p   UR                   R                  R                  5       n[        R                  " U R
                  5      n[        R                  R                  U5      nUR                  U5      nUR                  5       (       aI  UR                  UR                  R                  R                  UR                  5      R!                  5       nOSnUR#                  UUR$                  UR&                  US9n/ nUR)                  S5      (       a  UR+                  S5        UbS  UR)                  S5      (       d,  UR)                  S5      (       d  UR)                  S5      (       a  UR+                  S5        UR)                  S5      (       a  UR+                  S	5        S
R-                  U5      n	UR/                  X'XR0                  5      n
UR0                  (       aW  SR3                  U R5                  5       R6                  5      n[8        R:                  R=                  SR3                  U5      5        U
$ )z>Update a Cloud NetApp Volume QuotaRule in the current project.N)disk_limit_mibdescriptionlabelsr   update_labelsremove_labelsclear_labelsr   r   diskLimitMib,z)gcloud {} netapp volumes quota-rules listzNCheck the status of the updated quota rule by listing all quota rules:
  $ {} )CONCEPTS
quota_ruleParsequota_rules_clientQuotaRulesClient_RELEASE_TRACKr   DiffFromUpdateArgsGetQuotaRuleMayHaveUpdatesApplymessages	QuotaRuleLabelsValuer   	GetOrNoneParseUpdatedQuotaRuleConfigr   r   IsSpecifiedappendjoinUpdateQuotaRuleasync_formatReleaseTrackprefixr   statusPrint)selfargsquota_rule_refr   labels_difforiginal_quota_ruler   r   updated_fieldsupdate_maskresultcommands               r   Run
Update.Run/   s   ]]--335N001D1DEF""11$7K --n= !!##  
//
#
#
/
/1D1K1K	  f33**$$	 4 J N &&M*
 	))O,,N++H%())N+((>*K##KF {{;BB




$
$g 
jj#VG_ Mr    N)__name__
__module____qualname____firstlineno____doc__r   r4   GAr#   detailed_helpstaticmethodr   rA   __static_attributes__rC   r   r   r	   r	      sB     0$$''.		- 5 55r   r	   c                   D    \ rS rSrSr\R                  R                  rSr	g)
UpdateBetag   z(Update a Cloud NetApp Volume Quota Rule.rC   N)
rD   rE   rF   rG   rH   r   r4   BETAr#   rL   rC   r   r   rN   rN   g   s    0$$)).r   rN   N)rH   1googlecloudsdk.api_lib.netapp.volumes.quota_rulesr   r!   googlecloudsdk.callioper   5googlecloudsdk.command_lib.netapp.volumes.quota_rulesr   r   $googlecloudsdk.command_lib.util.argsr   googlecloudsdk.corer   DefaultUniverseOnlyReleaseTracksr4   rI   UpdateCommandr	   rP   rN   rC   r   r   <module>rY      s     / Z ( \ < # D%%(()IT I * IX D%%**+* * ,*r   