
                             S r SSKJr  SSKJr  SSKJr  S rS r  SS jr  SS jr	S	 r
S
 rS rS rS rS rS rS rS rS rS rS rg)z8Flags and helpers for the Cloud Quotas related commands.    )arg_parsers)base)
completersc                     U R                  SS9nUR                  SSSR                  U5      S9  UR                  SSS	R                  U5      S9  UR                  S
[        R                  SSR                  U5      S9  g)a  Adds project, folder, or organization flags to the parser.

Args:
  parser: An argparse parser that you can use to add arguments that go on the
    command line after this command. Positional arguments are allowed.
  help_string: text that is prepended to help for each argument.
Trequired	--projectPROJECT_ID_OR_NUMBERProject of the {0}.metavarhelpz--folder	FOLDER_IDzFolder of the {0}.z--organizationORGANIZATION_IDzOrganization of the {0}.)	completerr   r   N)add_mutually_exclusive_groupadd_argumentformatr   OrganizationCompleterparserhelp_stringgroups      .lib/googlecloudsdk/command_lib/quotas/flags.pyAddResourceFlagsr      s     
-
-t
-
<%$ ''4   &&{3   00%,,[9	      c                 b    U R                  SS9nUR                  SSSR                  U5      S9  g)zAdd project flag to the parser.

Args:
  parser: An argparse parser that you can use to add arguments that go on the
    command line after this command. Positional arguments are allowed.
  help_string: text that is prepended to help for each argument.
Tr   r	   r
   r   r   N)r   r   r   r   s      r   AddProjectFlagr   3   s>     
-
-t
-
<%$ ''4  r   c                 z    U (       a  [         R                  " S[        US9$ [         R                  " S[        SUS9$ )NQUOTA_IDtyper   z
--quota-idTr"   r   r   r   Argumentstr
positionaltexts     r   QuotaIdr*   C   s/     ==#D99==C$TJJr   c                 z    U (       a  [         R                  " S[        US9$ [         R                  " S[        SUS9$ )NPREFERENCE_IDr!   z--preference-idFr#   r$   r'   s     r   PreferenceIdr-   M   s0     ==s>>==*u4PPr   c                  .    [         R                  " SSSS9$ )Nz	--serviceTz2Name of the service in which the quota is defined.r   r   r   r%    r   r   Servicer2   W   s    	?
 r   c                  4    [         R                  " SSS/ SQS9$ )Nz--enablementTz.Enablement state of the QuotaAdjusterSettings.)enableddisabled	inherited)r   r   choicesr0   r1   r   r   
Enablementr8   _   s    	;2	
 r   c                  .    [         R                  " SSSS9$ )Nz--preferred-valueTzfPreferred value. Must be greater than or equal to -1. If set to -1, it means the value is "unlimited".r/   r0   r1   r   r   PreferredValuer:   h   s    	4	
 r   c                  t    [         R                  " S[        R                  " 5       S[        R                  SS9$ )Nz--dimensionsz	KEY=VALUEzDimensions of the quota.)r"   r   actionr   )r   r%   r   ArgDictUpdateActionr1   r   r   
Dimensionsr?   s   s1    	 %%%
 r   c                  .    [         R                  " SSSS9$ )Nz"--allow-quota-decrease-below-usage
store_truezaIf specified, allows you to reduce your effective limit below your quota usage. Default is false.r<   r   r0   r1   r   r   AllowsQuotaDecreaseBelowUsagerC   }   s    	*,	
 r   c                  .    [         R                  " SSSS9$ )Nz&--allow-high-percentage-quota-decreaserA   zbIf specified, allows you to reduce your effective limit by more than 10 percent. Default is false.rB   r0   r1   r   r    AllowHighPercentageQuotaDecreaserE      s    	.+	
 r   c                  ,    [         R                  " SSS9$ )Nz--emaila^  An optional email address that can be used for quota related communication between the Google Cloud and the user in case the Google Cloud needs further information to make a decision on whether the user preferred quota can be granted. The Google account for the email address must have quota update permission for the project, folder or organization this quota preference is for. If no contact email address is provided, or the provided email address does not have the required quota update permission, the quota preference request will be denied in case further information is required to make a decision.r   r0   r1   r   r   EmailrH      s    		*
 r   c                  ,    [         R                  " SSS9$ )Nz--justificationz5A short statement to justify quota increase requests.rG   r0   r1   r   r   JustificationrJ      s    	B
 r   c                  .    [         R                  " SSSS9$ )Nz--allow-missingrA   z`If specified and the quota preference is not found, a new one will be created. Default is false.rB   r0   r1   r   r   AllowMissingrL      s    	+	
 r   c                  .    [         R                  " SSSS9$ )Nz--validate-onlyrA   zIf specified, only validates the request, but does not actually update. Note that a request being valid does not mean that the request is guaranteed to be fulfilled. Default is false.rB   r0   r1   r   r   ValidateOnlyrN      s    	F	
 r   c                  .    [         R                  " SS SS9$ )Nz--page-tokenzPA token identifying a page of results the server should return. Default is none.)defaultr   r0   r1   r   r   	PageTokenrQ      s    		
 r   c                  .    [         R                  " SSSS9$ )Nz--reconciling-onlyrA   zUIf specified, only displays quota preferences in unresolved states. Default is false.rB   r0   r1   r   r   ReconcilingOnlyrS      s    		
 r   N)Tz4ID of the quota, which is unique within the service.)TzCID of the Quota Preference object, must be unique under its parent.)__doc__googlecloudsdk.callioper   r   +googlecloudsdk.command_lib.resource_managerr   r   r   r*   r-   r2   r8   r:   r?   rC   rE   rH   rJ   rL   rN   rQ   rS   r1   r   r   <module>rW      su    ? / ( B:" 	?K 	NQ$	r   