
    z                     n   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
 ddl	mZ dd	lmZ d
ddZe
j                   e
j                   e
j"                  j$                  e
j"                  j&                  e
j"                  j(                         G d de
j*                                      Zee_        y)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                   *    e Zd ZdZdZed        Zd Zy)UpdateConfiga  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                     t        j                         | _        | j                  j                  |d       t        j                  |       t        j
                  |       y )Npatch)operation_type)r
   InterconnectArgumentINTERCONNECT_ARGAddArgumentAddAaiEnabledAddAaiProfileDescription)clsparsers     Alib/surface/compute/interconnects/application_awareness/update.pyArgszUpdateConfig.Args9   sH     557C$$VG$D		""6*    c                    t        j                  | j                               }| j                  j	                  ||j
                        }t        j                  ||j                        }|j                         j                  }|j                  s|j                  ry|'||j                  j                  j                         k(  rPt        j                  dj!                  |j                  rdnd      dj!                  |j#                                     |j                  r|j                  |_        |j'                  d d d d d d d d d |j                  |      fS )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   RunzUpdateConfig.Run@   s;   **4+<+<+>?F



1
1$8H8H
IC&&s6==IL<< # ||t//
(
0+]]##LLNO --KKT\\	7LMvchhj)
 	
 

"
" %7
 	"!%""+I 	 	
 r   )__name__
__module____qualname____doc__r   classmethodr   r>    r   r   r   r   +   s&    
 + +'r   r   N)rB   
__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_helprD   r   r   <module>rR      s    @ &  ' 7 ? ( . BB
  T..33T5F5F5I5I84'' 8 8v + r   