
                            d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl	m
Z
 ej                   ej                  ej                  j                         G d d	ej                                      Z ej                  ej                  j"                         G d
 de             Z ej                  ej                  j&                         G d de             Zy)zCommand to update the project.    )absolute_import)division)unicode_literals)base_classes)base)
propertiesc                   *    e Zd ZdZdZed        Zd Zy)UpdatepUpdate a Compute Engine project resource.

  *{command}* is used to update a Compute Engine project resource.
  Fc                     |j                  dddgd d       |j                  dg dd	 d
       | j                  r|j                  dg dd d       y y )Nz--default-network-tierPREMIUMSTANDARDc                 "    | j                         S Nupperxs    *lib/surface/compute/project_info/update.py<lambda>zUpdate.Args.<locals>.<lambda>)   
    qwwy    z2The default network tier to assign to the project.)choicestypehelpz--cloud-armor-tier)CA_STANDARDCA_ENTERPRISE_PAYGOCA_ENTERPRISE_ANNUALc                 "    | j                         S r   r   r   s    r   r   zUpdate.Args.<locals>.<lambda>.   r   r   z*Cloud armor tier to assign to the project.z--managed-protection-tier)r   CAMP_PLUS_PAYGOCAMP_PLUS_ANNUALc                 "    | j                         S r   r   r   s    r   r   zUpdate.Args.<locals>.<lambda>5   s
    r   z1Managed protection tier to assign to the project.)add_argument _support_managed_protection_tier)clsparsers     r   ArgszUpdate.Args$   sw    
 J' A	  C
 N 9	   ++
%H"B	   ,r   c                    t        j                  | j                               }|j                  j                  }|j                  j
                  }g }|j                  r|j                  t        j                  j                  j                  j                         |j                  |j                  j                  |j                                    }|j                  |j                   d|f       |j"                  r|j%                  t        j                  j                  j                  j                         |j'                  |j&                  j)                  |j"                                    }|j                  |j                   d|f       n| j*                  r|j,                  r|j/                  t        j                  j                  j                  j                         |j1                  |j0                  j3                  |j,                                    }|j                  |j                   d	|f       |j                  j5                  |      S )
N)networkTier)project$projectsSetDefaultNetworkTierRequestSetDefaultNetworkTier)cloudArmorTier)r*    projectsSetCloudArmorTierRequestSetCloudArmorTier)managedProtectionTier)r*   'projectsSetManagedProtectionTierRequestSetManagedProtectionTier)r   ComputeApiHolderReleaseTrackclientapitools_clientmessagesdefault_network_tier+ComputeProjectsSetDefaultNetworkTierRequestr   VALUEScorer*   	GetOrFail$ProjectsSetDefaultNetworkTierRequestNetworkTierValueValuesEnumappendprojectscloud_armor_tier'ComputeProjectsSetCloudArmorTierRequest ProjectsSetCloudArmorTierRequestCloudArmorTierValueValuesEnumr$   managed_protection_tier.ComputeProjectsSetManagedProtectionTierRequest'ProjectsSetManagedProtectionTierRequest$ManagedProtectionTierValueValuesEnumMakeRequests)selfargsholderr5   r7   requestsrequests          r   Runz
Update.Run9   s   **4+<+<+>?F]]**F}}%%HH  DD##((00::</7
.
."GG(()B)BC / E E Fg oov(?IJ@@##((00::<+3+T+T%FFdd'' ,U , A g oov(;WEF		.	.43O3OGG##((00::<2:2b2b$,$T$T$y$y..% 3c 3 H g oov(BGLM==%%h//r   N)__name__
__module____qualname____doc__r$   classmethodr'   rO    r   r   r
   r
      s&    
 &+" ($0r   r
   c                       e Zd ZdZdZy)
UpdateBetar   TNrP   rQ   rR   rS   r$   rU   r   r   rW   rW   `       
 &*"r   rW   c                       e Zd ZdZdZy)UpdateAlphar   TNrX   rU   r   r   r[   r[   j   rY   r   r[   N)rS   
__future__r   r   r   googlecloudsdk.api_lib.computer   googlecloudsdk.callioper   googlecloudsdk.corer   DefaultUniverseOnlyReleaseTracksr4   GAUpdateCommandr
   BETArW   ALPHAr[   rU   r   r   <module>rf      s    % &  ' 7 ( * D%%(()A0T A0 * A0H D%%**+* * ,* D%%++,** * -*r   