
                         P    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 Z	d Z
y	)
z#Instance creation request modifier.    )absolute_import)division)unicode_literals)apis)basec                 .    t        j                  d|       S )Nkrmapihosting)r   GetMessagesModule)api_versions    Glib/googlecloudsdk/command_lib/anthos/config/controller/create_utils.pyMessagesr      s    				==    c           
         t        |j                         j                        }dj                  |j                  |j
                        }|j                  |j                  d            }| t        j                  j                  k(  r,|j                  d      r|j                  |j                  _        |j                  |      }|j                   r|j                   |_        g }|j                  d      r|j                  d	      rt%        d
      |j                  d	      r4|j&                  D ]%  }|j)                  |      }	|j+                  |	       ' |j-                  |      }
|j.                  r|j1                  |j2                  |j4                  |j6                  |j8                  |j:                  |j<                  |j>                  |j@                        }|j                  d	      r|
|_!        |jE                  |      }||_#        nd}|j8                  |j8                  }|jI                  |j2                  |j4                  |j6                  ||j:                  |j<                  |j>                  |j@                        }|j                  d	      r|
|_!        |jE                  |      }||_#        |jK                  ||jL                  |      }|S )z?Returns an updated request formatted to the right URI endpoint.z*projects/{project_id}/locations/{location})
project_idlocationT)enabled)configControllerConfigexperimental_features)bundlesConfig	man_block
man_blocksz8man_block and man_blocks can not be set at the same time)	cidrBlock)
cidrBlocks)clusterCidrBlockclusterNamedRangemanBlockmasterIpv4CidrBlocknetworksubnetservicesCidrBlockservicesNamedRange)fullManagementConfigz172.16.0.128/28)standardManagementConfig)parentkrmApiHostId
krmApiHost)'r   GetCollectionInfor   format
projectsIdr   BundlesConfigConfigControllerConfigr   ReleaseTrackALPHAIsSpecifiedr   r   experimentalFeatures
KrmApiHostuse_private_endpointusePrivateEndpoint	Exceptionr   	CidrBlockappendMasterAuthorizedNetworksConfigfull_managementFullManagementConfigcluster_ipv4_cidr_blockcluster_named_ranger   master_ipv4_cidr_blockr   r   services_ipv4_cidr_blockservices_named_rangemasterAuthorizedNetworksConfigManagementConfigmanagementConfigStandardManagementConfig6KrmapihostingProjectsLocationsKrmApiHostsCreateRequestkrmApiHostsId)release_trackrefargsmessages
custom_uribundles_configkrm_api_hostmultiple_cidr_blocks
cidr_blockcur_cidr_blockr   full_mgmt_configmgmt_configr;   std_mgmt_configrequests                   r   CreateUpdateRequestrR      s   c++-99:( <BB$-- C 9* ))%<<T<J * L. d''---$2B2B3AEA[A[N))>$$" % $, 
&*&?&?L# 	k"t'7'7'E
N
OO	l#oo
))J)?n!!.1 & 66% 7 '* 
445522 77{{7744 5 6 %8B5++- , /K$/L! /"".#::7755222{{7744 8 6O %7Ao4++!0 , 2K$/L! EE((! F # 
 
.r   N)__doc__
__future__r   r   r   googlecloudsdk.api_lib.utilr   googlecloudsdk.callioper   r   rR    r   r   <module>rX      s$    * &  ' , (>Mr   