
    };e.	                         d Z eZdgZ	 ddlmZ ddlm	Z	m
Z
  G d de	      Z G d de	      Z G d	 de
      Zy
# e$ r	 ddlmZ Y 7w xY w)z5Test client for the lazr.restful example web service.CookbookWebServiceClient    )quote)CollectionWithKeyBasedLookupServiceRootc                       e Zd ZdZd ZdZy)CookbookSetz>A custom subclass capable of cookbook lookup by cookbook name.c                     t        | j                  j                  j                               dz   t	        t        |            z   S )z>Transform a cookbook name into the URL to a cookbook resource.z
cookbooks/)str_root	_root_uriensureSlashr   selfids     B/usr/lib/python3/dist-packages/lazr/restfulclient/tests/example.py_get_url_from_idzCookbookSet._get_url_from_id'   s<     

$$0023CGn	
    cookbookN__name__
__module____qualname____doc__r   collection_of r   r   r   r   $   s    H
 Mr   r   c                       e Zd ZdZd ZdZy)	RecipeSetz8A custom subclass capable of recipe lookup by recipe ID.c                 z    t        | j                  j                  j                               dz   t        |      z   S )z8Transform a recipe ID into the URL to a recipe resource.zrecipes/)r
   r   r   r   r   s     r   r   zRecipeSet._get_url_from_id5   s.    4::''3356Cc"gMMr   recipeNr   r   r   r   r   r   2   s    BN Mr   r   c                   f     e Zd Z eej
                        Zeed<   eed<   dZdZ	ee	df fd	Z
 xZS )r   recipes	cookbookszhttp://cookbooks.dev/z1.0Nc                 4    t         t        |   d |||       y )N)cacheversion)superr   __init__)r   service_rootr%   r$   	__class__s       r   r'   z!CookbookWebServiceClient.__init__E   s#     	&6,eW 	7 	
r   )r   r   r   dictr   RESOURCE_TYPE_CLASSESr   r   DEFAULT_SERVICE_ROOTDEFAULT_VERSIONr'   __classcell__)r)   s   @r   r   r   <   sJ     !B!BC'0)$)4+&2O *	
 
r   N)r   type__metaclass____all__urllib.parser   ImportErrorurlliblazr.restfulclient.resourcer   r   r   r   r   r   r   r   <module>r6      sa     8
". , 
{ 
C  s   9 AA