
    L                     *   S r SSKJr  SSKJr  SSKJr  Sr\R                  R                  S\R                  R                  S\R                  R                  S0rSS	 jr\R                  R                  4S
 jr\R                  R                  4S jrg)z5Utilities for Cloud Quotas API QuotaAdjusterSettings.    )message_util)apis)basez%s/locations/globalv1alphav1betav1c                 V    [         R                  U 5      n[        R                  " SX!S9$ )Ncloudquotas)no_http)VERSION_MAPgetr   GetClientInstance)release_trackr   api_versions      <lib/googlecloudsdk/api_lib/quotas/quota_adjuster_settings.py_GetClientInstancer      s#    .+			{	LL    c                    [         R                  " U R                  U R                  U R                  5      n[        U5      nUR                  n[        U-  S-   nU R                  (       a*  UR                  US9nUR                  R                  U5      $ U R                  (       a*  UR                  US9nUR                  R                  U5      $ U R                  (       a*  UR                  US9nUR                  R                  U5      $ g)a  Retrieve the QuotaAdjusterSettings for a project, folder, or organization.

Args:
  args: argparse.Namespace, The arguments that this command was invoked with.
  release_track: base.ReleaseTrack, The release track to use.

Returns:
  The requested QuotaAdjusterSettings.
/quotaAdjusterSettings)nameN)r   CreateConsumerprojectfolderorganizationr   MESSAGES_MODULE_CONSUMER_LOCATION_RESOURCEPCloudquotasProjectsLocationsQuotaAdjusterSettingsGetQuotaAdjusterSettingsRequest(projects_locations_quotaAdjusterSettingsGetQuotaAdjusterSettingsOCloudquotasFoldersLocationsQuotaAdjusterSettingsGetQuotaAdjusterSettingsRequest'folders_locations_quotaAdjusterSettingsUCloudquotasOrganizationsLocationsQuotaAdjusterSettingsGetQuotaAdjusterSettingsRequest-organizations_locations_quotaAdjusterSettings)argsr   consumerclientmessagesr   requests          r   r   r   $   s    ((
llDKK!2!2( m,&##(	$	14L	L$	\\gg h G ::SS  
[[ff g G 	66OO	
 
ll m G ??XX 	 r   c                    [         R                  " U R                  U R                  U R                  5      n[        U5      nUR                  n[        U-  S-   nU R                  S:X  a  SnSnO5SnUR                  R                  U R                  R                  5       5      nUR                  UUUS9nU R                  (       a6  UR                  UUU R                  S9n	UR                  R                  U	5      $ U R                  (       a6  UR!                  UUU R                  S9n	UR"                  R                  U	5      $ U R                  (       a6  UR%                  UUU R                  S9n	UR&                  R                  U	5      $ g)a  Updates the QuotaAdjusterSettings of a project, folder, or organization.

Args:
  args: argparse.Namespace, The arguments that this command was invoked with.
  release_track: base.ReleaseTrack, The release track to use.

Returns:
  The updated QuotaAdjusterSettings.
r   	inheritedTNF)r   
enablementr*   )r   quotaAdjusterSettingsvalidateOnly)r   r   r   r   r   r   r   r   r+   QuotaAdjusterSettingsEnablementValueValuesEnumupperSCloudquotasProjectsLocationsQuotaAdjusterSettingsUpdateQuotaAdjusterSettingsRequestvalidate_onlyr   UpdateQuotaAdjusterSettingsRCloudquotasFoldersLocationsQuotaAdjusterSettingsUpdateQuotaAdjusterSettingsRequestr!   XCloudquotasOrganizationsLocationsQuotaAdjusterSettingsUpdateQuotaAdjusterSettingsRequestr#   )
r$   r   r%   r&   r'   r   r*   r+   quota_adjuster_settingsr(   s
             r   r3   r3   O   s    ((
llDKK!2!2( m,&##(	$	14L	L$	__#IJI//IIJ %:: ;  
\\jj5'' k G
 ::VV  
[[ii5'' j G
 99UU  
oo5'' p G
 ??[[  r   N)F)__doc__googlecloudsdk.api_lib.quotasr   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   r   ReleaseTrackALPHABETAGAr   r   r   r3    r   r   <module>r@      s    < 6 , ( 4  	YH$M
 261B1B1H1H (V 594E4E4K4K 9r   