
    A                     r   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S	.rS
rSrSrSr\R(                  \R*                  " \R,                  R.                  \R,                  R0                  \R,                  R2                  5       " S S\R4                  5      5       5       r\\l        g)z#Command for creating interconnects.    )base_classes)client)base)flags)logz        *{command}* is used to create interconnects. An interconnect represents
        a single specific connection between Google and the customer.

        For an example, refer to the *EXAMPLES* section below.
        a          To create an interconnect of type DEDICATED, run:

          $ {command} example-interconnect --customer-name="Example Customer Name" --interconnect-type=DEDICATED --link-type=LINK_TYPE_ETHERNET_10G_LR --location=example-zone1-1 --requested-link-count=1 --noc-contact-email=noc@example.com --description="Example interconnect"

        To create a Cross-Cloud Interconnect, run:

          $ {command} example-cc-interconnect --interconnect-type=DEDICATED --link-type=LINK_TYPE_ETHERNET_10G_LR --location=example-zone1-1 --requested-link-count=1 --remote-location=example-remote-location --noc-contact-email=noc@example.com --description="Example Cross-Cloud Interconnect"
        )DESCRIPTIONEXAMPLESzThe location for the interconnect. The locations can be listed by using the `{parent_command} locations list` command to find the appropriate location to use when creating an interconnect.zThe remote location for a Cross-Cloud Interconnect. The remote locations can be listed by using the `{parent_command} remote-locations list` command to find the appropriate remote location to use when creating a Cross-Cloud Interconnect.zKhttps://cloud.google.com/interconnect/docs/how-to/dedicated/retrieving-loaszUhttps://cloud.google.com/network-connectivity/docs/interconnect/concepts/cci-overviewc                   J    \ rS rSrSrSrSrSrSr\	S 5       r
S rS rS rS	rg)
Create@   zCreate a Compute Engine interconnect.

*{command}* is used to create interconnects. An interconnect represents a
single specific connection between Google and the customer.
NFc                    [         R                  " [        5      U l        U R                  R	                  U5        [
        R                  " [        5      U l        U R                  R	                  U5        [        R                  " 5       U l        U R                  R	                  USS9  [        R                  " XR                  5       5        UR                  R                  [        R                   5        g )Ncreate)operation_type)location_flags,InterconnectLocationArgumentForOtherResource_LOCATION_FLAG_MSGLOCATION_ARGAddArgumentremote_location_flags2InterconnectRemoteLocationArgumentForOtherResource_REMOTE_LOCATION_FLAG_MSGREMOTE_LOCATION_ARGr   InterconnectArgumentINTERCONNECT_ARGAddCreateArgsReleaseTrackdisplay_infoAddCacheUpdaterInterconnectsCompleter)clsparsers     +lib/surface/compute/interconnects/create.pyArgsCreate.ArgsP   s     	CC	     (3ff!C ''/ 557C$$VH$E	 0 0 23
''(D(DE    c                     g)Nzcompute.interconnects )selfs    r"   
CollectionCreate.Collection_   s    "r%   c                    [         R                  " U R                  5       5      nU R                  R	                  XR
                  5      n[        R                  " X2R                  S9nU R                  R	                  XR
                  5      nU R                  R	                  XR
                  5      nUR                  R                  n[        R                  " XqR                  5      n[        R                  " XqR                  5      n	S n
U(       a  UR!                  5       n
SU l        UR%                  UR&                  UUR(                  U	UR*                  UR,                  UR!                  5       [        R.                  " XqR0                  5      UR2                  U
[        R4                  " XqR6                  5      UR8                  S9$ )N)compute_clientT)descriptioninterconnect_typerequested_link_count	link_typeadmin_enablednoc_contact_emaillocationsubzonecustomer_nameremote_locationrequested_featuresresource_manager_tags)r   ComputeApiHolderr   r   ResolveAsResource	resourcesr   Interconnectr   r   messagesr   GetInterconnectTyper.   GetLinkTyper0   SelfLinkis_ccir   r-   r/   r1   r2   
GetSubzoner4   r5   GetRequestedFeaturesr7   r8   )r(   argsholderrefinterconnectlocation_refremote_location_refr=   r.   r0   r6   s              r"   Run
Create.Runb   ss   **4+<+<+>?F



1
1$8H8H
IC&&s==IL$$66t=M=MNL22DD }}%%H11(( !!(NN;IO+446odk$$+!66((00&&(  <<8((' 55--
 #88   r%   c                     U R                   (       a  [        O[        nSR                  U5      n[        R
                  R                  U5        g )NzPlease check the provided contact email for further instructions on how to activate your Interconnect. See also {} for more detailed help.)rA   _CCI_DOCUMENTATION_LINK_DOCUMENTATION_LINKformatr   statusPrint)r(   resources_were_displayeddocumentation_linkmessages       r"   EpilogCreate.Epilog   s=    #';;4G 
	%%+V,>%? 
 JJWr%   )rA   )__name__
__module____qualname____firstlineno____doc__r   r   r   rA   classmethodr#   r)   rJ   rU   __static_attributes__r'   r%   r"   r   r   @   sC    
 ,&F F##J
r%   r   N)r[   googlecloudsdk.api_lib.computer   ,googlecloudsdk.api_lib.compute.interconnectsr   googlecloudsdk.callioper   0googlecloudsdk.command_lib.compute.interconnectsr   :googlecloudsdk.command_lib.compute.interconnects.locationsr   Agooglecloudsdk.command_lib.compute.interconnects.remote_locationsr   googlecloudsdk.corer   DETAILED_HELPr   r   rN   rM   UniverseCompatibleReleaseTracksr   ALPHABETAGACreateCommandr   detailed_helpr'   r%   r"   <module>rm      s    * 8 ? ( B ^ l #		0E    d q  T..33T5F5F5I5IMT M M` % r%   