
                            S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSKJ	r	  SSK
Jr  SS	KJr  S
 rS rS r\	R$                  " \	R&                  R(                  5       " S S\	R*                  5      5       r\	R$                  " \	R&                  R.                  5       " S S\5      5       r\	R$                  " \	R&                  R2                  5       " S S\5      5       rg)z'Command for creating SSL health checks.    )absolute_import)division)unicode_literals)base_classes)health_checks_utils)base)scope)flagsc                      SSS.$ )Nz=Create a SSL health check to monitor load balanced instances.au            *{command}* is used to create a non-legacy health check using the SSL
          protocol. You can use this health check for Google Cloud
          load balancers or for managed instance group autohealing. For more
          information, see the health checks overview at:
          [](https://cloud.google.com/load-balancing/docs/health-check-concepts)
          )briefDESCRIPTION r       /lib/surface/compute/health_checks/create/ssl.py_DetailedHelpr      s     J	
 r   c                 4   U R                   R                  [        R                  5        [        R                  " S5      R                  U SS9  [        R                  " U 5        [        R                  " U S5        U(       a  [        R                  " U 5        gg)z.Set up arguments to create an SSL HealthCheck.SSLcreate)operation_typeN)
display_info	AddFormatr
   DEFAULT_LIST_FORMATHealthCheckArgumentAddArgumentr   AddTcpRelatedCreationArgsAddProtocolAgnosticCreationArgs AddHealthCheckLoggingRelatedArgs)parserinclude_log_configs     r   _Argsr    +   sn     9 9:E"..vh.O//755feD88@ r   c                    UR                   nUR                  n[        R                  " S5      R	                  XR
                  [        R                  R                  S9nUR                  R                  U R                  5      nUR                  U R                  U R                  U R                  U R                  US9n[         R"                  " X5        [         R$                  " U5      (       a  UR'                  UR)                  UR+                  5       U R,                  UR(                  R.                  R0                  UU R2                  U R4                  U R6                  U R8                  S9UR:                  UR<                  S9nUR>                  R@                  n	OURC                  UR)                  UR+                  5       U R,                  UR(                  R.                  R0                  UU R2                  U R4                  U R6                  U R8                  S9UR:                  S9nUR>                  RD                  n	U(       a%  [         RF                  " X05      URH                  l%        URM                  U	SU4/5      $ )z9Issues the request necessary for adding the health check.r   )default_scope)requestresponseportportNameproxyHeader)namedescriptiontypesslHealthCheckcheckIntervalSec
timeoutSechealthyThresholdunhealthyThreshold)healthCheckprojectregion)r0   r1   Insert)'clientmessagesr
   r   ResolveAsResource	resourcescompute_scope	ScopeEnumGLOBALSSLHealthCheckProxyHeaderValueValuesEnumproxy_headerr#   r$   r%   	port_namer   ,ValidateAndAddPortSpecificationToHealthCheckIsRegionalHealthCheckRef&ComputeRegionHealthChecksInsertRequestHealthCheckNamer)   TypeValueValuesEnumr   check_intervaltimeouthealthy_thresholdunhealthy_thresholdr1   r2   apitools_clientregionHealthChecks ComputeHealthChecksInsertRequesthealthChecksCreateLogConfigr0   	logConfigMakeRequests)
argsholderr   r4   r5   health_check_refr=   ssl_health_checkr#   
collections
             r   _RunrU   5   s8   ==&__(..u5GG
M,C,C,J,J H L((CC
,,,ll}}99~~ -   BB
 112BCC==((!&&(((%%99==+!00||!33#77 ) 9 !((&& > (G ''::J77((!&&(((%%99==+!00||!33#77 ) 9 !(( 8 
*G ''44J$7$G$G%G! 
		z8W=>	??r   c                   @    \ rS rSrSrSr\" 5       r\S 5       r	S r
Srg)Createk   zCreate a SSL health check.Tc                 .    [        XR                  5        g N)r    _include_log_config)clsr   s     r   ArgsCreate.Argsr   s    	&))*r   c                 v    [         R                  " U R                  5       5      n[        XU R                  5      $ rZ   )r   ComputeApiHolderReleaseTrackrU   r[   )selfrP   rQ   s      r   Run
Create.Runv   s.    **4+<+<+>?Fd6677r   r   N)__name__
__module____qualname____firstlineno____doc__r[   r   detailed_helpclassmethodr]   rc   __static_attributes__r   r   r   rW   rW   k   s)    "/-+ +8r   rW   c                       \ rS rSrSrg)
CreateBeta{   r   Nre   rf   rg   rh   rl   r   r   r   rn   rn   {        r   rn   c                       \ rS rSrSrg)CreateAlpha   r   Nrp   r   r   r   rs   rs      rq   r   rs   N)ri   
__future__r   r   r   googlecloudsdk.api_lib.computer   r   googlecloudsdk.callioper   "googlecloudsdk.command_lib.computer	   r8   0googlecloudsdk.command_lib.compute.health_checksr
   r   r    rU   ReleaseTracksra   GACreateCommandrW   BETArn   ALPHArs   r   r   r   <module>r      s    . &  ' 7 > ( E BA3@l D%%(()8T 8 *8 D%%**+  ,
 D%%++,*  -r   