B
    `j                 @   s    d dl mZ G dd deZdS )    )Basec               @   s0   e Zd ZdZdZdZi fddZedd ZdS )	DerivedBasea  
    The DerivedBase class holds information about an object who belongs to another object
    (for example, a disk belongs to a linode).  These objects have their own endpoints,
    but they are below another object in the hierarchy (i.e. /linodes/lnde_123/disks/disk_123)
     	parent_idc             C   s(   t j| |||d | t| j| d S )N)json)r   __init__Z_settypeparent_id_name)selfclientidr   r    r   H/home/dcms/DCMS/lib/python3.7/site-packages/linode_api4/objects/dbase.pyr      s    zDerivedBase.__init__c             C   s(   d t|j| j}|j|| ||jdS )Nz{}/{})modelr   )formatr   Zapi_endpointderived_url_pathZ_get_objectsr   )clsparentr   base_urlr   r   r   _api_get_derived   s    zDerivedBase._api_get_derivedN)	__name__
__module____qualname____doc__r   r	   r   classmethodr   r   r   r   r   r      s
   r   N)Zlinode_api4.objectsr   r   r   r   r   r   <module>   s   