
    o                     j    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	 dZ
 G d	 d
e      Zy)z Cloud vmware sddc API utilities.    )absolute_import)division)unicode_literals)apis)waiter)	resourcesv1alpha1c                   B    e Zd ZdZefdZed        Zed        ZddZ	y)VmwareClientBasez*Base class for vwmare API client wrappers.c                     t        j                  d|      | _        t        j                  d|      | _        d | _        | j                  j                  | _        y )Nsddc)	r   GetClientInstance_clientGetMessagesModule	_messagesserviceclientprojects_locations_operationsoperations_service)selfapi_versions     .lib/googlecloudsdk/api_lib/vmware/sddc/util.py__init__zVmwareClientBase.__init__   sC    ))&+>DL++FK@DNDL"kkGGD    c                     | j                   S N)r   r   s    r   r   zVmwareClientBase.client%   s    <<r   c                     | j                   S r   )r   r   s    r   messageszVmwareClientBase.messages)   s    >>r   c                    t         j                  j                  |j                  d      }|r t	        j
                  | j                        }n*t	        j                  | j                  | j                        }t	        j                  |||      S )Nz"sddc.projects.locations.operations)
collection)
r   REGISTRYParsenamer   CloudOperationPollerNoResourcesr   CloudOperationPollerr   WaitFor)r   	operationmessage	is_deleteoperation_refpollers         r   WaitForOperationz!VmwareClientBase.WaitForOperation-   st    &&,,#G - IM55d6M6MNf**4<<+/+B+BDf>>&-99r   N)F)
__name__
__module____qualname____doc___DEFAULT_API_VERSIONr   propertyr   r   r-    r   r   r   r      s;    2!5 H    :r   r   N)r1   
__future__r   r   r   googlecloudsdk.api_lib.utilr   r   googlecloudsdk.corer   r2   objectr   r4   r   r   <module>r9      s.    ' &  ' , . )! :v :r   