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.
- evcloud/__init__.py +802 -0
- evcloud/_default_clients.py +30 -0
- evcloud/client.py +200 -0
- evcloud/core/__init__.py +67 -0
- evcloud/core/api_error.py +23 -0
- evcloud/core/client_wrapper.py +108 -0
- evcloud/core/datetime_utils.py +70 -0
- evcloud/core/file.py +67 -0
- evcloud/core/force_multipart.py +18 -0
- evcloud/core/http_client.py +840 -0
- evcloud/core/http_response.py +59 -0
- evcloud/core/http_sse/__init__.py +9 -0
- evcloud/core/http_sse/_api.py +112 -0
- evcloud/core/http_sse/_decoders.py +61 -0
- evcloud/core/http_sse/_exceptions.py +7 -0
- evcloud/core/http_sse/_models.py +17 -0
- evcloud/core/jsonable_encoder.py +120 -0
- evcloud/core/logging.py +107 -0
- evcloud/core/pagination.py +82 -0
- evcloud/core/parse_error.py +36 -0
- evcloud/core/pydantic_utilities.py +634 -0
- evcloud/core/query_encoder.py +58 -0
- evcloud/core/remove_none_from_dict.py +11 -0
- evcloud/core/request_options.py +35 -0
- evcloud/core/serialization.py +276 -0
- evcloud/cpo/__init__.py +31 -0
- evcloud/cpo/cdrs/__init__.py +4 -0
- evcloud/cpo/cdrs/client.py +311 -0
- evcloud/cpo/cdrs/raw_client.py +592 -0
- evcloud/cpo/charge_points/__init__.py +7 -0
- evcloud/cpo/charge_points/client.py +1436 -0
- evcloud/cpo/charge_points/raw_client.py +2809 -0
- evcloud/cpo/charge_points/types/__init__.py +7 -0
- evcloud/cpo/charge_points/types/list_charge_points_request_ocpp_version.py +5 -0
- evcloud/cpo/client.py +62 -0
- evcloud/cpo/connectors/__init__.py +4 -0
- evcloud/cpo/connectors/client.py +698 -0
- evcloud/cpo/connectors/raw_client.py +1457 -0
- evcloud/cpo/evses/__init__.py +4 -0
- evcloud/cpo/evses/client.py +691 -0
- evcloud/cpo/evses/raw_client.py +1457 -0
- evcloud/cpo/health/__init__.py +4 -0
- evcloud/cpo/health/client.py +100 -0
- evcloud/cpo/health/raw_client.py +192 -0
- evcloud/cpo/locations/__init__.py +4 -0
- evcloud/cpo/locations/client.py +1021 -0
- evcloud/cpo/locations/raw_client.py +1887 -0
- evcloud/cpo/raw_client.py +13 -0
- evcloud/cpo/sessions/__init__.py +7 -0
- evcloud/cpo/sessions/client.py +430 -0
- evcloud/cpo/sessions/raw_client.py +889 -0
- evcloud/cpo/sessions/types/__init__.py +8 -0
- evcloud/cpo/sessions/types/list_sessions_request_billing_state.py +5 -0
- evcloud/cpo/sessions/types/list_sessions_request_status.py +7 -0
- evcloud/cpo/tariffs/__init__.py +17 -0
- evcloud/cpo/tariffs/client.py +1232 -0
- evcloud/cpo/tariffs/raw_client.py +2526 -0
- evcloud/cpo/tariffs/types/__init__.py +15 -0
- evcloud/cpo/tariffs/types/list_tariffs_request_type.py +7 -0
- evcloud/cpo/tariffs/types/tariff_create_ocpi_version.py +5 -0
- evcloud/cpo/tariffs/types/tariff_create_preauthorize_amount.py +5 -0
- evcloud/cpo/tariffs/types/tariff_patch_preauthorize_amount.py +5 -0
- evcloud/emsp/__init__.py +55 -0
- evcloud/emsp/cdrs/__init__.py +4 -0
- evcloud/emsp/cdrs/client.py +300 -0
- evcloud/emsp/cdrs/raw_client.py +610 -0
- evcloud/emsp/chargers/__init__.py +7 -0
- evcloud/emsp/chargers/client.py +167 -0
- evcloud/emsp/chargers/raw_client.py +331 -0
- evcloud/emsp/chargers/types/__init__.py +11 -0
- evcloud/emsp/chargers/types/resolve_chargers_response.py +53 -0
- evcloud/emsp/client.py +77 -0
- evcloud/emsp/commands/__init__.py +7 -0
- evcloud/emsp/commands/client.py +516 -0
- evcloud/emsp/commands/raw_client.py +979 -0
- evcloud/emsp/commands/types/__init__.py +7 -0
- evcloud/emsp/commands/types/send_commands_request_command.py +7 -0
- evcloud/emsp/emp_identities/__init__.py +4 -0
- evcloud/emsp/emp_identities/client.py +548 -0
- evcloud/emsp/emp_identities/raw_client.py +1277 -0
- evcloud/emsp/evses/__init__.py +4 -0
- evcloud/emsp/evses/client.py +154 -0
- evcloud/emsp/evses/raw_client.py +288 -0
- evcloud/emsp/health/__init__.py +4 -0
- evcloud/emsp/health/client.py +100 -0
- evcloud/emsp/health/raw_client.py +192 -0
- evcloud/emsp/locations/__init__.py +4 -0
- evcloud/emsp/locations/client.py +1386 -0
- evcloud/emsp/locations/raw_client.py +2903 -0
- evcloud/emsp/networks/__init__.py +7 -0
- evcloud/emsp/networks/client.py +1615 -0
- evcloud/emsp/networks/raw_client.py +3725 -0
- evcloud/emsp/networks/types/__init__.py +9 -0
- evcloud/emsp/networks/types/list_networks_request_network_type.py +5 -0
- evcloud/emsp/networks/types/list_rules_networks_request_validity.py +5 -0
- evcloud/emsp/networks/types/network_rule_create_request_rule_type.py +5 -0
- evcloud/emsp/raw_client.py +13 -0
- evcloud/emsp/sessions/__init__.py +4 -0
- evcloud/emsp/sessions/client.py +300 -0
- evcloud/emsp/sessions/raw_client.py +610 -0
- evcloud/emsp/tariffs/__init__.py +7 -0
- evcloud/emsp/tariffs/client.py +421 -0
- evcloud/emsp/tariffs/raw_client.py +883 -0
- evcloud/emsp/tariffs/types/__init__.py +8 -0
- evcloud/emsp/tariffs/types/estimate_request_kwh.py +5 -0
- evcloud/emsp/tariffs/types/estimate_request_minutes.py +5 -0
- evcloud/emsp/tenant/__init__.py +4 -0
- evcloud/emsp/tenant/client.py +328 -0
- evcloud/emsp/tenant/raw_client.py +869 -0
- evcloud/emsp/token_groups/__init__.py +7 -0
- evcloud/emsp/token_groups/client.py +1256 -0
- evcloud/emsp/token_groups/raw_client.py +3288 -0
- evcloud/emsp/token_groups/types/__init__.py +7 -0
- evcloud/emsp/token_groups/types/remove_token_token_groups_request_type.py +5 -0
- evcloud/emsp/tokens/__init__.py +7 -0
- evcloud/emsp/tokens/client.py +1298 -0
- evcloud/emsp/tokens/raw_client.py +2947 -0
- evcloud/emsp/tokens/types/__init__.py +10 -0
- evcloud/emsp/tokens/types/list_tokens_request_status.py +7 -0
- evcloud/emsp/tokens/types/list_tokens_request_type.py +5 -0
- evcloud/emsp/tokens/types/token_update_default_profile_type.py +5 -0
- evcloud/emsp/tokens/types/token_update_whitelist.py +5 -0
- evcloud/energy/__init__.py +8 -0
- evcloud/energy/client.py +47 -0
- evcloud/energy/control_requests/__init__.py +7 -0
- evcloud/energy/control_requests/client.py +399 -0
- evcloud/energy/control_requests/raw_client.py +835 -0
- evcloud/energy/control_requests/types/__init__.py +7 -0
- evcloud/energy/control_requests/types/list_control_requests_request_result.py +15 -0
- evcloud/energy/health/__init__.py +4 -0
- evcloud/energy/health/client.py +100 -0
- evcloud/energy/health/raw_client.py +192 -0
- evcloud/energy/power_measurements/__init__.py +4 -0
- evcloud/energy/power_measurements/client.py +254 -0
- evcloud/energy/power_measurements/raw_client.py +527 -0
- evcloud/energy/raw_client.py +13 -0
- evcloud/environment.py +7 -0
- evcloud/errors/__init__.py +25 -0
- evcloud/errors/bad_gateway_error.py +11 -0
- evcloud/errors/bad_request_error.py +11 -0
- evcloud/errors/conflict_error.py +11 -0
- evcloud/errors/forbidden_error.py +11 -0
- evcloud/errors/gateway_timeout_error.py +11 -0
- evcloud/errors/not_found_error.py +11 -0
- evcloud/errors/too_many_requests_error.py +11 -0
- evcloud/errors/unauthorized_error.py +11 -0
- evcloud/errors/unprocessable_entity_error.py +11 -0
- evcloud/health/__init__.py +4 -0
- evcloud/health/client.py +99 -0
- evcloud/health/raw_client.py +100 -0
- evcloud/ocpi/__init__.py +123 -0
- evcloud/ocpi/client.py +56 -0
- evcloud/ocpi/cpo_data/__init__.py +31 -0
- evcloud/ocpi/cpo_data/client.py +1553 -0
- evcloud/ocpi/cpo_data/raw_client.py +3119 -0
- evcloud/ocpi/cpo_data/types/__init__.py +29 -0
- evcloud/ocpi/cpo_data/types/cancel_reservation_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/create_cdr_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/delete_tariff_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/send_active_charging_profile_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/update_connector_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/update_evse_status_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/update_location_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/update_session_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/upsert_location_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/upsert_session_cpo_data_request_version.py +5 -0
- evcloud/ocpi/cpo_data/types/upsert_tariff_cpo_data_request_version.py +5 -0
- evcloud/ocpi/credentials/__init__.py +31 -0
- evcloud/ocpi/credentials/client.py +750 -0
- evcloud/ocpi/credentials/raw_client.py +1537 -0
- evcloud/ocpi/credentials/types/__init__.py +29 -0
- evcloud/ocpi/credentials/types/partner_versions_pull_request_partner_token_encoding.py +5 -0
- evcloud/ocpi/credentials/types/pull_versions_credentials_request_role.py +5 -0
- evcloud/ocpi/credentials/types/pull_versions_credentials_request_version.py +5 -0
- evcloud/ocpi/credentials/types/rotate_credentials_request_role.py +5 -0
- evcloud/ocpi/credentials/types/rotate_credentials_request_version.py +5 -0
- evcloud/ocpi/credentials/types/start_handshake_credentials_request_role.py +5 -0
- evcloud/ocpi/credentials/types/start_handshake_credentials_request_version.py +5 -0
- evcloud/ocpi/credentials/types/status_credentials_request_role.py +5 -0
- evcloud/ocpi/credentials/types/status_credentials_request_version.py +5 -0
- evcloud/ocpi/credentials/types/unregister_credentials_request_role.py +5 -0
- evcloud/ocpi/credentials/types/unregister_credentials_request_version.py +5 -0
- evcloud/ocpi/emsp/__init__.py +27 -0
- evcloud/ocpi/emsp/client.py +1142 -0
- evcloud/ocpi/emsp/raw_client.py +2209 -0
- evcloud/ocpi/emsp/types/__init__.py +25 -0
- evcloud/ocpi/emsp/types/charging_preferences_request_profile_type.py +5 -0
- evcloud/ocpi/emsp/types/clear_charging_profile_emsp_request_version.py +5 -0
- evcloud/ocpi/emsp/types/get_active_charging_profile_emsp_request_version.py +5 -0
- evcloud/ocpi/emsp/types/send_command_emsp_request_command.py +7 -0
- evcloud/ocpi/emsp/types/send_command_emsp_request_version.py +5 -0
- evcloud/ocpi/emsp/types/set_charging_preferences_emsp_request_version.py +5 -0
- evcloud/ocpi/emsp/types/set_charging_profile_emsp_request_version.py +5 -0
- evcloud/ocpi/emsp/types/update_token_emsp_request_version.py +5 -0
- evcloud/ocpi/emsp/types/upsert_token_emsp_request_version.py +5 -0
- evcloud/ocpi/invites/__init__.py +19 -0
- evcloud/ocpi/invites/client.py +385 -0
- evcloud/ocpi/invites/raw_client.py +887 -0
- evcloud/ocpi/invites/types/__init__.py +17 -0
- evcloud/ocpi/invites/types/partner_invite_create_request_gateway_role.py +5 -0
- evcloud/ocpi/invites/types/partner_invite_create_request_role.py +5 -0
- evcloud/ocpi/invites/types/partner_invite_create_request_version.py +5 -0
- evcloud/ocpi/invites/types/partner_invite_update_request_gateway_role.py +5 -0
- evcloud/ocpi/invites/types/partner_invite_update_request_version.py +5 -0
- evcloud/ocpi/partners/__init__.py +7 -0
- evcloud/ocpi/partners/client.py +581 -0
- evcloud/ocpi/partners/raw_client.py +1340 -0
- evcloud/ocpi/partners/types/__init__.py +8 -0
- evcloud/ocpi/partners/types/partner_register_request_ocpi_version.py +5 -0
- evcloud/ocpi/partners/types/partner_update_request_ocpi_version.py +5 -0
- evcloud/ocpi/raw_client.py +13 -0
- evcloud/ocpi/sync/__init__.py +33 -0
- evcloud/ocpi/sync/client.py +1701 -0
- evcloud/ocpi/sync/raw_client.py +3685 -0
- evcloud/ocpi/sync/types/__init__.py +31 -0
- evcloud/ocpi/sync/types/pull_cdrs_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/pull_hub_client_info_as_cpo_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/pull_hub_client_info_as_emsp_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/pull_locations_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/pull_sessions_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/pull_tariffs_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/pull_tokens_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/push_cdr_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/push_location_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/push_session_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/push_tariff_sync_request_version.py +5 -0
- evcloud/ocpi/sync/types/push_token_sync_request_version.py +5 -0
- evcloud/py.typed +0 -0
- evcloud/types/__init__.py +759 -0
- evcloud/types/access_mode.py +5 -0
- evcloud/types/asset_connector.py +26 -0
- evcloud/types/asset_updated_event.py +29 -0
- evcloud/types/availability_page.py +26 -0
- evcloud/types/batch_response.py +26 -0
- evcloud/types/batch_response_missing_item.py +7 -0
- evcloud/types/cdr_event.py +41 -0
- evcloud/types/cdr_out.py +75 -0
- evcloud/types/cdr_out_auth_method.py +7 -0
- evcloud/types/cdr_out_auth_method_zero.py +5 -0
- evcloud/types/cdr_out_origin.py +7 -0
- evcloud/types/cdr_out_origin_zero.py +5 -0
- evcloud/types/cdr_page.py +27 -0
- evcloud/types/cdr_write_response.py +26 -0
- evcloud/types/charge_point_created_out.py +74 -0
- evcloud/types/charge_point_created_out_access_mode.py +7 -0
- evcloud/types/charge_point_created_out_access_mode_zero.py +5 -0
- evcloud/types/charge_point_created_out_pricing.py +7 -0
- evcloud/types/charge_point_created_out_pricing_zero.py +5 -0
- evcloud/types/charge_point_created_out_site_type.py +7 -0
- evcloud/types/charge_point_created_out_site_type_zero.py +5 -0
- evcloud/types/charge_point_out.py +73 -0
- evcloud/types/charge_point_out_access_mode.py +7 -0
- evcloud/types/charge_point_out_access_mode_zero.py +5 -0
- evcloud/types/charge_point_out_pricing.py +7 -0
- evcloud/types/charge_point_out_pricing_zero.py +5 -0
- evcloud/types/charge_point_out_site_type.py +7 -0
- evcloud/types/charge_point_out_site_type_zero.py +5 -0
- evcloud/types/charge_point_page.py +27 -0
- evcloud/types/charging_preferences_response.py +28 -0
- evcloud/types/charging_preferences_response_result.py +10 -0
- evcloud/types/charging_profile.py +30 -0
- evcloud/types/charging_profile_charging_rate_unit.py +5 -0
- evcloud/types/charging_profile_period.py +31 -0
- evcloud/types/charging_profile_response.py +32 -0
- evcloud/types/cluster_page.py +26 -0
- evcloud/types/command_accepted.py +30 -0
- evcloud/types/command_accepted_route.py +53 -0
- evcloud/types/command_accepted_route_own.py +28 -0
- evcloud/types/command_accepted_route_own_ocpi_version.py +7 -0
- evcloud/types/command_accepted_route_own_ocpi_version_zero.py +5 -0
- evcloud/types/command_accepted_route_roaming.py +30 -0
- evcloud/types/command_accepted_route_roaming_ocpi_version.py +7 -0
- evcloud/types/command_accepted_route_roaming_ocpi_version_zero.py +5 -0
- evcloud/types/command_accepted_status.py +7 -0
- evcloud/types/command_accepted_status_zero.py +20 -0
- evcloud/types/command_page.py +26 -0
- evcloud/types/command_record.py +40 -0
- evcloud/types/command_record_command.py +7 -0
- evcloud/types/command_record_command_zero.py +7 -0
- evcloud/types/command_record_route.py +53 -0
- evcloud/types/command_record_route_own.py +28 -0
- evcloud/types/command_record_route_own_ocpi_version.py +7 -0
- evcloud/types/command_record_route_own_ocpi_version_zero.py +5 -0
- evcloud/types/command_record_route_roaming.py +30 -0
- evcloud/types/command_record_route_roaming_ocpi_version.py +7 -0
- evcloud/types/command_record_route_roaming_ocpi_version_zero.py +5 -0
- evcloud/types/command_record_status.py +7 -0
- evcloud/types/command_record_status_zero.py +20 -0
- evcloud/types/command_response_out.py +26 -0
- evcloud/types/command_response_out_result.py +7 -0
- evcloud/types/command_response_out_result_zero.py +7 -0
- evcloud/types/command_result_event.py +39 -0
- evcloud/types/command_result_event_module.py +5 -0
- evcloud/types/command_result_event_protocol.py +5 -0
- evcloud/types/command_result_event_status.py +5 -0
- evcloud/types/command_send_response.py +31 -0
- evcloud/types/command_token.py +36 -0
- evcloud/types/connector_format.py +5 -0
- evcloud/types/connector_page.py +27 -0
- evcloud/types/connector_status_event.py +29 -0
- evcloud/types/connector_write_response.py +27 -0
- evcloud/types/control_action.py +5 -0
- evcloud/types/control_request_page.py +27 -0
- evcloud/types/control_request_response.py +38 -0
- evcloud/types/control_request_response_action.py +7 -0
- evcloud/types/control_request_response_action_zero.py +7 -0
- evcloud/types/control_request_response_result.py +7 -0
- evcloud/types/control_request_response_result_zero.py +15 -0
- evcloud/types/control_request_response_unit.py +7 -0
- evcloud/types/control_request_response_unit_zero.py +5 -0
- evcloud/types/control_response_event.py +38 -0
- evcloud/types/control_response_event_action.py +5 -0
- evcloud/types/control_response_event_result.py +15 -0
- evcloud/types/control_response_event_unit.py +5 -0
- evcloud/types/cpo_connector_out.py +58 -0
- evcloud/types/cpo_connector_out_format.py +7 -0
- evcloud/types/cpo_connector_out_format_zero.py +5 -0
- evcloud/types/cpo_connector_out_ocpi_status.py +7 -0
- evcloud/types/cpo_connector_out_ocpi_status_zero.py +10 -0
- evcloud/types/cpo_connector_out_power_type.py +7 -0
- evcloud/types/cpo_connector_out_power_type_zero.py +7 -0
- evcloud/types/cpo_evse_out.py +61 -0
- evcloud/types/cpo_evse_out_origin.py +7 -0
- evcloud/types/cpo_evse_out_origin_zero.py +5 -0
- evcloud/types/cpo_evse_out_status.py +7 -0
- evcloud/types/cpo_evse_out_status_zero.py +10 -0
- evcloud/types/credentials_handshake_request.py +44 -0
- evcloud/types/credentials_handshake_request_partner_token_encoding.py +5 -0
- evcloud/types/credentials_handshake_response.py +32 -0
- evcloud/types/credentials_handshake_response_action.py +7 -0
- evcloud/types/credentials_handshake_response_version.py +5 -0
- evcloud/types/deliver_event_response.py +23 -0
- evcloud/types/delivery_drift_event.py +30 -0
- evcloud/types/display_text.py +24 -0
- evcloud/types/effective_cpo.py +27 -0
- evcloud/types/effective_cpo_source.py +7 -0
- evcloud/types/effective_cpo_source_zero.py +5 -0
- evcloud/types/effective_view_response.py +29 -0
- evcloud/types/emp_identity_out.py +35 -0
- evcloud/types/emp_identity_out_status.py +7 -0
- evcloud/types/emp_identity_out_status_zero.py +5 -0
- evcloud/types/emp_identity_page.py +26 -0
- evcloud/types/emsp_cdr_out.py +41 -0
- evcloud/types/emsp_cdr_out_source.py +7 -0
- evcloud/types/emsp_cdr_out_source_zero.py +5 -0
- evcloud/types/emsp_cdr_page.py +26 -0
- evcloud/types/emsp_connector_out.py +30 -0
- evcloud/types/emsp_evse_out.py +32 -0
- evcloud/types/emsp_gateway_schema_commands_location_key.py +25 -0
- evcloud/types/emsp_gateway_schema_location_lookup_location_key.py +25 -0
- evcloud/types/emsp_gateway_schema_locations_location_out.py +47 -0
- evcloud/types/emsp_gateway_schema_locations_location_page.py +26 -0
- evcloud/types/emsp_gateway_schema_networks_location_out.py +37 -0
- evcloud/types/emsp_gateway_schema_networks_location_page.py +26 -0
- evcloud/types/emsp_session_out.py +41 -0
- evcloud/types/emsp_session_out_source.py +7 -0
- evcloud/types/emsp_session_out_source_zero.py +5 -0
- evcloud/types/emsp_session_page.py +26 -0
- evcloud/types/emsp_tariff_page.py +26 -0
- evcloud/types/energy_contract.py +24 -0
- evcloud/types/estimate_line.py +27 -0
- evcloud/types/estimate_line_type.py +7 -0
- evcloud/types/estimate_line_type_zero.py +5 -0
- evcloud/types/estimate_response.py +30 -0
- evcloud/types/event_type_list.py +24 -0
- evcloud/types/event_type_response.py +27 -0
- evcloud/types/event_type_response_type.py +7 -0
- evcloud/types/event_type_response_type_zero.py +27 -0
- evcloud/types/event_type_version.py +24 -0
- evcloud/types/evse_connector_status.py +26 -0
- evcloud/types/evse_page.py +27 -0
- evcloud/types/evse_parking.py +25 -0
- evcloud/types/evse_parking_evse_position.py +7 -0
- evcloud/types/evse_parking_evse_position_zero.py +5 -0
- evcloud/types/evse_status_event.py +31 -0
- evcloud/types/evse_status_out.py +32 -0
- evcloud/types/evse_status_write_response.py +28 -0
- evcloud/types/facility_count.py +24 -0
- evcloud/types/facility_page.py +26 -0
- evcloud/types/health_ok.py +24 -0
- evcloud/types/health_ok_status.py +7 -0
- evcloud/types/health_ok_status_zero.py +5 -0
- evcloud/types/http_error_response.py +29 -0
- evcloud/types/http_validation_error.py +24 -0
- evcloud/types/limit_unit.py +5 -0
- evcloud/types/location_availability.py +28 -0
- evcloud/types/location_availability_status.py +7 -0
- evcloud/types/location_availability_status_zero.py +7 -0
- evcloud/types/location_base.py +53 -0
- evcloud/types/location_base_parking_type.py +7 -0
- evcloud/types/location_base_parking_type_zero.py +8 -0
- evcloud/types/location_cluster.py +26 -0
- evcloud/types/location_detail.py +51 -0
- evcloud/types/location_key_input.py +25 -0
- evcloud/types/location_list.py +24 -0
- evcloud/types/location_out.py +79 -0
- evcloud/types/location_out_access_mode.py +7 -0
- evcloud/types/location_out_access_mode_zero.py +5 -0
- evcloud/types/location_out_ocpi_version.py +7 -0
- evcloud/types/location_out_ocpi_version_zero.py +5 -0
- evcloud/types/location_out_origin.py +7 -0
- evcloud/types/location_out_origin_zero.py +5 -0
- evcloud/types/location_out_parking_type.py +7 -0
- evcloud/types/location_out_parking_type_zero.py +8 -0
- evcloud/types/location_out_role.py +7 -0
- evcloud/types/location_out_role_zero.py +5 -0
- evcloud/types/location_out_site_type.py +7 -0
- evcloud/types/location_out_site_type_zero.py +5 -0
- evcloud/types/location_page.py +27 -0
- evcloud/types/location_summary.py +43 -0
- evcloud/types/location_updated_event.py +30 -0
- evcloud/types/location_write_response.py +26 -0
- evcloud/types/map_cluster.py +28 -0
- evcloud/types/map_page.py +29 -0
- evcloud/types/network_consumer.py +25 -0
- evcloud/types/network_consumer_page.py +26 -0
- evcloud/types/network_detail_response.py +49 -0
- evcloud/types/network_detail_response_network_type.py +7 -0
- evcloud/types/network_detail_response_network_type_zero.py +5 -0
- evcloud/types/network_detail_response_publish_state.py +7 -0
- evcloud/types/network_detail_response_publish_state_zero.py +7 -0
- evcloud/types/network_page.py +26 -0
- evcloud/types/network_priority_order.py +23 -0
- evcloud/types/network_response.py +46 -0
- evcloud/types/network_response_network_type.py +7 -0
- evcloud/types/network_response_network_type_zero.py +5 -0
- evcloud/types/network_response_publish_state.py +7 -0
- evcloud/types/network_response_publish_state_zero.py +5 -0
- evcloud/types/network_rule_page.py +26 -0
- evcloud/types/network_rule_response.py +33 -0
- evcloud/types/network_rule_response_rule_type.py +7 -0
- evcloud/types/network_rule_response_rule_type_zero.py +5 -0
- evcloud/types/ocpi_business_details.py +26 -0
- evcloud/types/ocpi_business_details_input.py +26 -0
- evcloud/types/ocpi_cdr_dimension.py +24 -0
- evcloud/types/ocpi_cdr_location.py +30 -0
- evcloud/types/ocpi_cdr_token.py +30 -0
- evcloud/types/ocpi_charging_period.py +27 -0
- evcloud/types/ocpi_display_text.py +24 -0
- evcloud/types/ocpi_energy_mix.py +29 -0
- evcloud/types/ocpi_energy_mix_input.py +29 -0
- evcloud/types/ocpi_energy_source.py +24 -0
- evcloud/types/ocpi_energy_source_input.py +24 -0
- evcloud/types/ocpi_environmental_impact.py +24 -0
- evcloud/types/ocpi_evse_parking.py +24 -0
- evcloud/types/ocpi_exceptional_period.py +25 -0
- evcloud/types/ocpi_geo_location.py +24 -0
- evcloud/types/ocpi_geo_location_in.py +24 -0
- evcloud/types/ocpi_image.py +28 -0
- evcloud/types/ocpi_image_input.py +28 -0
- evcloud/types/ocpi_opening_times.py +28 -0
- evcloud/types/ocpi_opening_times_input.py +28 -0
- evcloud/types/ocpi_parking_place.py +44 -0
- evcloud/types/ocpi_parking_place_input.py +44 -0
- evcloud/types/ocpi_price_component_input.py +28 -0
- evcloud/types/ocpi_price_component_input_price.py +5 -0
- evcloud/types/ocpi_price_component_input_vat.py +5 -0
- evcloud/types/ocpi_price_component_output.py +26 -0
- evcloud/types/ocpi_price_input.py +26 -0
- evcloud/types/ocpi_price_input_excl_vat.py +5 -0
- evcloud/types/ocpi_price_input_incl_vat.py +5 -0
- evcloud/types/ocpi_price_output.py +24 -0
- evcloud/types/ocpi_publish_token.py +27 -0
- evcloud/types/ocpi_regular_hours.py +25 -0
- evcloud/types/ocpi_regular_hours_input.py +25 -0
- evcloud/types/ocpi_related_location.py +26 -0
- evcloud/types/ocpi_signed_data.py +28 -0
- evcloud/types/ocpi_signed_value.py +25 -0
- evcloud/types/ocpi_status_schedule.py +26 -0
- evcloud/types/ocpi_tariff_element_input.py +26 -0
- evcloud/types/ocpi_tariff_element_output.py +26 -0
- evcloud/types/ocpi_tariff_restrictions_input.py +33 -0
- evcloud/types/ocpi_tariff_restrictions_input_max_kwh.py +5 -0
- evcloud/types/ocpi_tariff_restrictions_input_min_kwh.py +5 -0
- evcloud/types/ocpi_tariff_restrictions_output.py +31 -0
- evcloud/types/ocpi_tariff_snapshot.py +26 -0
- evcloud/types/ocpp_version.py +5 -0
- evcloud/types/page_info.py +24 -0
- evcloud/types/parking.py +45 -0
- evcloud/types/parking_direction.py +7 -0
- evcloud/types/parking_direction_zero.py +5 -0
- evcloud/types/parking_type.py +8 -0
- evcloud/types/parking_vehicle_types_item.py +7 -0
- evcloud/types/parking_vehicle_types_item_zero.py +18 -0
- evcloud/types/partner_invite_response.py +47 -0
- evcloud/types/partner_invite_response_action.py +5 -0
- evcloud/types/partner_invite_response_role.py +5 -0
- evcloud/types/partner_invite_response_version.py +5 -0
- evcloud/types/partner_invite_revoke_response.py +31 -0
- evcloud/types/partner_invite_revoke_response_role.py +5 -0
- evcloud/types/partner_response.py +41 -0
- evcloud/types/partner_response_ocpi_version.py +5 -0
- evcloud/types/partner_token_updated_event.py +35 -0
- evcloud/types/partner_versions_pull_response.py +29 -0
- evcloud/types/partner_versions_pull_response_code.py +8 -0
- evcloud/types/partner_versions_pull_response_version.py +5 -0
- evcloud/types/power_measurement.py +30 -0
- evcloud/types/power_measurement_event.py +30 -0
- evcloud/types/power_measurement_list.py +24 -0
- evcloud/types/power_type.py +5 -0
- evcloud/types/price_component.py +26 -0
- evcloud/types/price_limit.py +24 -0
- evcloud/types/pricing_mode.py +5 -0
- evcloud/types/queue_health.py +34 -0
- evcloud/types/reservation_cancel_response.py +25 -0
- evcloud/types/resolve_chargers_response_own.py +28 -0
- evcloud/types/resolve_chargers_response_own_ocpi_version.py +7 -0
- evcloud/types/resolve_chargers_response_own_ocpi_version_zero.py +5 -0
- evcloud/types/resolve_chargers_response_roaming.py +30 -0
- evcloud/types/resolve_chargers_response_roaming_ocpi_version.py +7 -0
- evcloud/types/resolve_chargers_response_roaming_ocpi_version_zero.py +5 -0
- evcloud/types/session_event.py +39 -0
- evcloud/types/session_out.py +60 -0
- evcloud/types/session_out_auth_method.py +7 -0
- evcloud/types/session_out_auth_method_zero.py +5 -0
- evcloud/types/session_out_billing_state.py +7 -0
- evcloud/types/session_out_billing_state_zero.py +5 -0
- evcloud/types/session_out_origin.py +7 -0
- evcloud/types/session_out_origin_zero.py +5 -0
- evcloud/types/session_out_status.py +7 -0
- evcloud/types/session_out_status_zero.py +7 -0
- evcloud/types/session_page.py +27 -0
- evcloud/types/session_write_response.py +27 -0
- evcloud/types/sharing_slot.py +25 -0
- evcloud/types/sharing_slot_input.py +25 -0
- evcloud/types/site_type.py +5 -0
- evcloud/types/sync_patch_request.py +26 -0
- evcloud/types/sync_pull_response.py +31 -0
- evcloud/types/sync_push_response.py +31 -0
- evcloud/types/sync_push_response_status.py +5 -0
- evcloud/types/tariff.py +42 -0
- evcloud/types/tariff_assignment_out.py +32 -0
- evcloud/types/tariff_assignment_page.py +27 -0
- evcloud/types/tariff_delete_response.py +26 -0
- evcloud/types/tariff_display.py +27 -0
- evcloud/types/tariff_element.py +26 -0
- evcloud/types/tariff_out.py +57 -0
- evcloud/types/tariff_out_origin.py +7 -0
- evcloud/types/tariff_out_origin_zero.py +5 -0
- evcloud/types/tariff_out_tax_included.py +7 -0
- evcloud/types/tariff_out_tax_included_zero.py +5 -0
- evcloud/types/tariff_out_type.py +7 -0
- evcloud/types/tariff_out_type_zero.py +7 -0
- evcloud/types/tariff_page.py +27 -0
- evcloud/types/tariff_restrictions.py +36 -0
- evcloud/types/tariff_summary.py +29 -0
- evcloud/types/tariff_tax_included.py +7 -0
- evcloud/types/tariff_tax_included_zero.py +5 -0
- evcloud/types/tariff_type.py +7 -0
- evcloud/types/tariff_updated_event.py +29 -0
- evcloud/types/tariff_write_response.py +26 -0
- evcloud/types/tax_included.py +5 -0
- evcloud/types/tenant_profile_out.py +31 -0
- evcloud/types/token_bulk_out.py +26 -0
- evcloud/types/token_create.py +46 -0
- evcloud/types/token_create_default_profile_type.py +5 -0
- evcloud/types/token_create_ocpi_version.py +5 -0
- evcloud/types/token_create_type.py +5 -0
- evcloud/types/token_create_whitelist.py +5 -0
- evcloud/types/token_event_data.py +47 -0
- evcloud/types/token_event_data_status.py +7 -0
- evcloud/types/token_event_data_type.py +5 -0
- evcloud/types/token_event_data_whitelist.py +5 -0
- evcloud/types/token_event_out.py +32 -0
- evcloud/types/token_event_out_event.py +7 -0
- evcloud/types/token_event_out_event_zero.py +7 -0
- evcloud/types/token_event_page.py +26 -0
- evcloud/types/token_failure_item.py +24 -0
- evcloud/types/token_group_action_out.py +27 -0
- evcloud/types/token_group_failure.py +24 -0
- evcloud/types/token_group_member_out.py +26 -0
- evcloud/types/token_group_network_out.py +35 -0
- evcloud/types/token_group_network_page.py +26 -0
- evcloud/types/token_group_out.py +31 -0
- evcloud/types/token_group_page.py +26 -0
- evcloud/types/token_out.py +55 -0
- evcloud/types/token_out_status.py +7 -0
- evcloud/types/token_out_status_zero.py +7 -0
- evcloud/types/token_out_type.py +7 -0
- evcloud/types/token_out_type_zero.py +5 -0
- evcloud/types/token_out_whitelist.py +7 -0
- evcloud/types/token_out_whitelist_zero.py +5 -0
- evcloud/types/token_page.py +26 -0
- evcloud/types/token_reason.py +23 -0
- evcloud/types/token_ref.py +26 -0
- evcloud/types/token_ref_ocpi_version.py +5 -0
- evcloud/types/token_write_response.py +28 -0
- evcloud/types/validation_error.py +28 -0
- evcloud/types/validation_error_loc_item.py +5 -0
- evcloud/types/webhook_delivery_page.py +27 -0
- evcloud/types/webhook_delivery_response.py +35 -0
- evcloud/types/webhook_page.py +27 -0
- evcloud/types/webhook_response.py +42 -0
- evcloud/types/webhook_response_event.py +7 -0
- evcloud/types/webhook_response_event_zero.py +27 -0
- evcloud/types/webhook_response_status.py +7 -0
- evcloud/types/webhook_response_status_zero.py +5 -0
- evcloud/types/webhook_test_result.py +25 -0
- evcloud/types/webhook_with_secret_response.py +43 -0
- evcloud/types/webhook_with_secret_response_event.py +7 -0
- evcloud/types/webhook_with_secret_response_event_zero.py +27 -0
- evcloud/types/webhook_with_secret_response_status.py +7 -0
- evcloud/types/webhook_with_secret_response_status_zero.py +5 -0
- evcloud/version.py +3 -0
- evcloud/webhooks/__init__.py +28 -0
- evcloud/webhooks/client.py +53 -0
- evcloud/webhooks/deliveries/__init__.py +4 -0
- evcloud/webhooks/deliveries/client.py +141 -0
- evcloud/webhooks/deliveries/raw_client.py +268 -0
- evcloud/webhooks/endpoints/__init__.py +17 -0
- evcloud/webhooks/endpoints/client.py +642 -0
- evcloud/webhooks/endpoints/raw_client.py +1521 -0
- evcloud/webhooks/endpoints/types/__init__.py +15 -0
- evcloud/webhooks/endpoints/types/list_endpoints_request_event_types_item.py +27 -0
- evcloud/webhooks/endpoints/types/webhook_create_request_api_version.py +5 -0
- evcloud/webhooks/endpoints/types/webhook_create_request_event.py +27 -0
- evcloud/webhooks/endpoints/types/webhook_update_request_status.py +5 -0
- evcloud/webhooks/event_types/__init__.py +7 -0
- evcloud/webhooks/event_types/client.py +176 -0
- evcloud/webhooks/event_types/raw_client.py +418 -0
- evcloud/webhooks/event_types/types/__init__.py +7 -0
- evcloud/webhooks/event_types/types/get_event_types_request_type.py +27 -0
- evcloud/webhooks/events/__init__.py +7 -0
- evcloud/webhooks/events/client.py +207 -0
- evcloud/webhooks/events/raw_client.py +355 -0
- evcloud/webhooks/events/types/__init__.py +8 -0
- evcloud/webhooks/events/types/deliver_event_request_data.py +33 -0
- evcloud/webhooks/events/types/deliver_event_request_event.py +27 -0
- evcloud/webhooks/health/__init__.py +4 -0
- evcloud/webhooks/health/client.py +161 -0
- evcloud/webhooks/health/raw_client.py +380 -0
- evcloud/webhooks/raw_client.py +13 -0
- evcloud-0.1.0.dist-info/METADATA +257 -0
- evcloud-0.1.0.dist-info/RECORD +635 -0
- 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
|