-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add schemas and enums for hubclientinfo v_2_2_1 module.
- Loading branch information
1 parent
e1b75a9
commit 9aeed04
Showing
3 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from enum import Enum | ||
|
||
|
||
class ConnectionStatus(str, Enum): | ||
""" | ||
https://github.com/ocpi/ocpi/blob/release-2.2.1-bugfixes/mod_hub_client_info.asciidoc#151-connectionstatus-enum | ||
""" | ||
|
||
connected = "CONNECTED" | ||
offline = "OFFLINE" | ||
planned = "PLANNED" | ||
suspended = "SUSPENDED" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from pydantic import BaseModel | ||
|
||
from py_ocpi.core.data_types import CiString, DateTime | ||
from py_ocpi.core.enums import RoleEnum | ||
from py_ocpi.modules.hubclientinfo.v_2_2_1.enums import ConnectionStatus | ||
|
||
|
||
class ClientInfo(BaseModel): | ||
""" | ||
https://github.com/ocpi/ocpi/blob/release-2.2.1-bugfixes/mod_hub_client_info.asciidoc#141-clientinfo-object | ||
""" | ||
|
||
party_id: CiString(3) # type: ignore | ||
country_code: CiString(2) # type: ignore | ||
role: RoleEnum | ||
status: ConnectionStatus | ||
last_updated: DateTime |