
    s'                     V    S r SSKJr  SSKJr  SSKJr  SSKrSSKJr   " S S\5      r	g)	zInterconnect.    )absolute_import)division)unicode_literalsN)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                 D   0 nUb  XS'   U	b  XS'   Ub  XS'   Ub  XS'   U R                   R                  SU R                  R                  U R                  R                  5       U R                  R                  " S	SU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applicationAwareInterconnectPatch)
r   r   r   r   r    r!   r"   r$   macsecEnabledmacsec)r*   interconnectResourcer)   r+   )r   r.   r-    ComputeInterconnectsPatchRequestr   r0   r   r)   )r   r   r"   r1   r2   r3   r4   r5   r>   label_fingerprintmacsec_enabledrD   aai_enabledapplication_aware_interconnectr:   s                  r   _MakePatchRequestTuple#Interconnect._MakePatchRequestTuplek   s    " FX$#4 (\%1/M+,""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)   r0   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)   r0   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)   r0   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)   r0   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   )r;   r   MakeRequests)r   r   r"   r#   r1   r2   r3   r4   r5   r6   only_generate_requestr7   r8   r9   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   )rP   r   re   )r   rf   rg   s      r   rN   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   )rU   r   re   r   rf   rg   rh   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$ rn   )rZ   r   re   ro   s       r   rX   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$ rn   )r_   r   re   ro   s       r   r]   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.
rI   
aai_configr+   N)
__name__
__module____qualname____firstlineno____doc__bool__annotations__r-   (InterconnectApplicationAwareInterconnect__static_attributes__r   s   r   AaiStatery      s     
 ..IIIr   r   r   r@   rA   )rU   dataclasses	dataclassr   re   getattr)r   rf   rg   r   rh   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   )rK   r   IncludeFieldsr   re   )r   r   r"   r1   r2   r3   r4   r5   rf   r>   rG   rH   rD   rI   rJ   cleared_fieldsrg   rh   s                     r   rB   Interconnect.Patch  s    ( 	## *	
H" !<<%%n5((55h?	 6q\O 65q\s   A,,
A>)r   r   r   ) NNNNNFNNFNNN)F)r   NNNNFNFNNNNNNN)r|   r}   r~   r   r   r   propertyr   r;   rK   rP   rU   rZ   r_   r-   ri   rN   rp   rX   r]   r   rB   r   r+   r   r   r   r      s    (* 0 0DL.`I
I
I
I
 ) )
 ! $L6 !%)!(r   r   )
r   
__future__r   r   r   r   0googlecloudsdk.command_lib.compute.interconnectsr   objectr   r+   r   r   <module>r      s'     &  '  B[6 [r   