
                         z    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dl	m
Z
  G d d	ej                        Zy
)z%Google Cloud Identity Sources client.    )absolute_import)division)unicode_literals)
list_pager)util)	arg_utilsc                   T     e Zd ZdZ fdZ	 	 	 ddZd Zd Z	 	 	 	 	 d	dZd Z	 xZ
S )
IdentitySourcesClientzIdentity Sources client.c                 `    t         t        |           | j                  j                  | _        y )N)superr
   __init__client0projects_locations_privateClouds_identitySourcesservice)self	__class__s    4lib/googlecloudsdk/api_lib/vmware/identitysources.pyr   zIdentitySourcesClient.__init__   s"    	
/1;;OODL    c                 J   t        j                  d| j                  j                  j                  d       j                  t        j                  |            }| j                  j                  ||||||| j                  j                  ||
      |	|| j                  j                  j                  j                  
      }| j                  j                  ||j                         |j                         j                               }| j                  j                  |      S )Nprotocolc                 
    d| vS )NPROTOCOL_UNSPECIFIED )xs    r   <lambda>z.IdentitySourcesClient.Create.<locals>.<lambda>2   s
    !7q!@r   )arg_namemessage_enuminclude_filter)primaryServerUrisecondaryServerUri)
domainbaseUsersDnbaseGroupsDn
domainUserdomainPasswordr   specificDomainControllersdomainAliassslCertificatesapplianceType)identitySourceidentitySourceIdparent)r   ChoiceEnumMappermessagesIdentitySourceProtocolValueValuesEnumGetEnumForChoiceEnumNameToChoiceSpecificDomainControllersApplianceTypeValueValuesEnumVCENTERFVmwareengineProjectsLocationsPrivateCloudsIdentitySourcesCreateRequestNameParentRelativeNamer   Create)r   resourcer!   base_users_dnbase_groups_dndomain_userdomain_passwordr   primary_serverdomain_aliassecondary_serverssl_certificatesprotocol_enum_valuesourcerequests                  r   r:   zIdentitySourcesClient.Create!   s    $44]]11II@ y11(;<	  ]]))!#&$"&--"I"I+/ #J #
 !(mm22OOWW * F  mmbb! --/ c G <<w''r   c                     | j                   j                  |j                               }| j                  j	                  |      S N)name)r.   CVmwareengineProjectsLocationsPrivateCloudsIdentitySourcesGetRequestr9   r   Getr   r;   rF   s      r   rK   zIdentitySourcesClient.GetM   s?    mm__""$ ` G <<G$$r   c                     |j                         }| j                  j                  |      }t        j                  | j
                  |dd      S )N)r,   pageSizeidentitySources)batch_size_attributefield)r9   r.   DVmwareengineProjectsLocationsPrivateCloudsIdentitySourcesListRequestr   YieldFromListr   )r   r;   address_namerF   s       r   ListzIdentitySourcesClient.ListS   sR    ((*Lmm`` a G ##'	 r   c                    | j                   j                         }g }|||_        |j                  d       |||_        |j                  d       |||_        |j                  d       |||_        |j                  d       |r||_        |j                  d       | j                   j                  ||j                         dj                  |            }	| j                  j                  |	      S )Nr<   r=   r>   r?   rC   ,)r*   rI   
updateMask)r.   r/   r"   appendr#   r$   r%   r(   EVmwareengineProjectsLocationsPrivateCloudsIdentitySourcesPatchRequestr9   joinr   Patch)
r   r;   r<   r=   r>   r?   rC   rE   update_maskrF   s
             r   UpdatezIdentitySourcesClient.Update`   s     ]]))+FK (f)!*f)*%f'"-f*+/f+,mmaa""$88K( b G <<g&&r   c                     | j                   j                  |j                               }| j                  j	                  |      S rH   )r.   FVmwareengineProjectsLocationsPrivateCloudsIdentitySourcesDeleteRequestr9   r   DeleterL   s      r   ra   zIdentitySourcesClient.Delete   s?    mmbb""$ c G <<w''r   )NNN)NNNNN)__name__
__module____qualname____doc__r   r:   rK   rU   r^   ra   __classcell__)r   s   @r   r
   r
      sC     P *(X%  "'H(r   r
   N)re   
__future__r   r   r   apitools.base.pyr   googlecloudsdk.api_lib.vmwarer   $googlecloudsdk.command_lib.util.apisr   VmwareClientBaser
   r   r   r   <module>rl      s0    , &  ' ' . :n(D11 n(r   