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,1615 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
7
+ from ...core.pagination import AsyncPager, SyncPager
8
+ from ...core.request_options import RequestOptions
9
+ from ...types.effective_cpo import EffectiveCpo
10
+ from ...types.effective_view_response import EffectiveViewResponse
11
+ from ...types.emsp_gateway_schema_networks_location_out import EmspGatewaySchemaNetworksLocationOut
12
+ from ...types.emsp_gateway_schema_networks_location_page import EmspGatewaySchemaNetworksLocationPage
13
+ from ...types.network_consumer import NetworkConsumer
14
+ from ...types.network_consumer_page import NetworkConsumerPage
15
+ from ...types.network_detail_response import NetworkDetailResponse
16
+ from ...types.network_page import NetworkPage
17
+ from ...types.network_response import NetworkResponse
18
+ from ...types.network_rule_page import NetworkRulePage
19
+ from ...types.network_rule_response import NetworkRuleResponse
20
+ from .raw_client import AsyncRawNetworksClient, RawNetworksClient
21
+ from .types.list_networks_request_network_type import ListNetworksRequestNetworkType
22
+ from .types.list_rules_networks_request_validity import ListRulesNetworksRequestValidity
23
+ from .types.network_rule_create_request_rule_type import NetworkRuleCreateRequestRuleType
24
+
25
+ # this is used as the default value for optional parameters
26
+ OMIT = typing.cast(typing.Any, ...)
27
+
28
+
29
+ class NetworksClient:
30
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
31
+ self._raw_client = RawNetworksClient(client_wrapper=client_wrapper)
32
+
33
+ @property
34
+ def with_raw_response(self) -> RawNetworksClient:
35
+ """
36
+ Retrieves a raw implementation of this client that returns raw responses.
37
+
38
+ Returns
39
+ -------
40
+ RawNetworksClient
41
+ """
42
+ return self._raw_client
43
+
44
+ def list(
45
+ self,
46
+ *,
47
+ network_type: typing.Optional[ListNetworksRequestNetworkType] = None,
48
+ parent_network_id: typing.Optional[int] = None,
49
+ published: typing.Optional[bool] = None,
50
+ after: typing.Optional[str] = None,
51
+ limit: typing.Optional[int] = None,
52
+ request_options: typing.Optional[RequestOptions] = None,
53
+ ) -> SyncPager[NetworkResponse, NetworkPage]:
54
+ """
55
+ Your base networks and the sub-networks that slice them.
56
+
57
+ Parameters
58
+ ----------
59
+ network_type : typing.Optional[ListNetworksRequestNetworkType]
60
+ Only BASE or only TENANT (sub-)networks.
61
+
62
+ parent_network_id : typing.Optional[int]
63
+ Only sub-networks of this base network.
64
+
65
+ published : typing.Optional[bool]
66
+ Only published (true) or unpublished (false) networks.
67
+
68
+ after : typing.Optional[str]
69
+ Cursor: the previous page's ``pagination.end_cursor``. Omit it for the first page.
70
+
71
+ limit : typing.Optional[int]
72
+ Maximum rows per page (default 50, max 200).
73
+
74
+ request_options : typing.Optional[RequestOptions]
75
+ Request-specific configuration.
76
+
77
+ Returns
78
+ -------
79
+ SyncPager[NetworkResponse, NetworkPage]
80
+ One page of networks; ``pagination.has_next`` is false on the last page.
81
+
82
+ Examples
83
+ --------
84
+ from evcloud import EvcloudClient
85
+
86
+ client = EvcloudClient(
87
+ token="YOUR_TOKEN",
88
+ )
89
+ response = client.emsp.networks.list(
90
+ limit=50,
91
+ network_type="TENANT",
92
+ )
93
+ for item in response:
94
+ yield item
95
+ # alternatively, you can paginate page-by-page
96
+ for page in response.iter_pages():
97
+ yield page
98
+ """
99
+ return self._raw_client.list(
100
+ network_type=network_type,
101
+ parent_network_id=parent_network_id,
102
+ published=published,
103
+ after=after,
104
+ limit=limit,
105
+ request_options=request_options,
106
+ )
107
+
108
+ def create(
109
+ self,
110
+ *,
111
+ idempotency_key: str,
112
+ name: str,
113
+ parent_network_id: int,
114
+ cpo_ids: typing.Optional[typing.Sequence[str]] = OMIT,
115
+ description: typing.Optional[str] = OMIT,
116
+ countries: typing.Optional[typing.Sequence[str]] = OMIT,
117
+ power_types: typing.Optional[typing.Sequence[str]] = OMIT,
118
+ parking_types: typing.Optional[typing.Sequence[str]] = OMIT,
119
+ facilities: typing.Optional[typing.Sequence[str]] = OMIT,
120
+ auto_accept_cpo_additions: typing.Optional[bool] = OMIT,
121
+ publicly_accessible: typing.Optional[bool] = OMIT,
122
+ request_options: typing.Optional[RequestOptions] = None,
123
+ ) -> NetworkResponse:
124
+ """
125
+ A named slice of one of your base networks: some of its CPOs, optionally filtered by country, power, parking and facilities.
126
+
127
+ Parameters
128
+ ----------
129
+ idempotency_key : str
130
+ A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
131
+
132
+ name : str
133
+
134
+ parent_network_id : int
135
+
136
+ cpo_ids : typing.Optional[typing.Sequence[str]]
137
+
138
+ description : typing.Optional[str]
139
+
140
+ countries : typing.Optional[typing.Sequence[str]]
141
+
142
+ power_types : typing.Optional[typing.Sequence[str]]
143
+
144
+ parking_types : typing.Optional[typing.Sequence[str]]
145
+
146
+ facilities : typing.Optional[typing.Sequence[str]]
147
+
148
+ auto_accept_cpo_additions : typing.Optional[bool]
149
+
150
+ publicly_accessible : typing.Optional[bool]
151
+
152
+ request_options : typing.Optional[RequestOptions]
153
+ Request-specific configuration.
154
+
155
+ Returns
156
+ -------
157
+ NetworkResponse
158
+ The created sub-network.
159
+
160
+ Examples
161
+ --------
162
+ from evcloud import EvcloudClient
163
+
164
+ client = EvcloudClient(
165
+ token="YOUR_TOKEN",
166
+ )
167
+ client.emsp.networks.create(
168
+ idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
169
+ name="Fleet fast chargers",
170
+ parent_network_id=20,
171
+ cpo_ids=["NL*ABC", "BE*XYZ"],
172
+ description="DC sites only",
173
+ countries=["NLD", "BEL"],
174
+ power_types=["DC"],
175
+ )
176
+ """
177
+ _response = self._raw_client.create(
178
+ idempotency_key=idempotency_key,
179
+ name=name,
180
+ parent_network_id=parent_network_id,
181
+ cpo_ids=cpo_ids,
182
+ description=description,
183
+ countries=countries,
184
+ power_types=power_types,
185
+ parking_types=parking_types,
186
+ facilities=facilities,
187
+ auto_accept_cpo_additions=auto_accept_cpo_additions,
188
+ publicly_accessible=publicly_accessible,
189
+ request_options=request_options,
190
+ )
191
+ return _response.data
192
+
193
+ def create_base(
194
+ self,
195
+ *,
196
+ idempotency_key: str,
197
+ emp_identity_id: int,
198
+ cpo_ids: typing.Sequence[str],
199
+ name: typing.Optional[str] = OMIT,
200
+ description: typing.Optional[str] = OMIT,
201
+ request_options: typing.Optional[RequestOptions] = None,
202
+ ) -> NetworkResponse:
203
+ """
204
+ Every CPO reachable through one of your roaming identities. Base networks are permanent.
205
+
206
+ Parameters
207
+ ----------
208
+ idempotency_key : str
209
+ A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
210
+
211
+ emp_identity_id : int
212
+
213
+ cpo_ids : typing.Sequence[str]
214
+
215
+ name : typing.Optional[str]
216
+
217
+ description : typing.Optional[str]
218
+
219
+ request_options : typing.Optional[RequestOptions]
220
+ Request-specific configuration.
221
+
222
+ Returns
223
+ -------
224
+ NetworkResponse
225
+ The created base network.
226
+
227
+ Examples
228
+ --------
229
+ from evcloud import EvcloudClient
230
+
231
+ client = EvcloudClient(
232
+ token="YOUR_TOKEN",
233
+ )
234
+ client.emsp.networks.create_base(
235
+ idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
236
+ emp_identity_id=3,
237
+ cpo_ids=["NL*ABC", "BE*XYZ"],
238
+ )
239
+ """
240
+ _response = self._raw_client.create_base(
241
+ idempotency_key=idempotency_key,
242
+ emp_identity_id=emp_identity_id,
243
+ cpo_ids=cpo_ids,
244
+ name=name,
245
+ description=description,
246
+ request_options=request_options,
247
+ )
248
+ return _response.data
249
+
250
+ def get_effective_view(
251
+ self,
252
+ *,
253
+ country: typing.Optional[str] = None,
254
+ after: typing.Optional[str] = None,
255
+ limit: typing.Optional[int] = None,
256
+ request_options: typing.Optional[RequestOptions] = None,
257
+ ) -> SyncPager[EffectiveCpo, EffectiveViewResponse]:
258
+ """
259
+ Each reachable CPO once: your own base networks first, then published networks in your ranking order.
260
+
261
+ Parameters
262
+ ----------
263
+ country : typing.Optional[str]
264
+ Only CPOs of this OCPI country code, e.g. NL.
265
+
266
+ after : typing.Optional[str]
267
+ Cursor: the previous page's ``pagination.end_cursor``. Omit it for the first page.
268
+
269
+ limit : typing.Optional[int]
270
+ Maximum rows per page (default 50, max 200).
271
+
272
+ request_options : typing.Optional[RequestOptions]
273
+ Request-specific configuration.
274
+
275
+ Returns
276
+ -------
277
+ SyncPager[EffectiveCpo, EffectiveViewResponse]
278
+ One page of reachable CPOs, with counts per source.
279
+
280
+ Examples
281
+ --------
282
+ from evcloud import EvcloudClient
283
+
284
+ client = EvcloudClient(
285
+ token="YOUR_TOKEN",
286
+ )
287
+ response = client.emsp.networks.get_effective_view(
288
+ limit=50,
289
+ country="NL",
290
+ )
291
+ for item in response:
292
+ yield item
293
+ # alternatively, you can paginate page-by-page
294
+ for page in response.iter_pages():
295
+ yield page
296
+ """
297
+ return self._raw_client.get_effective_view(
298
+ country=country, after=after, limit=limit, request_options=request_options
299
+ )
300
+
301
+ def get(self, network_id: int, *, request_options: typing.Optional[RequestOptions] = None) -> NetworkDetailResponse:
302
+ """
303
+ With how many locations and EVSEs it reaches today and how many token groups use it.
304
+
305
+ Parameters
306
+ ----------
307
+ network_id : int
308
+ The network's ``network_id``.
309
+
310
+ request_options : typing.Optional[RequestOptions]
311
+ Request-specific configuration.
312
+
313
+ Returns
314
+ -------
315
+ NetworkDetailResponse
316
+ The network with how many locations, EVSEs and token groups it has.
317
+
318
+ Examples
319
+ --------
320
+ from evcloud import EvcloudClient
321
+
322
+ client = EvcloudClient(
323
+ token="YOUR_TOKEN",
324
+ )
325
+ client.emsp.networks.get(
326
+ network_id=21,
327
+ )
328
+ """
329
+ _response = self._raw_client.get(network_id, request_options=request_options)
330
+ return _response.data
331
+
332
+ def delete(
333
+ self,
334
+ network_id: int,
335
+ *,
336
+ force: typing.Optional[bool] = None,
337
+ request_options: typing.Optional[RequestOptions] = None,
338
+ ) -> None:
339
+ """
340
+ Base networks cannot be deleted. A sub-network assigned to token groups needs ``force=true``.
341
+
342
+ Parameters
343
+ ----------
344
+ network_id : int
345
+ The network's ``network_id``.
346
+
347
+ force : typing.Optional[bool]
348
+ Also remove the network from the token groups it is assigned to.
349
+
350
+ request_options : typing.Optional[RequestOptions]
351
+ Request-specific configuration.
352
+
353
+ Returns
354
+ -------
355
+ None
356
+
357
+ Examples
358
+ --------
359
+ from evcloud import EvcloudClient
360
+
361
+ client = EvcloudClient(
362
+ token="YOUR_TOKEN",
363
+ )
364
+ client.emsp.networks.delete(
365
+ network_id=21,
366
+ force=True,
367
+ )
368
+ """
369
+ _response = self._raw_client.delete(network_id, force=force, request_options=request_options)
370
+ return _response.data
371
+
372
+ def update(
373
+ self,
374
+ network_id: int,
375
+ *,
376
+ name: typing.Optional[str] = OMIT,
377
+ description: typing.Optional[str] = OMIT,
378
+ cpo_ids: typing.Optional[typing.Sequence[str]] = OMIT,
379
+ publicly_accessible: typing.Optional[bool] = OMIT,
380
+ auto_accept_cpo_additions: typing.Optional[bool] = OMIT,
381
+ countries: typing.Optional[typing.Sequence[str]] = OMIT,
382
+ power_types: typing.Optional[typing.Sequence[str]] = OMIT,
383
+ parking_types: typing.Optional[typing.Sequence[str]] = OMIT,
384
+ facilities: typing.Optional[typing.Sequence[str]] = OMIT,
385
+ request_options: typing.Optional[RequestOptions] = None,
386
+ ) -> NetworkResponse:
387
+ """
388
+ Only the fields sent change. A base network's name and filters cannot change; its CPOs and access settings can.
389
+
390
+ Parameters
391
+ ----------
392
+ network_id : int
393
+ The network's ``network_id``.
394
+
395
+ name : typing.Optional[str]
396
+
397
+ description : typing.Optional[str]
398
+
399
+ cpo_ids : typing.Optional[typing.Sequence[str]]
400
+
401
+ publicly_accessible : typing.Optional[bool]
402
+
403
+ auto_accept_cpo_additions : typing.Optional[bool]
404
+
405
+ countries : typing.Optional[typing.Sequence[str]]
406
+
407
+ power_types : typing.Optional[typing.Sequence[str]]
408
+
409
+ parking_types : typing.Optional[typing.Sequence[str]]
410
+
411
+ facilities : typing.Optional[typing.Sequence[str]]
412
+
413
+ request_options : typing.Optional[RequestOptions]
414
+ Request-specific configuration.
415
+
416
+ Returns
417
+ -------
418
+ NetworkResponse
419
+ The network after the update.
420
+
421
+ Examples
422
+ --------
423
+ from evcloud import EvcloudClient
424
+
425
+ client = EvcloudClient(
426
+ token="YOUR_TOKEN",
427
+ )
428
+ client.emsp.networks.update(
429
+ network_id=21,
430
+ cpo_ids=["NL*ABC"],
431
+ )
432
+ """
433
+ _response = self._raw_client.update(
434
+ network_id,
435
+ name=name,
436
+ description=description,
437
+ cpo_ids=cpo_ids,
438
+ publicly_accessible=publicly_accessible,
439
+ auto_accept_cpo_additions=auto_accept_cpo_additions,
440
+ countries=countries,
441
+ power_types=power_types,
442
+ parking_types=parking_types,
443
+ facilities=facilities,
444
+ request_options=request_options,
445
+ )
446
+ return _response.data
447
+
448
+ def list_consumers(
449
+ self,
450
+ network_id: int,
451
+ *,
452
+ after: typing.Optional[str] = None,
453
+ limit: typing.Optional[int] = None,
454
+ request_options: typing.Optional[RequestOptions] = None,
455
+ ) -> SyncPager[NetworkConsumer, NetworkConsumerPage]:
456
+ """
457
+ Workspaces that ranked this base network, with its position in their ranking.
458
+
459
+ Parameters
460
+ ----------
461
+ network_id : int
462
+ The network's ``network_id``.
463
+
464
+ after : typing.Optional[str]
465
+ Cursor: the previous page's ``pagination.end_cursor``. Omit it for the first page.
466
+
467
+ limit : typing.Optional[int]
468
+ Maximum rows per page (default 50, max 200).
469
+
470
+ request_options : typing.Optional[RequestOptions]
471
+ Request-specific configuration.
472
+
473
+ Returns
474
+ -------
475
+ SyncPager[NetworkConsumer, NetworkConsumerPage]
476
+ One page of workspaces, with your network's place in their ranking.
477
+
478
+ Examples
479
+ --------
480
+ from evcloud import EvcloudClient
481
+
482
+ client = EvcloudClient(
483
+ token="YOUR_TOKEN",
484
+ )
485
+ response = client.emsp.networks.list_consumers(
486
+ network_id=20,
487
+ limit=50,
488
+ )
489
+ for item in response:
490
+ yield item
491
+ # alternatively, you can paginate page-by-page
492
+ for page in response.iter_pages():
493
+ yield page
494
+ """
495
+ return self._raw_client.list_consumers(network_id, after=after, limit=limit, request_options=request_options)
496
+
497
+ def list_locations(
498
+ self,
499
+ network_id: int,
500
+ *,
501
+ country: typing.Optional[str] = None,
502
+ after: typing.Optional[str] = None,
503
+ limit: typing.Optional[int] = None,
504
+ request_options: typing.Optional[RequestOptions] = None,
505
+ ) -> SyncPager[EmspGatewaySchemaNetworksLocationOut, EmspGatewaySchemaNetworksLocationPage]:
506
+ """
507
+ Partner locations of its CPOs, with its filters and active access rules applied.
508
+
509
+ Parameters
510
+ ----------
511
+ network_id : int
512
+ The network's ``network_id``.
513
+
514
+ country : typing.Optional[str]
515
+ Only locations in this country (ISO 3166 alpha-2 or alpha-3).
516
+
517
+ after : typing.Optional[str]
518
+ Cursor: the previous page's ``pagination.end_cursor``. Omit it for the first page.
519
+
520
+ limit : typing.Optional[int]
521
+ Maximum rows per page (default 50, max 200).
522
+
523
+ request_options : typing.Optional[RequestOptions]
524
+ Request-specific configuration.
525
+
526
+ Returns
527
+ -------
528
+ SyncPager[EmspGatewaySchemaNetworksLocationOut, EmspGatewaySchemaNetworksLocationPage]
529
+ One page of partner locations the network reaches.
530
+
531
+ Examples
532
+ --------
533
+ from evcloud import EvcloudClient
534
+
535
+ client = EvcloudClient(
536
+ token="YOUR_TOKEN",
537
+ )
538
+ response = client.emsp.networks.list_locations(
539
+ network_id=21,
540
+ limit=50,
541
+ country="NLD",
542
+ )
543
+ for item in response:
544
+ yield item
545
+ # alternatively, you can paginate page-by-page
546
+ for page in response.iter_pages():
547
+ yield page
548
+ """
549
+ return self._raw_client.list_locations(
550
+ network_id, country=country, after=after, limit=limit, request_options=request_options
551
+ )
552
+
553
+ def set_publish_state(
554
+ self,
555
+ network_id: int,
556
+ *,
557
+ idempotency_key: str,
558
+ published: bool,
559
+ unpublish_drain_until: typing.Optional[dt.datetime] = OMIT,
560
+ request_options: typing.Optional[RequestOptions] = None,
561
+ ) -> NetworkResponse:
562
+ """
563
+ Published base networks can be ranked by other workspaces. When withdrawing, ``unpublish_drain_until`` keeps their access until then.
564
+
565
+ Parameters
566
+ ----------
567
+ network_id : int
568
+ The network's ``network_id``.
569
+
570
+ idempotency_key : str
571
+ A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
572
+
573
+ published : bool
574
+
575
+ unpublish_drain_until : typing.Optional[dt.datetime]
576
+
577
+ request_options : typing.Optional[RequestOptions]
578
+ Request-specific configuration.
579
+
580
+ Returns
581
+ -------
582
+ NetworkResponse
583
+ The network after the change.
584
+
585
+ Examples
586
+ --------
587
+ from evcloud import EvcloudClient
588
+
589
+ client = EvcloudClient(
590
+ token="YOUR_TOKEN",
591
+ )
592
+ client.emsp.networks.set_publish_state(
593
+ network_id=20,
594
+ idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
595
+ published=True,
596
+ )
597
+ """
598
+ _response = self._raw_client.set_publish_state(
599
+ network_id,
600
+ idempotency_key=idempotency_key,
601
+ published=published,
602
+ unpublish_drain_until=unpublish_drain_until,
603
+ request_options=request_options,
604
+ )
605
+ return _response.data
606
+
607
+ def list_rules(
608
+ self,
609
+ network_id: int,
610
+ *,
611
+ validity: typing.Optional[ListRulesNetworksRequestValidity] = None,
612
+ after: typing.Optional[str] = None,
613
+ limit: typing.Optional[int] = None,
614
+ request_options: typing.Optional[RequestOptions] = None,
615
+ ) -> SyncPager[NetworkRuleResponse, NetworkRulePage]:
616
+ """
617
+ With no rules a network shows every location of its CPOs.
618
+
619
+ Parameters
620
+ ----------
621
+ network_id : int
622
+ The network's ``network_id``.
623
+
624
+ validity : typing.Optional[ListRulesNetworksRequestValidity]
625
+ Only rules in effect now (ACTIVE), later, or ended; default ALL.
626
+
627
+ after : typing.Optional[str]
628
+ Cursor: the previous page's ``pagination.end_cursor``. Omit it for the first page.
629
+
630
+ limit : typing.Optional[int]
631
+ Maximum rows per page (default 50, max 200).
632
+
633
+ request_options : typing.Optional[RequestOptions]
634
+ Request-specific configuration.
635
+
636
+ Returns
637
+ -------
638
+ SyncPager[NetworkRuleResponse, NetworkRulePage]
639
+ One page of access rules.
640
+
641
+ Examples
642
+ --------
643
+ from evcloud import EvcloudClient
644
+
645
+ client = EvcloudClient(
646
+ token="YOUR_TOKEN",
647
+ )
648
+ response = client.emsp.networks.list_rules(
649
+ network_id=21,
650
+ limit=50,
651
+ validity="ACTIVE",
652
+ )
653
+ for item in response:
654
+ yield item
655
+ # alternatively, you can paginate page-by-page
656
+ for page in response.iter_pages():
657
+ yield page
658
+ """
659
+ return self._raw_client.list_rules(
660
+ network_id, validity=validity, after=after, limit=limit, request_options=request_options
661
+ )
662
+
663
+ def create_rule(
664
+ self,
665
+ network_id: int,
666
+ *,
667
+ idempotency_key: str,
668
+ rule_type: NetworkRuleCreateRequestRuleType,
669
+ location_ids: typing.Sequence[str],
670
+ priority: typing.Optional[int] = OMIT,
671
+ effective_from: typing.Optional[dt.datetime] = OMIT,
672
+ effective_until: typing.Optional[dt.datetime] = OMIT,
673
+ request_options: typing.Optional[RequestOptions] = None,
674
+ ) -> NetworkRuleResponse:
675
+ """
676
+ INCLUDE shows only the listed locations, EXCLUDE hides them, optionally within an ``effective_from``/``effective_until`` window.
677
+
678
+ Parameters
679
+ ----------
680
+ network_id : int
681
+ The network's ``network_id``.
682
+
683
+ idempotency_key : str
684
+ A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
685
+
686
+ rule_type : NetworkRuleCreateRequestRuleType
687
+
688
+ location_ids : typing.Sequence[str]
689
+
690
+ priority : typing.Optional[int]
691
+
692
+ effective_from : typing.Optional[dt.datetime]
693
+
694
+ effective_until : typing.Optional[dt.datetime]
695
+
696
+ request_options : typing.Optional[RequestOptions]
697
+ Request-specific configuration.
698
+
699
+ Returns
700
+ -------
701
+ NetworkRuleResponse
702
+ The created rule.
703
+
704
+ Examples
705
+ --------
706
+ from evcloud import EvcloudClient
707
+
708
+ client = EvcloudClient(
709
+ token="YOUR_TOKEN",
710
+ )
711
+ client.emsp.networks.create_rule(
712
+ network_id=21,
713
+ idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
714
+ rule_type="EXCLUDE",
715
+ location_ids=["LOC-AMS-001"],
716
+ )
717
+ """
718
+ _response = self._raw_client.create_rule(
719
+ network_id,
720
+ idempotency_key=idempotency_key,
721
+ rule_type=rule_type,
722
+ location_ids=location_ids,
723
+ priority=priority,
724
+ effective_from=effective_from,
725
+ effective_until=effective_until,
726
+ request_options=request_options,
727
+ )
728
+ return _response.data
729
+
730
+ def delete_rule(
731
+ self, network_id: int, rule_id: int, *, request_options: typing.Optional[RequestOptions] = None
732
+ ) -> None:
733
+ """
734
+ Removes one access rule; the network's other rules stay in force.
735
+
736
+ Parameters
737
+ ----------
738
+ network_id : int
739
+ The network's ``network_id``.
740
+
741
+ rule_id : int
742
+ The access rule's ``rule_id``.
743
+
744
+ request_options : typing.Optional[RequestOptions]
745
+ Request-specific configuration.
746
+
747
+ Returns
748
+ -------
749
+ None
750
+
751
+ Examples
752
+ --------
753
+ from evcloud import EvcloudClient
754
+
755
+ client = EvcloudClient(
756
+ token="YOUR_TOKEN",
757
+ )
758
+ client.emsp.networks.delete_rule(
759
+ network_id=21,
760
+ rule_id=5,
761
+ )
762
+ """
763
+ _response = self._raw_client.delete_rule(network_id, rule_id, request_options=request_options)
764
+ return _response.data
765
+
766
+
767
+ class AsyncNetworksClient:
768
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
769
+ self._raw_client = AsyncRawNetworksClient(client_wrapper=client_wrapper)
770
+
771
+ @property
772
+ def with_raw_response(self) -> AsyncRawNetworksClient:
773
+ """
774
+ Retrieves a raw implementation of this client that returns raw responses.
775
+
776
+ Returns
777
+ -------
778
+ AsyncRawNetworksClient
779
+ """
780
+ return self._raw_client
781
+
782
+ async def list(
783
+ self,
784
+ *,
785
+ network_type: typing.Optional[ListNetworksRequestNetworkType] = None,
786
+ parent_network_id: typing.Optional[int] = None,
787
+ published: typing.Optional[bool] = None,
788
+ after: typing.Optional[str] = None,
789
+ limit: typing.Optional[int] = None,
790
+ request_options: typing.Optional[RequestOptions] = None,
791
+ ) -> AsyncPager[NetworkResponse, NetworkPage]:
792
+ """
793
+ Your base networks and the sub-networks that slice them.
794
+
795
+ Parameters
796
+ ----------
797
+ network_type : typing.Optional[ListNetworksRequestNetworkType]
798
+ Only BASE or only TENANT (sub-)networks.
799
+
800
+ parent_network_id : typing.Optional[int]
801
+ Only sub-networks of this base network.
802
+
803
+ published : typing.Optional[bool]
804
+ Only published (true) or unpublished (false) networks.
805
+
806
+ after : typing.Optional[str]
807
+ Cursor: the previous page's ``pagination.end_cursor``. Omit it for the first page.
808
+
809
+ limit : typing.Optional[int]
810
+ Maximum rows per page (default 50, max 200).
811
+
812
+ request_options : typing.Optional[RequestOptions]
813
+ Request-specific configuration.
814
+
815
+ Returns
816
+ -------
817
+ AsyncPager[NetworkResponse, NetworkPage]
818
+ One page of networks; ``pagination.has_next`` is false on the last page.
819
+
820
+ Examples
821
+ --------
822
+ import asyncio
823
+
824
+ from evcloud import AsyncEvcloudClient
825
+
826
+ client = AsyncEvcloudClient(
827
+ token="YOUR_TOKEN",
828
+ )
829
+
830
+
831
+ async def main() -> None:
832
+ response = await client.emsp.networks.list(
833
+ limit=50,
834
+ network_type="TENANT",
835
+ )
836
+ async for item in response:
837
+ yield item
838
+
839
+ # alternatively, you can paginate page-by-page
840
+ async for page in response.iter_pages():
841
+ yield page
842
+
843
+
844
+ asyncio.run(main())
845
+ """
846
+ return await self._raw_client.list(
847
+ network_type=network_type,
848
+ parent_network_id=parent_network_id,
849
+ published=published,
850
+ after=after,
851
+ limit=limit,
852
+ request_options=request_options,
853
+ )
854
+
855
+ async def create(
856
+ self,
857
+ *,
858
+ idempotency_key: str,
859
+ name: str,
860
+ parent_network_id: int,
861
+ cpo_ids: typing.Optional[typing.Sequence[str]] = OMIT,
862
+ description: typing.Optional[str] = OMIT,
863
+ countries: typing.Optional[typing.Sequence[str]] = OMIT,
864
+ power_types: typing.Optional[typing.Sequence[str]] = OMIT,
865
+ parking_types: typing.Optional[typing.Sequence[str]] = OMIT,
866
+ facilities: typing.Optional[typing.Sequence[str]] = OMIT,
867
+ auto_accept_cpo_additions: typing.Optional[bool] = OMIT,
868
+ publicly_accessible: typing.Optional[bool] = OMIT,
869
+ request_options: typing.Optional[RequestOptions] = None,
870
+ ) -> NetworkResponse:
871
+ """
872
+ A named slice of one of your base networks: some of its CPOs, optionally filtered by country, power, parking and facilities.
873
+
874
+ Parameters
875
+ ----------
876
+ idempotency_key : str
877
+ A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
878
+
879
+ name : str
880
+
881
+ parent_network_id : int
882
+
883
+ cpo_ids : typing.Optional[typing.Sequence[str]]
884
+
885
+ description : typing.Optional[str]
886
+
887
+ countries : typing.Optional[typing.Sequence[str]]
888
+
889
+ power_types : typing.Optional[typing.Sequence[str]]
890
+
891
+ parking_types : typing.Optional[typing.Sequence[str]]
892
+
893
+ facilities : typing.Optional[typing.Sequence[str]]
894
+
895
+ auto_accept_cpo_additions : typing.Optional[bool]
896
+
897
+ publicly_accessible : typing.Optional[bool]
898
+
899
+ request_options : typing.Optional[RequestOptions]
900
+ Request-specific configuration.
901
+
902
+ Returns
903
+ -------
904
+ NetworkResponse
905
+ The created sub-network.
906
+
907
+ Examples
908
+ --------
909
+ import asyncio
910
+
911
+ from evcloud import AsyncEvcloudClient
912
+
913
+ client = AsyncEvcloudClient(
914
+ token="YOUR_TOKEN",
915
+ )
916
+
917
+
918
+ async def main() -> None:
919
+ await client.emsp.networks.create(
920
+ idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
921
+ name="Fleet fast chargers",
922
+ parent_network_id=20,
923
+ cpo_ids=["NL*ABC", "BE*XYZ"],
924
+ description="DC sites only",
925
+ countries=["NLD", "BEL"],
926
+ power_types=["DC"],
927
+ )
928
+
929
+
930
+ asyncio.run(main())
931
+ """
932
+ _response = await self._raw_client.create(
933
+ idempotency_key=idempotency_key,
934
+ name=name,
935
+ parent_network_id=parent_network_id,
936
+ cpo_ids=cpo_ids,
937
+ description=description,
938
+ countries=countries,
939
+ power_types=power_types,
940
+ parking_types=parking_types,
941
+ facilities=facilities,
942
+ auto_accept_cpo_additions=auto_accept_cpo_additions,
943
+ publicly_accessible=publicly_accessible,
944
+ request_options=request_options,
945
+ )
946
+ return _response.data
947
+
948
+ async def create_base(
949
+ self,
950
+ *,
951
+ idempotency_key: str,
952
+ emp_identity_id: int,
953
+ cpo_ids: typing.Sequence[str],
954
+ name: typing.Optional[str] = OMIT,
955
+ description: typing.Optional[str] = OMIT,
956
+ request_options: typing.Optional[RequestOptions] = None,
957
+ ) -> NetworkResponse:
958
+ """
959
+ Every CPO reachable through one of your roaming identities. Base networks are permanent.
960
+
961
+ Parameters
962
+ ----------
963
+ idempotency_key : str
964
+ A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
965
+
966
+ emp_identity_id : int
967
+
968
+ cpo_ids : typing.Sequence[str]
969
+
970
+ name : typing.Optional[str]
971
+
972
+ description : typing.Optional[str]
973
+
974
+ request_options : typing.Optional[RequestOptions]
975
+ Request-specific configuration.
976
+
977
+ Returns
978
+ -------
979
+ NetworkResponse
980
+ The created base network.
981
+
982
+ Examples
983
+ --------
984
+ import asyncio
985
+
986
+ from evcloud import AsyncEvcloudClient
987
+
988
+ client = AsyncEvcloudClient(
989
+ token="YOUR_TOKEN",
990
+ )
991
+
992
+
993
+ async def main() -> None:
994
+ await client.emsp.networks.create_base(
995
+ idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
996
+ emp_identity_id=3,
997
+ cpo_ids=["NL*ABC", "BE*XYZ"],
998
+ )
999
+
1000
+
1001
+ asyncio.run(main())
1002
+ """
1003
+ _response = await self._raw_client.create_base(
1004
+ idempotency_key=idempotency_key,
1005
+ emp_identity_id=emp_identity_id,
1006
+ cpo_ids=cpo_ids,
1007
+ name=name,
1008
+ description=description,
1009
+ request_options=request_options,
1010
+ )
1011
+ return _response.data
1012
+
1013
+ async def get_effective_view(
1014
+ self,
1015
+ *,
1016
+ country: typing.Optional[str] = None,
1017
+ after: typing.Optional[str] = None,
1018
+ limit: typing.Optional[int] = None,
1019
+ request_options: typing.Optional[RequestOptions] = None,
1020
+ ) -> AsyncPager[EffectiveCpo, EffectiveViewResponse]:
1021
+ """
1022
+ Each reachable CPO once: your own base networks first, then published networks in your ranking order.
1023
+
1024
+ Parameters
1025
+ ----------
1026
+ country : typing.Optional[str]
1027
+ Only CPOs of this OCPI country code, e.g. NL.
1028
+
1029
+ after : typing.Optional[str]
1030
+ Cursor: the previous page's ``pagination.end_cursor``. Omit it for the first page.
1031
+
1032
+ limit : typing.Optional[int]
1033
+ Maximum rows per page (default 50, max 200).
1034
+
1035
+ request_options : typing.Optional[RequestOptions]
1036
+ Request-specific configuration.
1037
+
1038
+ Returns
1039
+ -------
1040
+ AsyncPager[EffectiveCpo, EffectiveViewResponse]
1041
+ One page of reachable CPOs, with counts per source.
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
+ response = await client.emsp.networks.get_effective_view(
1056
+ limit=50,
1057
+ country="NL",
1058
+ )
1059
+ async for item in response:
1060
+ yield item
1061
+
1062
+ # alternatively, you can paginate page-by-page
1063
+ async for page in response.iter_pages():
1064
+ yield page
1065
+
1066
+
1067
+ asyncio.run(main())
1068
+ """
1069
+ return await self._raw_client.get_effective_view(
1070
+ country=country, after=after, limit=limit, request_options=request_options
1071
+ )
1072
+
1073
+ async def get(
1074
+ self, network_id: int, *, request_options: typing.Optional[RequestOptions] = None
1075
+ ) -> NetworkDetailResponse:
1076
+ """
1077
+ With how many locations and EVSEs it reaches today and how many token groups use it.
1078
+
1079
+ Parameters
1080
+ ----------
1081
+ network_id : int
1082
+ The network's ``network_id``.
1083
+
1084
+ request_options : typing.Optional[RequestOptions]
1085
+ Request-specific configuration.
1086
+
1087
+ Returns
1088
+ -------
1089
+ NetworkDetailResponse
1090
+ The network with how many locations, EVSEs and token groups it has.
1091
+
1092
+ Examples
1093
+ --------
1094
+ import asyncio
1095
+
1096
+ from evcloud import AsyncEvcloudClient
1097
+
1098
+ client = AsyncEvcloudClient(
1099
+ token="YOUR_TOKEN",
1100
+ )
1101
+
1102
+
1103
+ async def main() -> None:
1104
+ await client.emsp.networks.get(
1105
+ network_id=21,
1106
+ )
1107
+
1108
+
1109
+ asyncio.run(main())
1110
+ """
1111
+ _response = await self._raw_client.get(network_id, request_options=request_options)
1112
+ return _response.data
1113
+
1114
+ async def delete(
1115
+ self,
1116
+ network_id: int,
1117
+ *,
1118
+ force: typing.Optional[bool] = None,
1119
+ request_options: typing.Optional[RequestOptions] = None,
1120
+ ) -> None:
1121
+ """
1122
+ Base networks cannot be deleted. A sub-network assigned to token groups needs ``force=true``.
1123
+
1124
+ Parameters
1125
+ ----------
1126
+ network_id : int
1127
+ The network's ``network_id``.
1128
+
1129
+ force : typing.Optional[bool]
1130
+ Also remove the network from the token groups it is assigned to.
1131
+
1132
+ request_options : typing.Optional[RequestOptions]
1133
+ Request-specific configuration.
1134
+
1135
+ Returns
1136
+ -------
1137
+ None
1138
+
1139
+ Examples
1140
+ --------
1141
+ import asyncio
1142
+
1143
+ from evcloud import AsyncEvcloudClient
1144
+
1145
+ client = AsyncEvcloudClient(
1146
+ token="YOUR_TOKEN",
1147
+ )
1148
+
1149
+
1150
+ async def main() -> None:
1151
+ await client.emsp.networks.delete(
1152
+ network_id=21,
1153
+ force=True,
1154
+ )
1155
+
1156
+
1157
+ asyncio.run(main())
1158
+ """
1159
+ _response = await self._raw_client.delete(network_id, force=force, request_options=request_options)
1160
+ return _response.data
1161
+
1162
+ async def update(
1163
+ self,
1164
+ network_id: int,
1165
+ *,
1166
+ name: typing.Optional[str] = OMIT,
1167
+ description: typing.Optional[str] = OMIT,
1168
+ cpo_ids: typing.Optional[typing.Sequence[str]] = OMIT,
1169
+ publicly_accessible: typing.Optional[bool] = OMIT,
1170
+ auto_accept_cpo_additions: typing.Optional[bool] = OMIT,
1171
+ countries: typing.Optional[typing.Sequence[str]] = OMIT,
1172
+ power_types: typing.Optional[typing.Sequence[str]] = OMIT,
1173
+ parking_types: typing.Optional[typing.Sequence[str]] = OMIT,
1174
+ facilities: typing.Optional[typing.Sequence[str]] = OMIT,
1175
+ request_options: typing.Optional[RequestOptions] = None,
1176
+ ) -> NetworkResponse:
1177
+ """
1178
+ Only the fields sent change. A base network's name and filters cannot change; its CPOs and access settings can.
1179
+
1180
+ Parameters
1181
+ ----------
1182
+ network_id : int
1183
+ The network's ``network_id``.
1184
+
1185
+ name : typing.Optional[str]
1186
+
1187
+ description : typing.Optional[str]
1188
+
1189
+ cpo_ids : typing.Optional[typing.Sequence[str]]
1190
+
1191
+ publicly_accessible : typing.Optional[bool]
1192
+
1193
+ auto_accept_cpo_additions : typing.Optional[bool]
1194
+
1195
+ countries : typing.Optional[typing.Sequence[str]]
1196
+
1197
+ power_types : typing.Optional[typing.Sequence[str]]
1198
+
1199
+ parking_types : typing.Optional[typing.Sequence[str]]
1200
+
1201
+ facilities : typing.Optional[typing.Sequence[str]]
1202
+
1203
+ request_options : typing.Optional[RequestOptions]
1204
+ Request-specific configuration.
1205
+
1206
+ Returns
1207
+ -------
1208
+ NetworkResponse
1209
+ The network after the update.
1210
+
1211
+ Examples
1212
+ --------
1213
+ import asyncio
1214
+
1215
+ from evcloud import AsyncEvcloudClient
1216
+
1217
+ client = AsyncEvcloudClient(
1218
+ token="YOUR_TOKEN",
1219
+ )
1220
+
1221
+
1222
+ async def main() -> None:
1223
+ await client.emsp.networks.update(
1224
+ network_id=21,
1225
+ cpo_ids=["NL*ABC"],
1226
+ )
1227
+
1228
+
1229
+ asyncio.run(main())
1230
+ """
1231
+ _response = await self._raw_client.update(
1232
+ network_id,
1233
+ name=name,
1234
+ description=description,
1235
+ cpo_ids=cpo_ids,
1236
+ publicly_accessible=publicly_accessible,
1237
+ auto_accept_cpo_additions=auto_accept_cpo_additions,
1238
+ countries=countries,
1239
+ power_types=power_types,
1240
+ parking_types=parking_types,
1241
+ facilities=facilities,
1242
+ request_options=request_options,
1243
+ )
1244
+ return _response.data
1245
+
1246
+ async def list_consumers(
1247
+ self,
1248
+ network_id: int,
1249
+ *,
1250
+ after: typing.Optional[str] = None,
1251
+ limit: typing.Optional[int] = None,
1252
+ request_options: typing.Optional[RequestOptions] = None,
1253
+ ) -> AsyncPager[NetworkConsumer, NetworkConsumerPage]:
1254
+ """
1255
+ Workspaces that ranked this base network, with its position in their ranking.
1256
+
1257
+ Parameters
1258
+ ----------
1259
+ network_id : int
1260
+ The network's ``network_id``.
1261
+
1262
+ after : typing.Optional[str]
1263
+ Cursor: the previous page's ``pagination.end_cursor``. Omit it for the first page.
1264
+
1265
+ limit : typing.Optional[int]
1266
+ Maximum rows per page (default 50, max 200).
1267
+
1268
+ request_options : typing.Optional[RequestOptions]
1269
+ Request-specific configuration.
1270
+
1271
+ Returns
1272
+ -------
1273
+ AsyncPager[NetworkConsumer, NetworkConsumerPage]
1274
+ One page of workspaces, with your network's place in their ranking.
1275
+
1276
+ Examples
1277
+ --------
1278
+ import asyncio
1279
+
1280
+ from evcloud import AsyncEvcloudClient
1281
+
1282
+ client = AsyncEvcloudClient(
1283
+ token="YOUR_TOKEN",
1284
+ )
1285
+
1286
+
1287
+ async def main() -> None:
1288
+ response = await client.emsp.networks.list_consumers(
1289
+ network_id=20,
1290
+ limit=50,
1291
+ )
1292
+ async for item in response:
1293
+ yield item
1294
+
1295
+ # alternatively, you can paginate page-by-page
1296
+ async for page in response.iter_pages():
1297
+ yield page
1298
+
1299
+
1300
+ asyncio.run(main())
1301
+ """
1302
+ return await self._raw_client.list_consumers(
1303
+ network_id, after=after, limit=limit, request_options=request_options
1304
+ )
1305
+
1306
+ async def list_locations(
1307
+ self,
1308
+ network_id: int,
1309
+ *,
1310
+ country: typing.Optional[str] = None,
1311
+ after: typing.Optional[str] = None,
1312
+ limit: typing.Optional[int] = None,
1313
+ request_options: typing.Optional[RequestOptions] = None,
1314
+ ) -> AsyncPager[EmspGatewaySchemaNetworksLocationOut, EmspGatewaySchemaNetworksLocationPage]:
1315
+ """
1316
+ Partner locations of its CPOs, with its filters and active access rules applied.
1317
+
1318
+ Parameters
1319
+ ----------
1320
+ network_id : int
1321
+ The network's ``network_id``.
1322
+
1323
+ country : typing.Optional[str]
1324
+ Only locations in this country (ISO 3166 alpha-2 or alpha-3).
1325
+
1326
+ after : typing.Optional[str]
1327
+ Cursor: the previous page's ``pagination.end_cursor``. Omit it for the first page.
1328
+
1329
+ limit : typing.Optional[int]
1330
+ Maximum rows per page (default 50, max 200).
1331
+
1332
+ request_options : typing.Optional[RequestOptions]
1333
+ Request-specific configuration.
1334
+
1335
+ Returns
1336
+ -------
1337
+ AsyncPager[EmspGatewaySchemaNetworksLocationOut, EmspGatewaySchemaNetworksLocationPage]
1338
+ One page of partner locations the network reaches.
1339
+
1340
+ Examples
1341
+ --------
1342
+ import asyncio
1343
+
1344
+ from evcloud import AsyncEvcloudClient
1345
+
1346
+ client = AsyncEvcloudClient(
1347
+ token="YOUR_TOKEN",
1348
+ )
1349
+
1350
+
1351
+ async def main() -> None:
1352
+ response = await client.emsp.networks.list_locations(
1353
+ network_id=21,
1354
+ limit=50,
1355
+ country="NLD",
1356
+ )
1357
+ async for item in response:
1358
+ yield item
1359
+
1360
+ # alternatively, you can paginate page-by-page
1361
+ async for page in response.iter_pages():
1362
+ yield page
1363
+
1364
+
1365
+ asyncio.run(main())
1366
+ """
1367
+ return await self._raw_client.list_locations(
1368
+ network_id, country=country, after=after, limit=limit, request_options=request_options
1369
+ )
1370
+
1371
+ async def set_publish_state(
1372
+ self,
1373
+ network_id: int,
1374
+ *,
1375
+ idempotency_key: str,
1376
+ published: bool,
1377
+ unpublish_drain_until: typing.Optional[dt.datetime] = OMIT,
1378
+ request_options: typing.Optional[RequestOptions] = None,
1379
+ ) -> NetworkResponse:
1380
+ """
1381
+ Published base networks can be ranked by other workspaces. When withdrawing, ``unpublish_drain_until`` keeps their access until then.
1382
+
1383
+ Parameters
1384
+ ----------
1385
+ network_id : int
1386
+ The network's ``network_id``.
1387
+
1388
+ idempotency_key : str
1389
+ A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
1390
+
1391
+ published : bool
1392
+
1393
+ unpublish_drain_until : typing.Optional[dt.datetime]
1394
+
1395
+ request_options : typing.Optional[RequestOptions]
1396
+ Request-specific configuration.
1397
+
1398
+ Returns
1399
+ -------
1400
+ NetworkResponse
1401
+ The network after the change.
1402
+
1403
+ Examples
1404
+ --------
1405
+ import asyncio
1406
+
1407
+ from evcloud import AsyncEvcloudClient
1408
+
1409
+ client = AsyncEvcloudClient(
1410
+ token="YOUR_TOKEN",
1411
+ )
1412
+
1413
+
1414
+ async def main() -> None:
1415
+ await client.emsp.networks.set_publish_state(
1416
+ network_id=20,
1417
+ idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
1418
+ published=True,
1419
+ )
1420
+
1421
+
1422
+ asyncio.run(main())
1423
+ """
1424
+ _response = await self._raw_client.set_publish_state(
1425
+ network_id,
1426
+ idempotency_key=idempotency_key,
1427
+ published=published,
1428
+ unpublish_drain_until=unpublish_drain_until,
1429
+ request_options=request_options,
1430
+ )
1431
+ return _response.data
1432
+
1433
+ async def list_rules(
1434
+ self,
1435
+ network_id: int,
1436
+ *,
1437
+ validity: typing.Optional[ListRulesNetworksRequestValidity] = None,
1438
+ after: typing.Optional[str] = None,
1439
+ limit: typing.Optional[int] = None,
1440
+ request_options: typing.Optional[RequestOptions] = None,
1441
+ ) -> AsyncPager[NetworkRuleResponse, NetworkRulePage]:
1442
+ """
1443
+ With no rules a network shows every location of its CPOs.
1444
+
1445
+ Parameters
1446
+ ----------
1447
+ network_id : int
1448
+ The network's ``network_id``.
1449
+
1450
+ validity : typing.Optional[ListRulesNetworksRequestValidity]
1451
+ Only rules in effect now (ACTIVE), later, or ended; default ALL.
1452
+
1453
+ after : typing.Optional[str]
1454
+ Cursor: the previous page's ``pagination.end_cursor``. Omit it for the first page.
1455
+
1456
+ limit : typing.Optional[int]
1457
+ Maximum rows per page (default 50, max 200).
1458
+
1459
+ request_options : typing.Optional[RequestOptions]
1460
+ Request-specific configuration.
1461
+
1462
+ Returns
1463
+ -------
1464
+ AsyncPager[NetworkRuleResponse, NetworkRulePage]
1465
+ One page of access rules.
1466
+
1467
+ Examples
1468
+ --------
1469
+ import asyncio
1470
+
1471
+ from evcloud import AsyncEvcloudClient
1472
+
1473
+ client = AsyncEvcloudClient(
1474
+ token="YOUR_TOKEN",
1475
+ )
1476
+
1477
+
1478
+ async def main() -> None:
1479
+ response = await client.emsp.networks.list_rules(
1480
+ network_id=21,
1481
+ limit=50,
1482
+ validity="ACTIVE",
1483
+ )
1484
+ async for item in response:
1485
+ yield item
1486
+
1487
+ # alternatively, you can paginate page-by-page
1488
+ async for page in response.iter_pages():
1489
+ yield page
1490
+
1491
+
1492
+ asyncio.run(main())
1493
+ """
1494
+ return await self._raw_client.list_rules(
1495
+ network_id, validity=validity, after=after, limit=limit, request_options=request_options
1496
+ )
1497
+
1498
+ async def create_rule(
1499
+ self,
1500
+ network_id: int,
1501
+ *,
1502
+ idempotency_key: str,
1503
+ rule_type: NetworkRuleCreateRequestRuleType,
1504
+ location_ids: typing.Sequence[str],
1505
+ priority: typing.Optional[int] = OMIT,
1506
+ effective_from: typing.Optional[dt.datetime] = OMIT,
1507
+ effective_until: typing.Optional[dt.datetime] = OMIT,
1508
+ request_options: typing.Optional[RequestOptions] = None,
1509
+ ) -> NetworkRuleResponse:
1510
+ """
1511
+ INCLUDE shows only the listed locations, EXCLUDE hides them, optionally within an ``effective_from``/``effective_until`` window.
1512
+
1513
+ Parameters
1514
+ ----------
1515
+ network_id : int
1516
+ The network's ``network_id``.
1517
+
1518
+ idempotency_key : str
1519
+ A unique key you choose for this call, e.g. a UUID. Retrying with the same key returns the first result instead of acting twice.
1520
+
1521
+ rule_type : NetworkRuleCreateRequestRuleType
1522
+
1523
+ location_ids : typing.Sequence[str]
1524
+
1525
+ priority : typing.Optional[int]
1526
+
1527
+ effective_from : typing.Optional[dt.datetime]
1528
+
1529
+ effective_until : typing.Optional[dt.datetime]
1530
+
1531
+ request_options : typing.Optional[RequestOptions]
1532
+ Request-specific configuration.
1533
+
1534
+ Returns
1535
+ -------
1536
+ NetworkRuleResponse
1537
+ The created rule.
1538
+
1539
+ Examples
1540
+ --------
1541
+ import asyncio
1542
+
1543
+ from evcloud import AsyncEvcloudClient
1544
+
1545
+ client = AsyncEvcloudClient(
1546
+ token="YOUR_TOKEN",
1547
+ )
1548
+
1549
+
1550
+ async def main() -> None:
1551
+ await client.emsp.networks.create_rule(
1552
+ network_id=21,
1553
+ idempotency_key="5d1f7c2e-8b3a-4e6f-9c0d-1a2b3c4d5e6f",
1554
+ rule_type="EXCLUDE",
1555
+ location_ids=["LOC-AMS-001"],
1556
+ )
1557
+
1558
+
1559
+ asyncio.run(main())
1560
+ """
1561
+ _response = await self._raw_client.create_rule(
1562
+ network_id,
1563
+ idempotency_key=idempotency_key,
1564
+ rule_type=rule_type,
1565
+ location_ids=location_ids,
1566
+ priority=priority,
1567
+ effective_from=effective_from,
1568
+ effective_until=effective_until,
1569
+ request_options=request_options,
1570
+ )
1571
+ return _response.data
1572
+
1573
+ async def delete_rule(
1574
+ self, network_id: int, rule_id: int, *, request_options: typing.Optional[RequestOptions] = None
1575
+ ) -> None:
1576
+ """
1577
+ Removes one access rule; the network's other rules stay in force.
1578
+
1579
+ Parameters
1580
+ ----------
1581
+ network_id : int
1582
+ The network's ``network_id``.
1583
+
1584
+ rule_id : int
1585
+ The access rule's ``rule_id``.
1586
+
1587
+ request_options : typing.Optional[RequestOptions]
1588
+ Request-specific configuration.
1589
+
1590
+ Returns
1591
+ -------
1592
+ None
1593
+
1594
+ Examples
1595
+ --------
1596
+ import asyncio
1597
+
1598
+ from evcloud import AsyncEvcloudClient
1599
+
1600
+ client = AsyncEvcloudClient(
1601
+ token="YOUR_TOKEN",
1602
+ )
1603
+
1604
+
1605
+ async def main() -> None:
1606
+ await client.emsp.networks.delete_rule(
1607
+ network_id=21,
1608
+ rule_id=5,
1609
+ )
1610
+
1611
+
1612
+ asyncio.run(main())
1613
+ """
1614
+ _response = await self._raw_client.delete_rule(network_id, rule_id, request_options=request_options)
1615
+ return _response.data