
                         f    d Z ddlmZ ddlmZ ddlmZ ddlmZ d Z	ddZ
d Zd	 Zdd
Zd Zd Zy)zHFlags and helpers for the Cloud NetApp Files Volume QuotaRules commands.    )flags)	arg_utils)labels_util)concept_parsersc                 X    t        j                  | |j                  j                        S )zReturns the Choice Enum for Quota Rule Type.

  Args:
    choice: The choice for quota rule type as string
    messages: The messages module.

  Returns:
    the quota rule type enum.
  )choice	enum_type)r   ChoiceToEnum	QuotaRuleTypeValueValuesEnum)r   messagess     Blib/googlecloudsdk/command_lib/netapp/volumes/quota_rules/flags.pyGetQuotaRuleTypeEnumFromArgr      s)     
		""66
     c                     t         j                  j                  dt        j                  d      dddi|      j                  |        y )Nz--volumeF)
positionalz(The volume for which quota rule applies.location )flag_name_overridesrequired)r   ConceptParserForResourcer   GetVolumeResourceSpecAddToParser)parserr   s     r   AddQuotaRuleVolumeArgr   *   sF    ++!!U30%r* ,  Kr   c                 :    d}| j                  dt        |d       y )Nz  String indicating the type of quota rule.
  The supported values are: 'DEFAULT_USER_QUOTA','DEFAULT_GROUP_QUOTA','INDIVIDUAL_USER_QUOTA','INDIVIDUAL_GROUP_QUOTA'
  z--typeTtypehelpr   add_argumentstrr   	help_texts     r   AddQuotaRuleTypeArgr&   4   s*    )
 		  r   c                 8    d}| j                  dt        |       y )Nzd  The target of the quota rule.
  Identified by a Unix UID/GID, Windows SID, or null for default.
  z--target)r   r    r!   r$   s     r   AddQuotaRuleTargetArgr(   B   s'    )
 	  r   c                 :    d}| j                  dt        ||       y )Nz)The disk limit in MiB for the quota rule.z--disk-limit-mibr   )r"   int)r   r   r%   s      r   AddQuotaRuleDiskLimitMibr+   O   s&    9)	  r   c                 T   t        j                  t        j                  d      g      j	                  |        t        | d       t        |        t        |        t        | d       t        j                  | d       t        j                  |        t        j                  |        y)z#Add args for creating a Quota rule.zThe Quota rule to create.Tr   
Quota ruleN)r   r   r   GetQuotaRulePresentationSpecr   r   r&   r(   r+   AddResourceDescriptionArgAddResourceAsyncFlagr   AddCreateLabelsFlagsr   s    r   AddQuotaRuleCreateArgsr4   \   s~    (()DE! [.f6D1!!&,7V$""6*r   c                 (   t        j                  t        j                  d      g      j	                  |        t        | d       t        | d       t        j                  | d       t        j                  |        t        j                  |        y)z#Add args for updating a Quota rule.zThe Quota rule to update.Tr-   Fr.   N)r   r   r   r/   r   r   r+   r0   r1   r   AddUpdateLabelsFlagsr3   s    r   AddQuotaRuleUpdateArgsr7   j   sn    (()DE! [.6E2!!&,7V$""6*r   N)F)__doc__!googlecloudsdk.command_lib.netappr   $googlecloudsdk.command_lib.util.apisr   $googlecloudsdk.command_lib.util.argsr   (googlecloudsdk.command_lib.util.conceptsr   r   r   r&   r(   r+   r4   r7    r   r   <module>r>      s:     O 3 : < D
 
+	+r   