
    h5h                        S SK JrJr  S SKJr  S SKJr  S SKJr  S SKJ	r	J
r
JrJr  S SKJrJrJrJrJr  \" 5       r\R)                  S\	S9\" \R*                  5      4S	\
4S
 jj5       r\R/                  S\S9S S\" \R*                  5      4S\S\4S jj5       r\R/                  S\	S9\" \R*                  5      4S\4S jj5       r\R)                  S\	S9\" \R*                  5      4S\S	\
4S jj5       r\R;                  S\	S9\" \R*                  5      4S\S\4S jj5       r\R?                  S\	S9\" \R*                  5      4S\4S jj5       r g)    )	APIRouterDepends)datetime)Optional)database)	IotDeviceIotDeviceCreateIotDeviceUpdateIotDeviceList)create_iot_device_serviceget_iot_device_serviceupdate_iot_device_servicedelete_iot_device_servicelist_iot_devices_service/)response_modeldevicec                 J   #    [        S5        [        X5      I S h  vN $  N7f)N3create_iot_devicecreate_iot_devicecreate_iot_device)printr   )r   dbs     PC:\Suresh\moveshuttle\MDcreated\moveengine\app\v1\routers\platform\iotdevices.pycreate_iot_devicer      s     	
?@*66666s   #!#
   skiplimitc                 6   #    [        XU5      I S h  vN $  N7fN)r   )r   r   r   s      r   list_iot_devicesr      s     )$r::::   z/{account_id}
account_idc                 4   #    [        X5      I S h  vN $  N7fr   )r   r!   r   s     r   get_iot_devicer$      s     '
7777   c                 4   #    [        X5      I S h  vN $  N7fr   )r   )r!   r   r   s      r   post_iot_devicer'      s     *66666r%   updatec                 6   #    [        XU5      I S h  vN $  N7fr   )r   )r!   r(   r   s      r   update_iot_devicer*   "   s     *:rBBBBr    c                 4   #    [        X5      I S h  vN $  N7fr   )r   r#   s     r   delete_iot_devicer,   &   s     *:::::r%   N)!fastapir   r   r   typingr   app.dbr   !app.v1.models.platform.iotdevicesr   r	   r
   r   #app.v1.services.platform.iotdevicesr   r   r   r   r   routerpostget_mongo_dbr   getintr   strr$   r'   putr*   deleter,        r   <module>r<      s   &      
S+8?@U@U8V 7O 7 ,7 C.'(rghF[F[>\ ; ; ; /; OI6-4X5J5J-K 8S 8 78 _Y7GNxOdOdGe 7c 7? 7 87 OI6IPQYQfQfIg C C_ C 7C y9078M8M0N ; ; :;r;   