
    o                     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	  G d dej                        Zy	)
z7Base class for gkemulticloud API clients for locations.    )absolute_import)division)unicode_literals)client)flagsc                   @     e Zd ZdZ fdZd Zd Zd Zd Zd Z	 xZ
S )LocationsClientzClient for managing locations.c                 b    t        t        | 
  di | | j                  j                  | _        y )N )superr	   __init___clientprojects_locations_service)selfkwargs	__class__s     ?lib/googlecloudsdk/api_lib/container/gkemulticloud/locations.pyr   zLocationsClient.__init__   s&    	/4)3F3LL33DM    c                     | j                   j                  |j                         dz         }| j                  j	                  |      S )z%Gets server config for Anthos on AWS.z/awsServerConfigname)	_messages7GkemulticloudProjectsLocationsGetAwsServerConfigRequestRelativeNamer   GetAwsServerConfigr   location_refreqs      r   r   z"LocationsClient.GetAwsServerConfig   sJ     	NN**,/AA 	O 	
 
 ==++C00r   c                     | j                   j                  |j                         dz         }| j                  j	                  |      S )z'Gets server config for Anthos on Azure.z/azureServerConfigr   )r   9GkemulticloudProjectsLocationsGetAzureServerConfigRequestr   r   GetAzureServerConfigr   s      r   r"   z$LocationsClient.GetAzureServerConfig(   sE    
..
R
R&&(+?? S C ==--c22r   c                     | j                   j                  |j                         dz         }| j                  j	                  |      S )z0Gets server config for Anthos Attached Clusters.z/attachedServerConfigr   )r   <GkemulticloudProjectsLocationsGetAttachedServerConfigRequestr   r   GetAttachedServerConfigr   s      r   r%   z'LocationsClient.GetAttachedServerConfig/   sE    
..
U
U&&(+BB V C ==0055r   c           	      6   | j                   j                  |j                         j                         |j                  t        j                  |      t        j                  |      t        j                  |            }| j                  j                  |      S )z/Generates an Attached cluster install manifest.parentattachedClusterIdplatformVersion!proxyConfig_kubernetesSecret_name&proxyConfig_kubernetesSecret_namespace)r   KGkemulticloudProjectsLocationsGenerateAttachedClusterInstallManifestRequestParentr   attachedClustersIdattached_flagsGetPlatformVersionGetProxySecretNameGetProxySecretNamespacer   &GenerateAttachedClusterInstallManifest)r   cluster_refargsr   s       r   GenerateInstallManifestz'LocationsClient.GenerateInstallManifest6   s{    
..
d
d!!#002%88&99$?*8*K*KD*Q..t4 e C ==??DDr   c           	         | j                   j                  |j                         |t        j                  |      t        j
                  |      t        j                  |            }| j                  j                  |      S )z:Generates an Attached cluster install manifest for import.r'   )	r   r-   r   r0   r1   r2   r3   r   r4   )r   r   memberships_idr6   r   s        r    GenerateInstallManifestForImportz0LocationsClient.GenerateInstallManifestForImportC   sn     ..
d
d((*(&99$?*8*K*KD*Q..t4 e C ==??DDr   )__name__
__module____qualname____doc__r   r   r"   r%   r7   r:   __classcell__)r   s   @r   r	   r	      s&    &4136EEr   r	   N)r>   
__future__r   r   r   .googlecloudsdk.api_lib.container.gkemulticloudr   -googlecloudsdk.command_lib.container.attachedr   r0   
ClientBaser	   r   r   r   <module>rD      s-    > &  ' A Q8Ef'' 8Er   