
    X                     b    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 G d	 d
e      Zy)z5Utilities for calling the Composer ImageVersions API.    )absolute_import)division)unicode_literals)util)baseimageVersionsi  c                   N    e Zd ZdZej
                  j                  fdZd Zd Z	y)ImageVersionServicez=Provides supported images version from the Image Version API.c                 j    d | _         || _        t        j                  | j                        | _        y )N)release_track)clientr   api_utilGetMessagesModulemessages)selfr   s     :lib/googlecloudsdk/api_lib/composer/image_versions_util.py__init__zImageVersionService.__init__   s)    DK&D..T=O=OPDM    c                     | j                   .t        j                  | j                        j                  | _         | j                   S )N)r   r   GetClientInstancer    projects_locations_imageVersions)r   s    r   	GetClientzImageVersionService.GetClient$   s<    {{..


>> k ;;r   c                     | j                   j                  }|g}t        j                  || j	                         |t
        t              S )zFRetrieves list of supported images version from the Image Version API.)r   1ComposerProjectsLocationsImageVersionsListRequestr   AggregateListResultsr   LIST_FIELD_NAME	PAGE_SIZE)r   project_location_refrequest	locationss       r   ListzImageVersionService.List+   sB     mmMMG%&I(($..2BI)8)E Er   N)
__name__
__module____qualname____doc__r   ReleaseTrackGAr   r   r!    r   r   r
   r
      s%    E#'#4#4#7#7 Q
Er   r
   N)r%   
__future__r   r   r   googlecloudsdk.api_lib.composerr   r   googlecloudsdk.callioper   r   r   objectr
   r(   r   r   <module>r-      s1    < &  ' < (!	E& Er   