
    Y                         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  \R                  " \R                  R                  \R                  R                  5      \R                    " S	 S
\R"                  5      5       5       rg)zICommand for creating or replacing an application from YAML specification.    )types_utils)base)pretty_print)deprecation_util)flags)messages_util)run_apps_operationsc                   8    \ rS rSrSrSSS.r\S 5       rS rSr	g	)
Update   Update a Cloud Run Integration.z"          {description}
          z          To update a redis integration to change the cache size

              $ {command} redis-integration --parameters=memory-size-gb=5

         )DESCRIPTIONEXAMPLESc                     [         R                  " U5        [         R                  " U5        [         R                  " U5        [         R                  " U5        g)zPSet up arguments for this command.

Args:
  parser: An argparse.ArgumentParser.
N)r   AddNamePositionalArgAddServiceUpdateArgsAddParametersArgAddServiceAccountArg)clsparsers     &lib/surface/run/integrations/update.pyArgsUpdate.Args.   s<     
v&	v&	6"	v&    c           	         [         R                  " 5         [         R                  " 5         UR                  nUR                  nUR
                  n[        R                  " U5      nU R                  5       n[        R                  " X5       nUR                  5         UR                  UUUUS9  UR                  U5      nUR                  UR                  5      n	[         R"                  " U5      n
[$        R&                  " S5        [$        R(                  " [*        R,                  " U
R.                  USS95        [*        R0                  " XU	5      nU(       al  U(       de  [$        R&                  " S5        [$        R&                  " U5        [$        R&                  " [*        R2                  " U R                  5       U5      5        SSS5        g! , (       d  f       g= f)r   )name
parametersadd_serviceremove_service updated)integration_typeintegration_nameactionN)r   CheckIfEndOfSaleAppliesDeprecationNoticer   r   r   r   GetParametersReleaseTrackr	   ConnectVerifyLocationUpdateIntegrationGetIntegrationGenericGetIntegrationStatusidr   GetTypeMetadataByResourcer   InfoSuccessr   GetSuccessMessager"   GetCallToActionCheckStatusMessage)selfargsr   r   r#   r   release_trackclientresourceresource_statusmetadatacall_to_actions               r   Run
Update.Run:   sv    ,,.&&(""K((Nyy$$T*J%%'M		$	$T	9V!'	  ) --.>?h33HKK@o66x@h

)
)'88/ %44
on
 
".),,!!#%5	
= 
:	9	9s   D9G
G N)
__name__
__module____qualname____firstlineno____doc__detailed_helpclassmethodr   r=   __static_attributes__r?   r   r   r   r      s1     (- 	' 	'-
r   r   N)rD   'googlecloudsdk.api_lib.run.integrationsr   googlecloudsdk.callioper   googlecloudsdk.command_lib.runr   +googlecloudsdk.command_lib.run.integrationsr   r   r   r	   ReleaseTracksr(   ALPHABETADefaultUniverseOnlyCommandr   r?   r   r   <module>rQ      sy    P @ ( 7 H = E K D%%++T->->-C-CDJ
T\\ J
  EJ
r   