
    "'                     2    S r SSKrSSKJr   " S S\5      rg)zInterconnect.    N)flagsc                       \ rS rSrSrSS jr\S 5       rS rS r	S r
S	 rS
 rS r\S 5       r             SS jrSS jrSS jrSS jrSS jrSS jr               SS jrSrg)Interconnect   z Abstracts Interconnect resource.Nc                     Xl         X l        g N)ref_compute_client)selfr	   compute_clients      :lib/googlecloudsdk/api_lib/compute/interconnects/client.py__init__Interconnect.__init__   s    H)    c                 .    U R                   R                  $ r   )r
   apitools_clientr   s    r   _clientInterconnect._client   s    ///r   c                 \   0 nUb$  [         R                  " U R                  U5      US'   U R                  R                  SU R                  R                  U R                  R                  U R                  R                  " SU R                  R                  5       UUUUUUUUU	U
US.UD6S94$ )a  Make a tuple for interconnect insert request.

Args:
  description: String that represents the description of the Cloud
    Interconnect resource.
  location: String that represents the URL of the location resource for
    Cloud Interconnect that Cloud Interconnect should be connected to.
  subzone: String that represents the subzone of the location resource that
    Cloud Interconnect should be connected to.
  interconnect_type: InterconnectTypeValueValuesEnum that represents the
    type of Cloud Interconnect.
  requested_link_count: Number of the requested links.
  link_type: LinkTypeValueValuesEnum that represents Cloud Interconnect link
    type.
  admin_enabled: Boolean that represents administrative status of Cloud
    Interconnect.
  noc_contact_email: String that represents the customer's email address.
  customer_name: String that represents the customer's name.
  remote_location: String that represents the Cloud Interconnect remote
    location URL that should be connected to Cloud Interconnect.
  requested_features: List of features requested for this interconnect.
  resource_manager_tags: Dictionary of resource manager tags for this
    interconnect.

Returns:
Insert interconnect tuple that can be used in a request.
paramsInsert)namedescriptioninterconnectTypelinkTypenocContactEmailrequestedLinkCountlocationsubzoneadminEnabledcustomerNameremoteLocationrequestedFeaturesprojectinterconnect )
r   CreateInterconnectParams	_messagesr   interconnects!ComputeInterconnectsInsertRequestr	   r&   r   Name)r   r   r   r    interconnect_typerequested_link_count	link_typeadmin_enablednoc_contact_emailcustomer_nameremote_locationrequested_featuresresource_manager_tagskwargss                 r   _MakeCreateRequestTuple$Interconnect._MakeCreateRequestTuple"   s    T F(77
../fX 	""88HH$$44 XX]]_'!2" 1#7!**."4  	9 	
 r   c                 P   0 nUb  XS'   U	b  XS'   Ub  XS'   Ub  XS'   Ub  X.S'   U R                   R                  SU R                  R                  U R                  R                  5       U R                  R                  " S
SUUUUUUU
US.	UD6U R                  R                  S	94$ )z,Make a tuple for interconnect patch request.NlabelslabelFingerprint
aaiEnabledapplicationAwareInterconnectr   Patch)	r   r   r   r   r   r   r!   macsecEnabledmacsec)r'   interconnectResourcer&   r(   )r   r+   r*    ComputeInterconnectsPatchRequestr	   r-   r   r&   )r   r   r   r.   r/   r0   r1   r2   r;   label_fingerprintmacsec_enabledrA   aai_enabledapplication_aware_interconnectr7   s                  r   _MakePatchRequestTuple#Interconnect._MakePatchRequestTupleh   s    " FX$#4 (\%1/M+,#Z""77!%!<!< "'!2" 1#7*," " HH$$ 	8 	
 r   c                     U R                   R                  SU R                  R                  U R                  R
                  U R                  R                  5       S94$ )NDeleter%   )r   r+   r*   !ComputeInterconnectsDeleteRequestr	   r&   r-   r   s    r   _MakeDeleteRequestTuple$Interconnect._MakeDeleteRequestTuple   sN    LL&&NN<<((txx}} = HI Ir   c                     U R                   R                  SU R                  R                  U R                  R
                  U R                  R                  5       S94$ )NGetr%   )r   r+   r*   ComputeInterconnectsGetRequestr	   r&   r-   r   s    r   _MakeDescribeRequestTuple&Interconnect._MakeDescribeRequestTuple   sN    LL&&NN99((txx}} : HI Ir   c                     U R                   R                  SU R                  R                  U R                  R
                  U R                  R                  5       S94$ )NGetDiagnosticsr%   )r   r+   r*   )ComputeInterconnectsGetDiagnosticsRequestr	   r&   r-   r   s    r   _MakeGetDiagnosticsRequestTuple,Interconnect._MakeGetDiagnosticsRequestTuple   sP    LL&&(8NNDD((txx}} E HI Ir   c                     U R                   R                  SU R                  R                  U R                  R
                  U R                  R                  5       S94$ )NGetMacsecConfigr%   )r   r+   r*   *ComputeInterconnectsGetMacsecConfigRequestr	   r&   r-   r   s    r    _MakeGetMacsecConfigRequestTuple-Interconnect._MakeGetMacsecConfigRequestTuple   sP    LL&&(9NNEE((txx}} F HI Ir   c                 .    U R                   R                  $ r   )r
   messagesr   s    r   r*   Interconnect._messages   s    (((r   c                     U R                  UUUUUUUUU	UU=(       d    / U5      /nU
(       d   U R                  R                  U5      nUS   $ U$ )zCreate an interconnect.r   )r8   r
   MakeRequests)r   r   r   r    r.   r/   r0   r1   r2   r3   only_generate_requestr4   r5   r6   requests	resourcess                   r   CreateInterconnect.Create   sl    $ 	$$ $"!	
H  !&&33H=iq\Or   c                 l    U R                  5       /nU(       d  U R                  R                  U5      $ U$ r   )rM   r
   rb   )r   rc   rd   s      r   rK   Interconnect.Delete   s2    ,,./H !!..x88Or   c                 v    U R                  5       /nU(       d   U R                  R                  U5      nUS   $ U$ Nr   )rR   r
   rb   r   rc   rd   re   s       r   DescribeInterconnect.Describe   s;    ..01H &&33H=iq\Or   c                 v    U R                  5       /nU(       d   U R                  R                  U5      nUS   $ U$ rk   )rW   r
   rb   rl   s       r   rU   Interconnect.GetDiagnostics   s;    4467H &&33H=iq\Or   c                 v    U R                  5       /nU(       d   U R                  R                  U5      nUS   $ U$ rk   )r\   r
   rb   rl   s       r   rZ   Interconnect.GetMacsecConfig   s;    5578H &&33H=iq\Or   c                    ^  T R                  5       /n[        R                  " SS9 " U 4S jS5      5       nU(       d@  T R                  R	                  U5      nU" [        US   SS 5      [        US   SS 5      5      $ U$ )NT)frozenc                   Z   > \ rS rSr% Sr\\S'    Y R                  R                  \S'   Sr	g)<Interconnect.GetApplicationAwarenessConfig.<locals>.AaiState   zEncapsulates application awareness enabled status and config.

Attr:
  aai_enabled: indicates where AAI is enabled.
  aai_config: AAI policy.
rF   
aai_configr(   N)
__name__
__module____qualname____firstlineno____doc__bool__annotations__r*   (InterconnectApplicationAwareInterconnect__static_attributes__r   s   r   AaiStaterv      s     
 ..IIIr   r   r   r=   r>   )rR   dataclasses	dataclassr
   rb   getattr)r   rc   rd   r   re   s   `    r   GetApplicationAwarenessConfig*Interconnect.GetApplicationAwarenessConfig   s    ..01H$'	J 	J (	J !&&33H=i
)A,d
3
)A, >
E  Or   c                    U R                  UUUUUUUU	U
UUUU5      /nU(       dD  U R                  R                  U5         U R                  R	                  U5      nSSS5        US   $ U$ ! , (       d  f       WS   $ = f)zPatch an interconnect.Nr   )rH   r   IncludeFieldsr
   rb   )r   r   r   r.   r/   r0   r1   r2   rc   r;   rD   rE   rA   rF   rG   cleared_fieldsrd   re   s                     r   r?   Interconnect.Patch  s    ( 	## *	
H" !<<%%n5((55h?	 6q\O 65q\s   A,,
A>)r
   r	   r   ) NNNNNFNNFNNN)F)r   NNNNFNFNNNNNNN)ry   rz   r{   r|   r}   r   propertyr   r8   rH   rM   rR   rW   r\   r*   rf   rK   rm   rU   rZ   r   r?   r   r(   r   r   r   r      s    (* 0 0DL/bI
I
I
I
 ) )
 ! $L6 !%)!(r   r   )r}   r   0googlecloudsdk.command_lib.compute.interconnectsr   objectr   r(   r   r   <module>r      s       B\6 \r   