
                         d   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                  R&                  5       " S	 S
\5      5       5       rg)(Create a Cloud NetApp Volume Quota Rule.    )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	)
Create   r   z=          Create a Cloud NetApp Volume Quota Rule.
          a            The following command creates a default `user` Quota Rule named NAME using the required arguments:

              $ {command} NAME --location=us-central1 --volume=vol1 --type=DEFAULT_USER_QUOTA --disk-limit-mib=200


          The following command creates a default `group` Quota Rule named NAME using the required arguments:

              $ {command} NAME --location=us-central1 --volume=vol1 --type=DEFAULT_GROUP_QUOTA --disk-limit-mib=200


          The following command creates an individual user Quota Rule named NAME for user with UID '100' using the required arguments:

              $ {command} NAME --location=us-central1 --volume=vol1 --type=INDIVIDUAL_USER_QUOTA --target=100 --disk-limit-mib=200


          The following command creates an individual group Quota Rule named NAME for group with GID '1001' using the required arguments:

              $ {command} NAME --location=us-central1 --volume=vol1 --type=INDIVIDUAL_GROUP_QUOTA --target=1001 --disk-limit-mib=200

          )DESCRIPTIONEXAMPLESc                 0    [         R                  " U 5        g )N)quota_rules_flagsAddQuotaRuleCreateArgs)parsers    0lib/surface/netapp/volumes/quota_rules/create.pyArgsCreate.Args<   s    ,,V4    c           	      :   UR                   R                  R                  5       nUR                   R                  R                  5       R	                  5       n[
        R                  " U R                  5      n[        R                  " UR                  UR                  5      n[        R                  " XR                  R                  R                  5      nUR!                  UR	                  5       UUR"                  UR$                  UR&                  U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 Quota Rule in the current project.)namequota_rule_typetargetdisk_limit_mibdescriptionlabelsz)gcloud {} netapp volumes quota-rules listzHCheck the status of the new quota rule by listing all quota rules:
$ {} )CONCEPTS
quota_ruleParsevolumeRelativeNamequota_rules_clientQuotaRulesClient_RELEASE_TRACKr   GetQuotaRuleTypeEnumFromArgtypemessagesr   ParseCreateArgs	QuotaRuleLabelsValueParseQuotaRuleConfigr   r   r   CreateQuotaRuleasync_formatReleaseTrackprefixr   statusPrint)
selfargsquota_rule_ref
volume_refr   r   r   r   resultcommands
             r   Run
Create.Run@   sF   ]]--335N%%++-::<J001D1DEF'CC		6??O ((oo''33F ,,((*'{{**$$ - J ##DKKF {{;BB




$
$g 
jj&/ Mr    N)__name__
__module____qualname____firstlineno____doc__r   r/   GAr$   detailed_helpstaticmethodr   r9   __static_attributes__r;   r   r   r
   r
      sB     1$$''.	-6 5 5"r   r
   c                   D    \ rS rSrSr\R                  R                  rSr	g)
CreateBetae   r   r;   N)
r<   r=   r>   r?   r@   r   r/   BETAr$   rD   r;   r   r   rF   rF   e   s     1$$)).r   rF   N)r@   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ReleaseTracksr/   rA   CreateCommandr
   rH   rF   r;   r   r   <module>rQ      s     / Z ( \ < # D%%(()FT F * FR D%%**+* * , *r   