evcloud 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (635) hide show
  1. evcloud/__init__.py +802 -0
  2. evcloud/_default_clients.py +30 -0
  3. evcloud/client.py +200 -0
  4. evcloud/core/__init__.py +67 -0
  5. evcloud/core/api_error.py +23 -0
  6. evcloud/core/client_wrapper.py +108 -0
  7. evcloud/core/datetime_utils.py +70 -0
  8. evcloud/core/file.py +67 -0
  9. evcloud/core/force_multipart.py +18 -0
  10. evcloud/core/http_client.py +840 -0
  11. evcloud/core/http_response.py +59 -0
  12. evcloud/core/http_sse/__init__.py +9 -0
  13. evcloud/core/http_sse/_api.py +112 -0
  14. evcloud/core/http_sse/_decoders.py +61 -0
  15. evcloud/core/http_sse/_exceptions.py +7 -0
  16. evcloud/core/http_sse/_models.py +17 -0
  17. evcloud/core/jsonable_encoder.py +120 -0
  18. evcloud/core/logging.py +107 -0
  19. evcloud/core/pagination.py +82 -0
  20. evcloud/core/parse_error.py +36 -0
  21. evcloud/core/pydantic_utilities.py +634 -0
  22. evcloud/core/query_encoder.py +58 -0
  23. evcloud/core/remove_none_from_dict.py +11 -0
  24. evcloud/core/request_options.py +35 -0
  25. evcloud/core/serialization.py +276 -0
  26. evcloud/cpo/__init__.py +31 -0
  27. evcloud/cpo/cdrs/__init__.py +4 -0
  28. evcloud/cpo/cdrs/client.py +311 -0
  29. evcloud/cpo/cdrs/raw_client.py +592 -0
  30. evcloud/cpo/charge_points/__init__.py +7 -0
  31. evcloud/cpo/charge_points/client.py +1436 -0
  32. evcloud/cpo/charge_points/raw_client.py +2809 -0
  33. evcloud/cpo/charge_points/types/__init__.py +7 -0
  34. evcloud/cpo/charge_points/types/list_charge_points_request_ocpp_version.py +5 -0
  35. evcloud/cpo/client.py +62 -0
  36. evcloud/cpo/connectors/__init__.py +4 -0
  37. evcloud/cpo/connectors/client.py +698 -0
  38. evcloud/cpo/connectors/raw_client.py +1457 -0
  39. evcloud/cpo/evses/__init__.py +4 -0
  40. evcloud/cpo/evses/client.py +691 -0
  41. evcloud/cpo/evses/raw_client.py +1457 -0
  42. evcloud/cpo/health/__init__.py +4 -0
  43. evcloud/cpo/health/client.py +100 -0
  44. evcloud/cpo/health/raw_client.py +192 -0
  45. evcloud/cpo/locations/__init__.py +4 -0
  46. evcloud/cpo/locations/client.py +1021 -0
  47. evcloud/cpo/locations/raw_client.py +1887 -0
  48. evcloud/cpo/raw_client.py +13 -0
  49. evcloud/cpo/sessions/__init__.py +7 -0
  50. evcloud/cpo/sessions/client.py +430 -0
  51. evcloud/cpo/sessions/raw_client.py +889 -0
  52. evcloud/cpo/sessions/types/__init__.py +8 -0
  53. evcloud/cpo/sessions/types/list_sessions_request_billing_state.py +5 -0
  54. evcloud/cpo/sessions/types/list_sessions_request_status.py +7 -0
  55. evcloud/cpo/tariffs/__init__.py +17 -0
  56. evcloud/cpo/tariffs/client.py +1232 -0
  57. evcloud/cpo/tariffs/raw_client.py +2526 -0
  58. evcloud/cpo/tariffs/types/__init__.py +15 -0
  59. evcloud/cpo/tariffs/types/list_tariffs_request_type.py +7 -0
  60. evcloud/cpo/tariffs/types/tariff_create_ocpi_version.py +5 -0
  61. evcloud/cpo/tariffs/types/tariff_create_preauthorize_amount.py +5 -0
  62. evcloud/cpo/tariffs/types/tariff_patch_preauthorize_amount.py +5 -0
  63. evcloud/emsp/__init__.py +55 -0
  64. evcloud/emsp/cdrs/__init__.py +4 -0
  65. evcloud/emsp/cdrs/client.py +300 -0
  66. evcloud/emsp/cdrs/raw_client.py +610 -0
  67. evcloud/emsp/chargers/__init__.py +7 -0
  68. evcloud/emsp/chargers/client.py +167 -0
  69. evcloud/emsp/chargers/raw_client.py +331 -0
  70. evcloud/emsp/chargers/types/__init__.py +11 -0
  71. evcloud/emsp/chargers/types/resolve_chargers_response.py +53 -0
  72. evcloud/emsp/client.py +77 -0
  73. evcloud/emsp/commands/__init__.py +7 -0
  74. evcloud/emsp/commands/client.py +516 -0
  75. evcloud/emsp/commands/raw_client.py +979 -0
  76. evcloud/emsp/commands/types/__init__.py +7 -0
  77. evcloud/emsp/commands/types/send_commands_request_command.py +7 -0
  78. evcloud/emsp/emp_identities/__init__.py +4 -0
  79. evcloud/emsp/emp_identities/client.py +548 -0
  80. evcloud/emsp/emp_identities/raw_client.py +1277 -0
  81. evcloud/emsp/evses/__init__.py +4 -0
  82. evcloud/emsp/evses/client.py +154 -0
  83. evcloud/emsp/evses/raw_client.py +288 -0
  84. evcloud/emsp/health/__init__.py +4 -0
  85. evcloud/emsp/health/client.py +100 -0
  86. evcloud/emsp/health/raw_client.py +192 -0
  87. evcloud/emsp/locations/__init__.py +4 -0
  88. evcloud/emsp/locations/client.py +1386 -0
  89. evcloud/emsp/locations/raw_client.py +2903 -0
  90. evcloud/emsp/networks/__init__.py +7 -0
  91. evcloud/emsp/networks/client.py +1615 -0
  92. evcloud/emsp/networks/raw_client.py +3725 -0
  93. evcloud/emsp/networks/types/__init__.py +9 -0
  94. evcloud/emsp/networks/types/list_networks_request_network_type.py +5 -0
  95. evcloud/emsp/networks/types/list_rules_networks_request_validity.py +5 -0
  96. evcloud/emsp/networks/types/network_rule_create_request_rule_type.py +5 -0
  97. evcloud/emsp/raw_client.py +13 -0
  98. evcloud/emsp/sessions/__init__.py +4 -0
  99. evcloud/emsp/sessions/client.py +300 -0
  100. evcloud/emsp/sessions/raw_client.py +610 -0
  101. evcloud/emsp/tariffs/__init__.py +7 -0
  102. evcloud/emsp/tariffs/client.py +421 -0
  103. evcloud/emsp/tariffs/raw_client.py +883 -0
  104. evcloud/emsp/tariffs/types/__init__.py +8 -0
  105. evcloud/emsp/tariffs/types/estimate_request_kwh.py +5 -0
  106. evcloud/emsp/tariffs/types/estimate_request_minutes.py +5 -0
  107. evcloud/emsp/tenant/__init__.py +4 -0
  108. evcloud/emsp/tenant/client.py +328 -0
  109. evcloud/emsp/tenant/raw_client.py +869 -0
  110. evcloud/emsp/token_groups/__init__.py +7 -0
  111. evcloud/emsp/token_groups/client.py +1256 -0
  112. evcloud/emsp/token_groups/raw_client.py +3288 -0
  113. evcloud/emsp/token_groups/types/__init__.py +7 -0
  114. evcloud/emsp/token_groups/types/remove_token_token_groups_request_type.py +5 -0
  115. evcloud/emsp/tokens/__init__.py +7 -0
  116. evcloud/emsp/tokens/client.py +1298 -0
  117. evcloud/emsp/tokens/raw_client.py +2947 -0
  118. evcloud/emsp/tokens/types/__init__.py +10 -0
  119. evcloud/emsp/tokens/types/list_tokens_request_status.py +7 -0
  120. evcloud/emsp/tokens/types/list_tokens_request_type.py +5 -0
  121. evcloud/emsp/tokens/types/token_update_default_profile_type.py +5 -0
  122. evcloud/emsp/tokens/types/token_update_whitelist.py +5 -0
  123. evcloud/energy/__init__.py +8 -0
  124. evcloud/energy/client.py +47 -0
  125. evcloud/energy/control_requests/__init__.py +7 -0
  126. evcloud/energy/control_requests/client.py +399 -0
  127. evcloud/energy/control_requests/raw_client.py +835 -0
  128. evcloud/energy/control_requests/types/__init__.py +7 -0
  129. evcloud/energy/control_requests/types/list_control_requests_request_result.py +15 -0
  130. evcloud/energy/health/__init__.py +4 -0
  131. evcloud/energy/health/client.py +100 -0
  132. evcloud/energy/health/raw_client.py +192 -0
  133. evcloud/energy/power_measurements/__init__.py +4 -0
  134. evcloud/energy/power_measurements/client.py +254 -0
  135. evcloud/energy/power_measurements/raw_client.py +527 -0
  136. evcloud/energy/raw_client.py +13 -0
  137. evcloud/environment.py +7 -0
  138. evcloud/errors/__init__.py +25 -0
  139. evcloud/errors/bad_gateway_error.py +11 -0
  140. evcloud/errors/bad_request_error.py +11 -0
  141. evcloud/errors/conflict_error.py +11 -0
  142. evcloud/errors/forbidden_error.py +11 -0
  143. evcloud/errors/gateway_timeout_error.py +11 -0
  144. evcloud/errors/not_found_error.py +11 -0
  145. evcloud/errors/too_many_requests_error.py +11 -0
  146. evcloud/errors/unauthorized_error.py +11 -0
  147. evcloud/errors/unprocessable_entity_error.py +11 -0
  148. evcloud/health/__init__.py +4 -0
  149. evcloud/health/client.py +99 -0
  150. evcloud/health/raw_client.py +100 -0
  151. evcloud/ocpi/__init__.py +123 -0
  152. evcloud/ocpi/client.py +56 -0
  153. evcloud/ocpi/cpo_data/__init__.py +31 -0
  154. evcloud/ocpi/cpo_data/client.py +1553 -0
  155. evcloud/ocpi/cpo_data/raw_client.py +3119 -0
  156. evcloud/ocpi/cpo_data/types/__init__.py +29 -0
  157. evcloud/ocpi/cpo_data/types/cancel_reservation_cpo_data_request_version.py +5 -0
  158. evcloud/ocpi/cpo_data/types/create_cdr_cpo_data_request_version.py +5 -0
  159. evcloud/ocpi/cpo_data/types/delete_tariff_cpo_data_request_version.py +5 -0
  160. evcloud/ocpi/cpo_data/types/send_active_charging_profile_cpo_data_request_version.py +5 -0
  161. evcloud/ocpi/cpo_data/types/update_connector_cpo_data_request_version.py +5 -0
  162. evcloud/ocpi/cpo_data/types/update_evse_status_cpo_data_request_version.py +5 -0
  163. evcloud/ocpi/cpo_data/types/update_location_cpo_data_request_version.py +5 -0
  164. evcloud/ocpi/cpo_data/types/update_session_cpo_data_request_version.py +5 -0
  165. evcloud/ocpi/cpo_data/types/upsert_location_cpo_data_request_version.py +5 -0
  166. evcloud/ocpi/cpo_data/types/upsert_session_cpo_data_request_version.py +5 -0
  167. evcloud/ocpi/cpo_data/types/upsert_tariff_cpo_data_request_version.py +5 -0
  168. evcloud/ocpi/credentials/__init__.py +31 -0
  169. evcloud/ocpi/credentials/client.py +750 -0
  170. evcloud/ocpi/credentials/raw_client.py +1537 -0
  171. evcloud/ocpi/credentials/types/__init__.py +29 -0
  172. evcloud/ocpi/credentials/types/partner_versions_pull_request_partner_token_encoding.py +5 -0
  173. evcloud/ocpi/credentials/types/pull_versions_credentials_request_role.py +5 -0
  174. evcloud/ocpi/credentials/types/pull_versions_credentials_request_version.py +5 -0
  175. evcloud/ocpi/credentials/types/rotate_credentials_request_role.py +5 -0
  176. evcloud/ocpi/credentials/types/rotate_credentials_request_version.py +5 -0
  177. evcloud/ocpi/credentials/types/start_handshake_credentials_request_role.py +5 -0
  178. evcloud/ocpi/credentials/types/start_handshake_credentials_request_version.py +5 -0
  179. evcloud/ocpi/credentials/types/status_credentials_request_role.py +5 -0
  180. evcloud/ocpi/credentials/types/status_credentials_request_version.py +5 -0
  181. evcloud/ocpi/credentials/types/unregister_credentials_request_role.py +5 -0
  182. evcloud/ocpi/credentials/types/unregister_credentials_request_version.py +5 -0
  183. evcloud/ocpi/emsp/__init__.py +27 -0
  184. evcloud/ocpi/emsp/client.py +1142 -0
  185. evcloud/ocpi/emsp/raw_client.py +2209 -0
  186. evcloud/ocpi/emsp/types/__init__.py +25 -0
  187. evcloud/ocpi/emsp/types/charging_preferences_request_profile_type.py +5 -0
  188. evcloud/ocpi/emsp/types/clear_charging_profile_emsp_request_version.py +5 -0
  189. evcloud/ocpi/emsp/types/get_active_charging_profile_emsp_request_version.py +5 -0
  190. evcloud/ocpi/emsp/types/send_command_emsp_request_command.py +7 -0
  191. evcloud/ocpi/emsp/types/send_command_emsp_request_version.py +5 -0
  192. evcloud/ocpi/emsp/types/set_charging_preferences_emsp_request_version.py +5 -0
  193. evcloud/ocpi/emsp/types/set_charging_profile_emsp_request_version.py +5 -0
  194. evcloud/ocpi/emsp/types/update_token_emsp_request_version.py +5 -0
  195. evcloud/ocpi/emsp/types/upsert_token_emsp_request_version.py +5 -0
  196. evcloud/ocpi/invites/__init__.py +19 -0
  197. evcloud/ocpi/invites/client.py +385 -0
  198. evcloud/ocpi/invites/raw_client.py +887 -0
  199. evcloud/ocpi/invites/types/__init__.py +17 -0
  200. evcloud/ocpi/invites/types/partner_invite_create_request_gateway_role.py +5 -0
  201. evcloud/ocpi/invites/types/partner_invite_create_request_role.py +5 -0
  202. evcloud/ocpi/invites/types/partner_invite_create_request_version.py +5 -0
  203. evcloud/ocpi/invites/types/partner_invite_update_request_gateway_role.py +5 -0
  204. evcloud/ocpi/invites/types/partner_invite_update_request_version.py +5 -0
  205. evcloud/ocpi/partners/__init__.py +7 -0
  206. evcloud/ocpi/partners/client.py +581 -0
  207. evcloud/ocpi/partners/raw_client.py +1340 -0
  208. evcloud/ocpi/partners/types/__init__.py +8 -0
  209. evcloud/ocpi/partners/types/partner_register_request_ocpi_version.py +5 -0
  210. evcloud/ocpi/partners/types/partner_update_request_ocpi_version.py +5 -0
  211. evcloud/ocpi/raw_client.py +13 -0
  212. evcloud/ocpi/sync/__init__.py +33 -0
  213. evcloud/ocpi/sync/client.py +1701 -0
  214. evcloud/ocpi/sync/raw_client.py +3685 -0
  215. evcloud/ocpi/sync/types/__init__.py +31 -0
  216. evcloud/ocpi/sync/types/pull_cdrs_sync_request_version.py +5 -0
  217. evcloud/ocpi/sync/types/pull_hub_client_info_as_cpo_sync_request_version.py +5 -0
  218. evcloud/ocpi/sync/types/pull_hub_client_info_as_emsp_sync_request_version.py +5 -0
  219. evcloud/ocpi/sync/types/pull_locations_sync_request_version.py +5 -0
  220. evcloud/ocpi/sync/types/pull_sessions_sync_request_version.py +5 -0
  221. evcloud/ocpi/sync/types/pull_tariffs_sync_request_version.py +5 -0
  222. evcloud/ocpi/sync/types/pull_tokens_sync_request_version.py +5 -0
  223. evcloud/ocpi/sync/types/push_cdr_sync_request_version.py +5 -0
  224. evcloud/ocpi/sync/types/push_location_sync_request_version.py +5 -0
  225. evcloud/ocpi/sync/types/push_session_sync_request_version.py +5 -0
  226. evcloud/ocpi/sync/types/push_tariff_sync_request_version.py +5 -0
  227. evcloud/ocpi/sync/types/push_token_sync_request_version.py +5 -0
  228. evcloud/py.typed +0 -0
  229. evcloud/types/__init__.py +759 -0
  230. evcloud/types/access_mode.py +5 -0
  231. evcloud/types/asset_connector.py +26 -0
  232. evcloud/types/asset_updated_event.py +29 -0
  233. evcloud/types/availability_page.py +26 -0
  234. evcloud/types/batch_response.py +26 -0
  235. evcloud/types/batch_response_missing_item.py +7 -0
  236. evcloud/types/cdr_event.py +41 -0
  237. evcloud/types/cdr_out.py +75 -0
  238. evcloud/types/cdr_out_auth_method.py +7 -0
  239. evcloud/types/cdr_out_auth_method_zero.py +5 -0
  240. evcloud/types/cdr_out_origin.py +7 -0
  241. evcloud/types/cdr_out_origin_zero.py +5 -0
  242. evcloud/types/cdr_page.py +27 -0
  243. evcloud/types/cdr_write_response.py +26 -0
  244. evcloud/types/charge_point_created_out.py +74 -0
  245. evcloud/types/charge_point_created_out_access_mode.py +7 -0
  246. evcloud/types/charge_point_created_out_access_mode_zero.py +5 -0
  247. evcloud/types/charge_point_created_out_pricing.py +7 -0
  248. evcloud/types/charge_point_created_out_pricing_zero.py +5 -0
  249. evcloud/types/charge_point_created_out_site_type.py +7 -0
  250. evcloud/types/charge_point_created_out_site_type_zero.py +5 -0
  251. evcloud/types/charge_point_out.py +73 -0
  252. evcloud/types/charge_point_out_access_mode.py +7 -0
  253. evcloud/types/charge_point_out_access_mode_zero.py +5 -0
  254. evcloud/types/charge_point_out_pricing.py +7 -0
  255. evcloud/types/charge_point_out_pricing_zero.py +5 -0
  256. evcloud/types/charge_point_out_site_type.py +7 -0
  257. evcloud/types/charge_point_out_site_type_zero.py +5 -0
  258. evcloud/types/charge_point_page.py +27 -0
  259. evcloud/types/charging_preferences_response.py +28 -0
  260. evcloud/types/charging_preferences_response_result.py +10 -0
  261. evcloud/types/charging_profile.py +30 -0
  262. evcloud/types/charging_profile_charging_rate_unit.py +5 -0
  263. evcloud/types/charging_profile_period.py +31 -0
  264. evcloud/types/charging_profile_response.py +32 -0
  265. evcloud/types/cluster_page.py +26 -0
  266. evcloud/types/command_accepted.py +30 -0
  267. evcloud/types/command_accepted_route.py +53 -0
  268. evcloud/types/command_accepted_route_own.py +28 -0
  269. evcloud/types/command_accepted_route_own_ocpi_version.py +7 -0
  270. evcloud/types/command_accepted_route_own_ocpi_version_zero.py +5 -0
  271. evcloud/types/command_accepted_route_roaming.py +30 -0
  272. evcloud/types/command_accepted_route_roaming_ocpi_version.py +7 -0
  273. evcloud/types/command_accepted_route_roaming_ocpi_version_zero.py +5 -0
  274. evcloud/types/command_accepted_status.py +7 -0
  275. evcloud/types/command_accepted_status_zero.py +20 -0
  276. evcloud/types/command_page.py +26 -0
  277. evcloud/types/command_record.py +40 -0
  278. evcloud/types/command_record_command.py +7 -0
  279. evcloud/types/command_record_command_zero.py +7 -0
  280. evcloud/types/command_record_route.py +53 -0
  281. evcloud/types/command_record_route_own.py +28 -0
  282. evcloud/types/command_record_route_own_ocpi_version.py +7 -0
  283. evcloud/types/command_record_route_own_ocpi_version_zero.py +5 -0
  284. evcloud/types/command_record_route_roaming.py +30 -0
  285. evcloud/types/command_record_route_roaming_ocpi_version.py +7 -0
  286. evcloud/types/command_record_route_roaming_ocpi_version_zero.py +5 -0
  287. evcloud/types/command_record_status.py +7 -0
  288. evcloud/types/command_record_status_zero.py +20 -0
  289. evcloud/types/command_response_out.py +26 -0
  290. evcloud/types/command_response_out_result.py +7 -0
  291. evcloud/types/command_response_out_result_zero.py +7 -0
  292. evcloud/types/command_result_event.py +39 -0
  293. evcloud/types/command_result_event_module.py +5 -0
  294. evcloud/types/command_result_event_protocol.py +5 -0
  295. evcloud/types/command_result_event_status.py +5 -0
  296. evcloud/types/command_send_response.py +31 -0
  297. evcloud/types/command_token.py +36 -0
  298. evcloud/types/connector_format.py +5 -0
  299. evcloud/types/connector_page.py +27 -0
  300. evcloud/types/connector_status_event.py +29 -0
  301. evcloud/types/connector_write_response.py +27 -0
  302. evcloud/types/control_action.py +5 -0
  303. evcloud/types/control_request_page.py +27 -0
  304. evcloud/types/control_request_response.py +38 -0
  305. evcloud/types/control_request_response_action.py +7 -0
  306. evcloud/types/control_request_response_action_zero.py +7 -0
  307. evcloud/types/control_request_response_result.py +7 -0
  308. evcloud/types/control_request_response_result_zero.py +15 -0
  309. evcloud/types/control_request_response_unit.py +7 -0
  310. evcloud/types/control_request_response_unit_zero.py +5 -0
  311. evcloud/types/control_response_event.py +38 -0
  312. evcloud/types/control_response_event_action.py +5 -0
  313. evcloud/types/control_response_event_result.py +15 -0
  314. evcloud/types/control_response_event_unit.py +5 -0
  315. evcloud/types/cpo_connector_out.py +58 -0
  316. evcloud/types/cpo_connector_out_format.py +7 -0
  317. evcloud/types/cpo_connector_out_format_zero.py +5 -0
  318. evcloud/types/cpo_connector_out_ocpi_status.py +7 -0
  319. evcloud/types/cpo_connector_out_ocpi_status_zero.py +10 -0
  320. evcloud/types/cpo_connector_out_power_type.py +7 -0
  321. evcloud/types/cpo_connector_out_power_type_zero.py +7 -0
  322. evcloud/types/cpo_evse_out.py +61 -0
  323. evcloud/types/cpo_evse_out_origin.py +7 -0
  324. evcloud/types/cpo_evse_out_origin_zero.py +5 -0
  325. evcloud/types/cpo_evse_out_status.py +7 -0
  326. evcloud/types/cpo_evse_out_status_zero.py +10 -0
  327. evcloud/types/credentials_handshake_request.py +44 -0
  328. evcloud/types/credentials_handshake_request_partner_token_encoding.py +5 -0
  329. evcloud/types/credentials_handshake_response.py +32 -0
  330. evcloud/types/credentials_handshake_response_action.py +7 -0
  331. evcloud/types/credentials_handshake_response_version.py +5 -0
  332. evcloud/types/deliver_event_response.py +23 -0
  333. evcloud/types/delivery_drift_event.py +30 -0
  334. evcloud/types/display_text.py +24 -0
  335. evcloud/types/effective_cpo.py +27 -0
  336. evcloud/types/effective_cpo_source.py +7 -0
  337. evcloud/types/effective_cpo_source_zero.py +5 -0
  338. evcloud/types/effective_view_response.py +29 -0
  339. evcloud/types/emp_identity_out.py +35 -0
  340. evcloud/types/emp_identity_out_status.py +7 -0
  341. evcloud/types/emp_identity_out_status_zero.py +5 -0
  342. evcloud/types/emp_identity_page.py +26 -0
  343. evcloud/types/emsp_cdr_out.py +41 -0
  344. evcloud/types/emsp_cdr_out_source.py +7 -0
  345. evcloud/types/emsp_cdr_out_source_zero.py +5 -0
  346. evcloud/types/emsp_cdr_page.py +26 -0
  347. evcloud/types/emsp_connector_out.py +30 -0
  348. evcloud/types/emsp_evse_out.py +32 -0
  349. evcloud/types/emsp_gateway_schema_commands_location_key.py +25 -0
  350. evcloud/types/emsp_gateway_schema_location_lookup_location_key.py +25 -0
  351. evcloud/types/emsp_gateway_schema_locations_location_out.py +47 -0
  352. evcloud/types/emsp_gateway_schema_locations_location_page.py +26 -0
  353. evcloud/types/emsp_gateway_schema_networks_location_out.py +37 -0
  354. evcloud/types/emsp_gateway_schema_networks_location_page.py +26 -0
  355. evcloud/types/emsp_session_out.py +41 -0
  356. evcloud/types/emsp_session_out_source.py +7 -0
  357. evcloud/types/emsp_session_out_source_zero.py +5 -0
  358. evcloud/types/emsp_session_page.py +26 -0
  359. evcloud/types/emsp_tariff_page.py +26 -0
  360. evcloud/types/energy_contract.py +24 -0
  361. evcloud/types/estimate_line.py +27 -0
  362. evcloud/types/estimate_line_type.py +7 -0
  363. evcloud/types/estimate_line_type_zero.py +5 -0
  364. evcloud/types/estimate_response.py +30 -0
  365. evcloud/types/event_type_list.py +24 -0
  366. evcloud/types/event_type_response.py +27 -0
  367. evcloud/types/event_type_response_type.py +7 -0
  368. evcloud/types/event_type_response_type_zero.py +27 -0
  369. evcloud/types/event_type_version.py +24 -0
  370. evcloud/types/evse_connector_status.py +26 -0
  371. evcloud/types/evse_page.py +27 -0
  372. evcloud/types/evse_parking.py +25 -0
  373. evcloud/types/evse_parking_evse_position.py +7 -0
  374. evcloud/types/evse_parking_evse_position_zero.py +5 -0
  375. evcloud/types/evse_status_event.py +31 -0
  376. evcloud/types/evse_status_out.py +32 -0
  377. evcloud/types/evse_status_write_response.py +28 -0
  378. evcloud/types/facility_count.py +24 -0
  379. evcloud/types/facility_page.py +26 -0
  380. evcloud/types/health_ok.py +24 -0
  381. evcloud/types/health_ok_status.py +7 -0
  382. evcloud/types/health_ok_status_zero.py +5 -0
  383. evcloud/types/http_error_response.py +29 -0
  384. evcloud/types/http_validation_error.py +24 -0
  385. evcloud/types/limit_unit.py +5 -0
  386. evcloud/types/location_availability.py +28 -0
  387. evcloud/types/location_availability_status.py +7 -0
  388. evcloud/types/location_availability_status_zero.py +7 -0
  389. evcloud/types/location_base.py +53 -0
  390. evcloud/types/location_base_parking_type.py +7 -0
  391. evcloud/types/location_base_parking_type_zero.py +8 -0
  392. evcloud/types/location_cluster.py +26 -0
  393. evcloud/types/location_detail.py +51 -0
  394. evcloud/types/location_key_input.py +25 -0
  395. evcloud/types/location_list.py +24 -0
  396. evcloud/types/location_out.py +79 -0
  397. evcloud/types/location_out_access_mode.py +7 -0
  398. evcloud/types/location_out_access_mode_zero.py +5 -0
  399. evcloud/types/location_out_ocpi_version.py +7 -0
  400. evcloud/types/location_out_ocpi_version_zero.py +5 -0
  401. evcloud/types/location_out_origin.py +7 -0
  402. evcloud/types/location_out_origin_zero.py +5 -0
  403. evcloud/types/location_out_parking_type.py +7 -0
  404. evcloud/types/location_out_parking_type_zero.py +8 -0
  405. evcloud/types/location_out_role.py +7 -0
  406. evcloud/types/location_out_role_zero.py +5 -0
  407. evcloud/types/location_out_site_type.py +7 -0
  408. evcloud/types/location_out_site_type_zero.py +5 -0
  409. evcloud/types/location_page.py +27 -0
  410. evcloud/types/location_summary.py +43 -0
  411. evcloud/types/location_updated_event.py +30 -0
  412. evcloud/types/location_write_response.py +26 -0
  413. evcloud/types/map_cluster.py +28 -0
  414. evcloud/types/map_page.py +29 -0
  415. evcloud/types/network_consumer.py +25 -0
  416. evcloud/types/network_consumer_page.py +26 -0
  417. evcloud/types/network_detail_response.py +49 -0
  418. evcloud/types/network_detail_response_network_type.py +7 -0
  419. evcloud/types/network_detail_response_network_type_zero.py +5 -0
  420. evcloud/types/network_detail_response_publish_state.py +7 -0
  421. evcloud/types/network_detail_response_publish_state_zero.py +7 -0
  422. evcloud/types/network_page.py +26 -0
  423. evcloud/types/network_priority_order.py +23 -0
  424. evcloud/types/network_response.py +46 -0
  425. evcloud/types/network_response_network_type.py +7 -0
  426. evcloud/types/network_response_network_type_zero.py +5 -0
  427. evcloud/types/network_response_publish_state.py +7 -0
  428. evcloud/types/network_response_publish_state_zero.py +5 -0
  429. evcloud/types/network_rule_page.py +26 -0
  430. evcloud/types/network_rule_response.py +33 -0
  431. evcloud/types/network_rule_response_rule_type.py +7 -0
  432. evcloud/types/network_rule_response_rule_type_zero.py +5 -0
  433. evcloud/types/ocpi_business_details.py +26 -0
  434. evcloud/types/ocpi_business_details_input.py +26 -0
  435. evcloud/types/ocpi_cdr_dimension.py +24 -0
  436. evcloud/types/ocpi_cdr_location.py +30 -0
  437. evcloud/types/ocpi_cdr_token.py +30 -0
  438. evcloud/types/ocpi_charging_period.py +27 -0
  439. evcloud/types/ocpi_display_text.py +24 -0
  440. evcloud/types/ocpi_energy_mix.py +29 -0
  441. evcloud/types/ocpi_energy_mix_input.py +29 -0
  442. evcloud/types/ocpi_energy_source.py +24 -0
  443. evcloud/types/ocpi_energy_source_input.py +24 -0
  444. evcloud/types/ocpi_environmental_impact.py +24 -0
  445. evcloud/types/ocpi_evse_parking.py +24 -0
  446. evcloud/types/ocpi_exceptional_period.py +25 -0
  447. evcloud/types/ocpi_geo_location.py +24 -0
  448. evcloud/types/ocpi_geo_location_in.py +24 -0
  449. evcloud/types/ocpi_image.py +28 -0
  450. evcloud/types/ocpi_image_input.py +28 -0
  451. evcloud/types/ocpi_opening_times.py +28 -0
  452. evcloud/types/ocpi_opening_times_input.py +28 -0
  453. evcloud/types/ocpi_parking_place.py +44 -0
  454. evcloud/types/ocpi_parking_place_input.py +44 -0
  455. evcloud/types/ocpi_price_component_input.py +28 -0
  456. evcloud/types/ocpi_price_component_input_price.py +5 -0
  457. evcloud/types/ocpi_price_component_input_vat.py +5 -0
  458. evcloud/types/ocpi_price_component_output.py +26 -0
  459. evcloud/types/ocpi_price_input.py +26 -0
  460. evcloud/types/ocpi_price_input_excl_vat.py +5 -0
  461. evcloud/types/ocpi_price_input_incl_vat.py +5 -0
  462. evcloud/types/ocpi_price_output.py +24 -0
  463. evcloud/types/ocpi_publish_token.py +27 -0
  464. evcloud/types/ocpi_regular_hours.py +25 -0
  465. evcloud/types/ocpi_regular_hours_input.py +25 -0
  466. evcloud/types/ocpi_related_location.py +26 -0
  467. evcloud/types/ocpi_signed_data.py +28 -0
  468. evcloud/types/ocpi_signed_value.py +25 -0
  469. evcloud/types/ocpi_status_schedule.py +26 -0
  470. evcloud/types/ocpi_tariff_element_input.py +26 -0
  471. evcloud/types/ocpi_tariff_element_output.py +26 -0
  472. evcloud/types/ocpi_tariff_restrictions_input.py +33 -0
  473. evcloud/types/ocpi_tariff_restrictions_input_max_kwh.py +5 -0
  474. evcloud/types/ocpi_tariff_restrictions_input_min_kwh.py +5 -0
  475. evcloud/types/ocpi_tariff_restrictions_output.py +31 -0
  476. evcloud/types/ocpi_tariff_snapshot.py +26 -0
  477. evcloud/types/ocpp_version.py +5 -0
  478. evcloud/types/page_info.py +24 -0
  479. evcloud/types/parking.py +45 -0
  480. evcloud/types/parking_direction.py +7 -0
  481. evcloud/types/parking_direction_zero.py +5 -0
  482. evcloud/types/parking_type.py +8 -0
  483. evcloud/types/parking_vehicle_types_item.py +7 -0
  484. evcloud/types/parking_vehicle_types_item_zero.py +18 -0
  485. evcloud/types/partner_invite_response.py +47 -0
  486. evcloud/types/partner_invite_response_action.py +5 -0
  487. evcloud/types/partner_invite_response_role.py +5 -0
  488. evcloud/types/partner_invite_response_version.py +5 -0
  489. evcloud/types/partner_invite_revoke_response.py +31 -0
  490. evcloud/types/partner_invite_revoke_response_role.py +5 -0
  491. evcloud/types/partner_response.py +41 -0
  492. evcloud/types/partner_response_ocpi_version.py +5 -0
  493. evcloud/types/partner_token_updated_event.py +35 -0
  494. evcloud/types/partner_versions_pull_response.py +29 -0
  495. evcloud/types/partner_versions_pull_response_code.py +8 -0
  496. evcloud/types/partner_versions_pull_response_version.py +5 -0
  497. evcloud/types/power_measurement.py +30 -0
  498. evcloud/types/power_measurement_event.py +30 -0
  499. evcloud/types/power_measurement_list.py +24 -0
  500. evcloud/types/power_type.py +5 -0
  501. evcloud/types/price_component.py +26 -0
  502. evcloud/types/price_limit.py +24 -0
  503. evcloud/types/pricing_mode.py +5 -0
  504. evcloud/types/queue_health.py +34 -0
  505. evcloud/types/reservation_cancel_response.py +25 -0
  506. evcloud/types/resolve_chargers_response_own.py +28 -0
  507. evcloud/types/resolve_chargers_response_own_ocpi_version.py +7 -0
  508. evcloud/types/resolve_chargers_response_own_ocpi_version_zero.py +5 -0
  509. evcloud/types/resolve_chargers_response_roaming.py +30 -0
  510. evcloud/types/resolve_chargers_response_roaming_ocpi_version.py +7 -0
  511. evcloud/types/resolve_chargers_response_roaming_ocpi_version_zero.py +5 -0
  512. evcloud/types/session_event.py +39 -0
  513. evcloud/types/session_out.py +60 -0
  514. evcloud/types/session_out_auth_method.py +7 -0
  515. evcloud/types/session_out_auth_method_zero.py +5 -0
  516. evcloud/types/session_out_billing_state.py +7 -0
  517. evcloud/types/session_out_billing_state_zero.py +5 -0
  518. evcloud/types/session_out_origin.py +7 -0
  519. evcloud/types/session_out_origin_zero.py +5 -0
  520. evcloud/types/session_out_status.py +7 -0
  521. evcloud/types/session_out_status_zero.py +7 -0
  522. evcloud/types/session_page.py +27 -0
  523. evcloud/types/session_write_response.py +27 -0
  524. evcloud/types/sharing_slot.py +25 -0
  525. evcloud/types/sharing_slot_input.py +25 -0
  526. evcloud/types/site_type.py +5 -0
  527. evcloud/types/sync_patch_request.py +26 -0
  528. evcloud/types/sync_pull_response.py +31 -0
  529. evcloud/types/sync_push_response.py +31 -0
  530. evcloud/types/sync_push_response_status.py +5 -0
  531. evcloud/types/tariff.py +42 -0
  532. evcloud/types/tariff_assignment_out.py +32 -0
  533. evcloud/types/tariff_assignment_page.py +27 -0
  534. evcloud/types/tariff_delete_response.py +26 -0
  535. evcloud/types/tariff_display.py +27 -0
  536. evcloud/types/tariff_element.py +26 -0
  537. evcloud/types/tariff_out.py +57 -0
  538. evcloud/types/tariff_out_origin.py +7 -0
  539. evcloud/types/tariff_out_origin_zero.py +5 -0
  540. evcloud/types/tariff_out_tax_included.py +7 -0
  541. evcloud/types/tariff_out_tax_included_zero.py +5 -0
  542. evcloud/types/tariff_out_type.py +7 -0
  543. evcloud/types/tariff_out_type_zero.py +7 -0
  544. evcloud/types/tariff_page.py +27 -0
  545. evcloud/types/tariff_restrictions.py +36 -0
  546. evcloud/types/tariff_summary.py +29 -0
  547. evcloud/types/tariff_tax_included.py +7 -0
  548. evcloud/types/tariff_tax_included_zero.py +5 -0
  549. evcloud/types/tariff_type.py +7 -0
  550. evcloud/types/tariff_updated_event.py +29 -0
  551. evcloud/types/tariff_write_response.py +26 -0
  552. evcloud/types/tax_included.py +5 -0
  553. evcloud/types/tenant_profile_out.py +31 -0
  554. evcloud/types/token_bulk_out.py +26 -0
  555. evcloud/types/token_create.py +46 -0
  556. evcloud/types/token_create_default_profile_type.py +5 -0
  557. evcloud/types/token_create_ocpi_version.py +5 -0
  558. evcloud/types/token_create_type.py +5 -0
  559. evcloud/types/token_create_whitelist.py +5 -0
  560. evcloud/types/token_event_data.py +47 -0
  561. evcloud/types/token_event_data_status.py +7 -0
  562. evcloud/types/token_event_data_type.py +5 -0
  563. evcloud/types/token_event_data_whitelist.py +5 -0
  564. evcloud/types/token_event_out.py +32 -0
  565. evcloud/types/token_event_out_event.py +7 -0
  566. evcloud/types/token_event_out_event_zero.py +7 -0
  567. evcloud/types/token_event_page.py +26 -0
  568. evcloud/types/token_failure_item.py +24 -0
  569. evcloud/types/token_group_action_out.py +27 -0
  570. evcloud/types/token_group_failure.py +24 -0
  571. evcloud/types/token_group_member_out.py +26 -0
  572. evcloud/types/token_group_network_out.py +35 -0
  573. evcloud/types/token_group_network_page.py +26 -0
  574. evcloud/types/token_group_out.py +31 -0
  575. evcloud/types/token_group_page.py +26 -0
  576. evcloud/types/token_out.py +55 -0
  577. evcloud/types/token_out_status.py +7 -0
  578. evcloud/types/token_out_status_zero.py +7 -0
  579. evcloud/types/token_out_type.py +7 -0
  580. evcloud/types/token_out_type_zero.py +5 -0
  581. evcloud/types/token_out_whitelist.py +7 -0
  582. evcloud/types/token_out_whitelist_zero.py +5 -0
  583. evcloud/types/token_page.py +26 -0
  584. evcloud/types/token_reason.py +23 -0
  585. evcloud/types/token_ref.py +26 -0
  586. evcloud/types/token_ref_ocpi_version.py +5 -0
  587. evcloud/types/token_write_response.py +28 -0
  588. evcloud/types/validation_error.py +28 -0
  589. evcloud/types/validation_error_loc_item.py +5 -0
  590. evcloud/types/webhook_delivery_page.py +27 -0
  591. evcloud/types/webhook_delivery_response.py +35 -0
  592. evcloud/types/webhook_page.py +27 -0
  593. evcloud/types/webhook_response.py +42 -0
  594. evcloud/types/webhook_response_event.py +7 -0
  595. evcloud/types/webhook_response_event_zero.py +27 -0
  596. evcloud/types/webhook_response_status.py +7 -0
  597. evcloud/types/webhook_response_status_zero.py +5 -0
  598. evcloud/types/webhook_test_result.py +25 -0
  599. evcloud/types/webhook_with_secret_response.py +43 -0
  600. evcloud/types/webhook_with_secret_response_event.py +7 -0
  601. evcloud/types/webhook_with_secret_response_event_zero.py +27 -0
  602. evcloud/types/webhook_with_secret_response_status.py +7 -0
  603. evcloud/types/webhook_with_secret_response_status_zero.py +5 -0
  604. evcloud/version.py +3 -0
  605. evcloud/webhooks/__init__.py +28 -0
  606. evcloud/webhooks/client.py +53 -0
  607. evcloud/webhooks/deliveries/__init__.py +4 -0
  608. evcloud/webhooks/deliveries/client.py +141 -0
  609. evcloud/webhooks/deliveries/raw_client.py +268 -0
  610. evcloud/webhooks/endpoints/__init__.py +17 -0
  611. evcloud/webhooks/endpoints/client.py +642 -0
  612. evcloud/webhooks/endpoints/raw_client.py +1521 -0
  613. evcloud/webhooks/endpoints/types/__init__.py +15 -0
  614. evcloud/webhooks/endpoints/types/list_endpoints_request_event_types_item.py +27 -0
  615. evcloud/webhooks/endpoints/types/webhook_create_request_api_version.py +5 -0
  616. evcloud/webhooks/endpoints/types/webhook_create_request_event.py +27 -0
  617. evcloud/webhooks/endpoints/types/webhook_update_request_status.py +5 -0
  618. evcloud/webhooks/event_types/__init__.py +7 -0
  619. evcloud/webhooks/event_types/client.py +176 -0
  620. evcloud/webhooks/event_types/raw_client.py +418 -0
  621. evcloud/webhooks/event_types/types/__init__.py +7 -0
  622. evcloud/webhooks/event_types/types/get_event_types_request_type.py +27 -0
  623. evcloud/webhooks/events/__init__.py +7 -0
  624. evcloud/webhooks/events/client.py +207 -0
  625. evcloud/webhooks/events/raw_client.py +355 -0
  626. evcloud/webhooks/events/types/__init__.py +8 -0
  627. evcloud/webhooks/events/types/deliver_event_request_data.py +33 -0
  628. evcloud/webhooks/events/types/deliver_event_request_event.py +27 -0
  629. evcloud/webhooks/health/__init__.py +4 -0
  630. evcloud/webhooks/health/client.py +161 -0
  631. evcloud/webhooks/health/raw_client.py +380 -0
  632. evcloud/webhooks/raw_client.py +13 -0
  633. evcloud-0.1.0.dist-info/METADATA +257 -0
  634. evcloud-0.1.0.dist-info/RECORD +635 -0
  635. evcloud-0.1.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,1386 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
6
+ from ...core.pagination import AsyncPager, SyncPager
7
+ from ...core.request_options import RequestOptions
8
+ from ...types.availability_page import AvailabilityPage
9
+ from ...types.batch_response import BatchResponse
10
+ from ...types.cluster_page import ClusterPage
11
+ from ...types.emsp_gateway_schema_locations_location_out import EmspGatewaySchemaLocationsLocationOut
12
+ from ...types.emsp_gateway_schema_locations_location_page import EmspGatewaySchemaLocationsLocationPage
13
+ from ...types.facility_page import FacilityPage
14
+ from ...types.location_detail import LocationDetail
15
+ from ...types.location_key_input import LocationKeyInput
16
+ from ...types.location_list import LocationList
17
+ from ...types.map_page import MapPage
18
+ from .raw_client import AsyncRawLocationsClient, RawLocationsClient
19
+
20
+ # this is used as the default value for optional parameters
21
+ OMIT = typing.cast(typing.Any, ...)
22
+
23
+
24
+ class LocationsClient:
25
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
26
+ self._raw_client = RawLocationsClient(client_wrapper=client_wrapper)
27
+
28
+ @property
29
+ def with_raw_response(self) -> RawLocationsClient:
30
+ """
31
+ Retrieves a raw implementation of this client that returns raw responses.
32
+
33
+ Returns
34
+ -------
35
+ RawLocationsClient
36
+ """
37
+ return self._raw_client
38
+
39
+ def list(
40
+ self,
41
+ *,
42
+ cpo_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
43
+ countries: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
44
+ connector_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
45
+ facilities: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
46
+ parking_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
47
+ network_id: typing.Optional[int] = None,
48
+ token_group_id: typing.Optional[int] = None,
49
+ bounding_box: typing.Optional[str] = None,
50
+ after: typing.Optional[str] = None,
51
+ limit: typing.Optional[int] = None,
52
+ q: typing.Optional[str] = None,
53
+ lat: typing.Optional[float] = None,
54
+ lon: typing.Optional[float] = None,
55
+ radius_km: typing.Optional[float] = None,
56
+ availability: typing.Optional[bool] = None,
57
+ min_power: typing.Optional[float] = None,
58
+ own: typing.Optional[bool] = None,
59
+ request_options: typing.Optional[RequestOptions] = None,
60
+ ) -> SyncPager[EmspGatewaySchemaLocationsLocationOut, EmspGatewaySchemaLocationsLocationPage]:
61
+ """
62
+ Your own OCPP chargers and roaming CPOs' locations, filtered by area, text, CPO, connector, power, facilities and parking type, optionally scoped to a network or a token group's networks. Each row carries a stable ``uid`` and its ``source`` (``OWN_OCPP`` or ``PARTNER_OCPI``).
63
+
64
+ Parameters
65
+ ----------
66
+ cpo_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
67
+ Only these CPOs, as ``CC*PID``. Repeat for more than one.
68
+
69
+ countries : typing.Optional[typing.Union[str, typing.Sequence[str]]]
70
+ ISO 3166-1 alpha-3 countries, e.g. ``NLD``. Repeat for more than one.
71
+
72
+ connector_types : typing.Optional[typing.Union[str, typing.Sequence[str]]]
73
+ Only these OCPI connector standards, e.g. ``IEC_62196_T2``. Repeat for more than one.
74
+
75
+ facilities : typing.Optional[typing.Union[str, typing.Sequence[str]]]
76
+ OCPI facilities, e.g. ``CAFE``. A location must list every one. Repeat for more than one.
77
+
78
+ parking_types : typing.Optional[typing.Union[str, typing.Sequence[str]]]
79
+ OCPI parking types, e.g. ``PARKING_GARAGE``. Any one matches. Repeat for more than one.
80
+
81
+ network_id : typing.Optional[int]
82
+ Only locations this network reaches. Not together with token_group_id.
83
+
84
+ token_group_id : typing.Optional[int]
85
+ Only locations the group's networks reach. Not together with network_id.
86
+
87
+ bounding_box : typing.Optional[str]
88
+ Only locations inside ``min_lon,min_lat,max_lon,max_lat`` (WGS84).
89
+
90
+ after : typing.Optional[str]
91
+ Cursor: the previous page's ``pagination.end_cursor`` (``country_code:party_id:location_id``). Omit it for the first page.
92
+
93
+ limit : typing.Optional[int]
94
+ Maximum rows per page (default 50, max 200).
95
+
96
+ q : typing.Optional[str]
97
+ Text in name, address or city.
98
+
99
+ lat : typing.Optional[float]
100
+ Search centre latitude (WGS84); send with lon.
101
+
102
+ lon : typing.Optional[float]
103
+ Search centre longitude (WGS84); send with lat.
104
+
105
+ radius_km : typing.Optional[float]
106
+ Search radius around lat/lon in km (default 10).
107
+
108
+ availability : typing.Optional[bool]
109
+ Only locations with an EVSE free right now.
110
+
111
+ min_power : typing.Optional[float]
112
+ Minimum connector power in kW.
113
+
114
+ own : typing.Optional[bool]
115
+ true: only your own OCPP chargers. false: only partner (roaming) locations.
116
+
117
+ request_options : typing.Optional[RequestOptions]
118
+ Request-specific configuration.
119
+
120
+ Returns
121
+ -------
122
+ SyncPager[EmspGatewaySchemaLocationsLocationOut, EmspGatewaySchemaLocationsLocationPage]
123
+ One page of own and partner locations.
124
+
125
+ Examples
126
+ --------
127
+ from evcloud import EvcloudClient
128
+
129
+ client = EvcloudClient(
130
+ token="YOUR_TOKEN",
131
+ )
132
+ response = client.emsp.locations.list(
133
+ limit=50,
134
+ lat=52.37,
135
+ lon=4.89,
136
+ radius_km=5.0,
137
+ availability=True,
138
+ min_power=50.0,
139
+ )
140
+ for item in response:
141
+ yield item
142
+ # alternatively, you can paginate page-by-page
143
+ for page in response.iter_pages():
144
+ yield page
145
+ """
146
+ return self._raw_client.list(
147
+ cpo_ids=cpo_ids,
148
+ countries=countries,
149
+ connector_types=connector_types,
150
+ facilities=facilities,
151
+ parking_types=parking_types,
152
+ network_id=network_id,
153
+ token_group_id=token_group_id,
154
+ bounding_box=bounding_box,
155
+ after=after,
156
+ limit=limit,
157
+ q=q,
158
+ lat=lat,
159
+ lon=lon,
160
+ radius_km=radius_km,
161
+ availability=availability,
162
+ min_power=min_power,
163
+ own=own,
164
+ request_options=request_options,
165
+ )
166
+
167
+ def check_availability(
168
+ self,
169
+ *,
170
+ location_ids: typing.Sequence[str],
171
+ network_id: typing.Optional[int] = OMIT,
172
+ token_group_id: typing.Optional[int] = OMIT,
173
+ request_options: typing.Optional[RequestOptions] = None,
174
+ ) -> AvailabilityPage:
175
+ """
176
+ Free and total EVSEs per location. Unknown or out-of-scope ids are left out.
177
+
178
+ Parameters
179
+ ----------
180
+ location_ids : typing.Sequence[str]
181
+
182
+ network_id : typing.Optional[int]
183
+
184
+ token_group_id : typing.Optional[int]
185
+
186
+ request_options : typing.Optional[RequestOptions]
187
+ Request-specific configuration.
188
+
189
+ Returns
190
+ -------
191
+ AvailabilityPage
192
+ Availability of each location found.
193
+
194
+ Examples
195
+ --------
196
+ from evcloud import EvcloudClient
197
+
198
+ client = EvcloudClient(
199
+ token="YOUR_TOKEN",
200
+ )
201
+ client.emsp.locations.check_availability(
202
+ location_ids=["LOC-AMS-001", "LOC-AMS-002"],
203
+ )
204
+ """
205
+ _response = self._raw_client.check_availability(
206
+ location_ids=location_ids,
207
+ network_id=network_id,
208
+ token_group_id=token_group_id,
209
+ request_options=request_options,
210
+ )
211
+ return _response.data
212
+
213
+ def cluster(
214
+ self,
215
+ *,
216
+ zoom_level: int,
217
+ network_id: typing.Optional[int] = None,
218
+ token_group_id: typing.Optional[int] = None,
219
+ bounding_box: typing.Optional[str] = None,
220
+ request_options: typing.Optional[RequestOptions] = None,
221
+ ) -> ClusterPage:
222
+ """
223
+ Deprecated: use ``GET /emsp/locations/map``. Kept for one minor version. Groups locations into grid cells sized for the zoom level. A cell lists its location ids when it holds 20 or fewer.
224
+
225
+ Parameters
226
+ ----------
227
+ zoom_level : int
228
+ Map zoom level (0 = whole world, 22 = street).
229
+
230
+ network_id : typing.Optional[int]
231
+ Only locations this network reaches. Not together with token_group_id.
232
+
233
+ token_group_id : typing.Optional[int]
234
+ Only locations the group's networks reach. Not together with network_id.
235
+
236
+ bounding_box : typing.Optional[str]
237
+ Only locations inside ``min_lon,min_lat,max_lon,max_lat`` (WGS84).
238
+
239
+ request_options : typing.Optional[RequestOptions]
240
+ Request-specific configuration.
241
+
242
+ Returns
243
+ -------
244
+ ClusterPage
245
+ The map cells that hold locations.
246
+
247
+ Examples
248
+ --------
249
+ from evcloud import EvcloudClient
250
+
251
+ client = EvcloudClient(
252
+ token="YOUR_TOKEN",
253
+ )
254
+ client.emsp.locations.cluster(
255
+ zoom_level=7,
256
+ bounding_box="3.3,50.7,7.2,53.6",
257
+ )
258
+ """
259
+ _response = self._raw_client.cluster(
260
+ zoom_level=zoom_level,
261
+ network_id=network_id,
262
+ token_group_id=token_group_id,
263
+ bounding_box=bounding_box,
264
+ request_options=request_options,
265
+ )
266
+ return _response.data
267
+
268
+ def list_facilities(
269
+ self,
270
+ *,
271
+ countries: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
272
+ network_id: typing.Optional[int] = None,
273
+ token_group_id: typing.Optional[int] = None,
274
+ request_options: typing.Optional[RequestOptions] = None,
275
+ ) -> FacilityPage:
276
+ """
277
+ Each OCPI facility present, with how many locations have it, most common first.
278
+
279
+ Parameters
280
+ ----------
281
+ countries : typing.Optional[typing.Union[str, typing.Sequence[str]]]
282
+ ISO 3166-1 alpha-3 countries, e.g. ``NLD``. Repeat for more than one.
283
+
284
+ network_id : typing.Optional[int]
285
+ Only locations this network reaches. Not together with token_group_id.
286
+
287
+ token_group_id : typing.Optional[int]
288
+ Only locations the group's networks reach. Not together with network_id.
289
+
290
+ request_options : typing.Optional[RequestOptions]
291
+ Request-specific configuration.
292
+
293
+ Returns
294
+ -------
295
+ FacilityPage
296
+ Facility counts, most common first.
297
+
298
+ Examples
299
+ --------
300
+ from evcloud import EvcloudClient
301
+
302
+ client = EvcloudClient(
303
+ token="YOUR_TOKEN",
304
+ )
305
+ client.emsp.locations.list_facilities(
306
+ network_id=21,
307
+ )
308
+ """
309
+ _response = self._raw_client.list_facilities(
310
+ countries=countries, network_id=network_id, token_group_id=token_group_id, request_options=request_options
311
+ )
312
+ return _response.data
313
+
314
+ def map_(
315
+ self,
316
+ *,
317
+ bbox: str,
318
+ zoom: int,
319
+ connector_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
320
+ cpo_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
321
+ network_id: typing.Optional[int] = None,
322
+ token_group_id: typing.Optional[int] = None,
323
+ min_power: typing.Optional[float] = None,
324
+ available_only: typing.Optional[bool] = None,
325
+ own: typing.Optional[bool] = None,
326
+ request_options: typing.Optional[RequestOptions] = None,
327
+ ) -> MapPage:
328
+ """
329
+ Pins (up to 500 location summaries) when ``zoom`` >= 13 or the box holds 500 locations or fewer; otherwise clusters on web-mercator tiles. ``tile_versions`` change when a tile's content changes. Answers are cached for a few seconds per workspace and query.
330
+
331
+ Parameters
332
+ ----------
333
+ bbox : str
334
+ The viewport as ``min_lon,min_lat,max_lon,max_lat`` (WGS84).
335
+
336
+ zoom : int
337
+ Map zoom level (0 = whole world, 22 = street).
338
+
339
+ connector_types : typing.Optional[typing.Union[str, typing.Sequence[str]]]
340
+ Only these OCPI connector standards, e.g. ``IEC_62196_T2``. Repeat for more than one.
341
+
342
+ cpo_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
343
+ Only these CPOs, as ``CC*PID``. Repeat for more than one.
344
+
345
+ network_id : typing.Optional[int]
346
+ Only locations this network reaches. Not together with token_group_id.
347
+
348
+ token_group_id : typing.Optional[int]
349
+ Only locations the group's networks reach. Not together with network_id.
350
+
351
+ min_power : typing.Optional[float]
352
+ Minimum connector power in kW.
353
+
354
+ available_only : typing.Optional[bool]
355
+ Only locations with an EVSE free right now.
356
+
357
+ own : typing.Optional[bool]
358
+ true: only your own OCPP chargers. false: only partner (roaming) locations.
359
+
360
+ request_options : typing.Optional[RequestOptions]
361
+ Request-specific configuration.
362
+
363
+ Returns
364
+ -------
365
+ MapPage
366
+ Clusters (zoomed out) or pins (zoomed in) for the viewport.
367
+
368
+ Examples
369
+ --------
370
+ from evcloud import EvcloudClient
371
+
372
+ client = EvcloudClient(
373
+ token="YOUR_TOKEN",
374
+ )
375
+ client.emsp.locations.map_(
376
+ bbox="4.7,52.2,5.0,52.5",
377
+ zoom=11,
378
+ available_only=True,
379
+ )
380
+ """
381
+ _response = self._raw_client.map_(
382
+ bbox=bbox,
383
+ zoom=zoom,
384
+ connector_types=connector_types,
385
+ cpo_ids=cpo_ids,
386
+ network_id=network_id,
387
+ token_group_id=token_group_id,
388
+ min_power=min_power,
389
+ available_only=available_only,
390
+ own=own,
391
+ request_options=request_options,
392
+ )
393
+ return _response.data
394
+
395
+ def search(
396
+ self,
397
+ *,
398
+ q: typing.Optional[str] = None,
399
+ evse_id: typing.Optional[str] = None,
400
+ lat: typing.Optional[float] = None,
401
+ lon: typing.Optional[float] = None,
402
+ limit: typing.Optional[int] = None,
403
+ request_options: typing.Optional[RequestOptions] = None,
404
+ ) -> LocationList:
405
+ """
406
+ Text search on name, address and city (``q``), EVSE id lookup (``evse_id``, as printed on the QR code; ``*`` and case are ignored), or both. Nearest first when ``lat`` and ``lon`` are given. Returns at most ``limit`` matches with no next page: refine the query to narrow it.
407
+
408
+ Parameters
409
+ ----------
410
+ q : typing.Optional[str]
411
+ Text in name, address or city.
412
+
413
+ evse_id : typing.Optional[str]
414
+ eMI3 EVSE id as printed on the QR code, e.g. ``NL*ABC*E1001*1``.
415
+
416
+ lat : typing.Optional[float]
417
+ Your latitude (WGS84); send with lon.
418
+
419
+ lon : typing.Optional[float]
420
+ Your longitude (WGS84); send with lat.
421
+
422
+ limit : typing.Optional[int]
423
+ Maximum results (default 10, max 50).
424
+
425
+ request_options : typing.Optional[RequestOptions]
426
+ Request-specific configuration.
427
+
428
+ Returns
429
+ -------
430
+ LocationList
431
+ Matching locations, nearest first when lat/lon are given.
432
+
433
+ Examples
434
+ --------
435
+ from evcloud import EvcloudClient
436
+
437
+ client = EvcloudClient(
438
+ token="YOUR_TOKEN",
439
+ )
440
+ client.emsp.locations.search(
441
+ evse_id="NL*ABC*E1001*1",
442
+ lat=52.37,
443
+ lon=4.89,
444
+ )
445
+ """
446
+ _response = self._raw_client.search(
447
+ q=q, evse_id=evse_id, lat=lat, lon=lon, limit=limit, request_options=request_options
448
+ )
449
+ return _response.data
450
+
451
+ def route(
452
+ self,
453
+ *,
454
+ polyline: str,
455
+ connector_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
456
+ cpo_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
457
+ buffer_km: typing.Optional[float] = None,
458
+ limit: typing.Optional[int] = None,
459
+ network_id: typing.Optional[int] = None,
460
+ token_group_id: typing.Optional[int] = None,
461
+ min_power: typing.Optional[float] = None,
462
+ available_only: typing.Optional[bool] = None,
463
+ own: typing.Optional[bool] = None,
464
+ request_options: typing.Optional[RequestOptions] = None,
465
+ ) -> LocationList:
466
+ """
467
+ Locations within ``buffer_km`` of an encoded polyline (Google format, precision 5), in order along the route. Same filters as the map. Returns at most ``limit`` locations with no next page: shorten the route or ``buffer_km`` to narrow it.
468
+
469
+ Parameters
470
+ ----------
471
+ polyline : str
472
+ The route as a Google encoded polyline, precision 5.
473
+
474
+ connector_types : typing.Optional[typing.Union[str, typing.Sequence[str]]]
475
+ Only these OCPI connector standards, e.g. ``IEC_62196_T2``. Repeat for more than one.
476
+
477
+ cpo_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
478
+ Only these CPOs, as ``CC*PID``. Repeat for more than one.
479
+
480
+ buffer_km : typing.Optional[float]
481
+ Distance from the route in km (default 2, max 20).
482
+
483
+ limit : typing.Optional[int]
484
+ Maximum results (default 50, max 200).
485
+
486
+ network_id : typing.Optional[int]
487
+ Only locations this network reaches. Not together with token_group_id.
488
+
489
+ token_group_id : typing.Optional[int]
490
+ Only locations the group's networks reach. Not together with network_id.
491
+
492
+ min_power : typing.Optional[float]
493
+ Minimum connector power in kW.
494
+
495
+ available_only : typing.Optional[bool]
496
+ Only locations with an EVSE free right now.
497
+
498
+ own : typing.Optional[bool]
499
+ true: only your own OCPP chargers. false: only partner (roaming) locations.
500
+
501
+ request_options : typing.Optional[RequestOptions]
502
+ Request-specific configuration.
503
+
504
+ Returns
505
+ -------
506
+ LocationList
507
+ Locations near the route, in order along it.
508
+
509
+ Examples
510
+ --------
511
+ from evcloud import EvcloudClient
512
+
513
+ client = EvcloudClient(
514
+ token="YOUR_TOKEN",
515
+ )
516
+ client.emsp.locations.route(
517
+ polyline="_p~iF~ps|U_ulLnnqC_mqNvxq`@",
518
+ buffer_km=2.0,
519
+ min_power=50.0,
520
+ )
521
+ """
522
+ _response = self._raw_client.route(
523
+ polyline=polyline,
524
+ connector_types=connector_types,
525
+ cpo_ids=cpo_ids,
526
+ buffer_km=buffer_km,
527
+ limit=limit,
528
+ network_id=network_id,
529
+ token_group_id=token_group_id,
530
+ min_power=min_power,
531
+ available_only=available_only,
532
+ own=own,
533
+ request_options=request_options,
534
+ )
535
+ return _response.data
536
+
537
+ def batch(
538
+ self,
539
+ *,
540
+ keys: typing.Optional[typing.Sequence[LocationKeyInput]] = OMIT,
541
+ uids: typing.Optional[typing.Sequence[str]] = OMIT,
542
+ request_options: typing.Optional[RequestOptions] = None,
543
+ ) -> BatchResponse:
544
+ """
545
+ Up to 500 locations by OCPI key or by ``uid`` (one of the two). Keys or uids that are unknown or out of scope come back in ``missing``.
546
+
547
+ Parameters
548
+ ----------
549
+ keys : typing.Optional[typing.Sequence[LocationKeyInput]]
550
+
551
+ uids : typing.Optional[typing.Sequence[str]]
552
+
553
+ request_options : typing.Optional[RequestOptions]
554
+ Request-specific configuration.
555
+
556
+ Returns
557
+ -------
558
+ BatchResponse
559
+ The locations found, and the keys or uids that were not.
560
+
561
+ Examples
562
+ --------
563
+ from evcloud import EvcloudClient, LocationKeyInput
564
+
565
+ client = EvcloudClient(
566
+ token="YOUR_TOKEN",
567
+ )
568
+ client.emsp.locations.batch(
569
+ keys=[
570
+ LocationKeyInput(
571
+ country_code="NL",
572
+ party_id="ABC",
573
+ location_id="LOC-AMS-001",
574
+ ),
575
+ LocationKeyInput(
576
+ country_code="NL",
577
+ party_id="ABC",
578
+ location_id="LOC-GONE",
579
+ ),
580
+ ],
581
+ )
582
+ """
583
+ _response = self._raw_client.batch(keys=keys, uids=uids, request_options=request_options)
584
+ return _response.data
585
+
586
+ def get_by_uid(self, uid: str, *, request_options: typing.Optional[RequestOptions] = None) -> LocationDetail:
587
+ """
588
+ One location with its EVSEs, connectors and tariff summary, by its stable ``uid``.
589
+
590
+ Parameters
591
+ ----------
592
+ uid : str
593
+ The location's stable ``uid``.
594
+
595
+ request_options : typing.Optional[RequestOptions]
596
+ Request-specific configuration.
597
+
598
+ Returns
599
+ -------
600
+ LocationDetail
601
+ The location with its EVSEs, connectors and tariff summary.
602
+
603
+ Examples
604
+ --------
605
+ from evcloud import EvcloudClient
606
+
607
+ client = EvcloudClient(
608
+ token="YOUR_TOKEN",
609
+ )
610
+ client.emsp.locations.get_by_uid(
611
+ uid="3f2b8c1d-6e4a-4b7f-9c2d-8a1e5f0b7c34",
612
+ )
613
+ """
614
+ _response = self._raw_client.get_by_uid(uid, request_options=request_options)
615
+ return _response.data
616
+
617
+ def get(
618
+ self,
619
+ location_id: str,
620
+ *,
621
+ country_code: str,
622
+ party_id: str,
623
+ request_options: typing.Optional[RequestOptions] = None,
624
+ ) -> LocationDetail:
625
+ """
626
+ One own or partner location with its EVSEs, connectors and tariff summary, addressed by the CPO's country code and party id.
627
+
628
+ Parameters
629
+ ----------
630
+ location_id : str
631
+ OCPI location id.
632
+
633
+ country_code : str
634
+ The CPO's OCPI country code, e.g. NL.
635
+
636
+ party_id : str
637
+ The CPO's OCPI party id, e.g. ABC.
638
+
639
+ request_options : typing.Optional[RequestOptions]
640
+ Request-specific configuration.
641
+
642
+ Returns
643
+ -------
644
+ LocationDetail
645
+ The location with its EVSEs, connectors and tariff summary.
646
+
647
+ Examples
648
+ --------
649
+ from evcloud import EvcloudClient
650
+
651
+ client = EvcloudClient(
652
+ token="YOUR_TOKEN",
653
+ )
654
+ client.emsp.locations.get(
655
+ location_id="LOC-AMS-001",
656
+ country_code="NL",
657
+ party_id="ABC",
658
+ )
659
+ """
660
+ _response = self._raw_client.get(
661
+ location_id, country_code=country_code, party_id=party_id, request_options=request_options
662
+ )
663
+ return _response.data
664
+
665
+
666
+ class AsyncLocationsClient:
667
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
668
+ self._raw_client = AsyncRawLocationsClient(client_wrapper=client_wrapper)
669
+
670
+ @property
671
+ def with_raw_response(self) -> AsyncRawLocationsClient:
672
+ """
673
+ Retrieves a raw implementation of this client that returns raw responses.
674
+
675
+ Returns
676
+ -------
677
+ AsyncRawLocationsClient
678
+ """
679
+ return self._raw_client
680
+
681
+ async def list(
682
+ self,
683
+ *,
684
+ cpo_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
685
+ countries: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
686
+ connector_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
687
+ facilities: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
688
+ parking_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
689
+ network_id: typing.Optional[int] = None,
690
+ token_group_id: typing.Optional[int] = None,
691
+ bounding_box: typing.Optional[str] = None,
692
+ after: typing.Optional[str] = None,
693
+ limit: typing.Optional[int] = None,
694
+ q: typing.Optional[str] = None,
695
+ lat: typing.Optional[float] = None,
696
+ lon: typing.Optional[float] = None,
697
+ radius_km: typing.Optional[float] = None,
698
+ availability: typing.Optional[bool] = None,
699
+ min_power: typing.Optional[float] = None,
700
+ own: typing.Optional[bool] = None,
701
+ request_options: typing.Optional[RequestOptions] = None,
702
+ ) -> AsyncPager[EmspGatewaySchemaLocationsLocationOut, EmspGatewaySchemaLocationsLocationPage]:
703
+ """
704
+ Your own OCPP chargers and roaming CPOs' locations, filtered by area, text, CPO, connector, power, facilities and parking type, optionally scoped to a network or a token group's networks. Each row carries a stable ``uid`` and its ``source`` (``OWN_OCPP`` or ``PARTNER_OCPI``).
705
+
706
+ Parameters
707
+ ----------
708
+ cpo_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
709
+ Only these CPOs, as ``CC*PID``. Repeat for more than one.
710
+
711
+ countries : typing.Optional[typing.Union[str, typing.Sequence[str]]]
712
+ ISO 3166-1 alpha-3 countries, e.g. ``NLD``. Repeat for more than one.
713
+
714
+ connector_types : typing.Optional[typing.Union[str, typing.Sequence[str]]]
715
+ Only these OCPI connector standards, e.g. ``IEC_62196_T2``. Repeat for more than one.
716
+
717
+ facilities : typing.Optional[typing.Union[str, typing.Sequence[str]]]
718
+ OCPI facilities, e.g. ``CAFE``. A location must list every one. Repeat for more than one.
719
+
720
+ parking_types : typing.Optional[typing.Union[str, typing.Sequence[str]]]
721
+ OCPI parking types, e.g. ``PARKING_GARAGE``. Any one matches. Repeat for more than one.
722
+
723
+ network_id : typing.Optional[int]
724
+ Only locations this network reaches. Not together with token_group_id.
725
+
726
+ token_group_id : typing.Optional[int]
727
+ Only locations the group's networks reach. Not together with network_id.
728
+
729
+ bounding_box : typing.Optional[str]
730
+ Only locations inside ``min_lon,min_lat,max_lon,max_lat`` (WGS84).
731
+
732
+ after : typing.Optional[str]
733
+ Cursor: the previous page's ``pagination.end_cursor`` (``country_code:party_id:location_id``). Omit it for the first page.
734
+
735
+ limit : typing.Optional[int]
736
+ Maximum rows per page (default 50, max 200).
737
+
738
+ q : typing.Optional[str]
739
+ Text in name, address or city.
740
+
741
+ lat : typing.Optional[float]
742
+ Search centre latitude (WGS84); send with lon.
743
+
744
+ lon : typing.Optional[float]
745
+ Search centre longitude (WGS84); send with lat.
746
+
747
+ radius_km : typing.Optional[float]
748
+ Search radius around lat/lon in km (default 10).
749
+
750
+ availability : typing.Optional[bool]
751
+ Only locations with an EVSE free right now.
752
+
753
+ min_power : typing.Optional[float]
754
+ Minimum connector power in kW.
755
+
756
+ own : typing.Optional[bool]
757
+ true: only your own OCPP chargers. false: only partner (roaming) locations.
758
+
759
+ request_options : typing.Optional[RequestOptions]
760
+ Request-specific configuration.
761
+
762
+ Returns
763
+ -------
764
+ AsyncPager[EmspGatewaySchemaLocationsLocationOut, EmspGatewaySchemaLocationsLocationPage]
765
+ One page of own and partner locations.
766
+
767
+ Examples
768
+ --------
769
+ import asyncio
770
+
771
+ from evcloud import AsyncEvcloudClient
772
+
773
+ client = AsyncEvcloudClient(
774
+ token="YOUR_TOKEN",
775
+ )
776
+
777
+
778
+ async def main() -> None:
779
+ response = await client.emsp.locations.list(
780
+ limit=50,
781
+ lat=52.37,
782
+ lon=4.89,
783
+ radius_km=5.0,
784
+ availability=True,
785
+ min_power=50.0,
786
+ )
787
+ async for item in response:
788
+ yield item
789
+
790
+ # alternatively, you can paginate page-by-page
791
+ async for page in response.iter_pages():
792
+ yield page
793
+
794
+
795
+ asyncio.run(main())
796
+ """
797
+ return await self._raw_client.list(
798
+ cpo_ids=cpo_ids,
799
+ countries=countries,
800
+ connector_types=connector_types,
801
+ facilities=facilities,
802
+ parking_types=parking_types,
803
+ network_id=network_id,
804
+ token_group_id=token_group_id,
805
+ bounding_box=bounding_box,
806
+ after=after,
807
+ limit=limit,
808
+ q=q,
809
+ lat=lat,
810
+ lon=lon,
811
+ radius_km=radius_km,
812
+ availability=availability,
813
+ min_power=min_power,
814
+ own=own,
815
+ request_options=request_options,
816
+ )
817
+
818
+ async def check_availability(
819
+ self,
820
+ *,
821
+ location_ids: typing.Sequence[str],
822
+ network_id: typing.Optional[int] = OMIT,
823
+ token_group_id: typing.Optional[int] = OMIT,
824
+ request_options: typing.Optional[RequestOptions] = None,
825
+ ) -> AvailabilityPage:
826
+ """
827
+ Free and total EVSEs per location. Unknown or out-of-scope ids are left out.
828
+
829
+ Parameters
830
+ ----------
831
+ location_ids : typing.Sequence[str]
832
+
833
+ network_id : typing.Optional[int]
834
+
835
+ token_group_id : typing.Optional[int]
836
+
837
+ request_options : typing.Optional[RequestOptions]
838
+ Request-specific configuration.
839
+
840
+ Returns
841
+ -------
842
+ AvailabilityPage
843
+ Availability of each location found.
844
+
845
+ Examples
846
+ --------
847
+ import asyncio
848
+
849
+ from evcloud import AsyncEvcloudClient
850
+
851
+ client = AsyncEvcloudClient(
852
+ token="YOUR_TOKEN",
853
+ )
854
+
855
+
856
+ async def main() -> None:
857
+ await client.emsp.locations.check_availability(
858
+ location_ids=["LOC-AMS-001", "LOC-AMS-002"],
859
+ )
860
+
861
+
862
+ asyncio.run(main())
863
+ """
864
+ _response = await self._raw_client.check_availability(
865
+ location_ids=location_ids,
866
+ network_id=network_id,
867
+ token_group_id=token_group_id,
868
+ request_options=request_options,
869
+ )
870
+ return _response.data
871
+
872
+ async def cluster(
873
+ self,
874
+ *,
875
+ zoom_level: int,
876
+ network_id: typing.Optional[int] = None,
877
+ token_group_id: typing.Optional[int] = None,
878
+ bounding_box: typing.Optional[str] = None,
879
+ request_options: typing.Optional[RequestOptions] = None,
880
+ ) -> ClusterPage:
881
+ """
882
+ Deprecated: use ``GET /emsp/locations/map``. Kept for one minor version. Groups locations into grid cells sized for the zoom level. A cell lists its location ids when it holds 20 or fewer.
883
+
884
+ Parameters
885
+ ----------
886
+ zoom_level : int
887
+ Map zoom level (0 = whole world, 22 = street).
888
+
889
+ network_id : typing.Optional[int]
890
+ Only locations this network reaches. Not together with token_group_id.
891
+
892
+ token_group_id : typing.Optional[int]
893
+ Only locations the group's networks reach. Not together with network_id.
894
+
895
+ bounding_box : typing.Optional[str]
896
+ Only locations inside ``min_lon,min_lat,max_lon,max_lat`` (WGS84).
897
+
898
+ request_options : typing.Optional[RequestOptions]
899
+ Request-specific configuration.
900
+
901
+ Returns
902
+ -------
903
+ ClusterPage
904
+ The map cells that hold locations.
905
+
906
+ Examples
907
+ --------
908
+ import asyncio
909
+
910
+ from evcloud import AsyncEvcloudClient
911
+
912
+ client = AsyncEvcloudClient(
913
+ token="YOUR_TOKEN",
914
+ )
915
+
916
+
917
+ async def main() -> None:
918
+ await client.emsp.locations.cluster(
919
+ zoom_level=7,
920
+ bounding_box="3.3,50.7,7.2,53.6",
921
+ )
922
+
923
+
924
+ asyncio.run(main())
925
+ """
926
+ _response = await self._raw_client.cluster(
927
+ zoom_level=zoom_level,
928
+ network_id=network_id,
929
+ token_group_id=token_group_id,
930
+ bounding_box=bounding_box,
931
+ request_options=request_options,
932
+ )
933
+ return _response.data
934
+
935
+ async def list_facilities(
936
+ self,
937
+ *,
938
+ countries: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
939
+ network_id: typing.Optional[int] = None,
940
+ token_group_id: typing.Optional[int] = None,
941
+ request_options: typing.Optional[RequestOptions] = None,
942
+ ) -> FacilityPage:
943
+ """
944
+ Each OCPI facility present, with how many locations have it, most common first.
945
+
946
+ Parameters
947
+ ----------
948
+ countries : typing.Optional[typing.Union[str, typing.Sequence[str]]]
949
+ ISO 3166-1 alpha-3 countries, e.g. ``NLD``. Repeat for more than one.
950
+
951
+ network_id : typing.Optional[int]
952
+ Only locations this network reaches. Not together with token_group_id.
953
+
954
+ token_group_id : typing.Optional[int]
955
+ Only locations the group's networks reach. Not together with network_id.
956
+
957
+ request_options : typing.Optional[RequestOptions]
958
+ Request-specific configuration.
959
+
960
+ Returns
961
+ -------
962
+ FacilityPage
963
+ Facility counts, most common first.
964
+
965
+ Examples
966
+ --------
967
+ import asyncio
968
+
969
+ from evcloud import AsyncEvcloudClient
970
+
971
+ client = AsyncEvcloudClient(
972
+ token="YOUR_TOKEN",
973
+ )
974
+
975
+
976
+ async def main() -> None:
977
+ await client.emsp.locations.list_facilities(
978
+ network_id=21,
979
+ )
980
+
981
+
982
+ asyncio.run(main())
983
+ """
984
+ _response = await self._raw_client.list_facilities(
985
+ countries=countries, network_id=network_id, token_group_id=token_group_id, request_options=request_options
986
+ )
987
+ return _response.data
988
+
989
+ async def map_(
990
+ self,
991
+ *,
992
+ bbox: str,
993
+ zoom: int,
994
+ connector_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
995
+ cpo_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
996
+ network_id: typing.Optional[int] = None,
997
+ token_group_id: typing.Optional[int] = None,
998
+ min_power: typing.Optional[float] = None,
999
+ available_only: typing.Optional[bool] = None,
1000
+ own: typing.Optional[bool] = None,
1001
+ request_options: typing.Optional[RequestOptions] = None,
1002
+ ) -> MapPage:
1003
+ """
1004
+ Pins (up to 500 location summaries) when ``zoom`` >= 13 or the box holds 500 locations or fewer; otherwise clusters on web-mercator tiles. ``tile_versions`` change when a tile's content changes. Answers are cached for a few seconds per workspace and query.
1005
+
1006
+ Parameters
1007
+ ----------
1008
+ bbox : str
1009
+ The viewport as ``min_lon,min_lat,max_lon,max_lat`` (WGS84).
1010
+
1011
+ zoom : int
1012
+ Map zoom level (0 = whole world, 22 = street).
1013
+
1014
+ connector_types : typing.Optional[typing.Union[str, typing.Sequence[str]]]
1015
+ Only these OCPI connector standards, e.g. ``IEC_62196_T2``. Repeat for more than one.
1016
+
1017
+ cpo_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
1018
+ Only these CPOs, as ``CC*PID``. Repeat for more than one.
1019
+
1020
+ network_id : typing.Optional[int]
1021
+ Only locations this network reaches. Not together with token_group_id.
1022
+
1023
+ token_group_id : typing.Optional[int]
1024
+ Only locations the group's networks reach. Not together with network_id.
1025
+
1026
+ min_power : typing.Optional[float]
1027
+ Minimum connector power in kW.
1028
+
1029
+ available_only : typing.Optional[bool]
1030
+ Only locations with an EVSE free right now.
1031
+
1032
+ own : typing.Optional[bool]
1033
+ true: only your own OCPP chargers. false: only partner (roaming) locations.
1034
+
1035
+ request_options : typing.Optional[RequestOptions]
1036
+ Request-specific configuration.
1037
+
1038
+ Returns
1039
+ -------
1040
+ MapPage
1041
+ Clusters (zoomed out) or pins (zoomed in) for the viewport.
1042
+
1043
+ Examples
1044
+ --------
1045
+ import asyncio
1046
+
1047
+ from evcloud import AsyncEvcloudClient
1048
+
1049
+ client = AsyncEvcloudClient(
1050
+ token="YOUR_TOKEN",
1051
+ )
1052
+
1053
+
1054
+ async def main() -> None:
1055
+ await client.emsp.locations.map_(
1056
+ bbox="4.7,52.2,5.0,52.5",
1057
+ zoom=11,
1058
+ available_only=True,
1059
+ )
1060
+
1061
+
1062
+ asyncio.run(main())
1063
+ """
1064
+ _response = await self._raw_client.map_(
1065
+ bbox=bbox,
1066
+ zoom=zoom,
1067
+ connector_types=connector_types,
1068
+ cpo_ids=cpo_ids,
1069
+ network_id=network_id,
1070
+ token_group_id=token_group_id,
1071
+ min_power=min_power,
1072
+ available_only=available_only,
1073
+ own=own,
1074
+ request_options=request_options,
1075
+ )
1076
+ return _response.data
1077
+
1078
+ async def search(
1079
+ self,
1080
+ *,
1081
+ q: typing.Optional[str] = None,
1082
+ evse_id: typing.Optional[str] = None,
1083
+ lat: typing.Optional[float] = None,
1084
+ lon: typing.Optional[float] = None,
1085
+ limit: typing.Optional[int] = None,
1086
+ request_options: typing.Optional[RequestOptions] = None,
1087
+ ) -> LocationList:
1088
+ """
1089
+ Text search on name, address and city (``q``), EVSE id lookup (``evse_id``, as printed on the QR code; ``*`` and case are ignored), or both. Nearest first when ``lat`` and ``lon`` are given. Returns at most ``limit`` matches with no next page: refine the query to narrow it.
1090
+
1091
+ Parameters
1092
+ ----------
1093
+ q : typing.Optional[str]
1094
+ Text in name, address or city.
1095
+
1096
+ evse_id : typing.Optional[str]
1097
+ eMI3 EVSE id as printed on the QR code, e.g. ``NL*ABC*E1001*1``.
1098
+
1099
+ lat : typing.Optional[float]
1100
+ Your latitude (WGS84); send with lon.
1101
+
1102
+ lon : typing.Optional[float]
1103
+ Your longitude (WGS84); send with lat.
1104
+
1105
+ limit : typing.Optional[int]
1106
+ Maximum results (default 10, max 50).
1107
+
1108
+ request_options : typing.Optional[RequestOptions]
1109
+ Request-specific configuration.
1110
+
1111
+ Returns
1112
+ -------
1113
+ LocationList
1114
+ Matching locations, nearest first when lat/lon are given.
1115
+
1116
+ Examples
1117
+ --------
1118
+ import asyncio
1119
+
1120
+ from evcloud import AsyncEvcloudClient
1121
+
1122
+ client = AsyncEvcloudClient(
1123
+ token="YOUR_TOKEN",
1124
+ )
1125
+
1126
+
1127
+ async def main() -> None:
1128
+ await client.emsp.locations.search(
1129
+ evse_id="NL*ABC*E1001*1",
1130
+ lat=52.37,
1131
+ lon=4.89,
1132
+ )
1133
+
1134
+
1135
+ asyncio.run(main())
1136
+ """
1137
+ _response = await self._raw_client.search(
1138
+ q=q, evse_id=evse_id, lat=lat, lon=lon, limit=limit, request_options=request_options
1139
+ )
1140
+ return _response.data
1141
+
1142
+ async def route(
1143
+ self,
1144
+ *,
1145
+ polyline: str,
1146
+ connector_types: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
1147
+ cpo_ids: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
1148
+ buffer_km: typing.Optional[float] = None,
1149
+ limit: typing.Optional[int] = None,
1150
+ network_id: typing.Optional[int] = None,
1151
+ token_group_id: typing.Optional[int] = None,
1152
+ min_power: typing.Optional[float] = None,
1153
+ available_only: typing.Optional[bool] = None,
1154
+ own: typing.Optional[bool] = None,
1155
+ request_options: typing.Optional[RequestOptions] = None,
1156
+ ) -> LocationList:
1157
+ """
1158
+ Locations within ``buffer_km`` of an encoded polyline (Google format, precision 5), in order along the route. Same filters as the map. Returns at most ``limit`` locations with no next page: shorten the route or ``buffer_km`` to narrow it.
1159
+
1160
+ Parameters
1161
+ ----------
1162
+ polyline : str
1163
+ The route as a Google encoded polyline, precision 5.
1164
+
1165
+ connector_types : typing.Optional[typing.Union[str, typing.Sequence[str]]]
1166
+ Only these OCPI connector standards, e.g. ``IEC_62196_T2``. Repeat for more than one.
1167
+
1168
+ cpo_ids : typing.Optional[typing.Union[str, typing.Sequence[str]]]
1169
+ Only these CPOs, as ``CC*PID``. Repeat for more than one.
1170
+
1171
+ buffer_km : typing.Optional[float]
1172
+ Distance from the route in km (default 2, max 20).
1173
+
1174
+ limit : typing.Optional[int]
1175
+ Maximum results (default 50, max 200).
1176
+
1177
+ network_id : typing.Optional[int]
1178
+ Only locations this network reaches. Not together with token_group_id.
1179
+
1180
+ token_group_id : typing.Optional[int]
1181
+ Only locations the group's networks reach. Not together with network_id.
1182
+
1183
+ min_power : typing.Optional[float]
1184
+ Minimum connector power in kW.
1185
+
1186
+ available_only : typing.Optional[bool]
1187
+ Only locations with an EVSE free right now.
1188
+
1189
+ own : typing.Optional[bool]
1190
+ true: only your own OCPP chargers. false: only partner (roaming) locations.
1191
+
1192
+ request_options : typing.Optional[RequestOptions]
1193
+ Request-specific configuration.
1194
+
1195
+ Returns
1196
+ -------
1197
+ LocationList
1198
+ Locations near the route, in order along it.
1199
+
1200
+ Examples
1201
+ --------
1202
+ import asyncio
1203
+
1204
+ from evcloud import AsyncEvcloudClient
1205
+
1206
+ client = AsyncEvcloudClient(
1207
+ token="YOUR_TOKEN",
1208
+ )
1209
+
1210
+
1211
+ async def main() -> None:
1212
+ await client.emsp.locations.route(
1213
+ polyline="_p~iF~ps|U_ulLnnqC_mqNvxq`@",
1214
+ buffer_km=2.0,
1215
+ min_power=50.0,
1216
+ )
1217
+
1218
+
1219
+ asyncio.run(main())
1220
+ """
1221
+ _response = await self._raw_client.route(
1222
+ polyline=polyline,
1223
+ connector_types=connector_types,
1224
+ cpo_ids=cpo_ids,
1225
+ buffer_km=buffer_km,
1226
+ limit=limit,
1227
+ network_id=network_id,
1228
+ token_group_id=token_group_id,
1229
+ min_power=min_power,
1230
+ available_only=available_only,
1231
+ own=own,
1232
+ request_options=request_options,
1233
+ )
1234
+ return _response.data
1235
+
1236
+ async def batch(
1237
+ self,
1238
+ *,
1239
+ keys: typing.Optional[typing.Sequence[LocationKeyInput]] = OMIT,
1240
+ uids: typing.Optional[typing.Sequence[str]] = OMIT,
1241
+ request_options: typing.Optional[RequestOptions] = None,
1242
+ ) -> BatchResponse:
1243
+ """
1244
+ Up to 500 locations by OCPI key or by ``uid`` (one of the two). Keys or uids that are unknown or out of scope come back in ``missing``.
1245
+
1246
+ Parameters
1247
+ ----------
1248
+ keys : typing.Optional[typing.Sequence[LocationKeyInput]]
1249
+
1250
+ uids : typing.Optional[typing.Sequence[str]]
1251
+
1252
+ request_options : typing.Optional[RequestOptions]
1253
+ Request-specific configuration.
1254
+
1255
+ Returns
1256
+ -------
1257
+ BatchResponse
1258
+ The locations found, and the keys or uids that were not.
1259
+
1260
+ Examples
1261
+ --------
1262
+ import asyncio
1263
+
1264
+ from evcloud import AsyncEvcloudClient, LocationKeyInput
1265
+
1266
+ client = AsyncEvcloudClient(
1267
+ token="YOUR_TOKEN",
1268
+ )
1269
+
1270
+
1271
+ async def main() -> None:
1272
+ await client.emsp.locations.batch(
1273
+ keys=[
1274
+ LocationKeyInput(
1275
+ country_code="NL",
1276
+ party_id="ABC",
1277
+ location_id="LOC-AMS-001",
1278
+ ),
1279
+ LocationKeyInput(
1280
+ country_code="NL",
1281
+ party_id="ABC",
1282
+ location_id="LOC-GONE",
1283
+ ),
1284
+ ],
1285
+ )
1286
+
1287
+
1288
+ asyncio.run(main())
1289
+ """
1290
+ _response = await self._raw_client.batch(keys=keys, uids=uids, request_options=request_options)
1291
+ return _response.data
1292
+
1293
+ async def get_by_uid(self, uid: str, *, request_options: typing.Optional[RequestOptions] = None) -> LocationDetail:
1294
+ """
1295
+ One location with its EVSEs, connectors and tariff summary, by its stable ``uid``.
1296
+
1297
+ Parameters
1298
+ ----------
1299
+ uid : str
1300
+ The location's stable ``uid``.
1301
+
1302
+ request_options : typing.Optional[RequestOptions]
1303
+ Request-specific configuration.
1304
+
1305
+ Returns
1306
+ -------
1307
+ LocationDetail
1308
+ The location with its EVSEs, connectors and tariff summary.
1309
+
1310
+ Examples
1311
+ --------
1312
+ import asyncio
1313
+
1314
+ from evcloud import AsyncEvcloudClient
1315
+
1316
+ client = AsyncEvcloudClient(
1317
+ token="YOUR_TOKEN",
1318
+ )
1319
+
1320
+
1321
+ async def main() -> None:
1322
+ await client.emsp.locations.get_by_uid(
1323
+ uid="3f2b8c1d-6e4a-4b7f-9c2d-8a1e5f0b7c34",
1324
+ )
1325
+
1326
+
1327
+ asyncio.run(main())
1328
+ """
1329
+ _response = await self._raw_client.get_by_uid(uid, request_options=request_options)
1330
+ return _response.data
1331
+
1332
+ async def get(
1333
+ self,
1334
+ location_id: str,
1335
+ *,
1336
+ country_code: str,
1337
+ party_id: str,
1338
+ request_options: typing.Optional[RequestOptions] = None,
1339
+ ) -> LocationDetail:
1340
+ """
1341
+ One own or partner location with its EVSEs, connectors and tariff summary, addressed by the CPO's country code and party id.
1342
+
1343
+ Parameters
1344
+ ----------
1345
+ location_id : str
1346
+ OCPI location id.
1347
+
1348
+ country_code : str
1349
+ The CPO's OCPI country code, e.g. NL.
1350
+
1351
+ party_id : str
1352
+ The CPO's OCPI party id, e.g. ABC.
1353
+
1354
+ request_options : typing.Optional[RequestOptions]
1355
+ Request-specific configuration.
1356
+
1357
+ Returns
1358
+ -------
1359
+ LocationDetail
1360
+ The location with its EVSEs, connectors and tariff summary.
1361
+
1362
+ Examples
1363
+ --------
1364
+ import asyncio
1365
+
1366
+ from evcloud import AsyncEvcloudClient
1367
+
1368
+ client = AsyncEvcloudClient(
1369
+ token="YOUR_TOKEN",
1370
+ )
1371
+
1372
+
1373
+ async def main() -> None:
1374
+ await client.emsp.locations.get(
1375
+ location_id="LOC-AMS-001",
1376
+ country_code="NL",
1377
+ party_id="ABC",
1378
+ )
1379
+
1380
+
1381
+ asyncio.run(main())
1382
+ """
1383
+ _response = await self._raw_client.get(
1384
+ location_id, country_code=country_code, party_id=party_id, request_options=request_options
1385
+ )
1386
+ return _response.data