
    z                     L    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
y)
z*Utilities for `gcloud app update` command.    )appengine_app_update_api_client)arg_parsers)log)progress_trackerc                     | j                  dt        j                  d       | j                  dd       | j                  ddd	gd
       y)z-Add the common flags to a app update command.z--split-health-checkszCEnables/disables split health checks by default on new deployments.)actionhelpz--service-accountz=The app-level default service account to update the app with.)r	   z--ssl-policyTLS_VERSION_1_0TLS_VERSION_1_2z0The app-level SSL policy to update the app with.)choicesr	   N)add_argumentr   StoreTrueFalseAction)parsers    1lib/googlecloudsdk/command_lib/app/update_util.pyAddAppUpdateFlagsr      sh     	--   	J  L 	 "34=      Nc                    t        j                  |       }|j                  j                  j                  j
                  |j                  j                  j                  j                  dj                  |      }|||Lt        j                  dj                  |j                              5  |j                  |||       ddd       yt        j                  j                  d       y# 1 sw Y   yxY w)a  Updates an App Engine application via API client.

  Args:
    release_track: The release track of the app update command to run.
    split_health_checks: Boolean, whether to enable split health checks by
      default.
    service_account: str, the app-level default service account to update for
      this App Engine app.
    ssl_policy: str, the app-level SSL policy to update for this App Engine app.
      Can be TLS_VERSION_1_0 or TLS_VERSION_1_2.
  )r
   r   NzUpdating the app [{0}])split_health_checksservice_account
ssl_policyzNothing to update.)r   GetApiClientForTrackmessagesApplicationSslPolicyValueValuesEnumDEFAULTMODERNgetr   ProgressTrackerformatprojectPatchApplicationr   statusPrint)release_trackr   r   r   
api_clientssl_policy_enums         r   r!   r!   ,   s    " /CC* 


)
)
B
B
J
J 


)
)
B
B
I
I C
O  %		$		$		)	) ''
(:(:;
 !!1)$ " 
 
 JJ)*
 
s   .C,,C5)NNN)__doc__googlecloudsdk.api_lib.app.apir   googlecloudsdk.callioper   googlecloudsdk.corer   googlecloudsdk.core.consoler   r   r!    r   r   <module>r-      s+     1 J / # 8, 	,+r   