
    z                     n   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
SS.r\
R                  \
R                   " \
R"                  R$                  \
R"                  R&                  \
R"                  R(                  5       " S S\
R*                  5      5       5       r\\l        g)zyCommand for enabling/disabling application awareness on interconnect and updating the profile description of the profile.    )absolute_import)division)unicode_literals)base_classes)client)base)
exceptions)flagsa          *{command}* allows the user to enable or disable application awareness on Interconnect,
        as well as add/update the description of the application awareness on Interconnect profile.
        For an example, refer to the *EXAMPLES* section below.z        To update the application awareness config on
        Compute Engine interconnect in a project, run:

          $ {command} example-interconnect application-awareness update --enabled --profile-description="Some string"
        )DESCRIPTIONEXAMPLESc                   2    \ rS rSrSrSr\S 5       rS rSr	g)UpdateConfig+   a  Updates application awareness configuration of a Compute Engine interconnect.

*{command}* allows the user to enable or disable application awareness on
Interconnect,as well as add/update the description of the application
awareness on Interconnect profile..
Nc                     [         R                  " 5       U l        U R                  R                  USS9  [         R                  " U5        [         R
                  " U5        g )Npatch)operation_type)r
   InterconnectArgumentINTERCONNECT_ARGAddArgumentAddAaiEnabledAddAaiProfileDescription)clsparsers     Alib/surface/compute/interconnects/application_awareness/update.pyArgsUpdateConfig.Args9   sH     557C$$VG$D		""6*    c                    [         R                  " U R                  5       5      nU R                  R	                  XR
                  5      n[        R                  " X2R                  S9nUR                  5       R                  nUR                  (       d  UR                  (       a  Ub(  UUR                  R                  R                  5       :X  aV  [        R                  " SR!                  UR                  (       a  SOS5      SR!                  UR#                  5       5      5      eUR                  (       a  UR                  Ul        UR'                  S S S S S S S S S UR                  US94$ )N)compute_clientz{}enabledzprofile-descriptionz=Interconnect '{}' does not have application awareness config.)descriptioninterconnect_typerequested_link_count	link_typeadmin_enablednoc_contact_emaillocationlabelslabel_fingerprintaai_enabledapplication_aware_interconnect)r   ComputeApiHolderReleaseTrackr   ResolveAsResource	resourcesr   InterconnectDescribeapplicationAwareInterconnectr    profile_descriptionmessages(InterconnectApplicationAwareInterconnectr	   BadArgumentExceptionformatNameprofileDescriptionPatch)selfargsholderrefinterconnectr+   s         r   RunUpdateConfig.Run@   s7   **4+<+<+>?F



1
1$8H8H
IC&&s==IL<< # ||t//
(
0+]]##LLNO --KKT\\	7LMvchhj)
 	
 

"
" %7
 	"!%""+I 	 	
 r    )
__name__
__module____qualname____firstlineno____doc__r   classmethodr   r@   __static_attributes__rB   r   r   r   r   +   s&    
 + +'r   r   N)rG   
__future__r   r   r   googlecloudsdk.api_lib.computer   ,googlecloudsdk.api_lib.compute.interconnectsr   googlecloudsdk.callioper   r	   0googlecloudsdk.command_lib.compute.interconnectsr
   DETAILED_HELPUniverseCompatibleReleaseTracksr-   ALPHABETAGADescribeCommandr   detailed_helprB   r   r   <module>rW      s    @ &  ' 7 ? ( . BB
  T..33T5F5F5I5I84'' 8 8v + r   