
    
                     f    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      Zy
)z!DesignCenter SharedTemplates API.    )absolute_import)division)unicode_literals)
list_pager)utils)basec                   P    e Zd ZdZej
                  j                  fdZddZd Z	y)SharedTemplatesClientz/Client for SharedTemplates in DesignCenter API.c                     t        j                  |      | _        t        j                  |      | _        | j                  j
                  | _        y )N)api_lib_utilsGetClientInstanceclientGetMessagesModulemessages)projects_locations_spaces_sharedTemplates
_st_client)selfrelease_tracks     <lib/googlecloudsdk/api_lib/design_center/shared_templates.py__init__zSharedTemplatesClient.__init__   s7    11-@DK!33MBDMkkKKDO    Nc                     | j                   j                  |      }t        j                  | j                  |d||d      S )a   List all DesignCenter SharedTemplates under a space.

    Args:
      parent: str, the full resource name of the parent space. e.g.,
        projects/{p}/locations/{l}/spaces/{s}
      limit: int or None, the total number of results to return. Default value
        is None
      page_size: int, the number of entries in each batch (affects requests
        made, but not the yielded results). Default value is 100.

    Returns:
      A list of DesignCenter SharedTemplates that belong to the given parent.
    )parentsharedTemplatespageSize)field
batch_sizelimitbatch_size_attribute)r   =DesigncenterProjectsLocationsSpacesSharedTemplatesListRequestr   YieldFromListr   )r   r   r   	page_sizelist_reqs        r   ListzSharedTemplatesClient.List"   sO     	SS 	T 	
 
 ##' r   c                 p    | j                   j                  |      }| j                  j                  |      S )a  Describe a DesignCenter SharedTemplate under a space.

    Args:
      name: str, the full resource name of the SharedTemplate.
        e.g., projects/{p}/locations/{l}/spaces/{s}/sharedTemplates/{st}

    Returns:
      Described DesignCenter SharedTemplate resource.
    )name)r   <DesigncenterProjectsLocationsSpacesSharedTemplatesGetRequestr   Get)r   r&   describe_reqs      r   DescribezSharedTemplatesClient.Describe>   s6     ==]] ^ L??|,,r   )Nd   )
__name__
__module____qualname____doc__r   ReleaseTrackALPHAr   r$   r*    r   r   r
   r
      s$    7#'#4#4#:#: L
8-r   r
   N)r/   
__future__r   r   r   apitools.base.pyr   $googlecloudsdk.api_lib.design_centerr   r   googlecloudsdk.callioper   objectr
   r2   r   r   <module>r8      s(    ( &  ' ' G (0-F 0-r   