v221

   1from typing import Any, List, Optional, TypeVar, Callable, Type, cast
   2from enum import Enum
   3
   4
   5T = TypeVar("T")
   6EnumT = TypeVar("EnumT", bound=Enum)
   7
   8
   9def from_float(x: Any) -> float:
  10    assert isinstance(x, (float, int)) and not isinstance(x, bool)
  11    return float(x)
  12
  13
  14def from_int(x: Any) -> int:
  15    assert isinstance(x, int) and not isinstance(x, bool)
  16    return x
  17
  18
  19def to_float(x: Any) -> float:
  20    assert isinstance(x, (int, float))
  21    return x
  22
  23
  24def from_none(x: Any) -> Any:
  25    assert x is None
  26    return x
  27
  28
  29def from_list(f: Callable[[Any], T], x: Any) -> List[T]:
  30    assert isinstance(x, list)
  31    return [f(y) for y in x]
  32
  33
  34def from_union(fs, x):
  35    for f in fs:
  36        try:
  37            return f(x)
  38        except:
  39            pass
  40    assert False
  41
  42
  43def from_str(x: Any) -> str:
  44    assert isinstance(x, str)
  45    return x
  46
  47
  48def to_class(c: Type[T], x: Any) -> dict:
  49    assert isinstance(x, c)
  50    return cast(Any, x).to_dict()
  51
  52
  53def to_enum(c: Type[EnumT], x: Any) -> EnumT:
  54    assert isinstance(x, c)
  55    return x.value
  56
  57
  58def from_bool(x: Any) -> bool:
  59    assert isinstance(x, bool)
  60    return x
  61
  62
  63class ChargingProfilePeriod:
  64    limit: float
  65    start_period: int
  66
  67    def __init__(self, limit: float, start_period: int) -> None:
  68        self.limit = limit
  69        self.start_period = start_period
  70
  71    @staticmethod
  72    def from_dict(obj: Any) -> 'ChargingProfilePeriod':
  73        assert isinstance(obj, dict)
  74        limit = from_float(obj.get("limit"))
  75        start_period = from_int(obj.get("start_period"))
  76        return ChargingProfilePeriod(limit, start_period)
  77
  78    def to_dict(self) -> dict:
  79        result: dict = {}
  80        result["limit"] = to_float(self.limit)
  81        result["start_period"] = from_int(self.start_period)
  82        return result
  83
  84
  85class ChargingRateUnit(Enum):
  86    A = "A"
  87    W = "W"
  88
  89
  90class ChargingProfile:
  91    charging_profile_period: Optional[List[ChargingProfilePeriod]]
  92    charging_rate_unit: ChargingRateUnit
  93    duration: Optional[int]
  94    min_charging_rate: Optional[float]
  95    start_date_time: Optional[str]
  96
  97    def __init__(self, charging_profile_period: Optional[List[ChargingProfilePeriod]], charging_rate_unit: ChargingRateUnit, duration: Optional[int], min_charging_rate: Optional[float], start_date_time: Optional[str]) -> None:
  98        self.charging_profile_period = charging_profile_period
  99        self.charging_rate_unit = charging_rate_unit
 100        self.duration = duration
 101        self.min_charging_rate = min_charging_rate
 102        self.start_date_time = start_date_time
 103
 104    @staticmethod
 105    def from_dict(obj: Any) -> 'ChargingProfile':
 106        assert isinstance(obj, dict)
 107        charging_profile_period = from_union([from_none, lambda x: from_list(ChargingProfilePeriod.from_dict, x)], obj.get("charging_profile_period"))
 108        charging_rate_unit = ChargingRateUnit(obj.get("charging_rate_unit"))
 109        duration = from_union([from_none, from_int], obj.get("duration"))
 110        min_charging_rate = from_union([from_none, from_float], obj.get("min_charging_rate"))
 111        start_date_time = from_union([from_none, from_str], obj.get("start_date_time"))
 112        return ChargingProfile(charging_profile_period, charging_rate_unit, duration, min_charging_rate, start_date_time)
 113
 114    def to_dict(self) -> dict:
 115        result: dict = {}
 116        if self.charging_profile_period is not None:
 117            result["charging_profile_period"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ChargingProfilePeriod, x), x)], self.charging_profile_period)
 118        result["charging_rate_unit"] = to_enum(ChargingRateUnit, self.charging_rate_unit)
 119        if self.duration is not None:
 120            result["duration"] = from_union([from_none, from_int], self.duration)
 121        if self.min_charging_rate is not None:
 122            result["min_charging_rate"] = from_union([from_none, to_float], self.min_charging_rate)
 123        if self.start_date_time is not None:
 124            result["start_date_time"] = from_union([from_none, from_str], self.start_date_time)
 125        return result
 126
 127
 128class ActiveChargingProfile:
 129    charging_profile: ChargingProfile
 130    start_date_time: str
 131
 132    def __init__(self, charging_profile: ChargingProfile, start_date_time: str) -> None:
 133        self.charging_profile = charging_profile
 134        self.start_date_time = start_date_time
 135
 136    @staticmethod
 137    def from_dict(obj: Any) -> 'ActiveChargingProfile':
 138        assert isinstance(obj, dict)
 139        charging_profile = ChargingProfile.from_dict(obj.get("charging_profile"))
 140        start_date_time = from_str(obj.get("start_date_time"))
 141        return ActiveChargingProfile(charging_profile, start_date_time)
 142
 143    def to_dict(self) -> dict:
 144        result: dict = {}
 145        result["charging_profile"] = to_class(ChargingProfile, self.charging_profile)
 146        result["start_date_time"] = from_str(self.start_date_time)
 147        return result
 148
 149
 150class ChargingProfileResultType(Enum):
 151    ACCEPTED = "ACCEPTED"
 152    REJECTED = "REJECTED"
 153    UNKNOWN = "UNKNOWN"
 154
 155
 156class ActiveChargingProfileResult:
 157    profile: Optional[ActiveChargingProfile]
 158    result: ChargingProfileResultType
 159
 160    def __init__(self, profile: Optional[ActiveChargingProfile], result: ChargingProfileResultType) -> None:
 161        self.profile = profile
 162        self.result = result
 163
 164    @staticmethod
 165    def from_dict(obj: Any) -> 'ActiveChargingProfileResult':
 166        assert isinstance(obj, dict)
 167        profile = from_union([ActiveChargingProfile.from_dict, from_none], obj.get("profile"))
 168        result = ChargingProfileResultType(obj.get("result"))
 169        return ActiveChargingProfileResult(profile, result)
 170
 171    def to_dict(self) -> dict:
 172        result: dict = {}
 173        if self.profile is not None:
 174            result["profile"] = from_union([lambda x: to_class(ActiveChargingProfile, x), from_none], self.profile)
 175        result["result"] = to_enum(ChargingProfileResultType, self.result)
 176        return result
 177
 178
 179class AllowedType(Enum):
 180    ALLOWED = "ALLOWED"
 181    BLOCKED = "BLOCKED"
 182    EXPIRED = "EXPIRED"
 183    NOT_ALLOWED = "NOT_ALLOWED"
 184    NO_CREDIT = "NO_CREDIT"
 185
 186
 187class DisplayText:
 188    language: str
 189    text: str
 190
 191    def __init__(self, language: str, text: str) -> None:
 192        self.language = language
 193        self.text = text
 194
 195    @staticmethod
 196    def from_dict(obj: Any) -> 'DisplayText':
 197        assert isinstance(obj, dict)
 198        language = from_str(obj.get("language"))
 199        text = from_str(obj.get("text"))
 200        return DisplayText(language, text)
 201
 202    def to_dict(self) -> dict:
 203        result: dict = {}
 204        result["language"] = from_str(self.language)
 205        result["text"] = from_str(self.text)
 206        return result
 207
 208
 209class LocationReferences:
 210    evse_uids: Optional[List[str]]
 211    location_id: str
 212
 213    def __init__(self, evse_uids: Optional[List[str]], location_id: str) -> None:
 214        self.evse_uids = evse_uids
 215        self.location_id = location_id
 216
 217    @staticmethod
 218    def from_dict(obj: Any) -> 'LocationReferences':
 219        assert isinstance(obj, dict)
 220        evse_uids = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("evse_uids"))
 221        location_id = from_str(obj.get("location_id"))
 222        return LocationReferences(evse_uids, location_id)
 223
 224    def to_dict(self) -> dict:
 225        result: dict = {}
 226        if self.evse_uids is not None:
 227            result["evse_uids"] = from_union([from_none, lambda x: from_list(from_str, x)], self.evse_uids)
 228        result["location_id"] = from_str(self.location_id)
 229        return result
 230
 231
 232class ProfileType(Enum):
 233    CHEAP = "CHEAP"
 234    FAST = "FAST"
 235    GREEN = "GREEN"
 236    REGULAR = "REGULAR"
 237
 238
 239class EnergyContract:
 240    contract_id: Optional[str]
 241    supplier_name: str
 242
 243    def __init__(self, contract_id: Optional[str], supplier_name: str) -> None:
 244        self.contract_id = contract_id
 245        self.supplier_name = supplier_name
 246
 247    @staticmethod
 248    def from_dict(obj: Any) -> 'EnergyContract':
 249        assert isinstance(obj, dict)
 250        contract_id = from_union([from_none, from_str], obj.get("contract_id"))
 251        supplier_name = from_str(obj.get("supplier_name"))
 252        return EnergyContract(contract_id, supplier_name)
 253
 254    def to_dict(self) -> dict:
 255        result: dict = {}
 256        if self.contract_id is not None:
 257            result["contract_id"] = from_union([from_none, from_str], self.contract_id)
 258        result["supplier_name"] = from_str(self.supplier_name)
 259        return result
 260
 261
 262class TokenType(Enum):
 263    AD_HOC_USER = "AD_HOC_USER"
 264    APP_USER = "APP_USER"
 265    OTHER = "OTHER"
 266    RFID = "RFID"
 267
 268
 269class WhitelistType(Enum):
 270    ALLOWED = "ALLOWED"
 271    ALLOWED_OFFLINE = "ALLOWED_OFFLINE"
 272    ALWAYS = "ALWAYS"
 273    NEVER = "NEVER"
 274
 275
 276class Token:
 277    contract_id: str
 278    country_code: str
 279    default_profile_type: Optional[ProfileType]
 280    energy_contract: Optional[EnergyContract]
 281    group_id: Optional[str]
 282    issuer: str
 283    language: Optional[str]
 284    last_updated: str
 285    party_id: str
 286    type: TokenType
 287    uid: str
 288    valid: bool
 289    visual_number: Optional[str]
 290    whitelist: WhitelistType
 291
 292    def __init__(self, contract_id: str, country_code: str, default_profile_type: Optional[ProfileType], energy_contract: Optional[EnergyContract], group_id: Optional[str], issuer: str, language: Optional[str], last_updated: str, party_id: str, type: TokenType, uid: str, valid: bool, visual_number: Optional[str], whitelist: WhitelistType) -> None:
 293        self.contract_id = contract_id
 294        self.country_code = country_code
 295        self.default_profile_type = default_profile_type
 296        self.energy_contract = energy_contract
 297        self.group_id = group_id
 298        self.issuer = issuer
 299        self.language = language
 300        self.last_updated = last_updated
 301        self.party_id = party_id
 302        self.type = type
 303        self.uid = uid
 304        self.valid = valid
 305        self.visual_number = visual_number
 306        self.whitelist = whitelist
 307
 308    @staticmethod
 309    def from_dict(obj: Any) -> 'Token':
 310        assert isinstance(obj, dict)
 311        contract_id = from_str(obj.get("contract_id"))
 312        country_code = from_str(obj.get("country_code"))
 313        default_profile_type = from_union([from_none, ProfileType], obj.get("default_profile_type"))
 314        energy_contract = from_union([from_none, EnergyContract.from_dict], obj.get("energy_contract"))
 315        group_id = from_union([from_none, from_str], obj.get("group_id"))
 316        issuer = from_str(obj.get("issuer"))
 317        language = from_union([from_none, from_str], obj.get("language"))
 318        last_updated = from_str(obj.get("last_updated"))
 319        party_id = from_str(obj.get("party_id"))
 320        type = TokenType(obj.get("type"))
 321        uid = from_str(obj.get("uid"))
 322        valid = from_bool(obj.get("valid"))
 323        visual_number = from_union([from_none, from_str], obj.get("visual_number"))
 324        whitelist = WhitelistType(obj.get("whitelist"))
 325        return Token(contract_id, country_code, default_profile_type, energy_contract, group_id, issuer, language, last_updated, party_id, type, uid, valid, visual_number, whitelist)
 326
 327    def to_dict(self) -> dict:
 328        result: dict = {}
 329        result["contract_id"] = from_str(self.contract_id)
 330        result["country_code"] = from_str(self.country_code)
 331        if self.default_profile_type is not None:
 332            result["default_profile_type"] = from_union([from_none, lambda x: to_enum(ProfileType, x)], self.default_profile_type)
 333        if self.energy_contract is not None:
 334            result["energy_contract"] = from_union([from_none, lambda x: to_class(EnergyContract, x)], self.energy_contract)
 335        if self.group_id is not None:
 336            result["group_id"] = from_union([from_none, from_str], self.group_id)
 337        result["issuer"] = from_str(self.issuer)
 338        if self.language is not None:
 339            result["language"] = from_union([from_none, from_str], self.language)
 340        result["last_updated"] = from_str(self.last_updated)
 341        result["party_id"] = from_str(self.party_id)
 342        result["type"] = to_enum(TokenType, self.type)
 343        result["uid"] = from_str(self.uid)
 344        result["valid"] = from_bool(self.valid)
 345        if self.visual_number is not None:
 346            result["visual_number"] = from_union([from_none, from_str], self.visual_number)
 347        result["whitelist"] = to_enum(WhitelistType, self.whitelist)
 348        return result
 349
 350
 351class AuthorizationInfo:
 352    allowed: AllowedType
 353    authorization_reference: Optional[str]
 354    info: Optional[DisplayText]
 355    location: Optional[LocationReferences]
 356    token: Token
 357
 358    def __init__(self, allowed: AllowedType, authorization_reference: Optional[str], info: Optional[DisplayText], location: Optional[LocationReferences], token: Token) -> None:
 359        self.allowed = allowed
 360        self.authorization_reference = authorization_reference
 361        self.info = info
 362        self.location = location
 363        self.token = token
 364
 365    @staticmethod
 366    def from_dict(obj: Any) -> 'AuthorizationInfo':
 367        assert isinstance(obj, dict)
 368        allowed = AllowedType(obj.get("allowed"))
 369        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
 370        info = from_union([from_none, DisplayText.from_dict], obj.get("info"))
 371        location = from_union([from_none, LocationReferences.from_dict], obj.get("location"))
 372        token = Token.from_dict(obj.get("token"))
 373        return AuthorizationInfo(allowed, authorization_reference, info, location, token)
 374
 375    def to_dict(self) -> dict:
 376        result: dict = {}
 377        result["allowed"] = to_enum(AllowedType, self.allowed)
 378        if self.authorization_reference is not None:
 379            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
 380        if self.info is not None:
 381            result["info"] = from_union([from_none, lambda x: to_class(DisplayText, x)], self.info)
 382        if self.location is not None:
 383            result["location"] = from_union([from_none, lambda x: to_class(LocationReferences, x)], self.location)
 384        result["token"] = to_class(Token, self.token)
 385        return result
 386
 387
 388class CancelReservation:
 389    reservation_id: str
 390    response_url: str
 391
 392    def __init__(self, reservation_id: str, response_url: str) -> None:
 393        self.reservation_id = reservation_id
 394        self.response_url = response_url
 395
 396    @staticmethod
 397    def from_dict(obj: Any) -> 'CancelReservation':
 398        assert isinstance(obj, dict)
 399        reservation_id = from_str(obj.get("reservation_id"))
 400        response_url = from_str(obj.get("response_url"))
 401        return CancelReservation(reservation_id, response_url)
 402
 403    def to_dict(self) -> dict:
 404        result: dict = {}
 405        result["reservation_id"] = from_str(self.reservation_id)
 406        result["response_url"] = from_str(self.response_url)
 407        return result
 408
 409
 410class AuthMethod(Enum):
 411    AUTH_REQUEST = "AUTH_REQUEST"
 412    COMMAND = "COMMAND"
 413    WHITELIST = "WHITELIST"
 414
 415
 416class ConnectorFormat(Enum):
 417    CABLE = "CABLE"
 418    SOCKET = "SOCKET"
 419
 420
 421class PowerType(Enum):
 422    AC_1__PHASE = "AC_1_PHASE"
 423    AC_2__PHASE = "AC_2_PHASE"
 424    AC_2__PHASE_SPLIT = "AC_2_PHASE_SPLIT"
 425    AC_3__PHASE = "AC_3_PHASE"
 426    DC = "DC"
 427
 428
 429class ConnectorType(Enum):
 430    CHADEMO = "CHADEMO"
 431    CHAOJI = "CHAOJI"
 432    DOMESTIC_A = "DOMESTIC_A"
 433    DOMESTIC_B = "DOMESTIC_B"
 434    DOMESTIC_C = "DOMESTIC_C"
 435    DOMESTIC_D = "DOMESTIC_D"
 436    DOMESTIC_E = "DOMESTIC_E"
 437    DOMESTIC_F = "DOMESTIC_F"
 438    DOMESTIC_G = "DOMESTIC_G"
 439    DOMESTIC_H = "DOMESTIC_H"
 440    DOMESTIC_I = "DOMESTIC_I"
 441    DOMESTIC_J = "DOMESTIC_J"
 442    DOMESTIC_K = "DOMESTIC_K"
 443    DOMESTIC_L = "DOMESTIC_L"
 444    DOMESTIC_M = "DOMESTIC_M"
 445    DOMESTIC_N = "DOMESTIC_N"
 446    DOMESTIC_O = "DOMESTIC_O"
 447    GBT_AC = "GBT_AC"
 448    GBT_DC = "GBT_DC"
 449    IEC_60309_2__SINGLE_16 = "IEC_60309_2_single_16"
 450    IEC_60309_2__THREE_16 = "IEC_60309_2_three_16"
 451    IEC_60309_2__THREE_32 = "IEC_60309_2_three_32"
 452    IEC_60309_2__THREE_64 = "IEC_60309_2_three_64"
 453    IEC_62196__T1 = "IEC_62196_T1"
 454    IEC_62196__T1_COMBO = "IEC_62196_T1_COMBO"
 455    IEC_62196__T2 = "IEC_62196_T2"
 456    IEC_62196__T2_COMBO = "IEC_62196_T2_COMBO"
 457    IEC_62196__T3_A = "IEC_62196_T3A"
 458    IEC_62196__T3_C = "IEC_62196_T3C"
 459    NEMA_10_30 = "NEMA_10_30"
 460    NEMA_10_50 = "NEMA_10_50"
 461    NEMA_14_30 = "NEMA_14_30"
 462    NEMA_14_50 = "NEMA_14_50"
 463    NEMA_5_20 = "NEMA_5_20"
 464    NEMA_6_30 = "NEMA_6_30"
 465    NEMA_6_50 = "NEMA_6_50"
 466    PANTOGRAPH_BOTTOM_UP = "PANTOGRAPH_BOTTOM_UP"
 467    PANTOGRAPH_TOP_DOWN = "PANTOGRAPH_TOP_DOWN"
 468    TESLA_R = "TESLA_R"
 469    TESLA_S = "TESLA_S"
 470
 471
 472class GeoLocation:
 473    latitude: str
 474    longitude: str
 475
 476    def __init__(self, latitude: str, longitude: str) -> None:
 477        self.latitude = latitude
 478        self.longitude = longitude
 479
 480    @staticmethod
 481    def from_dict(obj: Any) -> 'GeoLocation':
 482        assert isinstance(obj, dict)
 483        latitude = from_str(obj.get("latitude"))
 484        longitude = from_str(obj.get("longitude"))
 485        return GeoLocation(latitude, longitude)
 486
 487    def to_dict(self) -> dict:
 488        result: dict = {}
 489        result["latitude"] = from_str(self.latitude)
 490        result["longitude"] = from_str(self.longitude)
 491        return result
 492
 493
 494class CdrLocation:
 495    address: str
 496    city: str
 497    connector_format: ConnectorFormat
 498    connector_id: str
 499    connector_power_type: PowerType
 500    connector_standard: ConnectorType
 501    coordinates: GeoLocation
 502    country: str
 503    evse_id: str
 504    evse_uid: str
 505    id: str
 506    name: Optional[str]
 507    postal_code: Optional[str]
 508    state: Optional[str]
 509
 510    def __init__(self, address: str, city: str, connector_format: ConnectorFormat, connector_id: str, connector_power_type: PowerType, connector_standard: ConnectorType, coordinates: GeoLocation, country: str, evse_id: str, evse_uid: str, id: str, name: Optional[str], postal_code: Optional[str], state: Optional[str]) -> None:
 511        self.address = address
 512        self.city = city
 513        self.connector_format = connector_format
 514        self.connector_id = connector_id
 515        self.connector_power_type = connector_power_type
 516        self.connector_standard = connector_standard
 517        self.coordinates = coordinates
 518        self.country = country
 519        self.evse_id = evse_id
 520        self.evse_uid = evse_uid
 521        self.id = id
 522        self.name = name
 523        self.postal_code = postal_code
 524        self.state = state
 525
 526    @staticmethod
 527    def from_dict(obj: Any) -> 'CdrLocation':
 528        assert isinstance(obj, dict)
 529        address = from_str(obj.get("address"))
 530        city = from_str(obj.get("city"))
 531        connector_format = ConnectorFormat(obj.get("connector_format"))
 532        connector_id = from_str(obj.get("connector_id"))
 533        connector_power_type = PowerType(obj.get("connector_power_type"))
 534        connector_standard = ConnectorType(obj.get("connector_standard"))
 535        coordinates = GeoLocation.from_dict(obj.get("coordinates"))
 536        country = from_str(obj.get("country"))
 537        evse_id = from_str(obj.get("evse_id"))
 538        evse_uid = from_str(obj.get("evse_uid"))
 539        id = from_str(obj.get("id"))
 540        name = from_union([from_none, from_str], obj.get("name"))
 541        postal_code = from_union([from_none, from_str], obj.get("postal_code"))
 542        state = from_union([from_none, from_str], obj.get("state"))
 543        return CdrLocation(address, city, connector_format, connector_id, connector_power_type, connector_standard, coordinates, country, evse_id, evse_uid, id, name, postal_code, state)
 544
 545    def to_dict(self) -> dict:
 546        result: dict = {}
 547        result["address"] = from_str(self.address)
 548        result["city"] = from_str(self.city)
 549        result["connector_format"] = to_enum(ConnectorFormat, self.connector_format)
 550        result["connector_id"] = from_str(self.connector_id)
 551        result["connector_power_type"] = to_enum(PowerType, self.connector_power_type)
 552        result["connector_standard"] = to_enum(ConnectorType, self.connector_standard)
 553        result["coordinates"] = to_class(GeoLocation, self.coordinates)
 554        result["country"] = from_str(self.country)
 555        result["evse_id"] = from_str(self.evse_id)
 556        result["evse_uid"] = from_str(self.evse_uid)
 557        result["id"] = from_str(self.id)
 558        if self.name is not None:
 559            result["name"] = from_union([from_none, from_str], self.name)
 560        if self.postal_code is not None:
 561            result["postal_code"] = from_union([from_none, from_str], self.postal_code)
 562        if self.state is not None:
 563            result["state"] = from_union([from_none, from_str], self.state)
 564        return result
 565
 566
 567class CdrToken:
 568    contract_id: str
 569    country_code: str
 570    party_id: str
 571    type: TokenType
 572    uid: str
 573
 574    def __init__(self, contract_id: str, country_code: str, party_id: str, type: TokenType, uid: str) -> None:
 575        self.contract_id = contract_id
 576        self.country_code = country_code
 577        self.party_id = party_id
 578        self.type = type
 579        self.uid = uid
 580
 581    @staticmethod
 582    def from_dict(obj: Any) -> 'CdrToken':
 583        assert isinstance(obj, dict)
 584        contract_id = from_str(obj.get("contract_id"))
 585        country_code = from_str(obj.get("country_code"))
 586        party_id = from_str(obj.get("party_id"))
 587        type = TokenType(obj.get("type"))
 588        uid = from_str(obj.get("uid"))
 589        return CdrToken(contract_id, country_code, party_id, type, uid)
 590
 591    def to_dict(self) -> dict:
 592        result: dict = {}
 593        result["contract_id"] = from_str(self.contract_id)
 594        result["country_code"] = from_str(self.country_code)
 595        result["party_id"] = from_str(self.party_id)
 596        result["type"] = to_enum(TokenType, self.type)
 597        result["uid"] = from_str(self.uid)
 598        return result
 599
 600
 601class CdrDimensionType(Enum):
 602    CURRENT = "CURRENT"
 603    ENERGY = "ENERGY"
 604    ENERGY_EXPORT = "ENERGY_EXPORT"
 605    ENERGY_IMPORT = "ENERGY_IMPORT"
 606    MAX_CURRENT = "MAX_CURRENT"
 607    MAX_POWER = "MAX_POWER"
 608    MIN_CURRENT = "MIN_CURRENT"
 609    MIN_POWER = "MIN_POWER"
 610    PARKING_TIME = "PARKING_TIME"
 611    POWER = "POWER"
 612    RESERVATION_TIME = "RESERVATION_TIME"
 613    STATE_OF_CHARGE = "STATE_OF_CHARGE"
 614    TIME = "TIME"
 615
 616
 617class CdrDimension:
 618    type: CdrDimensionType
 619    volume: float
 620
 621    def __init__(self, type: CdrDimensionType, volume: float) -> None:
 622        self.type = type
 623        self.volume = volume
 624
 625    @staticmethod
 626    def from_dict(obj: Any) -> 'CdrDimension':
 627        assert isinstance(obj, dict)
 628        type = CdrDimensionType(obj.get("type"))
 629        volume = from_float(obj.get("volume"))
 630        return CdrDimension(type, volume)
 631
 632    def to_dict(self) -> dict:
 633        result: dict = {}
 634        result["type"] = to_enum(CdrDimensionType, self.type)
 635        result["volume"] = to_float(self.volume)
 636        return result
 637
 638
 639class ChargingPeriod:
 640    dimensions: List[CdrDimension]
 641    start_date_time: str
 642    tariff_id: Optional[str]
 643
 644    def __init__(self, dimensions: List[CdrDimension], start_date_time: str, tariff_id: Optional[str]) -> None:
 645        self.dimensions = dimensions
 646        self.start_date_time = start_date_time
 647        self.tariff_id = tariff_id
 648
 649    @staticmethod
 650    def from_dict(obj: Any) -> 'ChargingPeriod':
 651        assert isinstance(obj, dict)
 652        dimensions = from_list(CdrDimension.from_dict, obj.get("dimensions"))
 653        start_date_time = from_str(obj.get("start_date_time"))
 654        tariff_id = from_union([from_none, from_str], obj.get("tariff_id"))
 655        return ChargingPeriod(dimensions, start_date_time, tariff_id)
 656
 657    def to_dict(self) -> dict:
 658        result: dict = {}
 659        result["dimensions"] = from_list(lambda x: to_class(CdrDimension, x), self.dimensions)
 660        result["start_date_time"] = from_str(self.start_date_time)
 661        if self.tariff_id is not None:
 662            result["tariff_id"] = from_union([from_none, from_str], self.tariff_id)
 663        return result
 664
 665
 666class SignedValue:
 667    nature: str
 668    plain_data: str
 669    signed_data: str
 670
 671    def __init__(self, nature: str, plain_data: str, signed_data: str) -> None:
 672        self.nature = nature
 673        self.plain_data = plain_data
 674        self.signed_data = signed_data
 675
 676    @staticmethod
 677    def from_dict(obj: Any) -> 'SignedValue':
 678        assert isinstance(obj, dict)
 679        nature = from_str(obj.get("nature"))
 680        plain_data = from_str(obj.get("plain_data"))
 681        signed_data = from_str(obj.get("signed_data"))
 682        return SignedValue(nature, plain_data, signed_data)
 683
 684    def to_dict(self) -> dict:
 685        result: dict = {}
 686        result["nature"] = from_str(self.nature)
 687        result["plain_data"] = from_str(self.plain_data)
 688        result["signed_data"] = from_str(self.signed_data)
 689        return result
 690
 691
 692class SignedData:
 693    encoding_method: str
 694    encoding_method_version: Optional[int]
 695    public_key: Optional[str]
 696    signed_values: List[SignedValue]
 697    url: Optional[str]
 698
 699    def __init__(self, encoding_method: str, encoding_method_version: Optional[int], public_key: Optional[str], signed_values: List[SignedValue], url: Optional[str]) -> None:
 700        self.encoding_method = encoding_method
 701        self.encoding_method_version = encoding_method_version
 702        self.public_key = public_key
 703        self.signed_values = signed_values
 704        self.url = url
 705
 706    @staticmethod
 707    def from_dict(obj: Any) -> 'SignedData':
 708        assert isinstance(obj, dict)
 709        encoding_method = from_str(obj.get("encoding_method"))
 710        encoding_method_version = from_union([from_none, from_int], obj.get("encoding_method_version"))
 711        public_key = from_union([from_none, from_str], obj.get("public_key"))
 712        signed_values = from_list(SignedValue.from_dict, obj.get("signed_values"))
 713        url = from_union([from_none, from_str], obj.get("url"))
 714        return SignedData(encoding_method, encoding_method_version, public_key, signed_values, url)
 715
 716    def to_dict(self) -> dict:
 717        result: dict = {}
 718        result["encoding_method"] = from_str(self.encoding_method)
 719        if self.encoding_method_version is not None:
 720            result["encoding_method_version"] = from_union([from_none, from_int], self.encoding_method_version)
 721        if self.public_key is not None:
 722            result["public_key"] = from_union([from_none, from_str], self.public_key)
 723        result["signed_values"] = from_list(lambda x: to_class(SignedValue, x), self.signed_values)
 724        if self.url is not None:
 725            result["url"] = from_union([from_none, from_str], self.url)
 726        return result
 727
 728
 729class TariffDimensionType(Enum):
 730    ENERGY = "ENERGY"
 731    FLAT = "FLAT"
 732    PARKING_TIME = "PARKING_TIME"
 733    TIME = "TIME"
 734
 735
 736class PriceComponent:
 737    price: float
 738    step_size: int
 739    type: TariffDimensionType
 740    vat: Optional[float]
 741
 742    def __init__(self, price: float, step_size: int, type: TariffDimensionType, vat: Optional[float]) -> None:
 743        self.price = price
 744        self.step_size = step_size
 745        self.type = type
 746        self.vat = vat
 747
 748    @staticmethod
 749    def from_dict(obj: Any) -> 'PriceComponent':
 750        assert isinstance(obj, dict)
 751        price = from_float(obj.get("price"))
 752        step_size = from_int(obj.get("step_size"))
 753        type = TariffDimensionType(obj.get("type"))
 754        vat = from_union([from_none, from_float], obj.get("vat"))
 755        return PriceComponent(price, step_size, type, vat)
 756
 757    def to_dict(self) -> dict:
 758        result: dict = {}
 759        result["price"] = to_float(self.price)
 760        result["step_size"] = from_int(self.step_size)
 761        result["type"] = to_enum(TariffDimensionType, self.type)
 762        if self.vat is not None:
 763            result["vat"] = from_union([from_none, to_float], self.vat)
 764        return result
 765
 766
 767class DayOfWeek(Enum):
 768    FRIDAY = "FRIDAY"
 769    MONDAY = "MONDAY"
 770    SATURDAY = "SATURDAY"
 771    SUNDAY = "SUNDAY"
 772    THURSDAY = "THURSDAY"
 773    TUESDAY = "TUESDAY"
 774    WEDNESDAY = "WEDNESDAY"
 775
 776
 777class ReservationRestrictionType(Enum):
 778    RESERVATION = "RESERVATION"
 779    RESERVATION_EXPIRES = "RESERVATION_EXPIRES"
 780
 781
 782class TariffRestrictions:
 783    day_of_week: Optional[List[DayOfWeek]]
 784    end_date: Optional[str]
 785    end_time: Optional[str]
 786    max_current: Optional[float]
 787    max_duration: Optional[int]
 788    max_kwh: Optional[float]
 789    max_power: Optional[float]
 790    min_current: Optional[float]
 791    min_duration: Optional[int]
 792    min_kwh: Optional[float]
 793    min_power: Optional[float]
 794    reservation: Optional[ReservationRestrictionType]
 795    start_date: Optional[str]
 796    start_time: Optional[str]
 797
 798    def __init__(self, day_of_week: Optional[List[DayOfWeek]], end_date: Optional[str], end_time: Optional[str], max_current: Optional[float], max_duration: Optional[int], max_kwh: Optional[float], max_power: Optional[float], min_current: Optional[float], min_duration: Optional[int], min_kwh: Optional[float], min_power: Optional[float], reservation: Optional[ReservationRestrictionType], start_date: Optional[str], start_time: Optional[str]) -> None:
 799        self.day_of_week = day_of_week
 800        self.end_date = end_date
 801        self.end_time = end_time
 802        self.max_current = max_current
 803        self.max_duration = max_duration
 804        self.max_kwh = max_kwh
 805        self.max_power = max_power
 806        self.min_current = min_current
 807        self.min_duration = min_duration
 808        self.min_kwh = min_kwh
 809        self.min_power = min_power
 810        self.reservation = reservation
 811        self.start_date = start_date
 812        self.start_time = start_time
 813
 814    @staticmethod
 815    def from_dict(obj: Any) -> 'TariffRestrictions':
 816        assert isinstance(obj, dict)
 817        day_of_week = from_union([from_none, lambda x: from_list(DayOfWeek, x)], obj.get("day_of_week"))
 818        end_date = from_union([from_none, from_str], obj.get("end_date"))
 819        end_time = from_union([from_none, from_str], obj.get("end_time"))
 820        max_current = from_union([from_none, from_float], obj.get("max_current"))
 821        max_duration = from_union([from_none, from_int], obj.get("max_duration"))
 822        max_kwh = from_union([from_none, from_float], obj.get("max_kwh"))
 823        max_power = from_union([from_none, from_float], obj.get("max_power"))
 824        min_current = from_union([from_none, from_float], obj.get("min_current"))
 825        min_duration = from_union([from_none, from_int], obj.get("min_duration"))
 826        min_kwh = from_union([from_none, from_float], obj.get("min_kwh"))
 827        min_power = from_union([from_none, from_float], obj.get("min_power"))
 828        reservation = from_union([from_none, ReservationRestrictionType], obj.get("reservation"))
 829        start_date = from_union([from_none, from_str], obj.get("start_date"))
 830        start_time = from_union([from_none, from_str], obj.get("start_time"))
 831        return TariffRestrictions(day_of_week, end_date, end_time, max_current, max_duration, max_kwh, max_power, min_current, min_duration, min_kwh, min_power, reservation, start_date, start_time)
 832
 833    def to_dict(self) -> dict:
 834        result: dict = {}
 835        if self.day_of_week is not None:
 836            result["day_of_week"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(DayOfWeek, x), x)], self.day_of_week)
 837        if self.end_date is not None:
 838            result["end_date"] = from_union([from_none, from_str], self.end_date)
 839        if self.end_time is not None:
 840            result["end_time"] = from_union([from_none, from_str], self.end_time)
 841        if self.max_current is not None:
 842            result["max_current"] = from_union([from_none, to_float], self.max_current)
 843        if self.max_duration is not None:
 844            result["max_duration"] = from_union([from_none, from_int], self.max_duration)
 845        if self.max_kwh is not None:
 846            result["max_kwh"] = from_union([from_none, to_float], self.max_kwh)
 847        if self.max_power is not None:
 848            result["max_power"] = from_union([from_none, to_float], self.max_power)
 849        if self.min_current is not None:
 850            result["min_current"] = from_union([from_none, to_float], self.min_current)
 851        if self.min_duration is not None:
 852            result["min_duration"] = from_union([from_none, from_int], self.min_duration)
 853        if self.min_kwh is not None:
 854            result["min_kwh"] = from_union([from_none, to_float], self.min_kwh)
 855        if self.min_power is not None:
 856            result["min_power"] = from_union([from_none, to_float], self.min_power)
 857        if self.reservation is not None:
 858            result["reservation"] = from_union([from_none, lambda x: to_enum(ReservationRestrictionType, x)], self.reservation)
 859        if self.start_date is not None:
 860            result["start_date"] = from_union([from_none, from_str], self.start_date)
 861        if self.start_time is not None:
 862            result["start_time"] = from_union([from_none, from_str], self.start_time)
 863        return result
 864
 865
 866class TariffElement:
 867    price_components: List[PriceComponent]
 868    restrictions: Optional[TariffRestrictions]
 869
 870    def __init__(self, price_components: List[PriceComponent], restrictions: Optional[TariffRestrictions]) -> None:
 871        self.price_components = price_components
 872        self.restrictions = restrictions
 873
 874    @staticmethod
 875    def from_dict(obj: Any) -> 'TariffElement':
 876        assert isinstance(obj, dict)
 877        price_components = from_list(PriceComponent.from_dict, obj.get("price_components"))
 878        restrictions = from_union([from_none, TariffRestrictions.from_dict], obj.get("restrictions"))
 879        return TariffElement(price_components, restrictions)
 880
 881    def to_dict(self) -> dict:
 882        result: dict = {}
 883        result["price_components"] = from_list(lambda x: to_class(PriceComponent, x), self.price_components)
 884        if self.restrictions is not None:
 885            result["restrictions"] = from_union([from_none, lambda x: to_class(TariffRestrictions, x)], self.restrictions)
 886        return result
 887
 888
 889class EnergySourceCategory(Enum):
 890    COAL = "COAL"
 891    GAS = "GAS"
 892    GENERAL_FOSSIL = "GENERAL_FOSSIL"
 893    GENERAL_GREEN = "GENERAL_GREEN"
 894    NUCLEAR = "NUCLEAR"
 895    SOLAR = "SOLAR"
 896    WATER = "WATER"
 897    WIND = "WIND"
 898
 899
 900class EnergySource:
 901    percentage: float
 902    source: EnergySourceCategory
 903
 904    def __init__(self, percentage: float, source: EnergySourceCategory) -> None:
 905        self.percentage = percentage
 906        self.source = source
 907
 908    @staticmethod
 909    def from_dict(obj: Any) -> 'EnergySource':
 910        assert isinstance(obj, dict)
 911        percentage = from_float(obj.get("percentage"))
 912        source = EnergySourceCategory(obj.get("source"))
 913        return EnergySource(percentage, source)
 914
 915    def to_dict(self) -> dict:
 916        result: dict = {}
 917        result["percentage"] = to_float(self.percentage)
 918        result["source"] = to_enum(EnergySourceCategory, self.source)
 919        return result
 920
 921
 922class EnvironmentalImpactCategory(Enum):
 923    CARBON_DIOXIDE = "CARBON_DIOXIDE"
 924    NUCLEAR_WASTE = "NUCLEAR_WASTE"
 925
 926
 927class EnvironmentalImpact:
 928    amount: float
 929    category: EnvironmentalImpactCategory
 930
 931    def __init__(self, amount: float, category: EnvironmentalImpactCategory) -> None:
 932        self.amount = amount
 933        self.category = category
 934
 935    @staticmethod
 936    def from_dict(obj: Any) -> 'EnvironmentalImpact':
 937        assert isinstance(obj, dict)
 938        amount = from_float(obj.get("amount"))
 939        category = EnvironmentalImpactCategory(obj.get("category"))
 940        return EnvironmentalImpact(amount, category)
 941
 942    def to_dict(self) -> dict:
 943        result: dict = {}
 944        result["amount"] = to_float(self.amount)
 945        result["category"] = to_enum(EnvironmentalImpactCategory, self.category)
 946        return result
 947
 948
 949class EnergyMix:
 950    energy_product_name: Optional[str]
 951    energy_sources: Optional[List[EnergySource]]
 952    environ_impact: Optional[List[EnvironmentalImpact]]
 953    is_green_energy: bool
 954    supplier_name: Optional[str]
 955
 956    def __init__(self, energy_product_name: Optional[str], energy_sources: Optional[List[EnergySource]], environ_impact: Optional[List[EnvironmentalImpact]], is_green_energy: bool, supplier_name: Optional[str]) -> None:
 957        self.energy_product_name = energy_product_name
 958        self.energy_sources = energy_sources
 959        self.environ_impact = environ_impact
 960        self.is_green_energy = is_green_energy
 961        self.supplier_name = supplier_name
 962
 963    @staticmethod
 964    def from_dict(obj: Any) -> 'EnergyMix':
 965        assert isinstance(obj, dict)
 966        energy_product_name = from_union([from_none, from_str], obj.get("energy_product_name"))
 967        energy_sources = from_union([from_none, lambda x: from_list(EnergySource.from_dict, x)], obj.get("energy_sources"))
 968        environ_impact = from_union([from_none, lambda x: from_list(EnvironmentalImpact.from_dict, x)], obj.get("environ_impact"))
 969        is_green_energy = from_bool(obj.get("is_green_energy"))
 970        supplier_name = from_union([from_none, from_str], obj.get("supplier_name"))
 971        return EnergyMix(energy_product_name, energy_sources, environ_impact, is_green_energy, supplier_name)
 972
 973    def to_dict(self) -> dict:
 974        result: dict = {}
 975        if self.energy_product_name is not None:
 976            result["energy_product_name"] = from_union([from_none, from_str], self.energy_product_name)
 977        if self.energy_sources is not None:
 978            result["energy_sources"] = from_union([from_none, lambda x: from_list(lambda x: to_class(EnergySource, x), x)], self.energy_sources)
 979        if self.environ_impact is not None:
 980            result["environ_impact"] = from_union([from_none, lambda x: from_list(lambda x: to_class(EnvironmentalImpact, x), x)], self.environ_impact)
 981        result["is_green_energy"] = from_bool(self.is_green_energy)
 982        if self.supplier_name is not None:
 983            result["supplier_name"] = from_union([from_none, from_str], self.supplier_name)
 984        return result
 985
 986
 987class Price:
 988    excl_vat: float
 989    incl_vat: Optional[float]
 990
 991    def __init__(self, excl_vat: float, incl_vat: Optional[float]) -> None:
 992        self.excl_vat = excl_vat
 993        self.incl_vat = incl_vat
 994
 995    @staticmethod
 996    def from_dict(obj: Any) -> 'Price':
 997        assert isinstance(obj, dict)
 998        excl_vat = from_float(obj.get("excl_vat"))
 999        incl_vat = from_union([from_none, from_float], obj.get("incl_vat"))
1000        return Price(excl_vat, incl_vat)
1001
1002    def to_dict(self) -> dict:
1003        result: dict = {}
1004        result["excl_vat"] = to_float(self.excl_vat)
1005        if self.incl_vat is not None:
1006            result["incl_vat"] = from_union([from_none, to_float], self.incl_vat)
1007        return result
1008
1009
1010class TariffType(Enum):
1011    AD_HOC_PAYMENT = "AD_HOC_PAYMENT"
1012    PROFILE_CHEAP = "PROFILE_CHEAP"
1013    PROFILE_FAST = "PROFILE_FAST"
1014    PROFILE_GREEN = "PROFILE_GREEN"
1015    REGULAR = "REGULAR"
1016
1017
1018class Tariff:
1019    country_code: str
1020    currency: str
1021    elements: List[TariffElement]
1022    end_date_time: Optional[str]
1023    energy_mix: Optional[EnergyMix]
1024    id: str
1025    last_updated: str
1026    max_price: Optional[Price]
1027    min_price: Optional[Price]
1028    party_id: str
1029    start_date_time: Optional[str]
1030    tariff_alt_text: Optional[List[DisplayText]]
1031    tariff_alt_url: Optional[str]
1032    type: Optional[TariffType]
1033
1034    def __init__(self, country_code: str, currency: str, elements: List[TariffElement], end_date_time: Optional[str], energy_mix: Optional[EnergyMix], id: str, last_updated: str, max_price: Optional[Price], min_price: Optional[Price], party_id: str, start_date_time: Optional[str], tariff_alt_text: Optional[List[DisplayText]], tariff_alt_url: Optional[str], type: Optional[TariffType]) -> None:
1035        self.country_code = country_code
1036        self.currency = currency
1037        self.elements = elements
1038        self.end_date_time = end_date_time
1039        self.energy_mix = energy_mix
1040        self.id = id
1041        self.last_updated = last_updated
1042        self.max_price = max_price
1043        self.min_price = min_price
1044        self.party_id = party_id
1045        self.start_date_time = start_date_time
1046        self.tariff_alt_text = tariff_alt_text
1047        self.tariff_alt_url = tariff_alt_url
1048        self.type = type
1049
1050    @staticmethod
1051    def from_dict(obj: Any) -> 'Tariff':
1052        assert isinstance(obj, dict)
1053        country_code = from_str(obj.get("country_code"))
1054        currency = from_str(obj.get("currency"))
1055        elements = from_list(TariffElement.from_dict, obj.get("elements"))
1056        end_date_time = from_union([from_none, from_str], obj.get("end_date_time"))
1057        energy_mix = from_union([from_none, EnergyMix.from_dict], obj.get("energy_mix"))
1058        id = from_str(obj.get("id"))
1059        last_updated = from_str(obj.get("last_updated"))
1060        max_price = from_union([from_none, Price.from_dict], obj.get("max_price"))
1061        min_price = from_union([from_none, Price.from_dict], obj.get("min_price"))
1062        party_id = from_str(obj.get("party_id"))
1063        start_date_time = from_union([from_none, from_str], obj.get("start_date_time"))
1064        tariff_alt_text = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("tariff_alt_text"))
1065        tariff_alt_url = from_union([from_none, from_str], obj.get("tariff_alt_url"))
1066        type = from_union([from_none, TariffType], obj.get("type"))
1067        return Tariff(country_code, currency, elements, end_date_time, energy_mix, id, last_updated, max_price, min_price, party_id, start_date_time, tariff_alt_text, tariff_alt_url, type)
1068
1069    def to_dict(self) -> dict:
1070        result: dict = {}
1071        result["country_code"] = from_str(self.country_code)
1072        result["currency"] = from_str(self.currency)
1073        result["elements"] = from_list(lambda x: to_class(TariffElement, x), self.elements)
1074        if self.end_date_time is not None:
1075            result["end_date_time"] = from_union([from_none, from_str], self.end_date_time)
1076        if self.energy_mix is not None:
1077            result["energy_mix"] = from_union([from_none, lambda x: to_class(EnergyMix, x)], self.energy_mix)
1078        result["id"] = from_str(self.id)
1079        result["last_updated"] = from_str(self.last_updated)
1080        if self.max_price is not None:
1081            result["max_price"] = from_union([from_none, lambda x: to_class(Price, x)], self.max_price)
1082        if self.min_price is not None:
1083            result["min_price"] = from_union([from_none, lambda x: to_class(Price, x)], self.min_price)
1084        result["party_id"] = from_str(self.party_id)
1085        if self.start_date_time is not None:
1086            result["start_date_time"] = from_union([from_none, from_str], self.start_date_time)
1087        if self.tariff_alt_text is not None:
1088            result["tariff_alt_text"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.tariff_alt_text)
1089        if self.tariff_alt_url is not None:
1090            result["tariff_alt_url"] = from_union([from_none, from_str], self.tariff_alt_url)
1091        if self.type is not None:
1092            result["type"] = from_union([from_none, lambda x: to_enum(TariffType, x)], self.type)
1093        return result
1094
1095
1096class Cdr:
1097    auth_method: AuthMethod
1098    authorization_reference: Optional[str]
1099    cdr_location: CdrLocation
1100    cdr_token: CdrToken
1101    charging_periods: List[ChargingPeriod]
1102    country_code: str
1103    credit: Optional[bool]
1104    credit_reference_id: Optional[str]
1105    currency: str
1106    end_date_time: str
1107    home_charging_compensation: Optional[bool]
1108    id: str
1109    invoice_reference_id: Optional[str]
1110    last_updated: str
1111    meter_id: Optional[str]
1112    party_id: str
1113    remark: Optional[str]
1114    session_id: Optional[str]
1115    signed_data: Optional[SignedData]
1116    start_date_time: str
1117    tariffs: Optional[List[Tariff]]
1118    total_cost: Price
1119    total_energy: float
1120    total_energy_cost: Optional[Price]
1121    total_fixed_cost: Optional[Price]
1122    total_parking_cost: Optional[Price]
1123    total_parking_time: Optional[float]
1124    total_reservation_cost: Optional[Price]
1125    total_time: float
1126    total_time_cost: Optional[Price]
1127
1128    def __init__(self, auth_method: AuthMethod, authorization_reference: Optional[str], cdr_location: CdrLocation, cdr_token: CdrToken, charging_periods: List[ChargingPeriod], country_code: str, credit: Optional[bool], credit_reference_id: Optional[str], currency: str, end_date_time: str, home_charging_compensation: Optional[bool], id: str, invoice_reference_id: Optional[str], last_updated: str, meter_id: Optional[str], party_id: str, remark: Optional[str], session_id: Optional[str], signed_data: Optional[SignedData], start_date_time: str, tariffs: Optional[List[Tariff]], total_cost: Price, total_energy: float, total_energy_cost: Optional[Price], total_fixed_cost: Optional[Price], total_parking_cost: Optional[Price], total_parking_time: Optional[float], total_reservation_cost: Optional[Price], total_time: float, total_time_cost: Optional[Price]) -> None:
1129        self.auth_method = auth_method
1130        self.authorization_reference = authorization_reference
1131        self.cdr_location = cdr_location
1132        self.cdr_token = cdr_token
1133        self.charging_periods = charging_periods
1134        self.country_code = country_code
1135        self.credit = credit
1136        self.credit_reference_id = credit_reference_id
1137        self.currency = currency
1138        self.end_date_time = end_date_time
1139        self.home_charging_compensation = home_charging_compensation
1140        self.id = id
1141        self.invoice_reference_id = invoice_reference_id
1142        self.last_updated = last_updated
1143        self.meter_id = meter_id
1144        self.party_id = party_id
1145        self.remark = remark
1146        self.session_id = session_id
1147        self.signed_data = signed_data
1148        self.start_date_time = start_date_time
1149        self.tariffs = tariffs
1150        self.total_cost = total_cost
1151        self.total_energy = total_energy
1152        self.total_energy_cost = total_energy_cost
1153        self.total_fixed_cost = total_fixed_cost
1154        self.total_parking_cost = total_parking_cost
1155        self.total_parking_time = total_parking_time
1156        self.total_reservation_cost = total_reservation_cost
1157        self.total_time = total_time
1158        self.total_time_cost = total_time_cost
1159
1160    @staticmethod
1161    def from_dict(obj: Any) -> 'Cdr':
1162        assert isinstance(obj, dict)
1163        auth_method = AuthMethod(obj.get("auth_method"))
1164        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
1165        cdr_location = CdrLocation.from_dict(obj.get("cdr_location"))
1166        cdr_token = CdrToken.from_dict(obj.get("cdr_token"))
1167        charging_periods = from_list(ChargingPeriod.from_dict, obj.get("charging_periods"))
1168        country_code = from_str(obj.get("country_code"))
1169        credit = from_union([from_none, from_bool], obj.get("credit"))
1170        credit_reference_id = from_union([from_none, from_str], obj.get("credit_reference_id"))
1171        currency = from_str(obj.get("currency"))
1172        end_date_time = from_str(obj.get("end_date_time"))
1173        home_charging_compensation = from_union([from_none, from_bool], obj.get("home_charging_compensation"))
1174        id = from_str(obj.get("id"))
1175        invoice_reference_id = from_union([from_none, from_str], obj.get("invoice_reference_id"))
1176        last_updated = from_str(obj.get("last_updated"))
1177        meter_id = from_union([from_none, from_str], obj.get("meter_id"))
1178        party_id = from_str(obj.get("party_id"))
1179        remark = from_union([from_none, from_str], obj.get("remark"))
1180        session_id = from_union([from_none, from_str], obj.get("session_id"))
1181        signed_data = from_union([from_none, SignedData.from_dict], obj.get("signed_data"))
1182        start_date_time = from_str(obj.get("start_date_time"))
1183        tariffs = from_union([from_none, lambda x: from_list(Tariff.from_dict, x)], obj.get("tariffs"))
1184        total_cost = Price.from_dict(obj.get("total_cost"))
1185        total_energy = from_float(obj.get("total_energy"))
1186        total_energy_cost = from_union([from_none, Price.from_dict], obj.get("total_energy_cost"))
1187        total_fixed_cost = from_union([from_none, Price.from_dict], obj.get("total_fixed_cost"))
1188        total_parking_cost = from_union([from_none, Price.from_dict], obj.get("total_parking_cost"))
1189        total_parking_time = from_union([from_none, from_float], obj.get("total_parking_time"))
1190        total_reservation_cost = from_union([from_none, Price.from_dict], obj.get("total_reservation_cost"))
1191        total_time = from_float(obj.get("total_time"))
1192        total_time_cost = from_union([from_none, Price.from_dict], obj.get("total_time_cost"))
1193        return Cdr(auth_method, authorization_reference, cdr_location, cdr_token, charging_periods, country_code, credit, credit_reference_id, currency, end_date_time, home_charging_compensation, id, invoice_reference_id, last_updated, meter_id, party_id, remark, session_id, signed_data, start_date_time, tariffs, total_cost, total_energy, total_energy_cost, total_fixed_cost, total_parking_cost, total_parking_time, total_reservation_cost, total_time, total_time_cost)
1194
1195    def to_dict(self) -> dict:
1196        result: dict = {}
1197        result["auth_method"] = to_enum(AuthMethod, self.auth_method)
1198        if self.authorization_reference is not None:
1199            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
1200        result["cdr_location"] = to_class(CdrLocation, self.cdr_location)
1201        result["cdr_token"] = to_class(CdrToken, self.cdr_token)
1202        result["charging_periods"] = from_list(lambda x: to_class(ChargingPeriod, x), self.charging_periods)
1203        result["country_code"] = from_str(self.country_code)
1204        if self.credit is not None:
1205            result["credit"] = from_union([from_none, from_bool], self.credit)
1206        if self.credit_reference_id is not None:
1207            result["credit_reference_id"] = from_union([from_none, from_str], self.credit_reference_id)
1208        result["currency"] = from_str(self.currency)
1209        result["end_date_time"] = from_str(self.end_date_time)
1210        if self.home_charging_compensation is not None:
1211            result["home_charging_compensation"] = from_union([from_none, from_bool], self.home_charging_compensation)
1212        result["id"] = from_str(self.id)
1213        if self.invoice_reference_id is not None:
1214            result["invoice_reference_id"] = from_union([from_none, from_str], self.invoice_reference_id)
1215        result["last_updated"] = from_str(self.last_updated)
1216        if self.meter_id is not None:
1217            result["meter_id"] = from_union([from_none, from_str], self.meter_id)
1218        result["party_id"] = from_str(self.party_id)
1219        if self.remark is not None:
1220            result["remark"] = from_union([from_none, from_str], self.remark)
1221        if self.session_id is not None:
1222            result["session_id"] = from_union([from_none, from_str], self.session_id)
1223        if self.signed_data is not None:
1224            result["signed_data"] = from_union([from_none, lambda x: to_class(SignedData, x)], self.signed_data)
1225        result["start_date_time"] = from_str(self.start_date_time)
1226        if self.tariffs is not None:
1227            result["tariffs"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Tariff, x), x)], self.tariffs)
1228        result["total_cost"] = to_class(Price, self.total_cost)
1229        result["total_energy"] = to_float(self.total_energy)
1230        if self.total_energy_cost is not None:
1231            result["total_energy_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_energy_cost)
1232        if self.total_fixed_cost is not None:
1233            result["total_fixed_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_fixed_cost)
1234        if self.total_parking_cost is not None:
1235            result["total_parking_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_parking_cost)
1236        if self.total_parking_time is not None:
1237            result["total_parking_time"] = from_union([from_none, to_float], self.total_parking_time)
1238        if self.total_reservation_cost is not None:
1239            result["total_reservation_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_reservation_cost)
1240        result["total_time"] = to_float(self.total_time)
1241        if self.total_time_cost is not None:
1242            result["total_time_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_time_cost)
1243        return result
1244
1245
1246class ChargingPreferences:
1247    departure_time: Optional[str]
1248    discharge_allowed: Optional[bool]
1249    energy_need: Optional[float]
1250    profile_type: ProfileType
1251
1252    def __init__(self, departure_time: Optional[str], discharge_allowed: Optional[bool], energy_need: Optional[float], profile_type: ProfileType) -> None:
1253        self.departure_time = departure_time
1254        self.discharge_allowed = discharge_allowed
1255        self.energy_need = energy_need
1256        self.profile_type = profile_type
1257
1258    @staticmethod
1259    def from_dict(obj: Any) -> 'ChargingPreferences':
1260        assert isinstance(obj, dict)
1261        departure_time = from_union([from_none, from_str], obj.get("departure_time"))
1262        discharge_allowed = from_union([from_none, from_bool], obj.get("discharge_allowed"))
1263        energy_need = from_union([from_none, from_float], obj.get("energy_need"))
1264        profile_type = ProfileType(obj.get("profile_type"))
1265        return ChargingPreferences(departure_time, discharge_allowed, energy_need, profile_type)
1266
1267    def to_dict(self) -> dict:
1268        result: dict = {}
1269        if self.departure_time is not None:
1270            result["departure_time"] = from_union([from_none, from_str], self.departure_time)
1271        if self.discharge_allowed is not None:
1272            result["discharge_allowed"] = from_union([from_none, from_bool], self.discharge_allowed)
1273        if self.energy_need is not None:
1274            result["energy_need"] = from_union([from_none, to_float], self.energy_need)
1275        result["profile_type"] = to_enum(ProfileType, self.profile_type)
1276        return result
1277
1278
1279class ChargingProfileResponseType(Enum):
1280    ACCEPTED = "ACCEPTED"
1281    NOT_SUPPORTED = "NOT_SUPPORTED"
1282    REJECTED = "REJECTED"
1283    TOO_OFTEN = "TOO_OFTEN"
1284    UNKNOWN_SESSION = "UNKNOWN_SESSION"
1285
1286
1287class ChargingProfileResponse:
1288    result: ChargingProfileResponseType
1289    timeout: int
1290
1291    def __init__(self, result: ChargingProfileResponseType, timeout: int) -> None:
1292        self.result = result
1293        self.timeout = timeout
1294
1295    @staticmethod
1296    def from_dict(obj: Any) -> 'ChargingProfileResponse':
1297        assert isinstance(obj, dict)
1298        result = ChargingProfileResponseType(obj.get("result"))
1299        timeout = from_int(obj.get("timeout"))
1300        return ChargingProfileResponse(result, timeout)
1301
1302    def to_dict(self) -> dict:
1303        result: dict = {}
1304        result["result"] = to_enum(ChargingProfileResponseType, self.result)
1305        result["timeout"] = from_int(self.timeout)
1306        return result
1307
1308
1309class ChargingProfileResult:
1310    result: ChargingProfileResultType
1311
1312    def __init__(self, result: ChargingProfileResultType) -> None:
1313        self.result = result
1314
1315    @staticmethod
1316    def from_dict(obj: Any) -> 'ChargingProfileResult':
1317        assert isinstance(obj, dict)
1318        result = ChargingProfileResultType(obj.get("result"))
1319        return ChargingProfileResult(result)
1320
1321    def to_dict(self) -> dict:
1322        result: dict = {}
1323        result["result"] = to_enum(ChargingProfileResultType, self.result)
1324        return result
1325
1326
1327class ClearProfileResult:
1328    result: ChargingProfileResultType
1329
1330    def __init__(self, result: ChargingProfileResultType) -> None:
1331        self.result = result
1332
1333    @staticmethod
1334    def from_dict(obj: Any) -> 'ClearProfileResult':
1335        assert isinstance(obj, dict)
1336        result = ChargingProfileResultType(obj.get("result"))
1337        return ClearProfileResult(result)
1338
1339    def to_dict(self) -> dict:
1340        result: dict = {}
1341        result["result"] = to_enum(ChargingProfileResultType, self.result)
1342        return result
1343
1344
1345class CommandResponseType(Enum):
1346    ACCEPTED = "ACCEPTED"
1347    NOT_SUPPORTED = "NOT_SUPPORTED"
1348    REJECTED = "REJECTED"
1349    UNKNOWN_SESSION = "UNKNOWN_SESSION"
1350
1351
1352class CommandResponse:
1353    message: Optional[List[DisplayText]]
1354    result: CommandResponseType
1355    timeout: int
1356
1357    def __init__(self, message: Optional[List[DisplayText]], result: CommandResponseType, timeout: int) -> None:
1358        self.message = message
1359        self.result = result
1360        self.timeout = timeout
1361
1362    @staticmethod
1363    def from_dict(obj: Any) -> 'CommandResponse':
1364        assert isinstance(obj, dict)
1365        message = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("message"))
1366        result = CommandResponseType(obj.get("result"))
1367        timeout = from_int(obj.get("timeout"))
1368        return CommandResponse(message, result, timeout)
1369
1370    def to_dict(self) -> dict:
1371        result: dict = {}
1372        if self.message is not None:
1373            result["message"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.message)
1374        result["result"] = to_enum(CommandResponseType, self.result)
1375        result["timeout"] = from_int(self.timeout)
1376        return result
1377
1378
1379class CommandResultType(Enum):
1380    ACCEPTED = "ACCEPTED"
1381    CANCELED_RESERVATION = "CANCELED_RESERVATION"
1382    EVSE_INOPERATIVE = "EVSE_INOPERATIVE"
1383    EVSE_OCCUPIED = "EVSE_OCCUPIED"
1384    FAILED = "FAILED"
1385    NOT_SUPPORTED = "NOT_SUPPORTED"
1386    REJECTED = "REJECTED"
1387    TIMEOUT = "TIMEOUT"
1388    UNKNOWN_RESERVATION = "UNKNOWN_RESERVATION"
1389
1390
1391class CommandResult:
1392    message: Optional[List[DisplayText]]
1393    result: CommandResultType
1394
1395    def __init__(self, message: Optional[List[DisplayText]], result: CommandResultType) -> None:
1396        self.message = message
1397        self.result = result
1398
1399    @staticmethod
1400    def from_dict(obj: Any) -> 'CommandResult':
1401        assert isinstance(obj, dict)
1402        message = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("message"))
1403        result = CommandResultType(obj.get("result"))
1404        return CommandResult(message, result)
1405
1406    def to_dict(self) -> dict:
1407        result: dict = {}
1408        if self.message is not None:
1409            result["message"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.message)
1410        result["result"] = to_enum(CommandResultType, self.result)
1411        return result
1412
1413
1414class Connector:
1415    format: ConnectorFormat
1416    id: str
1417    last_updated: str
1418    max_amperage: int
1419    max_electric_power: Optional[int]
1420    max_voltage: int
1421    power_type: PowerType
1422    standard: ConnectorType
1423    tariff_ids: Optional[List[str]]
1424    terms_and_conditions: Optional[str]
1425
1426    def __init__(self, format: ConnectorFormat, id: str, last_updated: str, max_amperage: int, max_electric_power: Optional[int], max_voltage: int, power_type: PowerType, standard: ConnectorType, tariff_ids: Optional[List[str]], terms_and_conditions: Optional[str]) -> None:
1427        self.format = format
1428        self.id = id
1429        self.last_updated = last_updated
1430        self.max_amperage = max_amperage
1431        self.max_electric_power = max_electric_power
1432        self.max_voltage = max_voltage
1433        self.power_type = power_type
1434        self.standard = standard
1435        self.tariff_ids = tariff_ids
1436        self.terms_and_conditions = terms_and_conditions
1437
1438    @staticmethod
1439    def from_dict(obj: Any) -> 'Connector':
1440        assert isinstance(obj, dict)
1441        format = ConnectorFormat(obj.get("format"))
1442        id = from_str(obj.get("id"))
1443        last_updated = from_str(obj.get("last_updated"))
1444        max_amperage = from_int(obj.get("max_amperage"))
1445        max_electric_power = from_union([from_none, from_int], obj.get("max_electric_power"))
1446        max_voltage = from_int(obj.get("max_voltage"))
1447        power_type = PowerType(obj.get("power_type"))
1448        standard = ConnectorType(obj.get("standard"))
1449        tariff_ids = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("tariff_ids"))
1450        terms_and_conditions = from_union([from_none, from_str], obj.get("terms_and_conditions"))
1451        return Connector(format, id, last_updated, max_amperage, max_electric_power, max_voltage, power_type, standard, tariff_ids, terms_and_conditions)
1452
1453    def to_dict(self) -> dict:
1454        result: dict = {}
1455        result["format"] = to_enum(ConnectorFormat, self.format)
1456        result["id"] = from_str(self.id)
1457        result["last_updated"] = from_str(self.last_updated)
1458        result["max_amperage"] = from_int(self.max_amperage)
1459        if self.max_electric_power is not None:
1460            result["max_electric_power"] = from_union([from_none, from_int], self.max_electric_power)
1461        result["max_voltage"] = from_int(self.max_voltage)
1462        result["power_type"] = to_enum(PowerType, self.power_type)
1463        result["standard"] = to_enum(ConnectorType, self.standard)
1464        if self.tariff_ids is not None:
1465            result["tariff_ids"] = from_union([from_none, lambda x: from_list(from_str, x)], self.tariff_ids)
1466        if self.terms_and_conditions is not None:
1467            result["terms_and_conditions"] = from_union([from_none, from_str], self.terms_and_conditions)
1468        return result
1469
1470
1471class ImageCategory(Enum):
1472    CHARGER = "CHARGER"
1473    ENTRANCE = "ENTRANCE"
1474    LOCATION = "LOCATION"
1475    NETWORK = "NETWORK"
1476    OPERATOR = "OPERATOR"
1477    OTHER = "OTHER"
1478    OWNER = "OWNER"
1479
1480
1481class Image:
1482    category: ImageCategory
1483    height: Optional[int]
1484    thumbnail: Optional[str]
1485    type: str
1486    url: str
1487    width: Optional[int]
1488
1489    def __init__(self, category: ImageCategory, height: Optional[int], thumbnail: Optional[str], type: str, url: str, width: Optional[int]) -> None:
1490        self.category = category
1491        self.height = height
1492        self.thumbnail = thumbnail
1493        self.type = type
1494        self.url = url
1495        self.width = width
1496
1497    @staticmethod
1498    def from_dict(obj: Any) -> 'Image':
1499        assert isinstance(obj, dict)
1500        category = ImageCategory(obj.get("category"))
1501        height = from_union([from_none, from_int], obj.get("height"))
1502        thumbnail = from_union([from_none, from_str], obj.get("thumbnail"))
1503        type = from_str(obj.get("type"))
1504        url = from_str(obj.get("url"))
1505        width = from_union([from_none, from_int], obj.get("width"))
1506        return Image(category, height, thumbnail, type, url, width)
1507
1508    def to_dict(self) -> dict:
1509        result: dict = {}
1510        result["category"] = to_enum(ImageCategory, self.category)
1511        if self.height is not None:
1512            result["height"] = from_union([from_none, from_int], self.height)
1513        if self.thumbnail is not None:
1514            result["thumbnail"] = from_union([from_none, from_str], self.thumbnail)
1515        result["type"] = from_str(self.type)
1516        result["url"] = from_str(self.url)
1517        if self.width is not None:
1518            result["width"] = from_union([from_none, from_int], self.width)
1519        return result
1520
1521
1522class BusinessDetails:
1523    logo: Optional[Image]
1524    name: str
1525    website: Optional[str]
1526
1527    def __init__(self, logo: Optional[Image], name: str, website: Optional[str]) -> None:
1528        self.logo = logo
1529        self.name = name
1530        self.website = website
1531
1532    @staticmethod
1533    def from_dict(obj: Any) -> 'BusinessDetails':
1534        assert isinstance(obj, dict)
1535        logo = from_union([from_none, Image.from_dict], obj.get("logo"))
1536        name = from_str(obj.get("name"))
1537        website = from_union([from_none, from_str], obj.get("website"))
1538        return BusinessDetails(logo, name, website)
1539
1540    def to_dict(self) -> dict:
1541        result: dict = {}
1542        if self.logo is not None:
1543            result["logo"] = from_union([from_none, lambda x: to_class(Image, x)], self.logo)
1544        result["name"] = from_str(self.name)
1545        if self.website is not None:
1546            result["website"] = from_union([from_none, from_str], self.website)
1547        return result
1548
1549
1550class Role(Enum):
1551    CPO = "CPO"
1552    EMSP = "EMSP"
1553    HUB = "HUB"
1554    NAP = "NAP"
1555    NSP = "NSP"
1556    OTHER = "OTHER"
1557    SCSP = "SCSP"
1558
1559
1560class CredentialsRole:
1561    business_details: BusinessDetails
1562    country_code: str
1563    party_id: str
1564    role: Role
1565
1566    def __init__(self, business_details: BusinessDetails, country_code: str, party_id: str, role: Role) -> None:
1567        self.business_details = business_details
1568        self.country_code = country_code
1569        self.party_id = party_id
1570        self.role = role
1571
1572    @staticmethod
1573    def from_dict(obj: Any) -> 'CredentialsRole':
1574        assert isinstance(obj, dict)
1575        business_details = BusinessDetails.from_dict(obj.get("business_details"))
1576        country_code = from_str(obj.get("country_code"))
1577        party_id = from_str(obj.get("party_id"))
1578        role = Role(obj.get("role"))
1579        return CredentialsRole(business_details, country_code, party_id, role)
1580
1581    def to_dict(self) -> dict:
1582        result: dict = {}
1583        result["business_details"] = to_class(BusinessDetails, self.business_details)
1584        result["country_code"] = from_str(self.country_code)
1585        result["party_id"] = from_str(self.party_id)
1586        result["role"] = to_enum(Role, self.role)
1587        return result
1588
1589
1590class Credentials:
1591    roles: List[CredentialsRole]
1592    token: str
1593    url: str
1594
1595    def __init__(self, roles: List[CredentialsRole], token: str, url: str) -> None:
1596        self.roles = roles
1597        self.token = token
1598        self.url = url
1599
1600    @staticmethod
1601    def from_dict(obj: Any) -> 'Credentials':
1602        assert isinstance(obj, dict)
1603        roles = from_list(CredentialsRole.from_dict, obj.get("roles"))
1604        token = from_str(obj.get("token"))
1605        url = from_str(obj.get("url"))
1606        return Credentials(roles, token, url)
1607
1608    def to_dict(self) -> dict:
1609        result: dict = {}
1610        result["roles"] = from_list(lambda x: to_class(CredentialsRole, x), self.roles)
1611        result["token"] = from_str(self.token)
1612        result["url"] = from_str(self.url)
1613        return result
1614
1615
1616class ModuleID(Enum):
1617    CDRS = "cdrs"
1618    CHARGINGPROFILES = "chargingprofiles"
1619    COMMANDS = "commands"
1620    CREDENTIALS = "credentials"
1621    HUBCLIENTINFO = "hubclientinfo"
1622    LOCATIONS = "locations"
1623    SESSIONS = "sessions"
1624    TARIFFS = "tariffs"
1625    TOKENS = "tokens"
1626
1627
1628class InterfaceRole(Enum):
1629    RECEIVER = "RECEIVER"
1630    SENDER = "SENDER"
1631
1632
1633class Endpoint:
1634    identifier: ModuleID
1635    role: InterfaceRole
1636    url: str
1637
1638    def __init__(self, identifier: ModuleID, role: InterfaceRole, url: str) -> None:
1639        self.identifier = identifier
1640        self.role = role
1641        self.url = url
1642
1643    @staticmethod
1644    def from_dict(obj: Any) -> 'Endpoint':
1645        assert isinstance(obj, dict)
1646        identifier = ModuleID(obj.get("identifier"))
1647        role = InterfaceRole(obj.get("role"))
1648        url = from_str(obj.get("url"))
1649        return Endpoint(identifier, role, url)
1650
1651    def to_dict(self) -> dict:
1652        result: dict = {}
1653        result["identifier"] = to_enum(ModuleID, self.identifier)
1654        result["role"] = to_enum(InterfaceRole, self.role)
1655        result["url"] = from_str(self.url)
1656        return result
1657
1658
1659class Capability(Enum):
1660    CHARGING_PREFERENCES_CAPABLE = "CHARGING_PREFERENCES_CAPABLE"
1661    CHARGING_PROFILE_CAPABLE = "CHARGING_PROFILE_CAPABLE"
1662    CHIP_CARD_SUPPORT = "CHIP_CARD_SUPPORT"
1663    CONTACTLESS_CARD_SUPPORT = "CONTACTLESS_CARD_SUPPORT"
1664    CREDIT_CARD_PAYABLE = "CREDIT_CARD_PAYABLE"
1665    DEBIT_CARD_PAYABLE = "DEBIT_CARD_PAYABLE"
1666    PED_TERMINAL = "PED_TERMINAL"
1667    REMOTE_START_STOP_CAPABLE = "REMOTE_START_STOP_CAPABLE"
1668    RESERVABLE = "RESERVABLE"
1669    RFID_READER = "RFID_READER"
1670    START_SESSION_CONNECTOR_REQUIRED = "START_SESSION_CONNECTOR_REQUIRED"
1671    TOKEN_GROUP_CAPABLE = "TOKEN_GROUP_CAPABLE"
1672    UNLOCK_CAPABLE = "UNLOCK_CAPABLE"
1673
1674
1675class ParkingRestriction(Enum):
1676    CUSTOMERS = "CUSTOMERS"
1677    DISABLED = "DISABLED"
1678    EV_ONLY = "EV_ONLY"
1679    MOTORCYCLES = "MOTORCYCLES"
1680    PLUGGED = "PLUGGED"
1681
1682
1683class Status(Enum):
1684    AVAILABLE = "AVAILABLE"
1685    BLOCKED = "BLOCKED"
1686    CHARGING = "CHARGING"
1687    INOPERATIVE = "INOPERATIVE"
1688    OUTOFORDER = "OUTOFORDER"
1689    PLANNED = "PLANNED"
1690    REMOVED = "REMOVED"
1691    RESERVED = "RESERVED"
1692    UNKNOWN = "UNKNOWN"
1693
1694
1695class StatusSchedule:
1696    period_begin: str
1697    period_end: Optional[str]
1698    status: Status
1699
1700    def __init__(self, period_begin: str, period_end: Optional[str], status: Status) -> None:
1701        self.period_begin = period_begin
1702        self.period_end = period_end
1703        self.status = status
1704
1705    @staticmethod
1706    def from_dict(obj: Any) -> 'StatusSchedule':
1707        assert isinstance(obj, dict)
1708        period_begin = from_str(obj.get("period_begin"))
1709        period_end = from_union([from_none, from_str], obj.get("period_end"))
1710        status = Status(obj.get("status"))
1711        return StatusSchedule(period_begin, period_end, status)
1712
1713    def to_dict(self) -> dict:
1714        result: dict = {}
1715        result["period_begin"] = from_str(self.period_begin)
1716        if self.period_end is not None:
1717            result["period_end"] = from_union([from_none, from_str], self.period_end)
1718        result["status"] = to_enum(Status, self.status)
1719        return result
1720
1721
1722class Evse:
1723    capabilities: Optional[List[Capability]]
1724    connectors: List[Connector]
1725    coordinates: Optional[GeoLocation]
1726    directions: Optional[List[DisplayText]]
1727    evse_id: Optional[str]
1728    floor_level: Optional[str]
1729    images: Optional[List[Image]]
1730    last_updated: str
1731    parking_restrictions: Optional[List[ParkingRestriction]]
1732    physical_reference: Optional[str]
1733    status: Status
1734    status_schedule: Optional[List[StatusSchedule]]
1735    uid: str
1736
1737    def __init__(self, capabilities: Optional[List[Capability]], connectors: List[Connector], coordinates: Optional[GeoLocation], directions: Optional[List[DisplayText]], evse_id: Optional[str], floor_level: Optional[str], images: Optional[List[Image]], last_updated: str, parking_restrictions: Optional[List[ParkingRestriction]], physical_reference: Optional[str], status: Status, status_schedule: Optional[List[StatusSchedule]], uid: str) -> None:
1738        self.capabilities = capabilities
1739        self.connectors = connectors
1740        self.coordinates = coordinates
1741        self.directions = directions
1742        self.evse_id = evse_id
1743        self.floor_level = floor_level
1744        self.images = images
1745        self.last_updated = last_updated
1746        self.parking_restrictions = parking_restrictions
1747        self.physical_reference = physical_reference
1748        self.status = status
1749        self.status_schedule = status_schedule
1750        self.uid = uid
1751
1752    @staticmethod
1753    def from_dict(obj: Any) -> 'Evse':
1754        assert isinstance(obj, dict)
1755        capabilities = from_union([from_none, lambda x: from_list(Capability, x)], obj.get("capabilities"))
1756        connectors = from_list(Connector.from_dict, obj.get("connectors"))
1757        coordinates = from_union([from_none, GeoLocation.from_dict], obj.get("coordinates"))
1758        directions = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("directions"))
1759        evse_id = from_union([from_none, from_str], obj.get("evse_id"))
1760        floor_level = from_union([from_none, from_str], obj.get("floor_level"))
1761        images = from_union([from_none, lambda x: from_list(Image.from_dict, x)], obj.get("images"))
1762        last_updated = from_str(obj.get("last_updated"))
1763        parking_restrictions = from_union([from_none, lambda x: from_list(ParkingRestriction, x)], obj.get("parking_restrictions"))
1764        physical_reference = from_union([from_none, from_str], obj.get("physical_reference"))
1765        status = Status(obj.get("status"))
1766        status_schedule = from_union([from_none, lambda x: from_list(StatusSchedule.from_dict, x)], obj.get("status_schedule"))
1767        uid = from_str(obj.get("uid"))
1768        return Evse(capabilities, connectors, coordinates, directions, evse_id, floor_level, images, last_updated, parking_restrictions, physical_reference, status, status_schedule, uid)
1769
1770    def to_dict(self) -> dict:
1771        result: dict = {}
1772        if self.capabilities is not None:
1773            result["capabilities"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(Capability, x), x)], self.capabilities)
1774        result["connectors"] = from_list(lambda x: to_class(Connector, x), self.connectors)
1775        if self.coordinates is not None:
1776            result["coordinates"] = from_union([from_none, lambda x: to_class(GeoLocation, x)], self.coordinates)
1777        if self.directions is not None:
1778            result["directions"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.directions)
1779        if self.evse_id is not None:
1780            result["evse_id"] = from_union([from_none, from_str], self.evse_id)
1781        if self.floor_level is not None:
1782            result["floor_level"] = from_union([from_none, from_str], self.floor_level)
1783        if self.images is not None:
1784            result["images"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Image, x), x)], self.images)
1785        result["last_updated"] = from_str(self.last_updated)
1786        if self.parking_restrictions is not None:
1787            result["parking_restrictions"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(ParkingRestriction, x), x)], self.parking_restrictions)
1788        if self.physical_reference is not None:
1789            result["physical_reference"] = from_union([from_none, from_str], self.physical_reference)
1790        result["status"] = to_enum(Status, self.status)
1791        if self.status_schedule is not None:
1792            result["status_schedule"] = from_union([from_none, lambda x: from_list(lambda x: to_class(StatusSchedule, x), x)], self.status_schedule)
1793        result["uid"] = from_str(self.uid)
1794        return result
1795
1796
1797class ConnectionStatus(Enum):
1798    CONNECTED = "CONNECTED"
1799    OFFLINE = "OFFLINE"
1800    PLANNED = "PLANNED"
1801    SUSPENDED = "SUSPENDED"
1802
1803
1804class HubClientInfo:
1805    country_code: str
1806    last_updated: str
1807    party_id: str
1808    role: Role
1809    status: ConnectionStatus
1810
1811    def __init__(self, country_code: str, last_updated: str, party_id: str, role: Role, status: ConnectionStatus) -> None:
1812        self.country_code = country_code
1813        self.last_updated = last_updated
1814        self.party_id = party_id
1815        self.role = role
1816        self.status = status
1817
1818    @staticmethod
1819    def from_dict(obj: Any) -> 'HubClientInfo':
1820        assert isinstance(obj, dict)
1821        country_code = from_str(obj.get("country_code"))
1822        last_updated = from_str(obj.get("last_updated"))
1823        party_id = from_str(obj.get("party_id"))
1824        role = Role(obj.get("role"))
1825        status = ConnectionStatus(obj.get("status"))
1826        return HubClientInfo(country_code, last_updated, party_id, role, status)
1827
1828    def to_dict(self) -> dict:
1829        result: dict = {}
1830        result["country_code"] = from_str(self.country_code)
1831        result["last_updated"] = from_str(self.last_updated)
1832        result["party_id"] = from_str(self.party_id)
1833        result["role"] = to_enum(Role, self.role)
1834        result["status"] = to_enum(ConnectionStatus, self.status)
1835        return result
1836
1837
1838class Facility(Enum):
1839    AIRPORT = "AIRPORT"
1840    BIKE_SHARING = "BIKE_SHARING"
1841    BUS_STOP = "BUS_STOP"
1842    CAFE = "CAFE"
1843    CARPOOL_PARKING = "CARPOOL_PARKING"
1844    FUEL_STATION = "FUEL_STATION"
1845    HOTEL = "HOTEL"
1846    MALL = "MALL"
1847    METRO_STATION = "METRO_STATION"
1848    MUSEUM = "MUSEUM"
1849    NATURE = "NATURE"
1850    PARKING_LOT = "PARKING_LOT"
1851    RECREATION_AREA = "RECREATION_AREA"
1852    RESTAURANT = "RESTAURANT"
1853    SPORT = "SPORT"
1854    SUPERMARKET = "SUPERMARKET"
1855    TAXI_STAND = "TAXI_STAND"
1856    TRAIN_STATION = "TRAIN_STATION"
1857    TRAM_STOP = "TRAM_STOP"
1858    WIFI = "WIFI"
1859
1860
1861class ExceptionalPeriod:
1862    period_begin: str
1863    period_end: str
1864
1865    def __init__(self, period_begin: str, period_end: str) -> None:
1866        self.period_begin = period_begin
1867        self.period_end = period_end
1868
1869    @staticmethod
1870    def from_dict(obj: Any) -> 'ExceptionalPeriod':
1871        assert isinstance(obj, dict)
1872        period_begin = from_str(obj.get("period_begin"))
1873        period_end = from_str(obj.get("period_end"))
1874        return ExceptionalPeriod(period_begin, period_end)
1875
1876    def to_dict(self) -> dict:
1877        result: dict = {}
1878        result["period_begin"] = from_str(self.period_begin)
1879        result["period_end"] = from_str(self.period_end)
1880        return result
1881
1882
1883class RegularHours:
1884    period_begin: str
1885    period_end: str
1886    weekday: int
1887
1888    def __init__(self, period_begin: str, period_end: str, weekday: int) -> None:
1889        self.period_begin = period_begin
1890        self.period_end = period_end
1891        self.weekday = weekday
1892
1893    @staticmethod
1894    def from_dict(obj: Any) -> 'RegularHours':
1895        assert isinstance(obj, dict)
1896        period_begin = from_str(obj.get("period_begin"))
1897        period_end = from_str(obj.get("period_end"))
1898        weekday = from_int(obj.get("weekday"))
1899        return RegularHours(period_begin, period_end, weekday)
1900
1901    def to_dict(self) -> dict:
1902        result: dict = {}
1903        result["period_begin"] = from_str(self.period_begin)
1904        result["period_end"] = from_str(self.period_end)
1905        result["weekday"] = from_int(self.weekday)
1906        return result
1907
1908
1909class Hours:
1910    exceptional_closings: Optional[List[ExceptionalPeriod]]
1911    exceptional_openings: Optional[List[ExceptionalPeriod]]
1912    regular_hours: Optional[List[RegularHours]]
1913    twentyfourseven: bool
1914
1915    def __init__(self, exceptional_closings: Optional[List[ExceptionalPeriod]], exceptional_openings: Optional[List[ExceptionalPeriod]], regular_hours: Optional[List[RegularHours]], twentyfourseven: bool) -> None:
1916        self.exceptional_closings = exceptional_closings
1917        self.exceptional_openings = exceptional_openings
1918        self.regular_hours = regular_hours
1919        self.twentyfourseven = twentyfourseven
1920
1921    @staticmethod
1922    def from_dict(obj: Any) -> 'Hours':
1923        assert isinstance(obj, dict)
1924        exceptional_closings = from_union([from_none, lambda x: from_list(ExceptionalPeriod.from_dict, x)], obj.get("exceptional_closings"))
1925        exceptional_openings = from_union([from_none, lambda x: from_list(ExceptionalPeriod.from_dict, x)], obj.get("exceptional_openings"))
1926        regular_hours = from_union([from_none, lambda x: from_list(RegularHours.from_dict, x)], obj.get("regular_hours"))
1927        twentyfourseven = from_bool(obj.get("twentyfourseven"))
1928        return Hours(exceptional_closings, exceptional_openings, regular_hours, twentyfourseven)
1929
1930    def to_dict(self) -> dict:
1931        result: dict = {}
1932        if self.exceptional_closings is not None:
1933            result["exceptional_closings"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ExceptionalPeriod, x), x)], self.exceptional_closings)
1934        if self.exceptional_openings is not None:
1935            result["exceptional_openings"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ExceptionalPeriod, x), x)], self.exceptional_openings)
1936        if self.regular_hours is not None:
1937            result["regular_hours"] = from_union([from_none, lambda x: from_list(lambda x: to_class(RegularHours, x), x)], self.regular_hours)
1938        result["twentyfourseven"] = from_bool(self.twentyfourseven)
1939        return result
1940
1941
1942class ParkingType(Enum):
1943    ALONG_MOTORWAY = "ALONG_MOTORWAY"
1944    ON_DRIVEWAY = "ON_DRIVEWAY"
1945    ON_STREET = "ON_STREET"
1946    PARKING_GARAGE = "PARKING_GARAGE"
1947    PARKING_LOT = "PARKING_LOT"
1948    UNDERGROUND_GARAGE = "UNDERGROUND_GARAGE"
1949
1950
1951class PublishTokenType:
1952    group_id: Optional[str]
1953    issuer: Optional[str]
1954    type: Optional[TokenType]
1955    uid: Optional[str]
1956    visual_number: Optional[str]
1957
1958    def __init__(self, group_id: Optional[str], issuer: Optional[str], type: Optional[TokenType], uid: Optional[str], visual_number: Optional[str]) -> None:
1959        self.group_id = group_id
1960        self.issuer = issuer
1961        self.type = type
1962        self.uid = uid
1963        self.visual_number = visual_number
1964
1965    @staticmethod
1966    def from_dict(obj: Any) -> 'PublishTokenType':
1967        assert isinstance(obj, dict)
1968        group_id = from_union([from_none, from_str], obj.get("group_id"))
1969        issuer = from_union([from_none, from_str], obj.get("issuer"))
1970        type = from_union([from_none, TokenType], obj.get("type"))
1971        uid = from_union([from_none, from_str], obj.get("uid"))
1972        visual_number = from_union([from_none, from_str], obj.get("visual_number"))
1973        return PublishTokenType(group_id, issuer, type, uid, visual_number)
1974
1975    def to_dict(self) -> dict:
1976        result: dict = {}
1977        if self.group_id is not None:
1978            result["group_id"] = from_union([from_none, from_str], self.group_id)
1979        if self.issuer is not None:
1980            result["issuer"] = from_union([from_none, from_str], self.issuer)
1981        if self.type is not None:
1982            result["type"] = from_union([from_none, lambda x: to_enum(TokenType, x)], self.type)
1983        if self.uid is not None:
1984            result["uid"] = from_union([from_none, from_str], self.uid)
1985        if self.visual_number is not None:
1986            result["visual_number"] = from_union([from_none, from_str], self.visual_number)
1987        return result
1988
1989
1990class AdditionalGeoLocation:
1991    latitude: str
1992    longitude: str
1993    name: Optional[DisplayText]
1994
1995    def __init__(self, latitude: str, longitude: str, name: Optional[DisplayText]) -> None:
1996        self.latitude = latitude
1997        self.longitude = longitude
1998        self.name = name
1999
2000    @staticmethod
2001    def from_dict(obj: Any) -> 'AdditionalGeoLocation':
2002        assert isinstance(obj, dict)
2003        latitude = from_str(obj.get("latitude"))
2004        longitude = from_str(obj.get("longitude"))
2005        name = from_union([from_none, DisplayText.from_dict], obj.get("name"))
2006        return AdditionalGeoLocation(latitude, longitude, name)
2007
2008    def to_dict(self) -> dict:
2009        result: dict = {}
2010        result["latitude"] = from_str(self.latitude)
2011        result["longitude"] = from_str(self.longitude)
2012        if self.name is not None:
2013            result["name"] = from_union([from_none, lambda x: to_class(DisplayText, x)], self.name)
2014        return result
2015
2016
2017class Location:
2018    address: str
2019    charging_when_closed: Optional[bool]
2020    city: str
2021    coordinates: GeoLocation
2022    country: str
2023    country_code: str
2024    directions: Optional[List[DisplayText]]
2025    energy_mix: Optional[EnergyMix]
2026    evses: Optional[List[Evse]]
2027    facilities: Optional[List[Facility]]
2028    id: str
2029    images: Optional[List[Image]]
2030    last_updated: str
2031    name: Optional[str]
2032    opening_times: Optional[Hours]
2033    operator: Optional[BusinessDetails]
2034    owner: Optional[BusinessDetails]
2035    parking_type: Optional[ParkingType]
2036    party_id: str
2037    postal_code: Optional[str]
2038    publish: bool
2039    publish_allowed_to: Optional[List[PublishTokenType]]
2040    related_locations: Optional[List[AdditionalGeoLocation]]
2041    state: Optional[str]
2042    suboperator: Optional[BusinessDetails]
2043    time_zone: str
2044
2045    def __init__(self, address: str, charging_when_closed: Optional[bool], city: str, coordinates: GeoLocation, country: str, country_code: str, directions: Optional[List[DisplayText]], energy_mix: Optional[EnergyMix], evses: Optional[List[Evse]], facilities: Optional[List[Facility]], id: str, images: Optional[List[Image]], last_updated: str, name: Optional[str], opening_times: Optional[Hours], operator: Optional[BusinessDetails], owner: Optional[BusinessDetails], parking_type: Optional[ParkingType], party_id: str, postal_code: Optional[str], publish: bool, publish_allowed_to: Optional[List[PublishTokenType]], related_locations: Optional[List[AdditionalGeoLocation]], state: Optional[str], suboperator: Optional[BusinessDetails], time_zone: str) -> None:
2046        self.address = address
2047        self.charging_when_closed = charging_when_closed
2048        self.city = city
2049        self.coordinates = coordinates
2050        self.country = country
2051        self.country_code = country_code
2052        self.directions = directions
2053        self.energy_mix = energy_mix
2054        self.evses = evses
2055        self.facilities = facilities
2056        self.id = id
2057        self.images = images
2058        self.last_updated = last_updated
2059        self.name = name
2060        self.opening_times = opening_times
2061        self.operator = operator
2062        self.owner = owner
2063        self.parking_type = parking_type
2064        self.party_id = party_id
2065        self.postal_code = postal_code
2066        self.publish = publish
2067        self.publish_allowed_to = publish_allowed_to
2068        self.related_locations = related_locations
2069        self.state = state
2070        self.suboperator = suboperator
2071        self.time_zone = time_zone
2072
2073    @staticmethod
2074    def from_dict(obj: Any) -> 'Location':
2075        assert isinstance(obj, dict)
2076        address = from_str(obj.get("address"))
2077        charging_when_closed = from_union([from_none, from_bool], obj.get("charging_when_closed"))
2078        city = from_str(obj.get("city"))
2079        coordinates = GeoLocation.from_dict(obj.get("coordinates"))
2080        country = from_str(obj.get("country"))
2081        country_code = from_str(obj.get("country_code"))
2082        directions = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("directions"))
2083        energy_mix = from_union([from_none, EnergyMix.from_dict], obj.get("energy_mix"))
2084        evses = from_union([from_none, lambda x: from_list(Evse.from_dict, x)], obj.get("evses"))
2085        facilities = from_union([from_none, lambda x: from_list(Facility, x)], obj.get("facilities"))
2086        id = from_str(obj.get("id"))
2087        images = from_union([from_none, lambda x: from_list(Image.from_dict, x)], obj.get("images"))
2088        last_updated = from_str(obj.get("last_updated"))
2089        name = from_union([from_none, from_str], obj.get("name"))
2090        opening_times = from_union([from_none, Hours.from_dict], obj.get("opening_times"))
2091        operator = from_union([from_none, BusinessDetails.from_dict], obj.get("operator"))
2092        owner = from_union([from_none, BusinessDetails.from_dict], obj.get("owner"))
2093        parking_type = from_union([from_none, ParkingType], obj.get("parking_type"))
2094        party_id = from_str(obj.get("party_id"))
2095        postal_code = from_union([from_none, from_str], obj.get("postal_code"))
2096        publish = from_bool(obj.get("publish"))
2097        publish_allowed_to = from_union([from_none, lambda x: from_list(PublishTokenType.from_dict, x)], obj.get("publish_allowed_to"))
2098        related_locations = from_union([from_none, lambda x: from_list(AdditionalGeoLocation.from_dict, x)], obj.get("related_locations"))
2099        state = from_union([from_none, from_str], obj.get("state"))
2100        suboperator = from_union([from_none, BusinessDetails.from_dict], obj.get("suboperator"))
2101        time_zone = from_str(obj.get("time_zone"))
2102        return Location(address, charging_when_closed, city, coordinates, country, country_code, directions, energy_mix, evses, facilities, id, images, last_updated, name, opening_times, operator, owner, parking_type, party_id, postal_code, publish, publish_allowed_to, related_locations, state, suboperator, time_zone)
2103
2104    def to_dict(self) -> dict:
2105        result: dict = {}
2106        result["address"] = from_str(self.address)
2107        if self.charging_when_closed is not None:
2108            result["charging_when_closed"] = from_union([from_none, from_bool], self.charging_when_closed)
2109        result["city"] = from_str(self.city)
2110        result["coordinates"] = to_class(GeoLocation, self.coordinates)
2111        result["country"] = from_str(self.country)
2112        result["country_code"] = from_str(self.country_code)
2113        if self.directions is not None:
2114            result["directions"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.directions)
2115        if self.energy_mix is not None:
2116            result["energy_mix"] = from_union([from_none, lambda x: to_class(EnergyMix, x)], self.energy_mix)
2117        if self.evses is not None:
2118            result["evses"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Evse, x), x)], self.evses)
2119        if self.facilities is not None:
2120            result["facilities"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(Facility, x), x)], self.facilities)
2121        result["id"] = from_str(self.id)
2122        if self.images is not None:
2123            result["images"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Image, x), x)], self.images)
2124        result["last_updated"] = from_str(self.last_updated)
2125        if self.name is not None:
2126            result["name"] = from_union([from_none, from_str], self.name)
2127        if self.opening_times is not None:
2128            result["opening_times"] = from_union([from_none, lambda x: to_class(Hours, x)], self.opening_times)
2129        if self.operator is not None:
2130            result["operator"] = from_union([from_none, lambda x: to_class(BusinessDetails, x)], self.operator)
2131        if self.owner is not None:
2132            result["owner"] = from_union([from_none, lambda x: to_class(BusinessDetails, x)], self.owner)
2133        if self.parking_type is not None:
2134            result["parking_type"] = from_union([from_none, lambda x: to_enum(ParkingType, x)], self.parking_type)
2135        result["party_id"] = from_str(self.party_id)
2136        if self.postal_code is not None:
2137            result["postal_code"] = from_union([from_none, from_str], self.postal_code)
2138        result["publish"] = from_bool(self.publish)
2139        if self.publish_allowed_to is not None:
2140            result["publish_allowed_to"] = from_union([from_none, lambda x: from_list(lambda x: to_class(PublishTokenType, x), x)], self.publish_allowed_to)
2141        if self.related_locations is not None:
2142            result["related_locations"] = from_union([from_none, lambda x: from_list(lambda x: to_class(AdditionalGeoLocation, x), x)], self.related_locations)
2143        if self.state is not None:
2144            result["state"] = from_union([from_none, from_str], self.state)
2145        if self.suboperator is not None:
2146            result["suboperator"] = from_union([from_none, lambda x: to_class(BusinessDetails, x)], self.suboperator)
2147        result["time_zone"] = from_str(self.time_zone)
2148        return result
2149
2150
2151class ReserveNow:
2152    authorization_reference: Optional[str]
2153    evse_uid: Optional[str]
2154    expiry_date: str
2155    location_id: str
2156    reservation_id: str
2157    response_url: str
2158    token: Token
2159
2160    def __init__(self, authorization_reference: Optional[str], evse_uid: Optional[str], expiry_date: str, location_id: str, reservation_id: str, response_url: str, token: Token) -> None:
2161        self.authorization_reference = authorization_reference
2162        self.evse_uid = evse_uid
2163        self.expiry_date = expiry_date
2164        self.location_id = location_id
2165        self.reservation_id = reservation_id
2166        self.response_url = response_url
2167        self.token = token
2168
2169    @staticmethod
2170    def from_dict(obj: Any) -> 'ReserveNow':
2171        assert isinstance(obj, dict)
2172        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
2173        evse_uid = from_union([from_none, from_str], obj.get("evse_uid"))
2174        expiry_date = from_str(obj.get("expiry_date"))
2175        location_id = from_str(obj.get("location_id"))
2176        reservation_id = from_str(obj.get("reservation_id"))
2177        response_url = from_str(obj.get("response_url"))
2178        token = Token.from_dict(obj.get("token"))
2179        return ReserveNow(authorization_reference, evse_uid, expiry_date, location_id, reservation_id, response_url, token)
2180
2181    def to_dict(self) -> dict:
2182        result: dict = {}
2183        if self.authorization_reference is not None:
2184            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
2185        if self.evse_uid is not None:
2186            result["evse_uid"] = from_union([from_none, from_str], self.evse_uid)
2187        result["expiry_date"] = from_str(self.expiry_date)
2188        result["location_id"] = from_str(self.location_id)
2189        result["reservation_id"] = from_str(self.reservation_id)
2190        result["response_url"] = from_str(self.response_url)
2191        result["token"] = to_class(Token, self.token)
2192        return result
2193
2194
2195class SessionStatus(Enum):
2196    ACTIVE = "ACTIVE"
2197    COMPLETED = "COMPLETED"
2198    INVALID = "INVALID"
2199    PENDING = "PENDING"
2200    RESERVATION = "RESERVATION"
2201
2202
2203class Session:
2204    auth_method: AuthMethod
2205    authorization_reference: Optional[str]
2206    cdr_token: CdrToken
2207    charging_periods: Optional[List[ChargingPeriod]]
2208    connector_id: str
2209    country_code: str
2210    currency: str
2211    end_date_time: Optional[str]
2212    evse_uid: str
2213    id: str
2214    kwh: float
2215    last_updated: str
2216    location_id: str
2217    meter_id: Optional[str]
2218    party_id: str
2219    start_date_time: str
2220    status: SessionStatus
2221    total_cost: Optional[Price]
2222
2223    def __init__(self, auth_method: AuthMethod, authorization_reference: Optional[str], cdr_token: CdrToken, charging_periods: Optional[List[ChargingPeriod]], connector_id: str, country_code: str, currency: str, end_date_time: Optional[str], evse_uid: str, id: str, kwh: float, last_updated: str, location_id: str, meter_id: Optional[str], party_id: str, start_date_time: str, status: SessionStatus, total_cost: Optional[Price]) -> None:
2224        self.auth_method = auth_method
2225        self.authorization_reference = authorization_reference
2226        self.cdr_token = cdr_token
2227        self.charging_periods = charging_periods
2228        self.connector_id = connector_id
2229        self.country_code = country_code
2230        self.currency = currency
2231        self.end_date_time = end_date_time
2232        self.evse_uid = evse_uid
2233        self.id = id
2234        self.kwh = kwh
2235        self.last_updated = last_updated
2236        self.location_id = location_id
2237        self.meter_id = meter_id
2238        self.party_id = party_id
2239        self.start_date_time = start_date_time
2240        self.status = status
2241        self.total_cost = total_cost
2242
2243    @staticmethod
2244    def from_dict(obj: Any) -> 'Session':
2245        assert isinstance(obj, dict)
2246        auth_method = AuthMethod(obj.get("auth_method"))
2247        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
2248        cdr_token = CdrToken.from_dict(obj.get("cdr_token"))
2249        charging_periods = from_union([from_none, lambda x: from_list(ChargingPeriod.from_dict, x)], obj.get("charging_periods"))
2250        connector_id = from_str(obj.get("connector_id"))
2251        country_code = from_str(obj.get("country_code"))
2252        currency = from_str(obj.get("currency"))
2253        end_date_time = from_union([from_none, from_str], obj.get("end_date_time"))
2254        evse_uid = from_str(obj.get("evse_uid"))
2255        id = from_str(obj.get("id"))
2256        kwh = from_float(obj.get("kwh"))
2257        last_updated = from_str(obj.get("last_updated"))
2258        location_id = from_str(obj.get("location_id"))
2259        meter_id = from_union([from_none, from_str], obj.get("meter_id"))
2260        party_id = from_str(obj.get("party_id"))
2261        start_date_time = from_str(obj.get("start_date_time"))
2262        status = SessionStatus(obj.get("status"))
2263        total_cost = from_union([from_none, Price.from_dict], obj.get("total_cost"))
2264        return Session(auth_method, authorization_reference, cdr_token, charging_periods, connector_id, country_code, currency, end_date_time, evse_uid, id, kwh, last_updated, location_id, meter_id, party_id, start_date_time, status, total_cost)
2265
2266    def to_dict(self) -> dict:
2267        result: dict = {}
2268        result["auth_method"] = to_enum(AuthMethod, self.auth_method)
2269        if self.authorization_reference is not None:
2270            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
2271        result["cdr_token"] = to_class(CdrToken, self.cdr_token)
2272        if self.charging_periods is not None:
2273            result["charging_periods"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ChargingPeriod, x), x)], self.charging_periods)
2274        result["connector_id"] = from_str(self.connector_id)
2275        result["country_code"] = from_str(self.country_code)
2276        result["currency"] = from_str(self.currency)
2277        if self.end_date_time is not None:
2278            result["end_date_time"] = from_union([from_none, from_str], self.end_date_time)
2279        result["evse_uid"] = from_str(self.evse_uid)
2280        result["id"] = from_str(self.id)
2281        result["kwh"] = to_float(self.kwh)
2282        result["last_updated"] = from_str(self.last_updated)
2283        result["location_id"] = from_str(self.location_id)
2284        if self.meter_id is not None:
2285            result["meter_id"] = from_union([from_none, from_str], self.meter_id)
2286        result["party_id"] = from_str(self.party_id)
2287        result["start_date_time"] = from_str(self.start_date_time)
2288        result["status"] = to_enum(SessionStatus, self.status)
2289        if self.total_cost is not None:
2290            result["total_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_cost)
2291        return result
2292
2293
2294class SetChargingProfile:
2295    charging_profile: ChargingProfile
2296    response_url: str
2297
2298    def __init__(self, charging_profile: ChargingProfile, response_url: str) -> None:
2299        self.charging_profile = charging_profile
2300        self.response_url = response_url
2301
2302    @staticmethod
2303    def from_dict(obj: Any) -> 'SetChargingProfile':
2304        assert isinstance(obj, dict)
2305        charging_profile = ChargingProfile.from_dict(obj.get("charging_profile"))
2306        response_url = from_str(obj.get("response_url"))
2307        return SetChargingProfile(charging_profile, response_url)
2308
2309    def to_dict(self) -> dict:
2310        result: dict = {}
2311        result["charging_profile"] = to_class(ChargingProfile, self.charging_profile)
2312        result["response_url"] = from_str(self.response_url)
2313        return result
2314
2315
2316class StartSession:
2317    authorization_reference: Optional[str]
2318    connector_id: Optional[str]
2319    evse_uid: Optional[str]
2320    location_id: str
2321    response_url: str
2322    token: Token
2323
2324    def __init__(self, authorization_reference: Optional[str], connector_id: Optional[str], evse_uid: Optional[str], location_id: str, response_url: str, token: Token) -> None:
2325        self.authorization_reference = authorization_reference
2326        self.connector_id = connector_id
2327        self.evse_uid = evse_uid
2328        self.location_id = location_id
2329        self.response_url = response_url
2330        self.token = token
2331
2332    @staticmethod
2333    def from_dict(obj: Any) -> 'StartSession':
2334        assert isinstance(obj, dict)
2335        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
2336        connector_id = from_union([from_none, from_str], obj.get("connector_id"))
2337        evse_uid = from_union([from_none, from_str], obj.get("evse_uid"))
2338        location_id = from_str(obj.get("location_id"))
2339        response_url = from_str(obj.get("response_url"))
2340        token = Token.from_dict(obj.get("token"))
2341        return StartSession(authorization_reference, connector_id, evse_uid, location_id, response_url, token)
2342
2343    def to_dict(self) -> dict:
2344        result: dict = {}
2345        if self.authorization_reference is not None:
2346            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
2347        if self.connector_id is not None:
2348            result["connector_id"] = from_union([from_none, from_str], self.connector_id)
2349        if self.evse_uid is not None:
2350            result["evse_uid"] = from_union([from_none, from_str], self.evse_uid)
2351        result["location_id"] = from_str(self.location_id)
2352        result["response_url"] = from_str(self.response_url)
2353        result["token"] = to_class(Token, self.token)
2354        return result
2355
2356
2357class StopSession:
2358    response_url: str
2359    session_id: str
2360
2361    def __init__(self, response_url: str, session_id: str) -> None:
2362        self.response_url = response_url
2363        self.session_id = session_id
2364
2365    @staticmethod
2366    def from_dict(obj: Any) -> 'StopSession':
2367        assert isinstance(obj, dict)
2368        response_url = from_str(obj.get("response_url"))
2369        session_id = from_str(obj.get("session_id"))
2370        return StopSession(response_url, session_id)
2371
2372    def to_dict(self) -> dict:
2373        result: dict = {}
2374        result["response_url"] = from_str(self.response_url)
2375        result["session_id"] = from_str(self.session_id)
2376        return result
2377
2378
2379class UnlockConnector:
2380    connector_id: str
2381    evse_uid: str
2382    location_id: str
2383    response_url: str
2384
2385    def __init__(self, connector_id: str, evse_uid: str, location_id: str, response_url: str) -> None:
2386        self.connector_id = connector_id
2387        self.evse_uid = evse_uid
2388        self.location_id = location_id
2389        self.response_url = response_url
2390
2391    @staticmethod
2392    def from_dict(obj: Any) -> 'UnlockConnector':
2393        assert isinstance(obj, dict)
2394        connector_id = from_str(obj.get("connector_id"))
2395        evse_uid = from_str(obj.get("evse_uid"))
2396        location_id = from_str(obj.get("location_id"))
2397        response_url = from_str(obj.get("response_url"))
2398        return UnlockConnector(connector_id, evse_uid, location_id, response_url)
2399
2400    def to_dict(self) -> dict:
2401        result: dict = {}
2402        result["connector_id"] = from_str(self.connector_id)
2403        result["evse_uid"] = from_str(self.evse_uid)
2404        result["location_id"] = from_str(self.location_id)
2405        result["response_url"] = from_str(self.response_url)
2406        return result
2407
2408
2409class VersionNumber(Enum):
2410    THE_20 = "2.0"
2411    THE_21 = "2.1"
2412    THE_211 = "2.1.1"
2413    THE_22 = "2.2"
2414    THE_221 = "2.2.1"
2415
2416
2417class Version:
2418    url: str
2419    version: VersionNumber
2420
2421    def __init__(self, url: str, version: VersionNumber) -> None:
2422        self.url = url
2423        self.version = version
2424
2425    @staticmethod
2426    def from_dict(obj: Any) -> 'Version':
2427        assert isinstance(obj, dict)
2428        url = from_str(obj.get("url"))
2429        version = VersionNumber(obj.get("version"))
2430        return Version(url, version)
2431
2432    def to_dict(self) -> dict:
2433        result: dict = {}
2434        result["url"] = from_str(self.url)
2435        result["version"] = to_enum(VersionNumber, self.version)
2436        return result
2437
2438
2439class VersionDetails:
2440    endpoints: List[Endpoint]
2441    version: VersionNumber
2442
2443    def __init__(self, endpoints: List[Endpoint], version: VersionNumber) -> None:
2444        self.endpoints = endpoints
2445        self.version = version
2446
2447    @staticmethod
2448    def from_dict(obj: Any) -> 'VersionDetails':
2449        assert isinstance(obj, dict)
2450        endpoints = from_list(Endpoint.from_dict, obj.get("endpoints"))
2451        version = VersionNumber(obj.get("version"))
2452        return VersionDetails(endpoints, version)
2453
2454    def to_dict(self) -> dict:
2455        result: dict = {}
2456        result["endpoints"] = from_list(lambda x: to_class(Endpoint, x), self.endpoints)
2457        result["version"] = to_enum(VersionNumber, self.version)
2458        return result
2459
2460
2461class V221:
2462    active_charging_profile: Optional[ActiveChargingProfile]
2463    active_charging_profile_result: Optional[ActiveChargingProfileResult]
2464    authorization_info: Optional[AuthorizationInfo]
2465    cancel_reservation: Optional[CancelReservation]
2466    cdr: Optional[Cdr]
2467    charging_preferences: Optional[ChargingPreferences]
2468    charging_profile: Optional[ChargingProfile]
2469    charging_profile_response: Optional[ChargingProfileResponse]
2470    charging_profile_result: Optional[ChargingProfileResult]
2471    clear_profile_result: Optional[ClearProfileResult]
2472    command_response: Optional[CommandResponse]
2473    command_result: Optional[CommandResult]
2474    connector: Optional[Connector]
2475    credentials: Optional[Credentials]
2476    endpoint: Optional[Endpoint]
2477    evse: Optional[Evse]
2478    hub_client_info: Optional[HubClientInfo]
2479    location: Optional[Location]
2480    location_references: Optional[LocationReferences]
2481    reserve_now: Optional[ReserveNow]
2482    session: Optional[Session]
2483    set_charging_profile: Optional[SetChargingProfile]
2484    start_session: Optional[StartSession]
2485    stop_session: Optional[StopSession]
2486    tariff: Optional[Tariff]
2487    token: Optional[Token]
2488    unlock_connector: Optional[UnlockConnector]
2489    version: Optional[Version]
2490    version_details: Optional[VersionDetails]
2491
2492    def __init__(self, active_charging_profile: Optional[ActiveChargingProfile], active_charging_profile_result: Optional[ActiveChargingProfileResult], authorization_info: Optional[AuthorizationInfo], cancel_reservation: Optional[CancelReservation], cdr: Optional[Cdr], charging_preferences: Optional[ChargingPreferences], charging_profile: Optional[ChargingProfile], charging_profile_response: Optional[ChargingProfileResponse], charging_profile_result: Optional[ChargingProfileResult], clear_profile_result: Optional[ClearProfileResult], command_response: Optional[CommandResponse], command_result: Optional[CommandResult], connector: Optional[Connector], credentials: Optional[Credentials], endpoint: Optional[Endpoint], evse: Optional[Evse], hub_client_info: Optional[HubClientInfo], location: Optional[Location], location_references: Optional[LocationReferences], reserve_now: Optional[ReserveNow], session: Optional[Session], set_charging_profile: Optional[SetChargingProfile], start_session: Optional[StartSession], stop_session: Optional[StopSession], tariff: Optional[Tariff], token: Optional[Token], unlock_connector: Optional[UnlockConnector], version: Optional[Version], version_details: Optional[VersionDetails]) -> None:
2493        self.active_charging_profile = active_charging_profile
2494        self.active_charging_profile_result = active_charging_profile_result
2495        self.authorization_info = authorization_info
2496        self.cancel_reservation = cancel_reservation
2497        self.cdr = cdr
2498        self.charging_preferences = charging_preferences
2499        self.charging_profile = charging_profile
2500        self.charging_profile_response = charging_profile_response
2501        self.charging_profile_result = charging_profile_result
2502        self.clear_profile_result = clear_profile_result
2503        self.command_response = command_response
2504        self.command_result = command_result
2505        self.connector = connector
2506        self.credentials = credentials
2507        self.endpoint = endpoint
2508        self.evse = evse
2509        self.hub_client_info = hub_client_info
2510        self.location = location
2511        self.location_references = location_references
2512        self.reserve_now = reserve_now
2513        self.session = session
2514        self.set_charging_profile = set_charging_profile
2515        self.start_session = start_session
2516        self.stop_session = stop_session
2517        self.tariff = tariff
2518        self.token = token
2519        self.unlock_connector = unlock_connector
2520        self.version = version
2521        self.version_details = version_details
2522
2523    @staticmethod
2524    def from_dict(obj: Any) -> 'V221':
2525        assert isinstance(obj, dict)
2526        active_charging_profile = from_union([ActiveChargingProfile.from_dict, from_none], obj.get("active_charging_profile"))
2527        active_charging_profile_result = from_union([ActiveChargingProfileResult.from_dict, from_none], obj.get("active_charging_profile_result"))
2528        authorization_info = from_union([AuthorizationInfo.from_dict, from_none], obj.get("authorization_info"))
2529        cancel_reservation = from_union([CancelReservation.from_dict, from_none], obj.get("cancel_reservation"))
2530        cdr = from_union([Cdr.from_dict, from_none], obj.get("cdr"))
2531        charging_preferences = from_union([ChargingPreferences.from_dict, from_none], obj.get("charging_preferences"))
2532        charging_profile = from_union([ChargingProfile.from_dict, from_none], obj.get("charging_profile"))
2533        charging_profile_response = from_union([ChargingProfileResponse.from_dict, from_none], obj.get("charging_profile_response"))
2534        charging_profile_result = from_union([ChargingProfileResult.from_dict, from_none], obj.get("charging_profile_result"))
2535        clear_profile_result = from_union([ClearProfileResult.from_dict, from_none], obj.get("clear_profile_result"))
2536        command_response = from_union([CommandResponse.from_dict, from_none], obj.get("command_response"))
2537        command_result = from_union([CommandResult.from_dict, from_none], obj.get("command_result"))
2538        connector = from_union([Connector.from_dict, from_none], obj.get("connector"))
2539        credentials = from_union([Credentials.from_dict, from_none], obj.get("credentials"))
2540        endpoint = from_union([Endpoint.from_dict, from_none], obj.get("endpoint"))
2541        evse = from_union([Evse.from_dict, from_none], obj.get("evse"))
2542        hub_client_info = from_union([HubClientInfo.from_dict, from_none], obj.get("hub_client_info"))
2543        location = from_union([Location.from_dict, from_none], obj.get("location"))
2544        location_references = from_union([from_none, LocationReferences.from_dict], obj.get("location_references"))
2545        reserve_now = from_union([ReserveNow.from_dict, from_none], obj.get("reserve_now"))
2546        session = from_union([Session.from_dict, from_none], obj.get("session"))
2547        set_charging_profile = from_union([SetChargingProfile.from_dict, from_none], obj.get("set_charging_profile"))
2548        start_session = from_union([StartSession.from_dict, from_none], obj.get("start_session"))
2549        stop_session = from_union([StopSession.from_dict, from_none], obj.get("stop_session"))
2550        tariff = from_union([Tariff.from_dict, from_none], obj.get("tariff"))
2551        token = from_union([Token.from_dict, from_none], obj.get("token"))
2552        unlock_connector = from_union([UnlockConnector.from_dict, from_none], obj.get("unlock_connector"))
2553        version = from_union([Version.from_dict, from_none], obj.get("version"))
2554        version_details = from_union([VersionDetails.from_dict, from_none], obj.get("version_details"))
2555        return V221(active_charging_profile, active_charging_profile_result, authorization_info, cancel_reservation, cdr, charging_preferences, charging_profile, charging_profile_response, charging_profile_result, clear_profile_result, command_response, command_result, connector, credentials, endpoint, evse, hub_client_info, location, location_references, reserve_now, session, set_charging_profile, start_session, stop_session, tariff, token, unlock_connector, version, version_details)
2556
2557    def to_dict(self) -> dict:
2558        result: dict = {}
2559        if self.active_charging_profile is not None:
2560            result["active_charging_profile"] = from_union([lambda x: to_class(ActiveChargingProfile, x), from_none], self.active_charging_profile)
2561        if self.active_charging_profile_result is not None:
2562            result["active_charging_profile_result"] = from_union([lambda x: to_class(ActiveChargingProfileResult, x), from_none], self.active_charging_profile_result)
2563        if self.authorization_info is not None:
2564            result["authorization_info"] = from_union([lambda x: to_class(AuthorizationInfo, x), from_none], self.authorization_info)
2565        if self.cancel_reservation is not None:
2566            result["cancel_reservation"] = from_union([lambda x: to_class(CancelReservation, x), from_none], self.cancel_reservation)
2567        if self.cdr is not None:
2568            result["cdr"] = from_union([lambda x: to_class(Cdr, x), from_none], self.cdr)
2569        if self.charging_preferences is not None:
2570            result["charging_preferences"] = from_union([lambda x: to_class(ChargingPreferences, x), from_none], self.charging_preferences)
2571        if self.charging_profile is not None:
2572            result["charging_profile"] = from_union([lambda x: to_class(ChargingProfile, x), from_none], self.charging_profile)
2573        if self.charging_profile_response is not None:
2574            result["charging_profile_response"] = from_union([lambda x: to_class(ChargingProfileResponse, x), from_none], self.charging_profile_response)
2575        if self.charging_profile_result is not None:
2576            result["charging_profile_result"] = from_union([lambda x: to_class(ChargingProfileResult, x), from_none], self.charging_profile_result)
2577        if self.clear_profile_result is not None:
2578            result["clear_profile_result"] = from_union([lambda x: to_class(ClearProfileResult, x), from_none], self.clear_profile_result)
2579        if self.command_response is not None:
2580            result["command_response"] = from_union([lambda x: to_class(CommandResponse, x), from_none], self.command_response)
2581        if self.command_result is not None:
2582            result["command_result"] = from_union([lambda x: to_class(CommandResult, x), from_none], self.command_result)
2583        if self.connector is not None:
2584            result["connector"] = from_union([lambda x: to_class(Connector, x), from_none], self.connector)
2585        if self.credentials is not None:
2586            result["credentials"] = from_union([lambda x: to_class(Credentials, x), from_none], self.credentials)
2587        if self.endpoint is not None:
2588            result["endpoint"] = from_union([lambda x: to_class(Endpoint, x), from_none], self.endpoint)
2589        if self.evse is not None:
2590            result["evse"] = from_union([lambda x: to_class(Evse, x), from_none], self.evse)
2591        if self.hub_client_info is not None:
2592            result["hub_client_info"] = from_union([lambda x: to_class(HubClientInfo, x), from_none], self.hub_client_info)
2593        if self.location is not None:
2594            result["location"] = from_union([lambda x: to_class(Location, x), from_none], self.location)
2595        if self.location_references is not None:
2596            result["location_references"] = from_union([from_none, lambda x: to_class(LocationReferences, x)], self.location_references)
2597        if self.reserve_now is not None:
2598            result["reserve_now"] = from_union([lambda x: to_class(ReserveNow, x), from_none], self.reserve_now)
2599        if self.session is not None:
2600            result["session"] = from_union([lambda x: to_class(Session, x), from_none], self.session)
2601        if self.set_charging_profile is not None:
2602            result["set_charging_profile"] = from_union([lambda x: to_class(SetChargingProfile, x), from_none], self.set_charging_profile)
2603        if self.start_session is not None:
2604            result["start_session"] = from_union([lambda x: to_class(StartSession, x), from_none], self.start_session)
2605        if self.stop_session is not None:
2606            result["stop_session"] = from_union([lambda x: to_class(StopSession, x), from_none], self.stop_session)
2607        if self.tariff is not None:
2608            result["tariff"] = from_union([lambda x: to_class(Tariff, x), from_none], self.tariff)
2609        if self.token is not None:
2610            result["token"] = from_union([lambda x: to_class(Token, x), from_none], self.token)
2611        if self.unlock_connector is not None:
2612            result["unlock_connector"] = from_union([lambda x: to_class(UnlockConnector, x), from_none], self.unlock_connector)
2613        if self.version is not None:
2614            result["version"] = from_union([lambda x: to_class(Version, x), from_none], self.version)
2615        if self.version_details is not None:
2616            result["version_details"] = from_union([lambda x: to_class(VersionDetails, x), from_none], self.version_details)
2617        return result
2618
2619
2620def v221_from_dict(s: Any) -> V221:
2621    return V221.from_dict(s)
2622
2623
2624def v221_to_dict(x: V221) -> Any:
2625    return to_class(V221, x)
def from_float(x: Any) -> float:
10def from_float(x: Any) -> float:
11    assert isinstance(x, (float, int)) and not isinstance(x, bool)
12    return float(x)
def from_int(x: Any) -> int:
15def from_int(x: Any) -> int:
16    assert isinstance(x, int) and not isinstance(x, bool)
17    return x
def to_float(x: Any) -> float:
20def to_float(x: Any) -> float:
21    assert isinstance(x, (int, float))
22    return x
def from_none(x: Any) -> Any:
25def from_none(x: Any) -> Any:
26    assert x is None
27    return x
def from_list(f: Callable[[Any], ~T], x: Any) -> List[~T]:
30def from_list(f: Callable[[Any], T], x: Any) -> List[T]:
31    assert isinstance(x, list)
32    return [f(y) for y in x]
def from_union(fs, x):
35def from_union(fs, x):
36    for f in fs:
37        try:
38            return f(x)
39        except:
40            pass
41    assert False
def from_str(x: Any) -> str:
44def from_str(x: Any) -> str:
45    assert isinstance(x, str)
46    return x
def to_class(c: Type[~T], x: Any) -> dict:
49def to_class(c: Type[T], x: Any) -> dict:
50    assert isinstance(x, c)
51    return cast(Any, x).to_dict()
def to_enum(c: Type[~EnumT], x: Any) -> ~EnumT:
54def to_enum(c: Type[EnumT], x: Any) -> EnumT:
55    assert isinstance(x, c)
56    return x.value
def from_bool(x: Any) -> bool:
59def from_bool(x: Any) -> bool:
60    assert isinstance(x, bool)
61    return x
class ChargingProfilePeriod:
64class ChargingProfilePeriod:
65    limit: float
66    start_period: int
67
68    def __init__(self, limit: float, start_period: int) -> None:
69        self.limit = limit
70        self.start_period = start_period
71
72    @staticmethod
73    def from_dict(obj: Any) -> 'ChargingProfilePeriod':
74        assert isinstance(obj, dict)
75        limit = from_float(obj.get("limit"))
76        start_period = from_int(obj.get("start_period"))
77        return ChargingProfilePeriod(limit, start_period)
78
79    def to_dict(self) -> dict:
80        result: dict = {}
81        result["limit"] = to_float(self.limit)
82        result["start_period"] = from_int(self.start_period)
83        return result
ChargingProfilePeriod(limit: float, start_period: int)
68    def __init__(self, limit: float, start_period: int) -> None:
69        self.limit = limit
70        self.start_period = start_period
limit: float
start_period: int
@staticmethod
def from_dict(obj: Any) -> ChargingProfilePeriod:
72    @staticmethod
73    def from_dict(obj: Any) -> 'ChargingProfilePeriod':
74        assert isinstance(obj, dict)
75        limit = from_float(obj.get("limit"))
76        start_period = from_int(obj.get("start_period"))
77        return ChargingProfilePeriod(limit, start_period)
def to_dict(self) -> dict:
79    def to_dict(self) -> dict:
80        result: dict = {}
81        result["limit"] = to_float(self.limit)
82        result["start_period"] = from_int(self.start_period)
83        return result
class ChargingRateUnit(enum.Enum):
86class ChargingRateUnit(Enum):
87    A = "A"
88    W = "W"
A = <ChargingRateUnit.A: 'A'>
W = <ChargingRateUnit.W: 'W'>
class ChargingProfile:
 91class ChargingProfile:
 92    charging_profile_period: Optional[List[ChargingProfilePeriod]]
 93    charging_rate_unit: ChargingRateUnit
 94    duration: Optional[int]
 95    min_charging_rate: Optional[float]
 96    start_date_time: Optional[str]
 97
 98    def __init__(self, charging_profile_period: Optional[List[ChargingProfilePeriod]], charging_rate_unit: ChargingRateUnit, duration: Optional[int], min_charging_rate: Optional[float], start_date_time: Optional[str]) -> None:
 99        self.charging_profile_period = charging_profile_period
100        self.charging_rate_unit = charging_rate_unit
101        self.duration = duration
102        self.min_charging_rate = min_charging_rate
103        self.start_date_time = start_date_time
104
105    @staticmethod
106    def from_dict(obj: Any) -> 'ChargingProfile':
107        assert isinstance(obj, dict)
108        charging_profile_period = from_union([from_none, lambda x: from_list(ChargingProfilePeriod.from_dict, x)], obj.get("charging_profile_period"))
109        charging_rate_unit = ChargingRateUnit(obj.get("charging_rate_unit"))
110        duration = from_union([from_none, from_int], obj.get("duration"))
111        min_charging_rate = from_union([from_none, from_float], obj.get("min_charging_rate"))
112        start_date_time = from_union([from_none, from_str], obj.get("start_date_time"))
113        return ChargingProfile(charging_profile_period, charging_rate_unit, duration, min_charging_rate, start_date_time)
114
115    def to_dict(self) -> dict:
116        result: dict = {}
117        if self.charging_profile_period is not None:
118            result["charging_profile_period"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ChargingProfilePeriod, x), x)], self.charging_profile_period)
119        result["charging_rate_unit"] = to_enum(ChargingRateUnit, self.charging_rate_unit)
120        if self.duration is not None:
121            result["duration"] = from_union([from_none, from_int], self.duration)
122        if self.min_charging_rate is not None:
123            result["min_charging_rate"] = from_union([from_none, to_float], self.min_charging_rate)
124        if self.start_date_time is not None:
125            result["start_date_time"] = from_union([from_none, from_str], self.start_date_time)
126        return result
ChargingProfile( charging_profile_period: Optional[List[ChargingProfilePeriod]], charging_rate_unit: ChargingRateUnit, duration: Optional[int], min_charging_rate: Optional[float], start_date_time: Optional[str])
 98    def __init__(self, charging_profile_period: Optional[List[ChargingProfilePeriod]], charging_rate_unit: ChargingRateUnit, duration: Optional[int], min_charging_rate: Optional[float], start_date_time: Optional[str]) -> None:
 99        self.charging_profile_period = charging_profile_period
100        self.charging_rate_unit = charging_rate_unit
101        self.duration = duration
102        self.min_charging_rate = min_charging_rate
103        self.start_date_time = start_date_time
charging_profile_period: Optional[List[ChargingProfilePeriod]]
charging_rate_unit: ChargingRateUnit
duration: Optional[int]
min_charging_rate: Optional[float]
start_date_time: Optional[str]
@staticmethod
def from_dict(obj: Any) -> ChargingProfile:
105    @staticmethod
106    def from_dict(obj: Any) -> 'ChargingProfile':
107        assert isinstance(obj, dict)
108        charging_profile_period = from_union([from_none, lambda x: from_list(ChargingProfilePeriod.from_dict, x)], obj.get("charging_profile_period"))
109        charging_rate_unit = ChargingRateUnit(obj.get("charging_rate_unit"))
110        duration = from_union([from_none, from_int], obj.get("duration"))
111        min_charging_rate = from_union([from_none, from_float], obj.get("min_charging_rate"))
112        start_date_time = from_union([from_none, from_str], obj.get("start_date_time"))
113        return ChargingProfile(charging_profile_period, charging_rate_unit, duration, min_charging_rate, start_date_time)
def to_dict(self) -> dict:
115    def to_dict(self) -> dict:
116        result: dict = {}
117        if self.charging_profile_period is not None:
118            result["charging_profile_period"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ChargingProfilePeriod, x), x)], self.charging_profile_period)
119        result["charging_rate_unit"] = to_enum(ChargingRateUnit, self.charging_rate_unit)
120        if self.duration is not None:
121            result["duration"] = from_union([from_none, from_int], self.duration)
122        if self.min_charging_rate is not None:
123            result["min_charging_rate"] = from_union([from_none, to_float], self.min_charging_rate)
124        if self.start_date_time is not None:
125            result["start_date_time"] = from_union([from_none, from_str], self.start_date_time)
126        return result
class ActiveChargingProfile:
129class ActiveChargingProfile:
130    charging_profile: ChargingProfile
131    start_date_time: str
132
133    def __init__(self, charging_profile: ChargingProfile, start_date_time: str) -> None:
134        self.charging_profile = charging_profile
135        self.start_date_time = start_date_time
136
137    @staticmethod
138    def from_dict(obj: Any) -> 'ActiveChargingProfile':
139        assert isinstance(obj, dict)
140        charging_profile = ChargingProfile.from_dict(obj.get("charging_profile"))
141        start_date_time = from_str(obj.get("start_date_time"))
142        return ActiveChargingProfile(charging_profile, start_date_time)
143
144    def to_dict(self) -> dict:
145        result: dict = {}
146        result["charging_profile"] = to_class(ChargingProfile, self.charging_profile)
147        result["start_date_time"] = from_str(self.start_date_time)
148        return result
ActiveChargingProfile(charging_profile: ChargingProfile, start_date_time: str)
133    def __init__(self, charging_profile: ChargingProfile, start_date_time: str) -> None:
134        self.charging_profile = charging_profile
135        self.start_date_time = start_date_time
charging_profile: ChargingProfile
start_date_time: str
@staticmethod
def from_dict(obj: Any) -> ActiveChargingProfile:
137    @staticmethod
138    def from_dict(obj: Any) -> 'ActiveChargingProfile':
139        assert isinstance(obj, dict)
140        charging_profile = ChargingProfile.from_dict(obj.get("charging_profile"))
141        start_date_time = from_str(obj.get("start_date_time"))
142        return ActiveChargingProfile(charging_profile, start_date_time)
def to_dict(self) -> dict:
144    def to_dict(self) -> dict:
145        result: dict = {}
146        result["charging_profile"] = to_class(ChargingProfile, self.charging_profile)
147        result["start_date_time"] = from_str(self.start_date_time)
148        return result
class ChargingProfileResultType(enum.Enum):
151class ChargingProfileResultType(Enum):
152    ACCEPTED = "ACCEPTED"
153    REJECTED = "REJECTED"
154    UNKNOWN = "UNKNOWN"
ACCEPTED = <ChargingProfileResultType.ACCEPTED: 'ACCEPTED'>
REJECTED = <ChargingProfileResultType.REJECTED: 'REJECTED'>
UNKNOWN = <ChargingProfileResultType.UNKNOWN: 'UNKNOWN'>
class ActiveChargingProfileResult:
157class ActiveChargingProfileResult:
158    profile: Optional[ActiveChargingProfile]
159    result: ChargingProfileResultType
160
161    def __init__(self, profile: Optional[ActiveChargingProfile], result: ChargingProfileResultType) -> None:
162        self.profile = profile
163        self.result = result
164
165    @staticmethod
166    def from_dict(obj: Any) -> 'ActiveChargingProfileResult':
167        assert isinstance(obj, dict)
168        profile = from_union([ActiveChargingProfile.from_dict, from_none], obj.get("profile"))
169        result = ChargingProfileResultType(obj.get("result"))
170        return ActiveChargingProfileResult(profile, result)
171
172    def to_dict(self) -> dict:
173        result: dict = {}
174        if self.profile is not None:
175            result["profile"] = from_union([lambda x: to_class(ActiveChargingProfile, x), from_none], self.profile)
176        result["result"] = to_enum(ChargingProfileResultType, self.result)
177        return result
ActiveChargingProfileResult( profile: Optional[ActiveChargingProfile], result: ChargingProfileResultType)
161    def __init__(self, profile: Optional[ActiveChargingProfile], result: ChargingProfileResultType) -> None:
162        self.profile = profile
163        self.result = result
profile: Optional[ActiveChargingProfile]
@staticmethod
def from_dict(obj: Any) -> ActiveChargingProfileResult:
165    @staticmethod
166    def from_dict(obj: Any) -> 'ActiveChargingProfileResult':
167        assert isinstance(obj, dict)
168        profile = from_union([ActiveChargingProfile.from_dict, from_none], obj.get("profile"))
169        result = ChargingProfileResultType(obj.get("result"))
170        return ActiveChargingProfileResult(profile, result)
def to_dict(self) -> dict:
172    def to_dict(self) -> dict:
173        result: dict = {}
174        if self.profile is not None:
175            result["profile"] = from_union([lambda x: to_class(ActiveChargingProfile, x), from_none], self.profile)
176        result["result"] = to_enum(ChargingProfileResultType, self.result)
177        return result
class AllowedType(enum.Enum):
180class AllowedType(Enum):
181    ALLOWED = "ALLOWED"
182    BLOCKED = "BLOCKED"
183    EXPIRED = "EXPIRED"
184    NOT_ALLOWED = "NOT_ALLOWED"
185    NO_CREDIT = "NO_CREDIT"
ALLOWED = <AllowedType.ALLOWED: 'ALLOWED'>
BLOCKED = <AllowedType.BLOCKED: 'BLOCKED'>
EXPIRED = <AllowedType.EXPIRED: 'EXPIRED'>
NOT_ALLOWED = <AllowedType.NOT_ALLOWED: 'NOT_ALLOWED'>
NO_CREDIT = <AllowedType.NO_CREDIT: 'NO_CREDIT'>
class DisplayText:
188class DisplayText:
189    language: str
190    text: str
191
192    def __init__(self, language: str, text: str) -> None:
193        self.language = language
194        self.text = text
195
196    @staticmethod
197    def from_dict(obj: Any) -> 'DisplayText':
198        assert isinstance(obj, dict)
199        language = from_str(obj.get("language"))
200        text = from_str(obj.get("text"))
201        return DisplayText(language, text)
202
203    def to_dict(self) -> dict:
204        result: dict = {}
205        result["language"] = from_str(self.language)
206        result["text"] = from_str(self.text)
207        return result
DisplayText(language: str, text: str)
192    def __init__(self, language: str, text: str) -> None:
193        self.language = language
194        self.text = text
language: str
text: str
@staticmethod
def from_dict(obj: Any) -> DisplayText:
196    @staticmethod
197    def from_dict(obj: Any) -> 'DisplayText':
198        assert isinstance(obj, dict)
199        language = from_str(obj.get("language"))
200        text = from_str(obj.get("text"))
201        return DisplayText(language, text)
def to_dict(self) -> dict:
203    def to_dict(self) -> dict:
204        result: dict = {}
205        result["language"] = from_str(self.language)
206        result["text"] = from_str(self.text)
207        return result
class LocationReferences:
210class LocationReferences:
211    evse_uids: Optional[List[str]]
212    location_id: str
213
214    def __init__(self, evse_uids: Optional[List[str]], location_id: str) -> None:
215        self.evse_uids = evse_uids
216        self.location_id = location_id
217
218    @staticmethod
219    def from_dict(obj: Any) -> 'LocationReferences':
220        assert isinstance(obj, dict)
221        evse_uids = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("evse_uids"))
222        location_id = from_str(obj.get("location_id"))
223        return LocationReferences(evse_uids, location_id)
224
225    def to_dict(self) -> dict:
226        result: dict = {}
227        if self.evse_uids is not None:
228            result["evse_uids"] = from_union([from_none, lambda x: from_list(from_str, x)], self.evse_uids)
229        result["location_id"] = from_str(self.location_id)
230        return result
LocationReferences(evse_uids: Optional[List[str]], location_id: str)
214    def __init__(self, evse_uids: Optional[List[str]], location_id: str) -> None:
215        self.evse_uids = evse_uids
216        self.location_id = location_id
evse_uids: Optional[List[str]]
location_id: str
@staticmethod
def from_dict(obj: Any) -> LocationReferences:
218    @staticmethod
219    def from_dict(obj: Any) -> 'LocationReferences':
220        assert isinstance(obj, dict)
221        evse_uids = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("evse_uids"))
222        location_id = from_str(obj.get("location_id"))
223        return LocationReferences(evse_uids, location_id)
def to_dict(self) -> dict:
225    def to_dict(self) -> dict:
226        result: dict = {}
227        if self.evse_uids is not None:
228            result["evse_uids"] = from_union([from_none, lambda x: from_list(from_str, x)], self.evse_uids)
229        result["location_id"] = from_str(self.location_id)
230        return result
class ProfileType(enum.Enum):
233class ProfileType(Enum):
234    CHEAP = "CHEAP"
235    FAST = "FAST"
236    GREEN = "GREEN"
237    REGULAR = "REGULAR"
CHEAP = <ProfileType.CHEAP: 'CHEAP'>
FAST = <ProfileType.FAST: 'FAST'>
GREEN = <ProfileType.GREEN: 'GREEN'>
REGULAR = <ProfileType.REGULAR: 'REGULAR'>
class EnergyContract:
240class EnergyContract:
241    contract_id: Optional[str]
242    supplier_name: str
243
244    def __init__(self, contract_id: Optional[str], supplier_name: str) -> None:
245        self.contract_id = contract_id
246        self.supplier_name = supplier_name
247
248    @staticmethod
249    def from_dict(obj: Any) -> 'EnergyContract':
250        assert isinstance(obj, dict)
251        contract_id = from_union([from_none, from_str], obj.get("contract_id"))
252        supplier_name = from_str(obj.get("supplier_name"))
253        return EnergyContract(contract_id, supplier_name)
254
255    def to_dict(self) -> dict:
256        result: dict = {}
257        if self.contract_id is not None:
258            result["contract_id"] = from_union([from_none, from_str], self.contract_id)
259        result["supplier_name"] = from_str(self.supplier_name)
260        return result
EnergyContract(contract_id: Optional[str], supplier_name: str)
244    def __init__(self, contract_id: Optional[str], supplier_name: str) -> None:
245        self.contract_id = contract_id
246        self.supplier_name = supplier_name
contract_id: Optional[str]
supplier_name: str
@staticmethod
def from_dict(obj: Any) -> EnergyContract:
248    @staticmethod
249    def from_dict(obj: Any) -> 'EnergyContract':
250        assert isinstance(obj, dict)
251        contract_id = from_union([from_none, from_str], obj.get("contract_id"))
252        supplier_name = from_str(obj.get("supplier_name"))
253        return EnergyContract(contract_id, supplier_name)
def to_dict(self) -> dict:
255    def to_dict(self) -> dict:
256        result: dict = {}
257        if self.contract_id is not None:
258            result["contract_id"] = from_union([from_none, from_str], self.contract_id)
259        result["supplier_name"] = from_str(self.supplier_name)
260        return result
class TokenType(enum.Enum):
263class TokenType(Enum):
264    AD_HOC_USER = "AD_HOC_USER"
265    APP_USER = "APP_USER"
266    OTHER = "OTHER"
267    RFID = "RFID"
AD_HOC_USER = <TokenType.AD_HOC_USER: 'AD_HOC_USER'>
APP_USER = <TokenType.APP_USER: 'APP_USER'>
OTHER = <TokenType.OTHER: 'OTHER'>
RFID = <TokenType.RFID: 'RFID'>
class WhitelistType(enum.Enum):
270class WhitelistType(Enum):
271    ALLOWED = "ALLOWED"
272    ALLOWED_OFFLINE = "ALLOWED_OFFLINE"
273    ALWAYS = "ALWAYS"
274    NEVER = "NEVER"
ALLOWED = <WhitelistType.ALLOWED: 'ALLOWED'>
ALLOWED_OFFLINE = <WhitelistType.ALLOWED_OFFLINE: 'ALLOWED_OFFLINE'>
ALWAYS = <WhitelistType.ALWAYS: 'ALWAYS'>
NEVER = <WhitelistType.NEVER: 'NEVER'>
class Token:
277class Token:
278    contract_id: str
279    country_code: str
280    default_profile_type: Optional[ProfileType]
281    energy_contract: Optional[EnergyContract]
282    group_id: Optional[str]
283    issuer: str
284    language: Optional[str]
285    last_updated: str
286    party_id: str
287    type: TokenType
288    uid: str
289    valid: bool
290    visual_number: Optional[str]
291    whitelist: WhitelistType
292
293    def __init__(self, contract_id: str, country_code: str, default_profile_type: Optional[ProfileType], energy_contract: Optional[EnergyContract], group_id: Optional[str], issuer: str, language: Optional[str], last_updated: str, party_id: str, type: TokenType, uid: str, valid: bool, visual_number: Optional[str], whitelist: WhitelistType) -> None:
294        self.contract_id = contract_id
295        self.country_code = country_code
296        self.default_profile_type = default_profile_type
297        self.energy_contract = energy_contract
298        self.group_id = group_id
299        self.issuer = issuer
300        self.language = language
301        self.last_updated = last_updated
302        self.party_id = party_id
303        self.type = type
304        self.uid = uid
305        self.valid = valid
306        self.visual_number = visual_number
307        self.whitelist = whitelist
308
309    @staticmethod
310    def from_dict(obj: Any) -> 'Token':
311        assert isinstance(obj, dict)
312        contract_id = from_str(obj.get("contract_id"))
313        country_code = from_str(obj.get("country_code"))
314        default_profile_type = from_union([from_none, ProfileType], obj.get("default_profile_type"))
315        energy_contract = from_union([from_none, EnergyContract.from_dict], obj.get("energy_contract"))
316        group_id = from_union([from_none, from_str], obj.get("group_id"))
317        issuer = from_str(obj.get("issuer"))
318        language = from_union([from_none, from_str], obj.get("language"))
319        last_updated = from_str(obj.get("last_updated"))
320        party_id = from_str(obj.get("party_id"))
321        type = TokenType(obj.get("type"))
322        uid = from_str(obj.get("uid"))
323        valid = from_bool(obj.get("valid"))
324        visual_number = from_union([from_none, from_str], obj.get("visual_number"))
325        whitelist = WhitelistType(obj.get("whitelist"))
326        return Token(contract_id, country_code, default_profile_type, energy_contract, group_id, issuer, language, last_updated, party_id, type, uid, valid, visual_number, whitelist)
327
328    def to_dict(self) -> dict:
329        result: dict = {}
330        result["contract_id"] = from_str(self.contract_id)
331        result["country_code"] = from_str(self.country_code)
332        if self.default_profile_type is not None:
333            result["default_profile_type"] = from_union([from_none, lambda x: to_enum(ProfileType, x)], self.default_profile_type)
334        if self.energy_contract is not None:
335            result["energy_contract"] = from_union([from_none, lambda x: to_class(EnergyContract, x)], self.energy_contract)
336        if self.group_id is not None:
337            result["group_id"] = from_union([from_none, from_str], self.group_id)
338        result["issuer"] = from_str(self.issuer)
339        if self.language is not None:
340            result["language"] = from_union([from_none, from_str], self.language)
341        result["last_updated"] = from_str(self.last_updated)
342        result["party_id"] = from_str(self.party_id)
343        result["type"] = to_enum(TokenType, self.type)
344        result["uid"] = from_str(self.uid)
345        result["valid"] = from_bool(self.valid)
346        if self.visual_number is not None:
347            result["visual_number"] = from_union([from_none, from_str], self.visual_number)
348        result["whitelist"] = to_enum(WhitelistType, self.whitelist)
349        return result
Token( contract_id: str, country_code: str, default_profile_type: Optional[ProfileType], energy_contract: Optional[EnergyContract], group_id: Optional[str], issuer: str, language: Optional[str], last_updated: str, party_id: str, type: TokenType, uid: str, valid: bool, visual_number: Optional[str], whitelist: WhitelistType)
293    def __init__(self, contract_id: str, country_code: str, default_profile_type: Optional[ProfileType], energy_contract: Optional[EnergyContract], group_id: Optional[str], issuer: str, language: Optional[str], last_updated: str, party_id: str, type: TokenType, uid: str, valid: bool, visual_number: Optional[str], whitelist: WhitelistType) -> None:
294        self.contract_id = contract_id
295        self.country_code = country_code
296        self.default_profile_type = default_profile_type
297        self.energy_contract = energy_contract
298        self.group_id = group_id
299        self.issuer = issuer
300        self.language = language
301        self.last_updated = last_updated
302        self.party_id = party_id
303        self.type = type
304        self.uid = uid
305        self.valid = valid
306        self.visual_number = visual_number
307        self.whitelist = whitelist
contract_id: str
country_code: str
default_profile_type: Optional[ProfileType]
energy_contract: Optional[EnergyContract]
group_id: Optional[str]
issuer: str
language: Optional[str]
last_updated: str
party_id: str
type: TokenType
uid: str
valid: bool
visual_number: Optional[str]
whitelist: WhitelistType
@staticmethod
def from_dict(obj: Any) -> Token:
309    @staticmethod
310    def from_dict(obj: Any) -> 'Token':
311        assert isinstance(obj, dict)
312        contract_id = from_str(obj.get("contract_id"))
313        country_code = from_str(obj.get("country_code"))
314        default_profile_type = from_union([from_none, ProfileType], obj.get("default_profile_type"))
315        energy_contract = from_union([from_none, EnergyContract.from_dict], obj.get("energy_contract"))
316        group_id = from_union([from_none, from_str], obj.get("group_id"))
317        issuer = from_str(obj.get("issuer"))
318        language = from_union([from_none, from_str], obj.get("language"))
319        last_updated = from_str(obj.get("last_updated"))
320        party_id = from_str(obj.get("party_id"))
321        type = TokenType(obj.get("type"))
322        uid = from_str(obj.get("uid"))
323        valid = from_bool(obj.get("valid"))
324        visual_number = from_union([from_none, from_str], obj.get("visual_number"))
325        whitelist = WhitelistType(obj.get("whitelist"))
326        return Token(contract_id, country_code, default_profile_type, energy_contract, group_id, issuer, language, last_updated, party_id, type, uid, valid, visual_number, whitelist)
def to_dict(self) -> dict:
328    def to_dict(self) -> dict:
329        result: dict = {}
330        result["contract_id"] = from_str(self.contract_id)
331        result["country_code"] = from_str(self.country_code)
332        if self.default_profile_type is not None:
333            result["default_profile_type"] = from_union([from_none, lambda x: to_enum(ProfileType, x)], self.default_profile_type)
334        if self.energy_contract is not None:
335            result["energy_contract"] = from_union([from_none, lambda x: to_class(EnergyContract, x)], self.energy_contract)
336        if self.group_id is not None:
337            result["group_id"] = from_union([from_none, from_str], self.group_id)
338        result["issuer"] = from_str(self.issuer)
339        if self.language is not None:
340            result["language"] = from_union([from_none, from_str], self.language)
341        result["last_updated"] = from_str(self.last_updated)
342        result["party_id"] = from_str(self.party_id)
343        result["type"] = to_enum(TokenType, self.type)
344        result["uid"] = from_str(self.uid)
345        result["valid"] = from_bool(self.valid)
346        if self.visual_number is not None:
347            result["visual_number"] = from_union([from_none, from_str], self.visual_number)
348        result["whitelist"] = to_enum(WhitelistType, self.whitelist)
349        return result
class AuthorizationInfo:
352class AuthorizationInfo:
353    allowed: AllowedType
354    authorization_reference: Optional[str]
355    info: Optional[DisplayText]
356    location: Optional[LocationReferences]
357    token: Token
358
359    def __init__(self, allowed: AllowedType, authorization_reference: Optional[str], info: Optional[DisplayText], location: Optional[LocationReferences], token: Token) -> None:
360        self.allowed = allowed
361        self.authorization_reference = authorization_reference
362        self.info = info
363        self.location = location
364        self.token = token
365
366    @staticmethod
367    def from_dict(obj: Any) -> 'AuthorizationInfo':
368        assert isinstance(obj, dict)
369        allowed = AllowedType(obj.get("allowed"))
370        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
371        info = from_union([from_none, DisplayText.from_dict], obj.get("info"))
372        location = from_union([from_none, LocationReferences.from_dict], obj.get("location"))
373        token = Token.from_dict(obj.get("token"))
374        return AuthorizationInfo(allowed, authorization_reference, info, location, token)
375
376    def to_dict(self) -> dict:
377        result: dict = {}
378        result["allowed"] = to_enum(AllowedType, self.allowed)
379        if self.authorization_reference is not None:
380            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
381        if self.info is not None:
382            result["info"] = from_union([from_none, lambda x: to_class(DisplayText, x)], self.info)
383        if self.location is not None:
384            result["location"] = from_union([from_none, lambda x: to_class(LocationReferences, x)], self.location)
385        result["token"] = to_class(Token, self.token)
386        return result
AuthorizationInfo( allowed: AllowedType, authorization_reference: Optional[str], info: Optional[DisplayText], location: Optional[LocationReferences], token: Token)
359    def __init__(self, allowed: AllowedType, authorization_reference: Optional[str], info: Optional[DisplayText], location: Optional[LocationReferences], token: Token) -> None:
360        self.allowed = allowed
361        self.authorization_reference = authorization_reference
362        self.info = info
363        self.location = location
364        self.token = token
allowed: AllowedType
authorization_reference: Optional[str]
info: Optional[DisplayText]
location: Optional[LocationReferences]
token: Token
@staticmethod
def from_dict(obj: Any) -> AuthorizationInfo:
366    @staticmethod
367    def from_dict(obj: Any) -> 'AuthorizationInfo':
368        assert isinstance(obj, dict)
369        allowed = AllowedType(obj.get("allowed"))
370        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
371        info = from_union([from_none, DisplayText.from_dict], obj.get("info"))
372        location = from_union([from_none, LocationReferences.from_dict], obj.get("location"))
373        token = Token.from_dict(obj.get("token"))
374        return AuthorizationInfo(allowed, authorization_reference, info, location, token)
def to_dict(self) -> dict:
376    def to_dict(self) -> dict:
377        result: dict = {}
378        result["allowed"] = to_enum(AllowedType, self.allowed)
379        if self.authorization_reference is not None:
380            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
381        if self.info is not None:
382            result["info"] = from_union([from_none, lambda x: to_class(DisplayText, x)], self.info)
383        if self.location is not None:
384            result["location"] = from_union([from_none, lambda x: to_class(LocationReferences, x)], self.location)
385        result["token"] = to_class(Token, self.token)
386        return result
class CancelReservation:
389class CancelReservation:
390    reservation_id: str
391    response_url: str
392
393    def __init__(self, reservation_id: str, response_url: str) -> None:
394        self.reservation_id = reservation_id
395        self.response_url = response_url
396
397    @staticmethod
398    def from_dict(obj: Any) -> 'CancelReservation':
399        assert isinstance(obj, dict)
400        reservation_id = from_str(obj.get("reservation_id"))
401        response_url = from_str(obj.get("response_url"))
402        return CancelReservation(reservation_id, response_url)
403
404    def to_dict(self) -> dict:
405        result: dict = {}
406        result["reservation_id"] = from_str(self.reservation_id)
407        result["response_url"] = from_str(self.response_url)
408        return result
CancelReservation(reservation_id: str, response_url: str)
393    def __init__(self, reservation_id: str, response_url: str) -> None:
394        self.reservation_id = reservation_id
395        self.response_url = response_url
reservation_id: str
response_url: str
@staticmethod
def from_dict(obj: Any) -> CancelReservation:
397    @staticmethod
398    def from_dict(obj: Any) -> 'CancelReservation':
399        assert isinstance(obj, dict)
400        reservation_id = from_str(obj.get("reservation_id"))
401        response_url = from_str(obj.get("response_url"))
402        return CancelReservation(reservation_id, response_url)
def to_dict(self) -> dict:
404    def to_dict(self) -> dict:
405        result: dict = {}
406        result["reservation_id"] = from_str(self.reservation_id)
407        result["response_url"] = from_str(self.response_url)
408        return result
class AuthMethod(enum.Enum):
411class AuthMethod(Enum):
412    AUTH_REQUEST = "AUTH_REQUEST"
413    COMMAND = "COMMAND"
414    WHITELIST = "WHITELIST"
AUTH_REQUEST = <AuthMethod.AUTH_REQUEST: 'AUTH_REQUEST'>
COMMAND = <AuthMethod.COMMAND: 'COMMAND'>
WHITELIST = <AuthMethod.WHITELIST: 'WHITELIST'>
class ConnectorFormat(enum.Enum):
417class ConnectorFormat(Enum):
418    CABLE = "CABLE"
419    SOCKET = "SOCKET"
CABLE = <ConnectorFormat.CABLE: 'CABLE'>
SOCKET = <ConnectorFormat.SOCKET: 'SOCKET'>
class PowerType(enum.Enum):
422class PowerType(Enum):
423    AC_1__PHASE = "AC_1_PHASE"
424    AC_2__PHASE = "AC_2_PHASE"
425    AC_2__PHASE_SPLIT = "AC_2_PHASE_SPLIT"
426    AC_3__PHASE = "AC_3_PHASE"
427    DC = "DC"
AC_1__PHASE = <PowerType.AC_1__PHASE: 'AC_1_PHASE'>
AC_2__PHASE = <PowerType.AC_2__PHASE: 'AC_2_PHASE'>
AC_2__PHASE_SPLIT = <PowerType.AC_2__PHASE_SPLIT: 'AC_2_PHASE_SPLIT'>
AC_3__PHASE = <PowerType.AC_3__PHASE: 'AC_3_PHASE'>
DC = <PowerType.DC: 'DC'>
class ConnectorType(enum.Enum):
430class ConnectorType(Enum):
431    CHADEMO = "CHADEMO"
432    CHAOJI = "CHAOJI"
433    DOMESTIC_A = "DOMESTIC_A"
434    DOMESTIC_B = "DOMESTIC_B"
435    DOMESTIC_C = "DOMESTIC_C"
436    DOMESTIC_D = "DOMESTIC_D"
437    DOMESTIC_E = "DOMESTIC_E"
438    DOMESTIC_F = "DOMESTIC_F"
439    DOMESTIC_G = "DOMESTIC_G"
440    DOMESTIC_H = "DOMESTIC_H"
441    DOMESTIC_I = "DOMESTIC_I"
442    DOMESTIC_J = "DOMESTIC_J"
443    DOMESTIC_K = "DOMESTIC_K"
444    DOMESTIC_L = "DOMESTIC_L"
445    DOMESTIC_M = "DOMESTIC_M"
446    DOMESTIC_N = "DOMESTIC_N"
447    DOMESTIC_O = "DOMESTIC_O"
448    GBT_AC = "GBT_AC"
449    GBT_DC = "GBT_DC"
450    IEC_60309_2__SINGLE_16 = "IEC_60309_2_single_16"
451    IEC_60309_2__THREE_16 = "IEC_60309_2_three_16"
452    IEC_60309_2__THREE_32 = "IEC_60309_2_three_32"
453    IEC_60309_2__THREE_64 = "IEC_60309_2_three_64"
454    IEC_62196__T1 = "IEC_62196_T1"
455    IEC_62196__T1_COMBO = "IEC_62196_T1_COMBO"
456    IEC_62196__T2 = "IEC_62196_T2"
457    IEC_62196__T2_COMBO = "IEC_62196_T2_COMBO"
458    IEC_62196__T3_A = "IEC_62196_T3A"
459    IEC_62196__T3_C = "IEC_62196_T3C"
460    NEMA_10_30 = "NEMA_10_30"
461    NEMA_10_50 = "NEMA_10_50"
462    NEMA_14_30 = "NEMA_14_30"
463    NEMA_14_50 = "NEMA_14_50"
464    NEMA_5_20 = "NEMA_5_20"
465    NEMA_6_30 = "NEMA_6_30"
466    NEMA_6_50 = "NEMA_6_50"
467    PANTOGRAPH_BOTTOM_UP = "PANTOGRAPH_BOTTOM_UP"
468    PANTOGRAPH_TOP_DOWN = "PANTOGRAPH_TOP_DOWN"
469    TESLA_R = "TESLA_R"
470    TESLA_S = "TESLA_S"
CHADEMO = <ConnectorType.CHADEMO: 'CHADEMO'>
CHAOJI = <ConnectorType.CHAOJI: 'CHAOJI'>
DOMESTIC_A = <ConnectorType.DOMESTIC_A: 'DOMESTIC_A'>
DOMESTIC_B = <ConnectorType.DOMESTIC_B: 'DOMESTIC_B'>
DOMESTIC_C = <ConnectorType.DOMESTIC_C: 'DOMESTIC_C'>
DOMESTIC_D = <ConnectorType.DOMESTIC_D: 'DOMESTIC_D'>
DOMESTIC_E = <ConnectorType.DOMESTIC_E: 'DOMESTIC_E'>
DOMESTIC_F = <ConnectorType.DOMESTIC_F: 'DOMESTIC_F'>
DOMESTIC_G = <ConnectorType.DOMESTIC_G: 'DOMESTIC_G'>
DOMESTIC_H = <ConnectorType.DOMESTIC_H: 'DOMESTIC_H'>
DOMESTIC_I = <ConnectorType.DOMESTIC_I: 'DOMESTIC_I'>
DOMESTIC_J = <ConnectorType.DOMESTIC_J: 'DOMESTIC_J'>
DOMESTIC_K = <ConnectorType.DOMESTIC_K: 'DOMESTIC_K'>
DOMESTIC_L = <ConnectorType.DOMESTIC_L: 'DOMESTIC_L'>
DOMESTIC_M = <ConnectorType.DOMESTIC_M: 'DOMESTIC_M'>
DOMESTIC_N = <ConnectorType.DOMESTIC_N: 'DOMESTIC_N'>
DOMESTIC_O = <ConnectorType.DOMESTIC_O: 'DOMESTIC_O'>
GBT_AC = <ConnectorType.GBT_AC: 'GBT_AC'>
GBT_DC = <ConnectorType.GBT_DC: 'GBT_DC'>
IEC_60309_2__SINGLE_16 = <ConnectorType.IEC_60309_2__SINGLE_16: 'IEC_60309_2_single_16'>
IEC_60309_2__THREE_16 = <ConnectorType.IEC_60309_2__THREE_16: 'IEC_60309_2_three_16'>
IEC_60309_2__THREE_32 = <ConnectorType.IEC_60309_2__THREE_32: 'IEC_60309_2_three_32'>
IEC_60309_2__THREE_64 = <ConnectorType.IEC_60309_2__THREE_64: 'IEC_60309_2_three_64'>
IEC_62196__T1 = <ConnectorType.IEC_62196__T1: 'IEC_62196_T1'>
IEC_62196__T1_COMBO = <ConnectorType.IEC_62196__T1_COMBO: 'IEC_62196_T1_COMBO'>
IEC_62196__T2 = <ConnectorType.IEC_62196__T2: 'IEC_62196_T2'>
IEC_62196__T2_COMBO = <ConnectorType.IEC_62196__T2_COMBO: 'IEC_62196_T2_COMBO'>
IEC_62196__T3_A = <ConnectorType.IEC_62196__T3_A: 'IEC_62196_T3A'>
IEC_62196__T3_C = <ConnectorType.IEC_62196__T3_C: 'IEC_62196_T3C'>
NEMA_10_30 = <ConnectorType.NEMA_10_30: 'NEMA_10_30'>
NEMA_10_50 = <ConnectorType.NEMA_10_50: 'NEMA_10_50'>
NEMA_14_30 = <ConnectorType.NEMA_14_30: 'NEMA_14_30'>
NEMA_14_50 = <ConnectorType.NEMA_14_50: 'NEMA_14_50'>
NEMA_5_20 = <ConnectorType.NEMA_5_20: 'NEMA_5_20'>
NEMA_6_30 = <ConnectorType.NEMA_6_30: 'NEMA_6_30'>
NEMA_6_50 = <ConnectorType.NEMA_6_50: 'NEMA_6_50'>
PANTOGRAPH_BOTTOM_UP = <ConnectorType.PANTOGRAPH_BOTTOM_UP: 'PANTOGRAPH_BOTTOM_UP'>
PANTOGRAPH_TOP_DOWN = <ConnectorType.PANTOGRAPH_TOP_DOWN: 'PANTOGRAPH_TOP_DOWN'>
TESLA_R = <ConnectorType.TESLA_R: 'TESLA_R'>
TESLA_S = <ConnectorType.TESLA_S: 'TESLA_S'>
class GeoLocation:
473class GeoLocation:
474    latitude: str
475    longitude: str
476
477    def __init__(self, latitude: str, longitude: str) -> None:
478        self.latitude = latitude
479        self.longitude = longitude
480
481    @staticmethod
482    def from_dict(obj: Any) -> 'GeoLocation':
483        assert isinstance(obj, dict)
484        latitude = from_str(obj.get("latitude"))
485        longitude = from_str(obj.get("longitude"))
486        return GeoLocation(latitude, longitude)
487
488    def to_dict(self) -> dict:
489        result: dict = {}
490        result["latitude"] = from_str(self.latitude)
491        result["longitude"] = from_str(self.longitude)
492        return result
GeoLocation(latitude: str, longitude: str)
477    def __init__(self, latitude: str, longitude: str) -> None:
478        self.latitude = latitude
479        self.longitude = longitude
latitude: str
longitude: str
@staticmethod
def from_dict(obj: Any) -> GeoLocation:
481    @staticmethod
482    def from_dict(obj: Any) -> 'GeoLocation':
483        assert isinstance(obj, dict)
484        latitude = from_str(obj.get("latitude"))
485        longitude = from_str(obj.get("longitude"))
486        return GeoLocation(latitude, longitude)
def to_dict(self) -> dict:
488    def to_dict(self) -> dict:
489        result: dict = {}
490        result["latitude"] = from_str(self.latitude)
491        result["longitude"] = from_str(self.longitude)
492        return result
class CdrLocation:
495class CdrLocation:
496    address: str
497    city: str
498    connector_format: ConnectorFormat
499    connector_id: str
500    connector_power_type: PowerType
501    connector_standard: ConnectorType
502    coordinates: GeoLocation
503    country: str
504    evse_id: str
505    evse_uid: str
506    id: str
507    name: Optional[str]
508    postal_code: Optional[str]
509    state: Optional[str]
510
511    def __init__(self, address: str, city: str, connector_format: ConnectorFormat, connector_id: str, connector_power_type: PowerType, connector_standard: ConnectorType, coordinates: GeoLocation, country: str, evse_id: str, evse_uid: str, id: str, name: Optional[str], postal_code: Optional[str], state: Optional[str]) -> None:
512        self.address = address
513        self.city = city
514        self.connector_format = connector_format
515        self.connector_id = connector_id
516        self.connector_power_type = connector_power_type
517        self.connector_standard = connector_standard
518        self.coordinates = coordinates
519        self.country = country
520        self.evse_id = evse_id
521        self.evse_uid = evse_uid
522        self.id = id
523        self.name = name
524        self.postal_code = postal_code
525        self.state = state
526
527    @staticmethod
528    def from_dict(obj: Any) -> 'CdrLocation':
529        assert isinstance(obj, dict)
530        address = from_str(obj.get("address"))
531        city = from_str(obj.get("city"))
532        connector_format = ConnectorFormat(obj.get("connector_format"))
533        connector_id = from_str(obj.get("connector_id"))
534        connector_power_type = PowerType(obj.get("connector_power_type"))
535        connector_standard = ConnectorType(obj.get("connector_standard"))
536        coordinates = GeoLocation.from_dict(obj.get("coordinates"))
537        country = from_str(obj.get("country"))
538        evse_id = from_str(obj.get("evse_id"))
539        evse_uid = from_str(obj.get("evse_uid"))
540        id = from_str(obj.get("id"))
541        name = from_union([from_none, from_str], obj.get("name"))
542        postal_code = from_union([from_none, from_str], obj.get("postal_code"))
543        state = from_union([from_none, from_str], obj.get("state"))
544        return CdrLocation(address, city, connector_format, connector_id, connector_power_type, connector_standard, coordinates, country, evse_id, evse_uid, id, name, postal_code, state)
545
546    def to_dict(self) -> dict:
547        result: dict = {}
548        result["address"] = from_str(self.address)
549        result["city"] = from_str(self.city)
550        result["connector_format"] = to_enum(ConnectorFormat, self.connector_format)
551        result["connector_id"] = from_str(self.connector_id)
552        result["connector_power_type"] = to_enum(PowerType, self.connector_power_type)
553        result["connector_standard"] = to_enum(ConnectorType, self.connector_standard)
554        result["coordinates"] = to_class(GeoLocation, self.coordinates)
555        result["country"] = from_str(self.country)
556        result["evse_id"] = from_str(self.evse_id)
557        result["evse_uid"] = from_str(self.evse_uid)
558        result["id"] = from_str(self.id)
559        if self.name is not None:
560            result["name"] = from_union([from_none, from_str], self.name)
561        if self.postal_code is not None:
562            result["postal_code"] = from_union([from_none, from_str], self.postal_code)
563        if self.state is not None:
564            result["state"] = from_union([from_none, from_str], self.state)
565        return result
CdrLocation( address: str, city: str, connector_format: ConnectorFormat, connector_id: str, connector_power_type: PowerType, connector_standard: ConnectorType, coordinates: GeoLocation, country: str, evse_id: str, evse_uid: str, id: str, name: Optional[str], postal_code: Optional[str], state: Optional[str])
511    def __init__(self, address: str, city: str, connector_format: ConnectorFormat, connector_id: str, connector_power_type: PowerType, connector_standard: ConnectorType, coordinates: GeoLocation, country: str, evse_id: str, evse_uid: str, id: str, name: Optional[str], postal_code: Optional[str], state: Optional[str]) -> None:
512        self.address = address
513        self.city = city
514        self.connector_format = connector_format
515        self.connector_id = connector_id
516        self.connector_power_type = connector_power_type
517        self.connector_standard = connector_standard
518        self.coordinates = coordinates
519        self.country = country
520        self.evse_id = evse_id
521        self.evse_uid = evse_uid
522        self.id = id
523        self.name = name
524        self.postal_code = postal_code
525        self.state = state
address: str
city: str
connector_format: ConnectorFormat
connector_id: str
connector_power_type: PowerType
connector_standard: ConnectorType
coordinates: GeoLocation
country: str
evse_id: str
evse_uid: str
id: str
name: Optional[str]
postal_code: Optional[str]
state: Optional[str]
@staticmethod
def from_dict(obj: Any) -> CdrLocation:
527    @staticmethod
528    def from_dict(obj: Any) -> 'CdrLocation':
529        assert isinstance(obj, dict)
530        address = from_str(obj.get("address"))
531        city = from_str(obj.get("city"))
532        connector_format = ConnectorFormat(obj.get("connector_format"))
533        connector_id = from_str(obj.get("connector_id"))
534        connector_power_type = PowerType(obj.get("connector_power_type"))
535        connector_standard = ConnectorType(obj.get("connector_standard"))
536        coordinates = GeoLocation.from_dict(obj.get("coordinates"))
537        country = from_str(obj.get("country"))
538        evse_id = from_str(obj.get("evse_id"))
539        evse_uid = from_str(obj.get("evse_uid"))
540        id = from_str(obj.get("id"))
541        name = from_union([from_none, from_str], obj.get("name"))
542        postal_code = from_union([from_none, from_str], obj.get("postal_code"))
543        state = from_union([from_none, from_str], obj.get("state"))
544        return CdrLocation(address, city, connector_format, connector_id, connector_power_type, connector_standard, coordinates, country, evse_id, evse_uid, id, name, postal_code, state)
def to_dict(self) -> dict:
546    def to_dict(self) -> dict:
547        result: dict = {}
548        result["address"] = from_str(self.address)
549        result["city"] = from_str(self.city)
550        result["connector_format"] = to_enum(ConnectorFormat, self.connector_format)
551        result["connector_id"] = from_str(self.connector_id)
552        result["connector_power_type"] = to_enum(PowerType, self.connector_power_type)
553        result["connector_standard"] = to_enum(ConnectorType, self.connector_standard)
554        result["coordinates"] = to_class(GeoLocation, self.coordinates)
555        result["country"] = from_str(self.country)
556        result["evse_id"] = from_str(self.evse_id)
557        result["evse_uid"] = from_str(self.evse_uid)
558        result["id"] = from_str(self.id)
559        if self.name is not None:
560            result["name"] = from_union([from_none, from_str], self.name)
561        if self.postal_code is not None:
562            result["postal_code"] = from_union([from_none, from_str], self.postal_code)
563        if self.state is not None:
564            result["state"] = from_union([from_none, from_str], self.state)
565        return result
class CdrToken:
568class CdrToken:
569    contract_id: str
570    country_code: str
571    party_id: str
572    type: TokenType
573    uid: str
574
575    def __init__(self, contract_id: str, country_code: str, party_id: str, type: TokenType, uid: str) -> None:
576        self.contract_id = contract_id
577        self.country_code = country_code
578        self.party_id = party_id
579        self.type = type
580        self.uid = uid
581
582    @staticmethod
583    def from_dict(obj: Any) -> 'CdrToken':
584        assert isinstance(obj, dict)
585        contract_id = from_str(obj.get("contract_id"))
586        country_code = from_str(obj.get("country_code"))
587        party_id = from_str(obj.get("party_id"))
588        type = TokenType(obj.get("type"))
589        uid = from_str(obj.get("uid"))
590        return CdrToken(contract_id, country_code, party_id, type, uid)
591
592    def to_dict(self) -> dict:
593        result: dict = {}
594        result["contract_id"] = from_str(self.contract_id)
595        result["country_code"] = from_str(self.country_code)
596        result["party_id"] = from_str(self.party_id)
597        result["type"] = to_enum(TokenType, self.type)
598        result["uid"] = from_str(self.uid)
599        return result
CdrToken( contract_id: str, country_code: str, party_id: str, type: TokenType, uid: str)
575    def __init__(self, contract_id: str, country_code: str, party_id: str, type: TokenType, uid: str) -> None:
576        self.contract_id = contract_id
577        self.country_code = country_code
578        self.party_id = party_id
579        self.type = type
580        self.uid = uid
contract_id: str
country_code: str
party_id: str
type: TokenType
uid: str
@staticmethod
def from_dict(obj: Any) -> CdrToken:
582    @staticmethod
583    def from_dict(obj: Any) -> 'CdrToken':
584        assert isinstance(obj, dict)
585        contract_id = from_str(obj.get("contract_id"))
586        country_code = from_str(obj.get("country_code"))
587        party_id = from_str(obj.get("party_id"))
588        type = TokenType(obj.get("type"))
589        uid = from_str(obj.get("uid"))
590        return CdrToken(contract_id, country_code, party_id, type, uid)
def to_dict(self) -> dict:
592    def to_dict(self) -> dict:
593        result: dict = {}
594        result["contract_id"] = from_str(self.contract_id)
595        result["country_code"] = from_str(self.country_code)
596        result["party_id"] = from_str(self.party_id)
597        result["type"] = to_enum(TokenType, self.type)
598        result["uid"] = from_str(self.uid)
599        return result
class CdrDimensionType(enum.Enum):
602class CdrDimensionType(Enum):
603    CURRENT = "CURRENT"
604    ENERGY = "ENERGY"
605    ENERGY_EXPORT = "ENERGY_EXPORT"
606    ENERGY_IMPORT = "ENERGY_IMPORT"
607    MAX_CURRENT = "MAX_CURRENT"
608    MAX_POWER = "MAX_POWER"
609    MIN_CURRENT = "MIN_CURRENT"
610    MIN_POWER = "MIN_POWER"
611    PARKING_TIME = "PARKING_TIME"
612    POWER = "POWER"
613    RESERVATION_TIME = "RESERVATION_TIME"
614    STATE_OF_CHARGE = "STATE_OF_CHARGE"
615    TIME = "TIME"
CURRENT = <CdrDimensionType.CURRENT: 'CURRENT'>
ENERGY = <CdrDimensionType.ENERGY: 'ENERGY'>
ENERGY_EXPORT = <CdrDimensionType.ENERGY_EXPORT: 'ENERGY_EXPORT'>
ENERGY_IMPORT = <CdrDimensionType.ENERGY_IMPORT: 'ENERGY_IMPORT'>
MAX_CURRENT = <CdrDimensionType.MAX_CURRENT: 'MAX_CURRENT'>
MAX_POWER = <CdrDimensionType.MAX_POWER: 'MAX_POWER'>
MIN_CURRENT = <CdrDimensionType.MIN_CURRENT: 'MIN_CURRENT'>
MIN_POWER = <CdrDimensionType.MIN_POWER: 'MIN_POWER'>
PARKING_TIME = <CdrDimensionType.PARKING_TIME: 'PARKING_TIME'>
POWER = <CdrDimensionType.POWER: 'POWER'>
RESERVATION_TIME = <CdrDimensionType.RESERVATION_TIME: 'RESERVATION_TIME'>
STATE_OF_CHARGE = <CdrDimensionType.STATE_OF_CHARGE: 'STATE_OF_CHARGE'>
TIME = <CdrDimensionType.TIME: 'TIME'>
class CdrDimension:
618class CdrDimension:
619    type: CdrDimensionType
620    volume: float
621
622    def __init__(self, type: CdrDimensionType, volume: float) -> None:
623        self.type = type
624        self.volume = volume
625
626    @staticmethod
627    def from_dict(obj: Any) -> 'CdrDimension':
628        assert isinstance(obj, dict)
629        type = CdrDimensionType(obj.get("type"))
630        volume = from_float(obj.get("volume"))
631        return CdrDimension(type, volume)
632
633    def to_dict(self) -> dict:
634        result: dict = {}
635        result["type"] = to_enum(CdrDimensionType, self.type)
636        result["volume"] = to_float(self.volume)
637        return result
CdrDimension(type: CdrDimensionType, volume: float)
622    def __init__(self, type: CdrDimensionType, volume: float) -> None:
623        self.type = type
624        self.volume = volume
volume: float
@staticmethod
def from_dict(obj: Any) -> CdrDimension:
626    @staticmethod
627    def from_dict(obj: Any) -> 'CdrDimension':
628        assert isinstance(obj, dict)
629        type = CdrDimensionType(obj.get("type"))
630        volume = from_float(obj.get("volume"))
631        return CdrDimension(type, volume)
def to_dict(self) -> dict:
633    def to_dict(self) -> dict:
634        result: dict = {}
635        result["type"] = to_enum(CdrDimensionType, self.type)
636        result["volume"] = to_float(self.volume)
637        return result
class ChargingPeriod:
640class ChargingPeriod:
641    dimensions: List[CdrDimension]
642    start_date_time: str
643    tariff_id: Optional[str]
644
645    def __init__(self, dimensions: List[CdrDimension], start_date_time: str, tariff_id: Optional[str]) -> None:
646        self.dimensions = dimensions
647        self.start_date_time = start_date_time
648        self.tariff_id = tariff_id
649
650    @staticmethod
651    def from_dict(obj: Any) -> 'ChargingPeriod':
652        assert isinstance(obj, dict)
653        dimensions = from_list(CdrDimension.from_dict, obj.get("dimensions"))
654        start_date_time = from_str(obj.get("start_date_time"))
655        tariff_id = from_union([from_none, from_str], obj.get("tariff_id"))
656        return ChargingPeriod(dimensions, start_date_time, tariff_id)
657
658    def to_dict(self) -> dict:
659        result: dict = {}
660        result["dimensions"] = from_list(lambda x: to_class(CdrDimension, x), self.dimensions)
661        result["start_date_time"] = from_str(self.start_date_time)
662        if self.tariff_id is not None:
663            result["tariff_id"] = from_union([from_none, from_str], self.tariff_id)
664        return result
ChargingPeriod( dimensions: List[CdrDimension], start_date_time: str, tariff_id: Optional[str])
645    def __init__(self, dimensions: List[CdrDimension], start_date_time: str, tariff_id: Optional[str]) -> None:
646        self.dimensions = dimensions
647        self.start_date_time = start_date_time
648        self.tariff_id = tariff_id
dimensions: List[CdrDimension]
start_date_time: str
tariff_id: Optional[str]
@staticmethod
def from_dict(obj: Any) -> ChargingPeriod:
650    @staticmethod
651    def from_dict(obj: Any) -> 'ChargingPeriod':
652        assert isinstance(obj, dict)
653        dimensions = from_list(CdrDimension.from_dict, obj.get("dimensions"))
654        start_date_time = from_str(obj.get("start_date_time"))
655        tariff_id = from_union([from_none, from_str], obj.get("tariff_id"))
656        return ChargingPeriod(dimensions, start_date_time, tariff_id)
def to_dict(self) -> dict:
658    def to_dict(self) -> dict:
659        result: dict = {}
660        result["dimensions"] = from_list(lambda x: to_class(CdrDimension, x), self.dimensions)
661        result["start_date_time"] = from_str(self.start_date_time)
662        if self.tariff_id is not None:
663            result["tariff_id"] = from_union([from_none, from_str], self.tariff_id)
664        return result
class SignedValue:
667class SignedValue:
668    nature: str
669    plain_data: str
670    signed_data: str
671
672    def __init__(self, nature: str, plain_data: str, signed_data: str) -> None:
673        self.nature = nature
674        self.plain_data = plain_data
675        self.signed_data = signed_data
676
677    @staticmethod
678    def from_dict(obj: Any) -> 'SignedValue':
679        assert isinstance(obj, dict)
680        nature = from_str(obj.get("nature"))
681        plain_data = from_str(obj.get("plain_data"))
682        signed_data = from_str(obj.get("signed_data"))
683        return SignedValue(nature, plain_data, signed_data)
684
685    def to_dict(self) -> dict:
686        result: dict = {}
687        result["nature"] = from_str(self.nature)
688        result["plain_data"] = from_str(self.plain_data)
689        result["signed_data"] = from_str(self.signed_data)
690        return result
SignedValue(nature: str, plain_data: str, signed_data: str)
672    def __init__(self, nature: str, plain_data: str, signed_data: str) -> None:
673        self.nature = nature
674        self.plain_data = plain_data
675        self.signed_data = signed_data
nature: str
plain_data: str
signed_data: str
@staticmethod
def from_dict(obj: Any) -> SignedValue:
677    @staticmethod
678    def from_dict(obj: Any) -> 'SignedValue':
679        assert isinstance(obj, dict)
680        nature = from_str(obj.get("nature"))
681        plain_data = from_str(obj.get("plain_data"))
682        signed_data = from_str(obj.get("signed_data"))
683        return SignedValue(nature, plain_data, signed_data)
def to_dict(self) -> dict:
685    def to_dict(self) -> dict:
686        result: dict = {}
687        result["nature"] = from_str(self.nature)
688        result["plain_data"] = from_str(self.plain_data)
689        result["signed_data"] = from_str(self.signed_data)
690        return result
class SignedData:
693class SignedData:
694    encoding_method: str
695    encoding_method_version: Optional[int]
696    public_key: Optional[str]
697    signed_values: List[SignedValue]
698    url: Optional[str]
699
700    def __init__(self, encoding_method: str, encoding_method_version: Optional[int], public_key: Optional[str], signed_values: List[SignedValue], url: Optional[str]) -> None:
701        self.encoding_method = encoding_method
702        self.encoding_method_version = encoding_method_version
703        self.public_key = public_key
704        self.signed_values = signed_values
705        self.url = url
706
707    @staticmethod
708    def from_dict(obj: Any) -> 'SignedData':
709        assert isinstance(obj, dict)
710        encoding_method = from_str(obj.get("encoding_method"))
711        encoding_method_version = from_union([from_none, from_int], obj.get("encoding_method_version"))
712        public_key = from_union([from_none, from_str], obj.get("public_key"))
713        signed_values = from_list(SignedValue.from_dict, obj.get("signed_values"))
714        url = from_union([from_none, from_str], obj.get("url"))
715        return SignedData(encoding_method, encoding_method_version, public_key, signed_values, url)
716
717    def to_dict(self) -> dict:
718        result: dict = {}
719        result["encoding_method"] = from_str(self.encoding_method)
720        if self.encoding_method_version is not None:
721            result["encoding_method_version"] = from_union([from_none, from_int], self.encoding_method_version)
722        if self.public_key is not None:
723            result["public_key"] = from_union([from_none, from_str], self.public_key)
724        result["signed_values"] = from_list(lambda x: to_class(SignedValue, x), self.signed_values)
725        if self.url is not None:
726            result["url"] = from_union([from_none, from_str], self.url)
727        return result
SignedData( encoding_method: str, encoding_method_version: Optional[int], public_key: Optional[str], signed_values: List[SignedValue], url: Optional[str])
700    def __init__(self, encoding_method: str, encoding_method_version: Optional[int], public_key: Optional[str], signed_values: List[SignedValue], url: Optional[str]) -> None:
701        self.encoding_method = encoding_method
702        self.encoding_method_version = encoding_method_version
703        self.public_key = public_key
704        self.signed_values = signed_values
705        self.url = url
encoding_method: str
encoding_method_version: Optional[int]
public_key: Optional[str]
signed_values: List[SignedValue]
url: Optional[str]
@staticmethod
def from_dict(obj: Any) -> SignedData:
707    @staticmethod
708    def from_dict(obj: Any) -> 'SignedData':
709        assert isinstance(obj, dict)
710        encoding_method = from_str(obj.get("encoding_method"))
711        encoding_method_version = from_union([from_none, from_int], obj.get("encoding_method_version"))
712        public_key = from_union([from_none, from_str], obj.get("public_key"))
713        signed_values = from_list(SignedValue.from_dict, obj.get("signed_values"))
714        url = from_union([from_none, from_str], obj.get("url"))
715        return SignedData(encoding_method, encoding_method_version, public_key, signed_values, url)
def to_dict(self) -> dict:
717    def to_dict(self) -> dict:
718        result: dict = {}
719        result["encoding_method"] = from_str(self.encoding_method)
720        if self.encoding_method_version is not None:
721            result["encoding_method_version"] = from_union([from_none, from_int], self.encoding_method_version)
722        if self.public_key is not None:
723            result["public_key"] = from_union([from_none, from_str], self.public_key)
724        result["signed_values"] = from_list(lambda x: to_class(SignedValue, x), self.signed_values)
725        if self.url is not None:
726            result["url"] = from_union([from_none, from_str], self.url)
727        return result
class TariffDimensionType(enum.Enum):
730class TariffDimensionType(Enum):
731    ENERGY = "ENERGY"
732    FLAT = "FLAT"
733    PARKING_TIME = "PARKING_TIME"
734    TIME = "TIME"
ENERGY = <TariffDimensionType.ENERGY: 'ENERGY'>
FLAT = <TariffDimensionType.FLAT: 'FLAT'>
PARKING_TIME = <TariffDimensionType.PARKING_TIME: 'PARKING_TIME'>
TIME = <TariffDimensionType.TIME: 'TIME'>
class PriceComponent:
737class PriceComponent:
738    price: float
739    step_size: int
740    type: TariffDimensionType
741    vat: Optional[float]
742
743    def __init__(self, price: float, step_size: int, type: TariffDimensionType, vat: Optional[float]) -> None:
744        self.price = price
745        self.step_size = step_size
746        self.type = type
747        self.vat = vat
748
749    @staticmethod
750    def from_dict(obj: Any) -> 'PriceComponent':
751        assert isinstance(obj, dict)
752        price = from_float(obj.get("price"))
753        step_size = from_int(obj.get("step_size"))
754        type = TariffDimensionType(obj.get("type"))
755        vat = from_union([from_none, from_float], obj.get("vat"))
756        return PriceComponent(price, step_size, type, vat)
757
758    def to_dict(self) -> dict:
759        result: dict = {}
760        result["price"] = to_float(self.price)
761        result["step_size"] = from_int(self.step_size)
762        result["type"] = to_enum(TariffDimensionType, self.type)
763        if self.vat is not None:
764            result["vat"] = from_union([from_none, to_float], self.vat)
765        return result
PriceComponent( price: float, step_size: int, type: TariffDimensionType, vat: Optional[float])
743    def __init__(self, price: float, step_size: int, type: TariffDimensionType, vat: Optional[float]) -> None:
744        self.price = price
745        self.step_size = step_size
746        self.type = type
747        self.vat = vat
price: float
step_size: int
vat: Optional[float]
@staticmethod
def from_dict(obj: Any) -> PriceComponent:
749    @staticmethod
750    def from_dict(obj: Any) -> 'PriceComponent':
751        assert isinstance(obj, dict)
752        price = from_float(obj.get("price"))
753        step_size = from_int(obj.get("step_size"))
754        type = TariffDimensionType(obj.get("type"))
755        vat = from_union([from_none, from_float], obj.get("vat"))
756        return PriceComponent(price, step_size, type, vat)
def to_dict(self) -> dict:
758    def to_dict(self) -> dict:
759        result: dict = {}
760        result["price"] = to_float(self.price)
761        result["step_size"] = from_int(self.step_size)
762        result["type"] = to_enum(TariffDimensionType, self.type)
763        if self.vat is not None:
764            result["vat"] = from_union([from_none, to_float], self.vat)
765        return result
class DayOfWeek(enum.Enum):
768class DayOfWeek(Enum):
769    FRIDAY = "FRIDAY"
770    MONDAY = "MONDAY"
771    SATURDAY = "SATURDAY"
772    SUNDAY = "SUNDAY"
773    THURSDAY = "THURSDAY"
774    TUESDAY = "TUESDAY"
775    WEDNESDAY = "WEDNESDAY"
FRIDAY = <DayOfWeek.FRIDAY: 'FRIDAY'>
MONDAY = <DayOfWeek.MONDAY: 'MONDAY'>
SATURDAY = <DayOfWeek.SATURDAY: 'SATURDAY'>
SUNDAY = <DayOfWeek.SUNDAY: 'SUNDAY'>
THURSDAY = <DayOfWeek.THURSDAY: 'THURSDAY'>
TUESDAY = <DayOfWeek.TUESDAY: 'TUESDAY'>
WEDNESDAY = <DayOfWeek.WEDNESDAY: 'WEDNESDAY'>
class ReservationRestrictionType(enum.Enum):
778class ReservationRestrictionType(Enum):
779    RESERVATION = "RESERVATION"
780    RESERVATION_EXPIRES = "RESERVATION_EXPIRES"
RESERVATION = <ReservationRestrictionType.RESERVATION: 'RESERVATION'>
RESERVATION_EXPIRES = <ReservationRestrictionType.RESERVATION_EXPIRES: 'RESERVATION_EXPIRES'>
class TariffRestrictions:
783class TariffRestrictions:
784    day_of_week: Optional[List[DayOfWeek]]
785    end_date: Optional[str]
786    end_time: Optional[str]
787    max_current: Optional[float]
788    max_duration: Optional[int]
789    max_kwh: Optional[float]
790    max_power: Optional[float]
791    min_current: Optional[float]
792    min_duration: Optional[int]
793    min_kwh: Optional[float]
794    min_power: Optional[float]
795    reservation: Optional[ReservationRestrictionType]
796    start_date: Optional[str]
797    start_time: Optional[str]
798
799    def __init__(self, day_of_week: Optional[List[DayOfWeek]], end_date: Optional[str], end_time: Optional[str], max_current: Optional[float], max_duration: Optional[int], max_kwh: Optional[float], max_power: Optional[float], min_current: Optional[float], min_duration: Optional[int], min_kwh: Optional[float], min_power: Optional[float], reservation: Optional[ReservationRestrictionType], start_date: Optional[str], start_time: Optional[str]) -> None:
800        self.day_of_week = day_of_week
801        self.end_date = end_date
802        self.end_time = end_time
803        self.max_current = max_current
804        self.max_duration = max_duration
805        self.max_kwh = max_kwh
806        self.max_power = max_power
807        self.min_current = min_current
808        self.min_duration = min_duration
809        self.min_kwh = min_kwh
810        self.min_power = min_power
811        self.reservation = reservation
812        self.start_date = start_date
813        self.start_time = start_time
814
815    @staticmethod
816    def from_dict(obj: Any) -> 'TariffRestrictions':
817        assert isinstance(obj, dict)
818        day_of_week = from_union([from_none, lambda x: from_list(DayOfWeek, x)], obj.get("day_of_week"))
819        end_date = from_union([from_none, from_str], obj.get("end_date"))
820        end_time = from_union([from_none, from_str], obj.get("end_time"))
821        max_current = from_union([from_none, from_float], obj.get("max_current"))
822        max_duration = from_union([from_none, from_int], obj.get("max_duration"))
823        max_kwh = from_union([from_none, from_float], obj.get("max_kwh"))
824        max_power = from_union([from_none, from_float], obj.get("max_power"))
825        min_current = from_union([from_none, from_float], obj.get("min_current"))
826        min_duration = from_union([from_none, from_int], obj.get("min_duration"))
827        min_kwh = from_union([from_none, from_float], obj.get("min_kwh"))
828        min_power = from_union([from_none, from_float], obj.get("min_power"))
829        reservation = from_union([from_none, ReservationRestrictionType], obj.get("reservation"))
830        start_date = from_union([from_none, from_str], obj.get("start_date"))
831        start_time = from_union([from_none, from_str], obj.get("start_time"))
832        return TariffRestrictions(day_of_week, end_date, end_time, max_current, max_duration, max_kwh, max_power, min_current, min_duration, min_kwh, min_power, reservation, start_date, start_time)
833
834    def to_dict(self) -> dict:
835        result: dict = {}
836        if self.day_of_week is not None:
837            result["day_of_week"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(DayOfWeek, x), x)], self.day_of_week)
838        if self.end_date is not None:
839            result["end_date"] = from_union([from_none, from_str], self.end_date)
840        if self.end_time is not None:
841            result["end_time"] = from_union([from_none, from_str], self.end_time)
842        if self.max_current is not None:
843            result["max_current"] = from_union([from_none, to_float], self.max_current)
844        if self.max_duration is not None:
845            result["max_duration"] = from_union([from_none, from_int], self.max_duration)
846        if self.max_kwh is not None:
847            result["max_kwh"] = from_union([from_none, to_float], self.max_kwh)
848        if self.max_power is not None:
849            result["max_power"] = from_union([from_none, to_float], self.max_power)
850        if self.min_current is not None:
851            result["min_current"] = from_union([from_none, to_float], self.min_current)
852        if self.min_duration is not None:
853            result["min_duration"] = from_union([from_none, from_int], self.min_duration)
854        if self.min_kwh is not None:
855            result["min_kwh"] = from_union([from_none, to_float], self.min_kwh)
856        if self.min_power is not None:
857            result["min_power"] = from_union([from_none, to_float], self.min_power)
858        if self.reservation is not None:
859            result["reservation"] = from_union([from_none, lambda x: to_enum(ReservationRestrictionType, x)], self.reservation)
860        if self.start_date is not None:
861            result["start_date"] = from_union([from_none, from_str], self.start_date)
862        if self.start_time is not None:
863            result["start_time"] = from_union([from_none, from_str], self.start_time)
864        return result
TariffRestrictions( day_of_week: Optional[List[DayOfWeek]], end_date: Optional[str], end_time: Optional[str], max_current: Optional[float], max_duration: Optional[int], max_kwh: Optional[float], max_power: Optional[float], min_current: Optional[float], min_duration: Optional[int], min_kwh: Optional[float], min_power: Optional[float], reservation: Optional[ReservationRestrictionType], start_date: Optional[str], start_time: Optional[str])
799    def __init__(self, day_of_week: Optional[List[DayOfWeek]], end_date: Optional[str], end_time: Optional[str], max_current: Optional[float], max_duration: Optional[int], max_kwh: Optional[float], max_power: Optional[float], min_current: Optional[float], min_duration: Optional[int], min_kwh: Optional[float], min_power: Optional[float], reservation: Optional[ReservationRestrictionType], start_date: Optional[str], start_time: Optional[str]) -> None:
800        self.day_of_week = day_of_week
801        self.end_date = end_date
802        self.end_time = end_time
803        self.max_current = max_current
804        self.max_duration = max_duration
805        self.max_kwh = max_kwh
806        self.max_power = max_power
807        self.min_current = min_current
808        self.min_duration = min_duration
809        self.min_kwh = min_kwh
810        self.min_power = min_power
811        self.reservation = reservation
812        self.start_date = start_date
813        self.start_time = start_time
day_of_week: Optional[List[DayOfWeek]]
end_date: Optional[str]
end_time: Optional[str]
max_current: Optional[float]
max_duration: Optional[int]
max_kwh: Optional[float]
max_power: Optional[float]
min_current: Optional[float]
min_duration: Optional[int]
min_kwh: Optional[float]
min_power: Optional[float]
reservation: Optional[ReservationRestrictionType]
start_date: Optional[str]
start_time: Optional[str]
@staticmethod
def from_dict(obj: Any) -> TariffRestrictions:
815    @staticmethod
816    def from_dict(obj: Any) -> 'TariffRestrictions':
817        assert isinstance(obj, dict)
818        day_of_week = from_union([from_none, lambda x: from_list(DayOfWeek, x)], obj.get("day_of_week"))
819        end_date = from_union([from_none, from_str], obj.get("end_date"))
820        end_time = from_union([from_none, from_str], obj.get("end_time"))
821        max_current = from_union([from_none, from_float], obj.get("max_current"))
822        max_duration = from_union([from_none, from_int], obj.get("max_duration"))
823        max_kwh = from_union([from_none, from_float], obj.get("max_kwh"))
824        max_power = from_union([from_none, from_float], obj.get("max_power"))
825        min_current = from_union([from_none, from_float], obj.get("min_current"))
826        min_duration = from_union([from_none, from_int], obj.get("min_duration"))
827        min_kwh = from_union([from_none, from_float], obj.get("min_kwh"))
828        min_power = from_union([from_none, from_float], obj.get("min_power"))
829        reservation = from_union([from_none, ReservationRestrictionType], obj.get("reservation"))
830        start_date = from_union([from_none, from_str], obj.get("start_date"))
831        start_time = from_union([from_none, from_str], obj.get("start_time"))
832        return TariffRestrictions(day_of_week, end_date, end_time, max_current, max_duration, max_kwh, max_power, min_current, min_duration, min_kwh, min_power, reservation, start_date, start_time)
def to_dict(self) -> dict:
834    def to_dict(self) -> dict:
835        result: dict = {}
836        if self.day_of_week is not None:
837            result["day_of_week"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(DayOfWeek, x), x)], self.day_of_week)
838        if self.end_date is not None:
839            result["end_date"] = from_union([from_none, from_str], self.end_date)
840        if self.end_time is not None:
841            result["end_time"] = from_union([from_none, from_str], self.end_time)
842        if self.max_current is not None:
843            result["max_current"] = from_union([from_none, to_float], self.max_current)
844        if self.max_duration is not None:
845            result["max_duration"] = from_union([from_none, from_int], self.max_duration)
846        if self.max_kwh is not None:
847            result["max_kwh"] = from_union([from_none, to_float], self.max_kwh)
848        if self.max_power is not None:
849            result["max_power"] = from_union([from_none, to_float], self.max_power)
850        if self.min_current is not None:
851            result["min_current"] = from_union([from_none, to_float], self.min_current)
852        if self.min_duration is not None:
853            result["min_duration"] = from_union([from_none, from_int], self.min_duration)
854        if self.min_kwh is not None:
855            result["min_kwh"] = from_union([from_none, to_float], self.min_kwh)
856        if self.min_power is not None:
857            result["min_power"] = from_union([from_none, to_float], self.min_power)
858        if self.reservation is not None:
859            result["reservation"] = from_union([from_none, lambda x: to_enum(ReservationRestrictionType, x)], self.reservation)
860        if self.start_date is not None:
861            result["start_date"] = from_union([from_none, from_str], self.start_date)
862        if self.start_time is not None:
863            result["start_time"] = from_union([from_none, from_str], self.start_time)
864        return result
class TariffElement:
867class TariffElement:
868    price_components: List[PriceComponent]
869    restrictions: Optional[TariffRestrictions]
870
871    def __init__(self, price_components: List[PriceComponent], restrictions: Optional[TariffRestrictions]) -> None:
872        self.price_components = price_components
873        self.restrictions = restrictions
874
875    @staticmethod
876    def from_dict(obj: Any) -> 'TariffElement':
877        assert isinstance(obj, dict)
878        price_components = from_list(PriceComponent.from_dict, obj.get("price_components"))
879        restrictions = from_union([from_none, TariffRestrictions.from_dict], obj.get("restrictions"))
880        return TariffElement(price_components, restrictions)
881
882    def to_dict(self) -> dict:
883        result: dict = {}
884        result["price_components"] = from_list(lambda x: to_class(PriceComponent, x), self.price_components)
885        if self.restrictions is not None:
886            result["restrictions"] = from_union([from_none, lambda x: to_class(TariffRestrictions, x)], self.restrictions)
887        return result
TariffElement( price_components: List[PriceComponent], restrictions: Optional[TariffRestrictions])
871    def __init__(self, price_components: List[PriceComponent], restrictions: Optional[TariffRestrictions]) -> None:
872        self.price_components = price_components
873        self.restrictions = restrictions
price_components: List[PriceComponent]
restrictions: Optional[TariffRestrictions]
@staticmethod
def from_dict(obj: Any) -> TariffElement:
875    @staticmethod
876    def from_dict(obj: Any) -> 'TariffElement':
877        assert isinstance(obj, dict)
878        price_components = from_list(PriceComponent.from_dict, obj.get("price_components"))
879        restrictions = from_union([from_none, TariffRestrictions.from_dict], obj.get("restrictions"))
880        return TariffElement(price_components, restrictions)
def to_dict(self) -> dict:
882    def to_dict(self) -> dict:
883        result: dict = {}
884        result["price_components"] = from_list(lambda x: to_class(PriceComponent, x), self.price_components)
885        if self.restrictions is not None:
886            result["restrictions"] = from_union([from_none, lambda x: to_class(TariffRestrictions, x)], self.restrictions)
887        return result
class EnergySourceCategory(enum.Enum):
890class EnergySourceCategory(Enum):
891    COAL = "COAL"
892    GAS = "GAS"
893    GENERAL_FOSSIL = "GENERAL_FOSSIL"
894    GENERAL_GREEN = "GENERAL_GREEN"
895    NUCLEAR = "NUCLEAR"
896    SOLAR = "SOLAR"
897    WATER = "WATER"
898    WIND = "WIND"
COAL = <EnergySourceCategory.COAL: 'COAL'>
GAS = <EnergySourceCategory.GAS: 'GAS'>
GENERAL_FOSSIL = <EnergySourceCategory.GENERAL_FOSSIL: 'GENERAL_FOSSIL'>
GENERAL_GREEN = <EnergySourceCategory.GENERAL_GREEN: 'GENERAL_GREEN'>
NUCLEAR = <EnergySourceCategory.NUCLEAR: 'NUCLEAR'>
SOLAR = <EnergySourceCategory.SOLAR: 'SOLAR'>
WATER = <EnergySourceCategory.WATER: 'WATER'>
WIND = <EnergySourceCategory.WIND: 'WIND'>
class EnergySource:
901class EnergySource:
902    percentage: float
903    source: EnergySourceCategory
904
905    def __init__(self, percentage: float, source: EnergySourceCategory) -> None:
906        self.percentage = percentage
907        self.source = source
908
909    @staticmethod
910    def from_dict(obj: Any) -> 'EnergySource':
911        assert isinstance(obj, dict)
912        percentage = from_float(obj.get("percentage"))
913        source = EnergySourceCategory(obj.get("source"))
914        return EnergySource(percentage, source)
915
916    def to_dict(self) -> dict:
917        result: dict = {}
918        result["percentage"] = to_float(self.percentage)
919        result["source"] = to_enum(EnergySourceCategory, self.source)
920        return result
EnergySource(percentage: float, source: EnergySourceCategory)
905    def __init__(self, percentage: float, source: EnergySourceCategory) -> None:
906        self.percentage = percentage
907        self.source = source
percentage: float
@staticmethod
def from_dict(obj: Any) -> EnergySource:
909    @staticmethod
910    def from_dict(obj: Any) -> 'EnergySource':
911        assert isinstance(obj, dict)
912        percentage = from_float(obj.get("percentage"))
913        source = EnergySourceCategory(obj.get("source"))
914        return EnergySource(percentage, source)
def to_dict(self) -> dict:
916    def to_dict(self) -> dict:
917        result: dict = {}
918        result["percentage"] = to_float(self.percentage)
919        result["source"] = to_enum(EnergySourceCategory, self.source)
920        return result
class EnvironmentalImpactCategory(enum.Enum):
923class EnvironmentalImpactCategory(Enum):
924    CARBON_DIOXIDE = "CARBON_DIOXIDE"
925    NUCLEAR_WASTE = "NUCLEAR_WASTE"
CARBON_DIOXIDE = <EnvironmentalImpactCategory.CARBON_DIOXIDE: 'CARBON_DIOXIDE'>
NUCLEAR_WASTE = <EnvironmentalImpactCategory.NUCLEAR_WASTE: 'NUCLEAR_WASTE'>
class EnvironmentalImpact:
928class EnvironmentalImpact:
929    amount: float
930    category: EnvironmentalImpactCategory
931
932    def __init__(self, amount: float, category: EnvironmentalImpactCategory) -> None:
933        self.amount = amount
934        self.category = category
935
936    @staticmethod
937    def from_dict(obj: Any) -> 'EnvironmentalImpact':
938        assert isinstance(obj, dict)
939        amount = from_float(obj.get("amount"))
940        category = EnvironmentalImpactCategory(obj.get("category"))
941        return EnvironmentalImpact(amount, category)
942
943    def to_dict(self) -> dict:
944        result: dict = {}
945        result["amount"] = to_float(self.amount)
946        result["category"] = to_enum(EnvironmentalImpactCategory, self.category)
947        return result
EnvironmentalImpact(amount: float, category: EnvironmentalImpactCategory)
932    def __init__(self, amount: float, category: EnvironmentalImpactCategory) -> None:
933        self.amount = amount
934        self.category = category
amount: float
@staticmethod
def from_dict(obj: Any) -> EnvironmentalImpact:
936    @staticmethod
937    def from_dict(obj: Any) -> 'EnvironmentalImpact':
938        assert isinstance(obj, dict)
939        amount = from_float(obj.get("amount"))
940        category = EnvironmentalImpactCategory(obj.get("category"))
941        return EnvironmentalImpact(amount, category)
def to_dict(self) -> dict:
943    def to_dict(self) -> dict:
944        result: dict = {}
945        result["amount"] = to_float(self.amount)
946        result["category"] = to_enum(EnvironmentalImpactCategory, self.category)
947        return result
class EnergyMix:
950class EnergyMix:
951    energy_product_name: Optional[str]
952    energy_sources: Optional[List[EnergySource]]
953    environ_impact: Optional[List[EnvironmentalImpact]]
954    is_green_energy: bool
955    supplier_name: Optional[str]
956
957    def __init__(self, energy_product_name: Optional[str], energy_sources: Optional[List[EnergySource]], environ_impact: Optional[List[EnvironmentalImpact]], is_green_energy: bool, supplier_name: Optional[str]) -> None:
958        self.energy_product_name = energy_product_name
959        self.energy_sources = energy_sources
960        self.environ_impact = environ_impact
961        self.is_green_energy = is_green_energy
962        self.supplier_name = supplier_name
963
964    @staticmethod
965    def from_dict(obj: Any) -> 'EnergyMix':
966        assert isinstance(obj, dict)
967        energy_product_name = from_union([from_none, from_str], obj.get("energy_product_name"))
968        energy_sources = from_union([from_none, lambda x: from_list(EnergySource.from_dict, x)], obj.get("energy_sources"))
969        environ_impact = from_union([from_none, lambda x: from_list(EnvironmentalImpact.from_dict, x)], obj.get("environ_impact"))
970        is_green_energy = from_bool(obj.get("is_green_energy"))
971        supplier_name = from_union([from_none, from_str], obj.get("supplier_name"))
972        return EnergyMix(energy_product_name, energy_sources, environ_impact, is_green_energy, supplier_name)
973
974    def to_dict(self) -> dict:
975        result: dict = {}
976        if self.energy_product_name is not None:
977            result["energy_product_name"] = from_union([from_none, from_str], self.energy_product_name)
978        if self.energy_sources is not None:
979            result["energy_sources"] = from_union([from_none, lambda x: from_list(lambda x: to_class(EnergySource, x), x)], self.energy_sources)
980        if self.environ_impact is not None:
981            result["environ_impact"] = from_union([from_none, lambda x: from_list(lambda x: to_class(EnvironmentalImpact, x), x)], self.environ_impact)
982        result["is_green_energy"] = from_bool(self.is_green_energy)
983        if self.supplier_name is not None:
984            result["supplier_name"] = from_union([from_none, from_str], self.supplier_name)
985        return result
EnergyMix( energy_product_name: Optional[str], energy_sources: Optional[List[EnergySource]], environ_impact: Optional[List[EnvironmentalImpact]], is_green_energy: bool, supplier_name: Optional[str])
957    def __init__(self, energy_product_name: Optional[str], energy_sources: Optional[List[EnergySource]], environ_impact: Optional[List[EnvironmentalImpact]], is_green_energy: bool, supplier_name: Optional[str]) -> None:
958        self.energy_product_name = energy_product_name
959        self.energy_sources = energy_sources
960        self.environ_impact = environ_impact
961        self.is_green_energy = is_green_energy
962        self.supplier_name = supplier_name
energy_product_name: Optional[str]
energy_sources: Optional[List[EnergySource]]
environ_impact: Optional[List[EnvironmentalImpact]]
is_green_energy: bool
supplier_name: Optional[str]
@staticmethod
def from_dict(obj: Any) -> EnergyMix:
964    @staticmethod
965    def from_dict(obj: Any) -> 'EnergyMix':
966        assert isinstance(obj, dict)
967        energy_product_name = from_union([from_none, from_str], obj.get("energy_product_name"))
968        energy_sources = from_union([from_none, lambda x: from_list(EnergySource.from_dict, x)], obj.get("energy_sources"))
969        environ_impact = from_union([from_none, lambda x: from_list(EnvironmentalImpact.from_dict, x)], obj.get("environ_impact"))
970        is_green_energy = from_bool(obj.get("is_green_energy"))
971        supplier_name = from_union([from_none, from_str], obj.get("supplier_name"))
972        return EnergyMix(energy_product_name, energy_sources, environ_impact, is_green_energy, supplier_name)
def to_dict(self) -> dict:
974    def to_dict(self) -> dict:
975        result: dict = {}
976        if self.energy_product_name is not None:
977            result["energy_product_name"] = from_union([from_none, from_str], self.energy_product_name)
978        if self.energy_sources is not None:
979            result["energy_sources"] = from_union([from_none, lambda x: from_list(lambda x: to_class(EnergySource, x), x)], self.energy_sources)
980        if self.environ_impact is not None:
981            result["environ_impact"] = from_union([from_none, lambda x: from_list(lambda x: to_class(EnvironmentalImpact, x), x)], self.environ_impact)
982        result["is_green_energy"] = from_bool(self.is_green_energy)
983        if self.supplier_name is not None:
984            result["supplier_name"] = from_union([from_none, from_str], self.supplier_name)
985        return result
class Price:
 988class Price:
 989    excl_vat: float
 990    incl_vat: Optional[float]
 991
 992    def __init__(self, excl_vat: float, incl_vat: Optional[float]) -> None:
 993        self.excl_vat = excl_vat
 994        self.incl_vat = incl_vat
 995
 996    @staticmethod
 997    def from_dict(obj: Any) -> 'Price':
 998        assert isinstance(obj, dict)
 999        excl_vat = from_float(obj.get("excl_vat"))
1000        incl_vat = from_union([from_none, from_float], obj.get("incl_vat"))
1001        return Price(excl_vat, incl_vat)
1002
1003    def to_dict(self) -> dict:
1004        result: dict = {}
1005        result["excl_vat"] = to_float(self.excl_vat)
1006        if self.incl_vat is not None:
1007            result["incl_vat"] = from_union([from_none, to_float], self.incl_vat)
1008        return result
Price(excl_vat: float, incl_vat: Optional[float])
992    def __init__(self, excl_vat: float, incl_vat: Optional[float]) -> None:
993        self.excl_vat = excl_vat
994        self.incl_vat = incl_vat
excl_vat: float
incl_vat: Optional[float]
@staticmethod
def from_dict(obj: Any) -> Price:
 996    @staticmethod
 997    def from_dict(obj: Any) -> 'Price':
 998        assert isinstance(obj, dict)
 999        excl_vat = from_float(obj.get("excl_vat"))
1000        incl_vat = from_union([from_none, from_float], obj.get("incl_vat"))
1001        return Price(excl_vat, incl_vat)
def to_dict(self) -> dict:
1003    def to_dict(self) -> dict:
1004        result: dict = {}
1005        result["excl_vat"] = to_float(self.excl_vat)
1006        if self.incl_vat is not None:
1007            result["incl_vat"] = from_union([from_none, to_float], self.incl_vat)
1008        return result
class TariffType(enum.Enum):
1011class TariffType(Enum):
1012    AD_HOC_PAYMENT = "AD_HOC_PAYMENT"
1013    PROFILE_CHEAP = "PROFILE_CHEAP"
1014    PROFILE_FAST = "PROFILE_FAST"
1015    PROFILE_GREEN = "PROFILE_GREEN"
1016    REGULAR = "REGULAR"
AD_HOC_PAYMENT = <TariffType.AD_HOC_PAYMENT: 'AD_HOC_PAYMENT'>
PROFILE_CHEAP = <TariffType.PROFILE_CHEAP: 'PROFILE_CHEAP'>
PROFILE_FAST = <TariffType.PROFILE_FAST: 'PROFILE_FAST'>
PROFILE_GREEN = <TariffType.PROFILE_GREEN: 'PROFILE_GREEN'>
REGULAR = <TariffType.REGULAR: 'REGULAR'>
class Tariff:
1019class Tariff:
1020    country_code: str
1021    currency: str
1022    elements: List[TariffElement]
1023    end_date_time: Optional[str]
1024    energy_mix: Optional[EnergyMix]
1025    id: str
1026    last_updated: str
1027    max_price: Optional[Price]
1028    min_price: Optional[Price]
1029    party_id: str
1030    start_date_time: Optional[str]
1031    tariff_alt_text: Optional[List[DisplayText]]
1032    tariff_alt_url: Optional[str]
1033    type: Optional[TariffType]
1034
1035    def __init__(self, country_code: str, currency: str, elements: List[TariffElement], end_date_time: Optional[str], energy_mix: Optional[EnergyMix], id: str, last_updated: str, max_price: Optional[Price], min_price: Optional[Price], party_id: str, start_date_time: Optional[str], tariff_alt_text: Optional[List[DisplayText]], tariff_alt_url: Optional[str], type: Optional[TariffType]) -> None:
1036        self.country_code = country_code
1037        self.currency = currency
1038        self.elements = elements
1039        self.end_date_time = end_date_time
1040        self.energy_mix = energy_mix
1041        self.id = id
1042        self.last_updated = last_updated
1043        self.max_price = max_price
1044        self.min_price = min_price
1045        self.party_id = party_id
1046        self.start_date_time = start_date_time
1047        self.tariff_alt_text = tariff_alt_text
1048        self.tariff_alt_url = tariff_alt_url
1049        self.type = type
1050
1051    @staticmethod
1052    def from_dict(obj: Any) -> 'Tariff':
1053        assert isinstance(obj, dict)
1054        country_code = from_str(obj.get("country_code"))
1055        currency = from_str(obj.get("currency"))
1056        elements = from_list(TariffElement.from_dict, obj.get("elements"))
1057        end_date_time = from_union([from_none, from_str], obj.get("end_date_time"))
1058        energy_mix = from_union([from_none, EnergyMix.from_dict], obj.get("energy_mix"))
1059        id = from_str(obj.get("id"))
1060        last_updated = from_str(obj.get("last_updated"))
1061        max_price = from_union([from_none, Price.from_dict], obj.get("max_price"))
1062        min_price = from_union([from_none, Price.from_dict], obj.get("min_price"))
1063        party_id = from_str(obj.get("party_id"))
1064        start_date_time = from_union([from_none, from_str], obj.get("start_date_time"))
1065        tariff_alt_text = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("tariff_alt_text"))
1066        tariff_alt_url = from_union([from_none, from_str], obj.get("tariff_alt_url"))
1067        type = from_union([from_none, TariffType], obj.get("type"))
1068        return Tariff(country_code, currency, elements, end_date_time, energy_mix, id, last_updated, max_price, min_price, party_id, start_date_time, tariff_alt_text, tariff_alt_url, type)
1069
1070    def to_dict(self) -> dict:
1071        result: dict = {}
1072        result["country_code"] = from_str(self.country_code)
1073        result["currency"] = from_str(self.currency)
1074        result["elements"] = from_list(lambda x: to_class(TariffElement, x), self.elements)
1075        if self.end_date_time is not None:
1076            result["end_date_time"] = from_union([from_none, from_str], self.end_date_time)
1077        if self.energy_mix is not None:
1078            result["energy_mix"] = from_union([from_none, lambda x: to_class(EnergyMix, x)], self.energy_mix)
1079        result["id"] = from_str(self.id)
1080        result["last_updated"] = from_str(self.last_updated)
1081        if self.max_price is not None:
1082            result["max_price"] = from_union([from_none, lambda x: to_class(Price, x)], self.max_price)
1083        if self.min_price is not None:
1084            result["min_price"] = from_union([from_none, lambda x: to_class(Price, x)], self.min_price)
1085        result["party_id"] = from_str(self.party_id)
1086        if self.start_date_time is not None:
1087            result["start_date_time"] = from_union([from_none, from_str], self.start_date_time)
1088        if self.tariff_alt_text is not None:
1089            result["tariff_alt_text"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.tariff_alt_text)
1090        if self.tariff_alt_url is not None:
1091            result["tariff_alt_url"] = from_union([from_none, from_str], self.tariff_alt_url)
1092        if self.type is not None:
1093            result["type"] = from_union([from_none, lambda x: to_enum(TariffType, x)], self.type)
1094        return result
Tariff( country_code: str, currency: str, elements: List[TariffElement], end_date_time: Optional[str], energy_mix: Optional[EnergyMix], id: str, last_updated: str, max_price: Optional[Price], min_price: Optional[Price], party_id: str, start_date_time: Optional[str], tariff_alt_text: Optional[List[DisplayText]], tariff_alt_url: Optional[str], type: Optional[TariffType])
1035    def __init__(self, country_code: str, currency: str, elements: List[TariffElement], end_date_time: Optional[str], energy_mix: Optional[EnergyMix], id: str, last_updated: str, max_price: Optional[Price], min_price: Optional[Price], party_id: str, start_date_time: Optional[str], tariff_alt_text: Optional[List[DisplayText]], tariff_alt_url: Optional[str], type: Optional[TariffType]) -> None:
1036        self.country_code = country_code
1037        self.currency = currency
1038        self.elements = elements
1039        self.end_date_time = end_date_time
1040        self.energy_mix = energy_mix
1041        self.id = id
1042        self.last_updated = last_updated
1043        self.max_price = max_price
1044        self.min_price = min_price
1045        self.party_id = party_id
1046        self.start_date_time = start_date_time
1047        self.tariff_alt_text = tariff_alt_text
1048        self.tariff_alt_url = tariff_alt_url
1049        self.type = type
country_code: str
currency: str
elements: List[TariffElement]
end_date_time: Optional[str]
energy_mix: Optional[EnergyMix]
id: str
last_updated: str
max_price: Optional[Price]
min_price: Optional[Price]
party_id: str
start_date_time: Optional[str]
tariff_alt_text: Optional[List[DisplayText]]
tariff_alt_url: Optional[str]
type: Optional[TariffType]
@staticmethod
def from_dict(obj: Any) -> Tariff:
1051    @staticmethod
1052    def from_dict(obj: Any) -> 'Tariff':
1053        assert isinstance(obj, dict)
1054        country_code = from_str(obj.get("country_code"))
1055        currency = from_str(obj.get("currency"))
1056        elements = from_list(TariffElement.from_dict, obj.get("elements"))
1057        end_date_time = from_union([from_none, from_str], obj.get("end_date_time"))
1058        energy_mix = from_union([from_none, EnergyMix.from_dict], obj.get("energy_mix"))
1059        id = from_str(obj.get("id"))
1060        last_updated = from_str(obj.get("last_updated"))
1061        max_price = from_union([from_none, Price.from_dict], obj.get("max_price"))
1062        min_price = from_union([from_none, Price.from_dict], obj.get("min_price"))
1063        party_id = from_str(obj.get("party_id"))
1064        start_date_time = from_union([from_none, from_str], obj.get("start_date_time"))
1065        tariff_alt_text = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("tariff_alt_text"))
1066        tariff_alt_url = from_union([from_none, from_str], obj.get("tariff_alt_url"))
1067        type = from_union([from_none, TariffType], obj.get("type"))
1068        return Tariff(country_code, currency, elements, end_date_time, energy_mix, id, last_updated, max_price, min_price, party_id, start_date_time, tariff_alt_text, tariff_alt_url, type)
def to_dict(self) -> dict:
1070    def to_dict(self) -> dict:
1071        result: dict = {}
1072        result["country_code"] = from_str(self.country_code)
1073        result["currency"] = from_str(self.currency)
1074        result["elements"] = from_list(lambda x: to_class(TariffElement, x), self.elements)
1075        if self.end_date_time is not None:
1076            result["end_date_time"] = from_union([from_none, from_str], self.end_date_time)
1077        if self.energy_mix is not None:
1078            result["energy_mix"] = from_union([from_none, lambda x: to_class(EnergyMix, x)], self.energy_mix)
1079        result["id"] = from_str(self.id)
1080        result["last_updated"] = from_str(self.last_updated)
1081        if self.max_price is not None:
1082            result["max_price"] = from_union([from_none, lambda x: to_class(Price, x)], self.max_price)
1083        if self.min_price is not None:
1084            result["min_price"] = from_union([from_none, lambda x: to_class(Price, x)], self.min_price)
1085        result["party_id"] = from_str(self.party_id)
1086        if self.start_date_time is not None:
1087            result["start_date_time"] = from_union([from_none, from_str], self.start_date_time)
1088        if self.tariff_alt_text is not None:
1089            result["tariff_alt_text"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.tariff_alt_text)
1090        if self.tariff_alt_url is not None:
1091            result["tariff_alt_url"] = from_union([from_none, from_str], self.tariff_alt_url)
1092        if self.type is not None:
1093            result["type"] = from_union([from_none, lambda x: to_enum(TariffType, x)], self.type)
1094        return result
class Cdr:
1097class Cdr:
1098    auth_method: AuthMethod
1099    authorization_reference: Optional[str]
1100    cdr_location: CdrLocation
1101    cdr_token: CdrToken
1102    charging_periods: List[ChargingPeriod]
1103    country_code: str
1104    credit: Optional[bool]
1105    credit_reference_id: Optional[str]
1106    currency: str
1107    end_date_time: str
1108    home_charging_compensation: Optional[bool]
1109    id: str
1110    invoice_reference_id: Optional[str]
1111    last_updated: str
1112    meter_id: Optional[str]
1113    party_id: str
1114    remark: Optional[str]
1115    session_id: Optional[str]
1116    signed_data: Optional[SignedData]
1117    start_date_time: str
1118    tariffs: Optional[List[Tariff]]
1119    total_cost: Price
1120    total_energy: float
1121    total_energy_cost: Optional[Price]
1122    total_fixed_cost: Optional[Price]
1123    total_parking_cost: Optional[Price]
1124    total_parking_time: Optional[float]
1125    total_reservation_cost: Optional[Price]
1126    total_time: float
1127    total_time_cost: Optional[Price]
1128
1129    def __init__(self, auth_method: AuthMethod, authorization_reference: Optional[str], cdr_location: CdrLocation, cdr_token: CdrToken, charging_periods: List[ChargingPeriod], country_code: str, credit: Optional[bool], credit_reference_id: Optional[str], currency: str, end_date_time: str, home_charging_compensation: Optional[bool], id: str, invoice_reference_id: Optional[str], last_updated: str, meter_id: Optional[str], party_id: str, remark: Optional[str], session_id: Optional[str], signed_data: Optional[SignedData], start_date_time: str, tariffs: Optional[List[Tariff]], total_cost: Price, total_energy: float, total_energy_cost: Optional[Price], total_fixed_cost: Optional[Price], total_parking_cost: Optional[Price], total_parking_time: Optional[float], total_reservation_cost: Optional[Price], total_time: float, total_time_cost: Optional[Price]) -> None:
1130        self.auth_method = auth_method
1131        self.authorization_reference = authorization_reference
1132        self.cdr_location = cdr_location
1133        self.cdr_token = cdr_token
1134        self.charging_periods = charging_periods
1135        self.country_code = country_code
1136        self.credit = credit
1137        self.credit_reference_id = credit_reference_id
1138        self.currency = currency
1139        self.end_date_time = end_date_time
1140        self.home_charging_compensation = home_charging_compensation
1141        self.id = id
1142        self.invoice_reference_id = invoice_reference_id
1143        self.last_updated = last_updated
1144        self.meter_id = meter_id
1145        self.party_id = party_id
1146        self.remark = remark
1147        self.session_id = session_id
1148        self.signed_data = signed_data
1149        self.start_date_time = start_date_time
1150        self.tariffs = tariffs
1151        self.total_cost = total_cost
1152        self.total_energy = total_energy
1153        self.total_energy_cost = total_energy_cost
1154        self.total_fixed_cost = total_fixed_cost
1155        self.total_parking_cost = total_parking_cost
1156        self.total_parking_time = total_parking_time
1157        self.total_reservation_cost = total_reservation_cost
1158        self.total_time = total_time
1159        self.total_time_cost = total_time_cost
1160
1161    @staticmethod
1162    def from_dict(obj: Any) -> 'Cdr':
1163        assert isinstance(obj, dict)
1164        auth_method = AuthMethod(obj.get("auth_method"))
1165        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
1166        cdr_location = CdrLocation.from_dict(obj.get("cdr_location"))
1167        cdr_token = CdrToken.from_dict(obj.get("cdr_token"))
1168        charging_periods = from_list(ChargingPeriod.from_dict, obj.get("charging_periods"))
1169        country_code = from_str(obj.get("country_code"))
1170        credit = from_union([from_none, from_bool], obj.get("credit"))
1171        credit_reference_id = from_union([from_none, from_str], obj.get("credit_reference_id"))
1172        currency = from_str(obj.get("currency"))
1173        end_date_time = from_str(obj.get("end_date_time"))
1174        home_charging_compensation = from_union([from_none, from_bool], obj.get("home_charging_compensation"))
1175        id = from_str(obj.get("id"))
1176        invoice_reference_id = from_union([from_none, from_str], obj.get("invoice_reference_id"))
1177        last_updated = from_str(obj.get("last_updated"))
1178        meter_id = from_union([from_none, from_str], obj.get("meter_id"))
1179        party_id = from_str(obj.get("party_id"))
1180        remark = from_union([from_none, from_str], obj.get("remark"))
1181        session_id = from_union([from_none, from_str], obj.get("session_id"))
1182        signed_data = from_union([from_none, SignedData.from_dict], obj.get("signed_data"))
1183        start_date_time = from_str(obj.get("start_date_time"))
1184        tariffs = from_union([from_none, lambda x: from_list(Tariff.from_dict, x)], obj.get("tariffs"))
1185        total_cost = Price.from_dict(obj.get("total_cost"))
1186        total_energy = from_float(obj.get("total_energy"))
1187        total_energy_cost = from_union([from_none, Price.from_dict], obj.get("total_energy_cost"))
1188        total_fixed_cost = from_union([from_none, Price.from_dict], obj.get("total_fixed_cost"))
1189        total_parking_cost = from_union([from_none, Price.from_dict], obj.get("total_parking_cost"))
1190        total_parking_time = from_union([from_none, from_float], obj.get("total_parking_time"))
1191        total_reservation_cost = from_union([from_none, Price.from_dict], obj.get("total_reservation_cost"))
1192        total_time = from_float(obj.get("total_time"))
1193        total_time_cost = from_union([from_none, Price.from_dict], obj.get("total_time_cost"))
1194        return Cdr(auth_method, authorization_reference, cdr_location, cdr_token, charging_periods, country_code, credit, credit_reference_id, currency, end_date_time, home_charging_compensation, id, invoice_reference_id, last_updated, meter_id, party_id, remark, session_id, signed_data, start_date_time, tariffs, total_cost, total_energy, total_energy_cost, total_fixed_cost, total_parking_cost, total_parking_time, total_reservation_cost, total_time, total_time_cost)
1195
1196    def to_dict(self) -> dict:
1197        result: dict = {}
1198        result["auth_method"] = to_enum(AuthMethod, self.auth_method)
1199        if self.authorization_reference is not None:
1200            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
1201        result["cdr_location"] = to_class(CdrLocation, self.cdr_location)
1202        result["cdr_token"] = to_class(CdrToken, self.cdr_token)
1203        result["charging_periods"] = from_list(lambda x: to_class(ChargingPeriod, x), self.charging_periods)
1204        result["country_code"] = from_str(self.country_code)
1205        if self.credit is not None:
1206            result["credit"] = from_union([from_none, from_bool], self.credit)
1207        if self.credit_reference_id is not None:
1208            result["credit_reference_id"] = from_union([from_none, from_str], self.credit_reference_id)
1209        result["currency"] = from_str(self.currency)
1210        result["end_date_time"] = from_str(self.end_date_time)
1211        if self.home_charging_compensation is not None:
1212            result["home_charging_compensation"] = from_union([from_none, from_bool], self.home_charging_compensation)
1213        result["id"] = from_str(self.id)
1214        if self.invoice_reference_id is not None:
1215            result["invoice_reference_id"] = from_union([from_none, from_str], self.invoice_reference_id)
1216        result["last_updated"] = from_str(self.last_updated)
1217        if self.meter_id is not None:
1218            result["meter_id"] = from_union([from_none, from_str], self.meter_id)
1219        result["party_id"] = from_str(self.party_id)
1220        if self.remark is not None:
1221            result["remark"] = from_union([from_none, from_str], self.remark)
1222        if self.session_id is not None:
1223            result["session_id"] = from_union([from_none, from_str], self.session_id)
1224        if self.signed_data is not None:
1225            result["signed_data"] = from_union([from_none, lambda x: to_class(SignedData, x)], self.signed_data)
1226        result["start_date_time"] = from_str(self.start_date_time)
1227        if self.tariffs is not None:
1228            result["tariffs"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Tariff, x), x)], self.tariffs)
1229        result["total_cost"] = to_class(Price, self.total_cost)
1230        result["total_energy"] = to_float(self.total_energy)
1231        if self.total_energy_cost is not None:
1232            result["total_energy_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_energy_cost)
1233        if self.total_fixed_cost is not None:
1234            result["total_fixed_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_fixed_cost)
1235        if self.total_parking_cost is not None:
1236            result["total_parking_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_parking_cost)
1237        if self.total_parking_time is not None:
1238            result["total_parking_time"] = from_union([from_none, to_float], self.total_parking_time)
1239        if self.total_reservation_cost is not None:
1240            result["total_reservation_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_reservation_cost)
1241        result["total_time"] = to_float(self.total_time)
1242        if self.total_time_cost is not None:
1243            result["total_time_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_time_cost)
1244        return result
Cdr( auth_method: AuthMethod, authorization_reference: Optional[str], cdr_location: CdrLocation, cdr_token: CdrToken, charging_periods: List[ChargingPeriod], country_code: str, credit: Optional[bool], credit_reference_id: Optional[str], currency: str, end_date_time: str, home_charging_compensation: Optional[bool], id: str, invoice_reference_id: Optional[str], last_updated: str, meter_id: Optional[str], party_id: str, remark: Optional[str], session_id: Optional[str], signed_data: Optional[SignedData], start_date_time: str, tariffs: Optional[List[Tariff]], total_cost: Price, total_energy: float, total_energy_cost: Optional[Price], total_fixed_cost: Optional[Price], total_parking_cost: Optional[Price], total_parking_time: Optional[float], total_reservation_cost: Optional[Price], total_time: float, total_time_cost: Optional[Price])
1129    def __init__(self, auth_method: AuthMethod, authorization_reference: Optional[str], cdr_location: CdrLocation, cdr_token: CdrToken, charging_periods: List[ChargingPeriod], country_code: str, credit: Optional[bool], credit_reference_id: Optional[str], currency: str, end_date_time: str, home_charging_compensation: Optional[bool], id: str, invoice_reference_id: Optional[str], last_updated: str, meter_id: Optional[str], party_id: str, remark: Optional[str], session_id: Optional[str], signed_data: Optional[SignedData], start_date_time: str, tariffs: Optional[List[Tariff]], total_cost: Price, total_energy: float, total_energy_cost: Optional[Price], total_fixed_cost: Optional[Price], total_parking_cost: Optional[Price], total_parking_time: Optional[float], total_reservation_cost: Optional[Price], total_time: float, total_time_cost: Optional[Price]) -> None:
1130        self.auth_method = auth_method
1131        self.authorization_reference = authorization_reference
1132        self.cdr_location = cdr_location
1133        self.cdr_token = cdr_token
1134        self.charging_periods = charging_periods
1135        self.country_code = country_code
1136        self.credit = credit
1137        self.credit_reference_id = credit_reference_id
1138        self.currency = currency
1139        self.end_date_time = end_date_time
1140        self.home_charging_compensation = home_charging_compensation
1141        self.id = id
1142        self.invoice_reference_id = invoice_reference_id
1143        self.last_updated = last_updated
1144        self.meter_id = meter_id
1145        self.party_id = party_id
1146        self.remark = remark
1147        self.session_id = session_id
1148        self.signed_data = signed_data
1149        self.start_date_time = start_date_time
1150        self.tariffs = tariffs
1151        self.total_cost = total_cost
1152        self.total_energy = total_energy
1153        self.total_energy_cost = total_energy_cost
1154        self.total_fixed_cost = total_fixed_cost
1155        self.total_parking_cost = total_parking_cost
1156        self.total_parking_time = total_parking_time
1157        self.total_reservation_cost = total_reservation_cost
1158        self.total_time = total_time
1159        self.total_time_cost = total_time_cost
auth_method: AuthMethod
authorization_reference: Optional[str]
cdr_location: CdrLocation
cdr_token: CdrToken
charging_periods: List[ChargingPeriod]
country_code: str
credit: Optional[bool]
credit_reference_id: Optional[str]
currency: str
end_date_time: str
home_charging_compensation: Optional[bool]
id: str
invoice_reference_id: Optional[str]
last_updated: str
meter_id: Optional[str]
party_id: str
remark: Optional[str]
session_id: Optional[str]
signed_data: Optional[SignedData]
start_date_time: str
tariffs: Optional[List[Tariff]]
total_cost: Price
total_energy: float
total_energy_cost: Optional[Price]
total_fixed_cost: Optional[Price]
total_parking_cost: Optional[Price]
total_parking_time: Optional[float]
total_reservation_cost: Optional[Price]
total_time: float
total_time_cost: Optional[Price]
@staticmethod
def from_dict(obj: Any) -> Cdr:
1161    @staticmethod
1162    def from_dict(obj: Any) -> 'Cdr':
1163        assert isinstance(obj, dict)
1164        auth_method = AuthMethod(obj.get("auth_method"))
1165        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
1166        cdr_location = CdrLocation.from_dict(obj.get("cdr_location"))
1167        cdr_token = CdrToken.from_dict(obj.get("cdr_token"))
1168        charging_periods = from_list(ChargingPeriod.from_dict, obj.get("charging_periods"))
1169        country_code = from_str(obj.get("country_code"))
1170        credit = from_union([from_none, from_bool], obj.get("credit"))
1171        credit_reference_id = from_union([from_none, from_str], obj.get("credit_reference_id"))
1172        currency = from_str(obj.get("currency"))
1173        end_date_time = from_str(obj.get("end_date_time"))
1174        home_charging_compensation = from_union([from_none, from_bool], obj.get("home_charging_compensation"))
1175        id = from_str(obj.get("id"))
1176        invoice_reference_id = from_union([from_none, from_str], obj.get("invoice_reference_id"))
1177        last_updated = from_str(obj.get("last_updated"))
1178        meter_id = from_union([from_none, from_str], obj.get("meter_id"))
1179        party_id = from_str(obj.get("party_id"))
1180        remark = from_union([from_none, from_str], obj.get("remark"))
1181        session_id = from_union([from_none, from_str], obj.get("session_id"))
1182        signed_data = from_union([from_none, SignedData.from_dict], obj.get("signed_data"))
1183        start_date_time = from_str(obj.get("start_date_time"))
1184        tariffs = from_union([from_none, lambda x: from_list(Tariff.from_dict, x)], obj.get("tariffs"))
1185        total_cost = Price.from_dict(obj.get("total_cost"))
1186        total_energy = from_float(obj.get("total_energy"))
1187        total_energy_cost = from_union([from_none, Price.from_dict], obj.get("total_energy_cost"))
1188        total_fixed_cost = from_union([from_none, Price.from_dict], obj.get("total_fixed_cost"))
1189        total_parking_cost = from_union([from_none, Price.from_dict], obj.get("total_parking_cost"))
1190        total_parking_time = from_union([from_none, from_float], obj.get("total_parking_time"))
1191        total_reservation_cost = from_union([from_none, Price.from_dict], obj.get("total_reservation_cost"))
1192        total_time = from_float(obj.get("total_time"))
1193        total_time_cost = from_union([from_none, Price.from_dict], obj.get("total_time_cost"))
1194        return Cdr(auth_method, authorization_reference, cdr_location, cdr_token, charging_periods, country_code, credit, credit_reference_id, currency, end_date_time, home_charging_compensation, id, invoice_reference_id, last_updated, meter_id, party_id, remark, session_id, signed_data, start_date_time, tariffs, total_cost, total_energy, total_energy_cost, total_fixed_cost, total_parking_cost, total_parking_time, total_reservation_cost, total_time, total_time_cost)
def to_dict(self) -> dict:
1196    def to_dict(self) -> dict:
1197        result: dict = {}
1198        result["auth_method"] = to_enum(AuthMethod, self.auth_method)
1199        if self.authorization_reference is not None:
1200            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
1201        result["cdr_location"] = to_class(CdrLocation, self.cdr_location)
1202        result["cdr_token"] = to_class(CdrToken, self.cdr_token)
1203        result["charging_periods"] = from_list(lambda x: to_class(ChargingPeriod, x), self.charging_periods)
1204        result["country_code"] = from_str(self.country_code)
1205        if self.credit is not None:
1206            result["credit"] = from_union([from_none, from_bool], self.credit)
1207        if self.credit_reference_id is not None:
1208            result["credit_reference_id"] = from_union([from_none, from_str], self.credit_reference_id)
1209        result["currency"] = from_str(self.currency)
1210        result["end_date_time"] = from_str(self.end_date_time)
1211        if self.home_charging_compensation is not None:
1212            result["home_charging_compensation"] = from_union([from_none, from_bool], self.home_charging_compensation)
1213        result["id"] = from_str(self.id)
1214        if self.invoice_reference_id is not None:
1215            result["invoice_reference_id"] = from_union([from_none, from_str], self.invoice_reference_id)
1216        result["last_updated"] = from_str(self.last_updated)
1217        if self.meter_id is not None:
1218            result["meter_id"] = from_union([from_none, from_str], self.meter_id)
1219        result["party_id"] = from_str(self.party_id)
1220        if self.remark is not None:
1221            result["remark"] = from_union([from_none, from_str], self.remark)
1222        if self.session_id is not None:
1223            result["session_id"] = from_union([from_none, from_str], self.session_id)
1224        if self.signed_data is not None:
1225            result["signed_data"] = from_union([from_none, lambda x: to_class(SignedData, x)], self.signed_data)
1226        result["start_date_time"] = from_str(self.start_date_time)
1227        if self.tariffs is not None:
1228            result["tariffs"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Tariff, x), x)], self.tariffs)
1229        result["total_cost"] = to_class(Price, self.total_cost)
1230        result["total_energy"] = to_float(self.total_energy)
1231        if self.total_energy_cost is not None:
1232            result["total_energy_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_energy_cost)
1233        if self.total_fixed_cost is not None:
1234            result["total_fixed_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_fixed_cost)
1235        if self.total_parking_cost is not None:
1236            result["total_parking_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_parking_cost)
1237        if self.total_parking_time is not None:
1238            result["total_parking_time"] = from_union([from_none, to_float], self.total_parking_time)
1239        if self.total_reservation_cost is not None:
1240            result["total_reservation_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_reservation_cost)
1241        result["total_time"] = to_float(self.total_time)
1242        if self.total_time_cost is not None:
1243            result["total_time_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_time_cost)
1244        return result
class ChargingPreferences:
1247class ChargingPreferences:
1248    departure_time: Optional[str]
1249    discharge_allowed: Optional[bool]
1250    energy_need: Optional[float]
1251    profile_type: ProfileType
1252
1253    def __init__(self, departure_time: Optional[str], discharge_allowed: Optional[bool], energy_need: Optional[float], profile_type: ProfileType) -> None:
1254        self.departure_time = departure_time
1255        self.discharge_allowed = discharge_allowed
1256        self.energy_need = energy_need
1257        self.profile_type = profile_type
1258
1259    @staticmethod
1260    def from_dict(obj: Any) -> 'ChargingPreferences':
1261        assert isinstance(obj, dict)
1262        departure_time = from_union([from_none, from_str], obj.get("departure_time"))
1263        discharge_allowed = from_union([from_none, from_bool], obj.get("discharge_allowed"))
1264        energy_need = from_union([from_none, from_float], obj.get("energy_need"))
1265        profile_type = ProfileType(obj.get("profile_type"))
1266        return ChargingPreferences(departure_time, discharge_allowed, energy_need, profile_type)
1267
1268    def to_dict(self) -> dict:
1269        result: dict = {}
1270        if self.departure_time is not None:
1271            result["departure_time"] = from_union([from_none, from_str], self.departure_time)
1272        if self.discharge_allowed is not None:
1273            result["discharge_allowed"] = from_union([from_none, from_bool], self.discharge_allowed)
1274        if self.energy_need is not None:
1275            result["energy_need"] = from_union([from_none, to_float], self.energy_need)
1276        result["profile_type"] = to_enum(ProfileType, self.profile_type)
1277        return result
ChargingPreferences( departure_time: Optional[str], discharge_allowed: Optional[bool], energy_need: Optional[float], profile_type: ProfileType)
1253    def __init__(self, departure_time: Optional[str], discharge_allowed: Optional[bool], energy_need: Optional[float], profile_type: ProfileType) -> None:
1254        self.departure_time = departure_time
1255        self.discharge_allowed = discharge_allowed
1256        self.energy_need = energy_need
1257        self.profile_type = profile_type
departure_time: Optional[str]
discharge_allowed: Optional[bool]
energy_need: Optional[float]
profile_type: ProfileType
@staticmethod
def from_dict(obj: Any) -> ChargingPreferences:
1259    @staticmethod
1260    def from_dict(obj: Any) -> 'ChargingPreferences':
1261        assert isinstance(obj, dict)
1262        departure_time = from_union([from_none, from_str], obj.get("departure_time"))
1263        discharge_allowed = from_union([from_none, from_bool], obj.get("discharge_allowed"))
1264        energy_need = from_union([from_none, from_float], obj.get("energy_need"))
1265        profile_type = ProfileType(obj.get("profile_type"))
1266        return ChargingPreferences(departure_time, discharge_allowed, energy_need, profile_type)
def to_dict(self) -> dict:
1268    def to_dict(self) -> dict:
1269        result: dict = {}
1270        if self.departure_time is not None:
1271            result["departure_time"] = from_union([from_none, from_str], self.departure_time)
1272        if self.discharge_allowed is not None:
1273            result["discharge_allowed"] = from_union([from_none, from_bool], self.discharge_allowed)
1274        if self.energy_need is not None:
1275            result["energy_need"] = from_union([from_none, to_float], self.energy_need)
1276        result["profile_type"] = to_enum(ProfileType, self.profile_type)
1277        return result
class ChargingProfileResponseType(enum.Enum):
1280class ChargingProfileResponseType(Enum):
1281    ACCEPTED = "ACCEPTED"
1282    NOT_SUPPORTED = "NOT_SUPPORTED"
1283    REJECTED = "REJECTED"
1284    TOO_OFTEN = "TOO_OFTEN"
1285    UNKNOWN_SESSION = "UNKNOWN_SESSION"
ACCEPTED = <ChargingProfileResponseType.ACCEPTED: 'ACCEPTED'>
NOT_SUPPORTED = <ChargingProfileResponseType.NOT_SUPPORTED: 'NOT_SUPPORTED'>
REJECTED = <ChargingProfileResponseType.REJECTED: 'REJECTED'>
TOO_OFTEN = <ChargingProfileResponseType.TOO_OFTEN: 'TOO_OFTEN'>
UNKNOWN_SESSION = <ChargingProfileResponseType.UNKNOWN_SESSION: 'UNKNOWN_SESSION'>
class ChargingProfileResponse:
1288class ChargingProfileResponse:
1289    result: ChargingProfileResponseType
1290    timeout: int
1291
1292    def __init__(self, result: ChargingProfileResponseType, timeout: int) -> None:
1293        self.result = result
1294        self.timeout = timeout
1295
1296    @staticmethod
1297    def from_dict(obj: Any) -> 'ChargingProfileResponse':
1298        assert isinstance(obj, dict)
1299        result = ChargingProfileResponseType(obj.get("result"))
1300        timeout = from_int(obj.get("timeout"))
1301        return ChargingProfileResponse(result, timeout)
1302
1303    def to_dict(self) -> dict:
1304        result: dict = {}
1305        result["result"] = to_enum(ChargingProfileResponseType, self.result)
1306        result["timeout"] = from_int(self.timeout)
1307        return result
ChargingProfileResponse(result: ChargingProfileResponseType, timeout: int)
1292    def __init__(self, result: ChargingProfileResponseType, timeout: int) -> None:
1293        self.result = result
1294        self.timeout = timeout
timeout: int
@staticmethod
def from_dict(obj: Any) -> ChargingProfileResponse:
1296    @staticmethod
1297    def from_dict(obj: Any) -> 'ChargingProfileResponse':
1298        assert isinstance(obj, dict)
1299        result = ChargingProfileResponseType(obj.get("result"))
1300        timeout = from_int(obj.get("timeout"))
1301        return ChargingProfileResponse(result, timeout)
def to_dict(self) -> dict:
1303    def to_dict(self) -> dict:
1304        result: dict = {}
1305        result["result"] = to_enum(ChargingProfileResponseType, self.result)
1306        result["timeout"] = from_int(self.timeout)
1307        return result
class ChargingProfileResult:
1310class ChargingProfileResult:
1311    result: ChargingProfileResultType
1312
1313    def __init__(self, result: ChargingProfileResultType) -> None:
1314        self.result = result
1315
1316    @staticmethod
1317    def from_dict(obj: Any) -> 'ChargingProfileResult':
1318        assert isinstance(obj, dict)
1319        result = ChargingProfileResultType(obj.get("result"))
1320        return ChargingProfileResult(result)
1321
1322    def to_dict(self) -> dict:
1323        result: dict = {}
1324        result["result"] = to_enum(ChargingProfileResultType, self.result)
1325        return result
ChargingProfileResult(result: ChargingProfileResultType)
1313    def __init__(self, result: ChargingProfileResultType) -> None:
1314        self.result = result
@staticmethod
def from_dict(obj: Any) -> ChargingProfileResult:
1316    @staticmethod
1317    def from_dict(obj: Any) -> 'ChargingProfileResult':
1318        assert isinstance(obj, dict)
1319        result = ChargingProfileResultType(obj.get("result"))
1320        return ChargingProfileResult(result)
def to_dict(self) -> dict:
1322    def to_dict(self) -> dict:
1323        result: dict = {}
1324        result["result"] = to_enum(ChargingProfileResultType, self.result)
1325        return result
class ClearProfileResult:
1328class ClearProfileResult:
1329    result: ChargingProfileResultType
1330
1331    def __init__(self, result: ChargingProfileResultType) -> None:
1332        self.result = result
1333
1334    @staticmethod
1335    def from_dict(obj: Any) -> 'ClearProfileResult':
1336        assert isinstance(obj, dict)
1337        result = ChargingProfileResultType(obj.get("result"))
1338        return ClearProfileResult(result)
1339
1340    def to_dict(self) -> dict:
1341        result: dict = {}
1342        result["result"] = to_enum(ChargingProfileResultType, self.result)
1343        return result
ClearProfileResult(result: ChargingProfileResultType)
1331    def __init__(self, result: ChargingProfileResultType) -> None:
1332        self.result = result
@staticmethod
def from_dict(obj: Any) -> ClearProfileResult:
1334    @staticmethod
1335    def from_dict(obj: Any) -> 'ClearProfileResult':
1336        assert isinstance(obj, dict)
1337        result = ChargingProfileResultType(obj.get("result"))
1338        return ClearProfileResult(result)
def to_dict(self) -> dict:
1340    def to_dict(self) -> dict:
1341        result: dict = {}
1342        result["result"] = to_enum(ChargingProfileResultType, self.result)
1343        return result
class CommandResponseType(enum.Enum):
1346class CommandResponseType(Enum):
1347    ACCEPTED = "ACCEPTED"
1348    NOT_SUPPORTED = "NOT_SUPPORTED"
1349    REJECTED = "REJECTED"
1350    UNKNOWN_SESSION = "UNKNOWN_SESSION"
ACCEPTED = <CommandResponseType.ACCEPTED: 'ACCEPTED'>
NOT_SUPPORTED = <CommandResponseType.NOT_SUPPORTED: 'NOT_SUPPORTED'>
REJECTED = <CommandResponseType.REJECTED: 'REJECTED'>
UNKNOWN_SESSION = <CommandResponseType.UNKNOWN_SESSION: 'UNKNOWN_SESSION'>
class CommandResponse:
1353class CommandResponse:
1354    message: Optional[List[DisplayText]]
1355    result: CommandResponseType
1356    timeout: int
1357
1358    def __init__(self, message: Optional[List[DisplayText]], result: CommandResponseType, timeout: int) -> None:
1359        self.message = message
1360        self.result = result
1361        self.timeout = timeout
1362
1363    @staticmethod
1364    def from_dict(obj: Any) -> 'CommandResponse':
1365        assert isinstance(obj, dict)
1366        message = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("message"))
1367        result = CommandResponseType(obj.get("result"))
1368        timeout = from_int(obj.get("timeout"))
1369        return CommandResponse(message, result, timeout)
1370
1371    def to_dict(self) -> dict:
1372        result: dict = {}
1373        if self.message is not None:
1374            result["message"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.message)
1375        result["result"] = to_enum(CommandResponseType, self.result)
1376        result["timeout"] = from_int(self.timeout)
1377        return result
CommandResponse( message: Optional[List[DisplayText]], result: CommandResponseType, timeout: int)
1358    def __init__(self, message: Optional[List[DisplayText]], result: CommandResponseType, timeout: int) -> None:
1359        self.message = message
1360        self.result = result
1361        self.timeout = timeout
message: Optional[List[DisplayText]]
timeout: int
@staticmethod
def from_dict(obj: Any) -> CommandResponse:
1363    @staticmethod
1364    def from_dict(obj: Any) -> 'CommandResponse':
1365        assert isinstance(obj, dict)
1366        message = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("message"))
1367        result = CommandResponseType(obj.get("result"))
1368        timeout = from_int(obj.get("timeout"))
1369        return CommandResponse(message, result, timeout)
def to_dict(self) -> dict:
1371    def to_dict(self) -> dict:
1372        result: dict = {}
1373        if self.message is not None:
1374            result["message"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.message)
1375        result["result"] = to_enum(CommandResponseType, self.result)
1376        result["timeout"] = from_int(self.timeout)
1377        return result
class CommandResultType(enum.Enum):
1380class CommandResultType(Enum):
1381    ACCEPTED = "ACCEPTED"
1382    CANCELED_RESERVATION = "CANCELED_RESERVATION"
1383    EVSE_INOPERATIVE = "EVSE_INOPERATIVE"
1384    EVSE_OCCUPIED = "EVSE_OCCUPIED"
1385    FAILED = "FAILED"
1386    NOT_SUPPORTED = "NOT_SUPPORTED"
1387    REJECTED = "REJECTED"
1388    TIMEOUT = "TIMEOUT"
1389    UNKNOWN_RESERVATION = "UNKNOWN_RESERVATION"
ACCEPTED = <CommandResultType.ACCEPTED: 'ACCEPTED'>
CANCELED_RESERVATION = <CommandResultType.CANCELED_RESERVATION: 'CANCELED_RESERVATION'>
EVSE_INOPERATIVE = <CommandResultType.EVSE_INOPERATIVE: 'EVSE_INOPERATIVE'>
EVSE_OCCUPIED = <CommandResultType.EVSE_OCCUPIED: 'EVSE_OCCUPIED'>
FAILED = <CommandResultType.FAILED: 'FAILED'>
NOT_SUPPORTED = <CommandResultType.NOT_SUPPORTED: 'NOT_SUPPORTED'>
REJECTED = <CommandResultType.REJECTED: 'REJECTED'>
TIMEOUT = <CommandResultType.TIMEOUT: 'TIMEOUT'>
UNKNOWN_RESERVATION = <CommandResultType.UNKNOWN_RESERVATION: 'UNKNOWN_RESERVATION'>
class CommandResult:
1392class CommandResult:
1393    message: Optional[List[DisplayText]]
1394    result: CommandResultType
1395
1396    def __init__(self, message: Optional[List[DisplayText]], result: CommandResultType) -> None:
1397        self.message = message
1398        self.result = result
1399
1400    @staticmethod
1401    def from_dict(obj: Any) -> 'CommandResult':
1402        assert isinstance(obj, dict)
1403        message = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("message"))
1404        result = CommandResultType(obj.get("result"))
1405        return CommandResult(message, result)
1406
1407    def to_dict(self) -> dict:
1408        result: dict = {}
1409        if self.message is not None:
1410            result["message"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.message)
1411        result["result"] = to_enum(CommandResultType, self.result)
1412        return result
CommandResult( message: Optional[List[DisplayText]], result: CommandResultType)
1396    def __init__(self, message: Optional[List[DisplayText]], result: CommandResultType) -> None:
1397        self.message = message
1398        self.result = result
message: Optional[List[DisplayText]]
@staticmethod
def from_dict(obj: Any) -> CommandResult:
1400    @staticmethod
1401    def from_dict(obj: Any) -> 'CommandResult':
1402        assert isinstance(obj, dict)
1403        message = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("message"))
1404        result = CommandResultType(obj.get("result"))
1405        return CommandResult(message, result)
def to_dict(self) -> dict:
1407    def to_dict(self) -> dict:
1408        result: dict = {}
1409        if self.message is not None:
1410            result["message"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.message)
1411        result["result"] = to_enum(CommandResultType, self.result)
1412        return result
class Connector:
1415class Connector:
1416    format: ConnectorFormat
1417    id: str
1418    last_updated: str
1419    max_amperage: int
1420    max_electric_power: Optional[int]
1421    max_voltage: int
1422    power_type: PowerType
1423    standard: ConnectorType
1424    tariff_ids: Optional[List[str]]
1425    terms_and_conditions: Optional[str]
1426
1427    def __init__(self, format: ConnectorFormat, id: str, last_updated: str, max_amperage: int, max_electric_power: Optional[int], max_voltage: int, power_type: PowerType, standard: ConnectorType, tariff_ids: Optional[List[str]], terms_and_conditions: Optional[str]) -> None:
1428        self.format = format
1429        self.id = id
1430        self.last_updated = last_updated
1431        self.max_amperage = max_amperage
1432        self.max_electric_power = max_electric_power
1433        self.max_voltage = max_voltage
1434        self.power_type = power_type
1435        self.standard = standard
1436        self.tariff_ids = tariff_ids
1437        self.terms_and_conditions = terms_and_conditions
1438
1439    @staticmethod
1440    def from_dict(obj: Any) -> 'Connector':
1441        assert isinstance(obj, dict)
1442        format = ConnectorFormat(obj.get("format"))
1443        id = from_str(obj.get("id"))
1444        last_updated = from_str(obj.get("last_updated"))
1445        max_amperage = from_int(obj.get("max_amperage"))
1446        max_electric_power = from_union([from_none, from_int], obj.get("max_electric_power"))
1447        max_voltage = from_int(obj.get("max_voltage"))
1448        power_type = PowerType(obj.get("power_type"))
1449        standard = ConnectorType(obj.get("standard"))
1450        tariff_ids = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("tariff_ids"))
1451        terms_and_conditions = from_union([from_none, from_str], obj.get("terms_and_conditions"))
1452        return Connector(format, id, last_updated, max_amperage, max_electric_power, max_voltage, power_type, standard, tariff_ids, terms_and_conditions)
1453
1454    def to_dict(self) -> dict:
1455        result: dict = {}
1456        result["format"] = to_enum(ConnectorFormat, self.format)
1457        result["id"] = from_str(self.id)
1458        result["last_updated"] = from_str(self.last_updated)
1459        result["max_amperage"] = from_int(self.max_amperage)
1460        if self.max_electric_power is not None:
1461            result["max_electric_power"] = from_union([from_none, from_int], self.max_electric_power)
1462        result["max_voltage"] = from_int(self.max_voltage)
1463        result["power_type"] = to_enum(PowerType, self.power_type)
1464        result["standard"] = to_enum(ConnectorType, self.standard)
1465        if self.tariff_ids is not None:
1466            result["tariff_ids"] = from_union([from_none, lambda x: from_list(from_str, x)], self.tariff_ids)
1467        if self.terms_and_conditions is not None:
1468            result["terms_and_conditions"] = from_union([from_none, from_str], self.terms_and_conditions)
1469        return result
Connector( format: ConnectorFormat, id: str, last_updated: str, max_amperage: int, max_electric_power: Optional[int], max_voltage: int, power_type: PowerType, standard: ConnectorType, tariff_ids: Optional[List[str]], terms_and_conditions: Optional[str])
1427    def __init__(self, format: ConnectorFormat, id: str, last_updated: str, max_amperage: int, max_electric_power: Optional[int], max_voltage: int, power_type: PowerType, standard: ConnectorType, tariff_ids: Optional[List[str]], terms_and_conditions: Optional[str]) -> None:
1428        self.format = format
1429        self.id = id
1430        self.last_updated = last_updated
1431        self.max_amperage = max_amperage
1432        self.max_electric_power = max_electric_power
1433        self.max_voltage = max_voltage
1434        self.power_type = power_type
1435        self.standard = standard
1436        self.tariff_ids = tariff_ids
1437        self.terms_and_conditions = terms_and_conditions
format: ConnectorFormat
id: str
last_updated: str
max_amperage: int
max_electric_power: Optional[int]
max_voltage: int
power_type: PowerType
standard: ConnectorType
tariff_ids: Optional[List[str]]
terms_and_conditions: Optional[str]
@staticmethod
def from_dict(obj: Any) -> Connector:
1439    @staticmethod
1440    def from_dict(obj: Any) -> 'Connector':
1441        assert isinstance(obj, dict)
1442        format = ConnectorFormat(obj.get("format"))
1443        id = from_str(obj.get("id"))
1444        last_updated = from_str(obj.get("last_updated"))
1445        max_amperage = from_int(obj.get("max_amperage"))
1446        max_electric_power = from_union([from_none, from_int], obj.get("max_electric_power"))
1447        max_voltage = from_int(obj.get("max_voltage"))
1448        power_type = PowerType(obj.get("power_type"))
1449        standard = ConnectorType(obj.get("standard"))
1450        tariff_ids = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("tariff_ids"))
1451        terms_and_conditions = from_union([from_none, from_str], obj.get("terms_and_conditions"))
1452        return Connector(format, id, last_updated, max_amperage, max_electric_power, max_voltage, power_type, standard, tariff_ids, terms_and_conditions)
def to_dict(self) -> dict:
1454    def to_dict(self) -> dict:
1455        result: dict = {}
1456        result["format"] = to_enum(ConnectorFormat, self.format)
1457        result["id"] = from_str(self.id)
1458        result["last_updated"] = from_str(self.last_updated)
1459        result["max_amperage"] = from_int(self.max_amperage)
1460        if self.max_electric_power is not None:
1461            result["max_electric_power"] = from_union([from_none, from_int], self.max_electric_power)
1462        result["max_voltage"] = from_int(self.max_voltage)
1463        result["power_type"] = to_enum(PowerType, self.power_type)
1464        result["standard"] = to_enum(ConnectorType, self.standard)
1465        if self.tariff_ids is not None:
1466            result["tariff_ids"] = from_union([from_none, lambda x: from_list(from_str, x)], self.tariff_ids)
1467        if self.terms_and_conditions is not None:
1468            result["terms_and_conditions"] = from_union([from_none, from_str], self.terms_and_conditions)
1469        return result
class ImageCategory(enum.Enum):
1472class ImageCategory(Enum):
1473    CHARGER = "CHARGER"
1474    ENTRANCE = "ENTRANCE"
1475    LOCATION = "LOCATION"
1476    NETWORK = "NETWORK"
1477    OPERATOR = "OPERATOR"
1478    OTHER = "OTHER"
1479    OWNER = "OWNER"
CHARGER = <ImageCategory.CHARGER: 'CHARGER'>
ENTRANCE = <ImageCategory.ENTRANCE: 'ENTRANCE'>
LOCATION = <ImageCategory.LOCATION: 'LOCATION'>
NETWORK = <ImageCategory.NETWORK: 'NETWORK'>
OPERATOR = <ImageCategory.OPERATOR: 'OPERATOR'>
OTHER = <ImageCategory.OTHER: 'OTHER'>
OWNER = <ImageCategory.OWNER: 'OWNER'>
class Image:
1482class Image:
1483    category: ImageCategory
1484    height: Optional[int]
1485    thumbnail: Optional[str]
1486    type: str
1487    url: str
1488    width: Optional[int]
1489
1490    def __init__(self, category: ImageCategory, height: Optional[int], thumbnail: Optional[str], type: str, url: str, width: Optional[int]) -> None:
1491        self.category = category
1492        self.height = height
1493        self.thumbnail = thumbnail
1494        self.type = type
1495        self.url = url
1496        self.width = width
1497
1498    @staticmethod
1499    def from_dict(obj: Any) -> 'Image':
1500        assert isinstance(obj, dict)
1501        category = ImageCategory(obj.get("category"))
1502        height = from_union([from_none, from_int], obj.get("height"))
1503        thumbnail = from_union([from_none, from_str], obj.get("thumbnail"))
1504        type = from_str(obj.get("type"))
1505        url = from_str(obj.get("url"))
1506        width = from_union([from_none, from_int], obj.get("width"))
1507        return Image(category, height, thumbnail, type, url, width)
1508
1509    def to_dict(self) -> dict:
1510        result: dict = {}
1511        result["category"] = to_enum(ImageCategory, self.category)
1512        if self.height is not None:
1513            result["height"] = from_union([from_none, from_int], self.height)
1514        if self.thumbnail is not None:
1515            result["thumbnail"] = from_union([from_none, from_str], self.thumbnail)
1516        result["type"] = from_str(self.type)
1517        result["url"] = from_str(self.url)
1518        if self.width is not None:
1519            result["width"] = from_union([from_none, from_int], self.width)
1520        return result
Image( category: ImageCategory, height: Optional[int], thumbnail: Optional[str], type: str, url: str, width: Optional[int])
1490    def __init__(self, category: ImageCategory, height: Optional[int], thumbnail: Optional[str], type: str, url: str, width: Optional[int]) -> None:
1491        self.category = category
1492        self.height = height
1493        self.thumbnail = thumbnail
1494        self.type = type
1495        self.url = url
1496        self.width = width
category: ImageCategory
height: Optional[int]
thumbnail: Optional[str]
type: str
url: str
width: Optional[int]
@staticmethod
def from_dict(obj: Any) -> Image:
1498    @staticmethod
1499    def from_dict(obj: Any) -> 'Image':
1500        assert isinstance(obj, dict)
1501        category = ImageCategory(obj.get("category"))
1502        height = from_union([from_none, from_int], obj.get("height"))
1503        thumbnail = from_union([from_none, from_str], obj.get("thumbnail"))
1504        type = from_str(obj.get("type"))
1505        url = from_str(obj.get("url"))
1506        width = from_union([from_none, from_int], obj.get("width"))
1507        return Image(category, height, thumbnail, type, url, width)
def to_dict(self) -> dict:
1509    def to_dict(self) -> dict:
1510        result: dict = {}
1511        result["category"] = to_enum(ImageCategory, self.category)
1512        if self.height is not None:
1513            result["height"] = from_union([from_none, from_int], self.height)
1514        if self.thumbnail is not None:
1515            result["thumbnail"] = from_union([from_none, from_str], self.thumbnail)
1516        result["type"] = from_str(self.type)
1517        result["url"] = from_str(self.url)
1518        if self.width is not None:
1519            result["width"] = from_union([from_none, from_int], self.width)
1520        return result
class BusinessDetails:
1523class BusinessDetails:
1524    logo: Optional[Image]
1525    name: str
1526    website: Optional[str]
1527
1528    def __init__(self, logo: Optional[Image], name: str, website: Optional[str]) -> None:
1529        self.logo = logo
1530        self.name = name
1531        self.website = website
1532
1533    @staticmethod
1534    def from_dict(obj: Any) -> 'BusinessDetails':
1535        assert isinstance(obj, dict)
1536        logo = from_union([from_none, Image.from_dict], obj.get("logo"))
1537        name = from_str(obj.get("name"))
1538        website = from_union([from_none, from_str], obj.get("website"))
1539        return BusinessDetails(logo, name, website)
1540
1541    def to_dict(self) -> dict:
1542        result: dict = {}
1543        if self.logo is not None:
1544            result["logo"] = from_union([from_none, lambda x: to_class(Image, x)], self.logo)
1545        result["name"] = from_str(self.name)
1546        if self.website is not None:
1547            result["website"] = from_union([from_none, from_str], self.website)
1548        return result
BusinessDetails(logo: Optional[Image], name: str, website: Optional[str])
1528    def __init__(self, logo: Optional[Image], name: str, website: Optional[str]) -> None:
1529        self.logo = logo
1530        self.name = name
1531        self.website = website
name: str
website: Optional[str]
@staticmethod
def from_dict(obj: Any) -> BusinessDetails:
1533    @staticmethod
1534    def from_dict(obj: Any) -> 'BusinessDetails':
1535        assert isinstance(obj, dict)
1536        logo = from_union([from_none, Image.from_dict], obj.get("logo"))
1537        name = from_str(obj.get("name"))
1538        website = from_union([from_none, from_str], obj.get("website"))
1539        return BusinessDetails(logo, name, website)
def to_dict(self) -> dict:
1541    def to_dict(self) -> dict:
1542        result: dict = {}
1543        if self.logo is not None:
1544            result["logo"] = from_union([from_none, lambda x: to_class(Image, x)], self.logo)
1545        result["name"] = from_str(self.name)
1546        if self.website is not None:
1547            result["website"] = from_union([from_none, from_str], self.website)
1548        return result
class Role(enum.Enum):
1551class Role(Enum):
1552    CPO = "CPO"
1553    EMSP = "EMSP"
1554    HUB = "HUB"
1555    NAP = "NAP"
1556    NSP = "NSP"
1557    OTHER = "OTHER"
1558    SCSP = "SCSP"
CPO = <Role.CPO: 'CPO'>
EMSP = <Role.EMSP: 'EMSP'>
HUB = <Role.HUB: 'HUB'>
NAP = <Role.NAP: 'NAP'>
NSP = <Role.NSP: 'NSP'>
OTHER = <Role.OTHER: 'OTHER'>
SCSP = <Role.SCSP: 'SCSP'>
class CredentialsRole:
1561class CredentialsRole:
1562    business_details: BusinessDetails
1563    country_code: str
1564    party_id: str
1565    role: Role
1566
1567    def __init__(self, business_details: BusinessDetails, country_code: str, party_id: str, role: Role) -> None:
1568        self.business_details = business_details
1569        self.country_code = country_code
1570        self.party_id = party_id
1571        self.role = role
1572
1573    @staticmethod
1574    def from_dict(obj: Any) -> 'CredentialsRole':
1575        assert isinstance(obj, dict)
1576        business_details = BusinessDetails.from_dict(obj.get("business_details"))
1577        country_code = from_str(obj.get("country_code"))
1578        party_id = from_str(obj.get("party_id"))
1579        role = Role(obj.get("role"))
1580        return CredentialsRole(business_details, country_code, party_id, role)
1581
1582    def to_dict(self) -> dict:
1583        result: dict = {}
1584        result["business_details"] = to_class(BusinessDetails, self.business_details)
1585        result["country_code"] = from_str(self.country_code)
1586        result["party_id"] = from_str(self.party_id)
1587        result["role"] = to_enum(Role, self.role)
1588        return result
CredentialsRole( business_details: BusinessDetails, country_code: str, party_id: str, role: Role)
1567    def __init__(self, business_details: BusinessDetails, country_code: str, party_id: str, role: Role) -> None:
1568        self.business_details = business_details
1569        self.country_code = country_code
1570        self.party_id = party_id
1571        self.role = role
business_details: BusinessDetails
country_code: str
party_id: str
role: Role
@staticmethod
def from_dict(obj: Any) -> CredentialsRole:
1573    @staticmethod
1574    def from_dict(obj: Any) -> 'CredentialsRole':
1575        assert isinstance(obj, dict)
1576        business_details = BusinessDetails.from_dict(obj.get("business_details"))
1577        country_code = from_str(obj.get("country_code"))
1578        party_id = from_str(obj.get("party_id"))
1579        role = Role(obj.get("role"))
1580        return CredentialsRole(business_details, country_code, party_id, role)
def to_dict(self) -> dict:
1582    def to_dict(self) -> dict:
1583        result: dict = {}
1584        result["business_details"] = to_class(BusinessDetails, self.business_details)
1585        result["country_code"] = from_str(self.country_code)
1586        result["party_id"] = from_str(self.party_id)
1587        result["role"] = to_enum(Role, self.role)
1588        return result
class Credentials:
1591class Credentials:
1592    roles: List[CredentialsRole]
1593    token: str
1594    url: str
1595
1596    def __init__(self, roles: List[CredentialsRole], token: str, url: str) -> None:
1597        self.roles = roles
1598        self.token = token
1599        self.url = url
1600
1601    @staticmethod
1602    def from_dict(obj: Any) -> 'Credentials':
1603        assert isinstance(obj, dict)
1604        roles = from_list(CredentialsRole.from_dict, obj.get("roles"))
1605        token = from_str(obj.get("token"))
1606        url = from_str(obj.get("url"))
1607        return Credentials(roles, token, url)
1608
1609    def to_dict(self) -> dict:
1610        result: dict = {}
1611        result["roles"] = from_list(lambda x: to_class(CredentialsRole, x), self.roles)
1612        result["token"] = from_str(self.token)
1613        result["url"] = from_str(self.url)
1614        return result
Credentials(roles: List[CredentialsRole], token: str, url: str)
1596    def __init__(self, roles: List[CredentialsRole], token: str, url: str) -> None:
1597        self.roles = roles
1598        self.token = token
1599        self.url = url
roles: List[CredentialsRole]
token: str
url: str
@staticmethod
def from_dict(obj: Any) -> Credentials:
1601    @staticmethod
1602    def from_dict(obj: Any) -> 'Credentials':
1603        assert isinstance(obj, dict)
1604        roles = from_list(CredentialsRole.from_dict, obj.get("roles"))
1605        token = from_str(obj.get("token"))
1606        url = from_str(obj.get("url"))
1607        return Credentials(roles, token, url)
def to_dict(self) -> dict:
1609    def to_dict(self) -> dict:
1610        result: dict = {}
1611        result["roles"] = from_list(lambda x: to_class(CredentialsRole, x), self.roles)
1612        result["token"] = from_str(self.token)
1613        result["url"] = from_str(self.url)
1614        return result
class ModuleID(enum.Enum):
1617class ModuleID(Enum):
1618    CDRS = "cdrs"
1619    CHARGINGPROFILES = "chargingprofiles"
1620    COMMANDS = "commands"
1621    CREDENTIALS = "credentials"
1622    HUBCLIENTINFO = "hubclientinfo"
1623    LOCATIONS = "locations"
1624    SESSIONS = "sessions"
1625    TARIFFS = "tariffs"
1626    TOKENS = "tokens"
CDRS = <ModuleID.CDRS: 'cdrs'>
CHARGINGPROFILES = <ModuleID.CHARGINGPROFILES: 'chargingprofiles'>
COMMANDS = <ModuleID.COMMANDS: 'commands'>
CREDENTIALS = <ModuleID.CREDENTIALS: 'credentials'>
HUBCLIENTINFO = <ModuleID.HUBCLIENTINFO: 'hubclientinfo'>
LOCATIONS = <ModuleID.LOCATIONS: 'locations'>
SESSIONS = <ModuleID.SESSIONS: 'sessions'>
TARIFFS = <ModuleID.TARIFFS: 'tariffs'>
TOKENS = <ModuleID.TOKENS: 'tokens'>
class InterfaceRole(enum.Enum):
1629class InterfaceRole(Enum):
1630    RECEIVER = "RECEIVER"
1631    SENDER = "SENDER"
RECEIVER = <InterfaceRole.RECEIVER: 'RECEIVER'>
SENDER = <InterfaceRole.SENDER: 'SENDER'>
class Endpoint:
1634class Endpoint:
1635    identifier: ModuleID
1636    role: InterfaceRole
1637    url: str
1638
1639    def __init__(self, identifier: ModuleID, role: InterfaceRole, url: str) -> None:
1640        self.identifier = identifier
1641        self.role = role
1642        self.url = url
1643
1644    @staticmethod
1645    def from_dict(obj: Any) -> 'Endpoint':
1646        assert isinstance(obj, dict)
1647        identifier = ModuleID(obj.get("identifier"))
1648        role = InterfaceRole(obj.get("role"))
1649        url = from_str(obj.get("url"))
1650        return Endpoint(identifier, role, url)
1651
1652    def to_dict(self) -> dict:
1653        result: dict = {}
1654        result["identifier"] = to_enum(ModuleID, self.identifier)
1655        result["role"] = to_enum(InterfaceRole, self.role)
1656        result["url"] = from_str(self.url)
1657        return result
Endpoint(identifier: ModuleID, role: InterfaceRole, url: str)
1639    def __init__(self, identifier: ModuleID, role: InterfaceRole, url: str) -> None:
1640        self.identifier = identifier
1641        self.role = role
1642        self.url = url
identifier: ModuleID
url: str
@staticmethod
def from_dict(obj: Any) -> Endpoint:
1644    @staticmethod
1645    def from_dict(obj: Any) -> 'Endpoint':
1646        assert isinstance(obj, dict)
1647        identifier = ModuleID(obj.get("identifier"))
1648        role = InterfaceRole(obj.get("role"))
1649        url = from_str(obj.get("url"))
1650        return Endpoint(identifier, role, url)
def to_dict(self) -> dict:
1652    def to_dict(self) -> dict:
1653        result: dict = {}
1654        result["identifier"] = to_enum(ModuleID, self.identifier)
1655        result["role"] = to_enum(InterfaceRole, self.role)
1656        result["url"] = from_str(self.url)
1657        return result
class Capability(enum.Enum):
1660class Capability(Enum):
1661    CHARGING_PREFERENCES_CAPABLE = "CHARGING_PREFERENCES_CAPABLE"
1662    CHARGING_PROFILE_CAPABLE = "CHARGING_PROFILE_CAPABLE"
1663    CHIP_CARD_SUPPORT = "CHIP_CARD_SUPPORT"
1664    CONTACTLESS_CARD_SUPPORT = "CONTACTLESS_CARD_SUPPORT"
1665    CREDIT_CARD_PAYABLE = "CREDIT_CARD_PAYABLE"
1666    DEBIT_CARD_PAYABLE = "DEBIT_CARD_PAYABLE"
1667    PED_TERMINAL = "PED_TERMINAL"
1668    REMOTE_START_STOP_CAPABLE = "REMOTE_START_STOP_CAPABLE"
1669    RESERVABLE = "RESERVABLE"
1670    RFID_READER = "RFID_READER"
1671    START_SESSION_CONNECTOR_REQUIRED = "START_SESSION_CONNECTOR_REQUIRED"
1672    TOKEN_GROUP_CAPABLE = "TOKEN_GROUP_CAPABLE"
1673    UNLOCK_CAPABLE = "UNLOCK_CAPABLE"
CHARGING_PREFERENCES_CAPABLE = <Capability.CHARGING_PREFERENCES_CAPABLE: 'CHARGING_PREFERENCES_CAPABLE'>
CHARGING_PROFILE_CAPABLE = <Capability.CHARGING_PROFILE_CAPABLE: 'CHARGING_PROFILE_CAPABLE'>
CHIP_CARD_SUPPORT = <Capability.CHIP_CARD_SUPPORT: 'CHIP_CARD_SUPPORT'>
CONTACTLESS_CARD_SUPPORT = <Capability.CONTACTLESS_CARD_SUPPORT: 'CONTACTLESS_CARD_SUPPORT'>
CREDIT_CARD_PAYABLE = <Capability.CREDIT_CARD_PAYABLE: 'CREDIT_CARD_PAYABLE'>
DEBIT_CARD_PAYABLE = <Capability.DEBIT_CARD_PAYABLE: 'DEBIT_CARD_PAYABLE'>
PED_TERMINAL = <Capability.PED_TERMINAL: 'PED_TERMINAL'>
REMOTE_START_STOP_CAPABLE = <Capability.REMOTE_START_STOP_CAPABLE: 'REMOTE_START_STOP_CAPABLE'>
RESERVABLE = <Capability.RESERVABLE: 'RESERVABLE'>
RFID_READER = <Capability.RFID_READER: 'RFID_READER'>
START_SESSION_CONNECTOR_REQUIRED = <Capability.START_SESSION_CONNECTOR_REQUIRED: 'START_SESSION_CONNECTOR_REQUIRED'>
TOKEN_GROUP_CAPABLE = <Capability.TOKEN_GROUP_CAPABLE: 'TOKEN_GROUP_CAPABLE'>
UNLOCK_CAPABLE = <Capability.UNLOCK_CAPABLE: 'UNLOCK_CAPABLE'>
class ParkingRestriction(enum.Enum):
1676class ParkingRestriction(Enum):
1677    CUSTOMERS = "CUSTOMERS"
1678    DISABLED = "DISABLED"
1679    EV_ONLY = "EV_ONLY"
1680    MOTORCYCLES = "MOTORCYCLES"
1681    PLUGGED = "PLUGGED"
CUSTOMERS = <ParkingRestriction.CUSTOMERS: 'CUSTOMERS'>
DISABLED = <ParkingRestriction.DISABLED: 'DISABLED'>
EV_ONLY = <ParkingRestriction.EV_ONLY: 'EV_ONLY'>
MOTORCYCLES = <ParkingRestriction.MOTORCYCLES: 'MOTORCYCLES'>
PLUGGED = <ParkingRestriction.PLUGGED: 'PLUGGED'>
class Status(enum.Enum):
1684class Status(Enum):
1685    AVAILABLE = "AVAILABLE"
1686    BLOCKED = "BLOCKED"
1687    CHARGING = "CHARGING"
1688    INOPERATIVE = "INOPERATIVE"
1689    OUTOFORDER = "OUTOFORDER"
1690    PLANNED = "PLANNED"
1691    REMOVED = "REMOVED"
1692    RESERVED = "RESERVED"
1693    UNKNOWN = "UNKNOWN"
AVAILABLE = <Status.AVAILABLE: 'AVAILABLE'>
BLOCKED = <Status.BLOCKED: 'BLOCKED'>
CHARGING = <Status.CHARGING: 'CHARGING'>
INOPERATIVE = <Status.INOPERATIVE: 'INOPERATIVE'>
OUTOFORDER = <Status.OUTOFORDER: 'OUTOFORDER'>
PLANNED = <Status.PLANNED: 'PLANNED'>
REMOVED = <Status.REMOVED: 'REMOVED'>
RESERVED = <Status.RESERVED: 'RESERVED'>
UNKNOWN = <Status.UNKNOWN: 'UNKNOWN'>
class StatusSchedule:
1696class StatusSchedule:
1697    period_begin: str
1698    period_end: Optional[str]
1699    status: Status
1700
1701    def __init__(self, period_begin: str, period_end: Optional[str], status: Status) -> None:
1702        self.period_begin = period_begin
1703        self.period_end = period_end
1704        self.status = status
1705
1706    @staticmethod
1707    def from_dict(obj: Any) -> 'StatusSchedule':
1708        assert isinstance(obj, dict)
1709        period_begin = from_str(obj.get("period_begin"))
1710        period_end = from_union([from_none, from_str], obj.get("period_end"))
1711        status = Status(obj.get("status"))
1712        return StatusSchedule(period_begin, period_end, status)
1713
1714    def to_dict(self) -> dict:
1715        result: dict = {}
1716        result["period_begin"] = from_str(self.period_begin)
1717        if self.period_end is not None:
1718            result["period_end"] = from_union([from_none, from_str], self.period_end)
1719        result["status"] = to_enum(Status, self.status)
1720        return result
StatusSchedule(period_begin: str, period_end: Optional[str], status: Status)
1701    def __init__(self, period_begin: str, period_end: Optional[str], status: Status) -> None:
1702        self.period_begin = period_begin
1703        self.period_end = period_end
1704        self.status = status
period_begin: str
period_end: Optional[str]
status: Status
@staticmethod
def from_dict(obj: Any) -> StatusSchedule:
1706    @staticmethod
1707    def from_dict(obj: Any) -> 'StatusSchedule':
1708        assert isinstance(obj, dict)
1709        period_begin = from_str(obj.get("period_begin"))
1710        period_end = from_union([from_none, from_str], obj.get("period_end"))
1711        status = Status(obj.get("status"))
1712        return StatusSchedule(period_begin, period_end, status)
def to_dict(self) -> dict:
1714    def to_dict(self) -> dict:
1715        result: dict = {}
1716        result["period_begin"] = from_str(self.period_begin)
1717        if self.period_end is not None:
1718            result["period_end"] = from_union([from_none, from_str], self.period_end)
1719        result["status"] = to_enum(Status, self.status)
1720        return result
class Evse:
1723class Evse:
1724    capabilities: Optional[List[Capability]]
1725    connectors: List[Connector]
1726    coordinates: Optional[GeoLocation]
1727    directions: Optional[List[DisplayText]]
1728    evse_id: Optional[str]
1729    floor_level: Optional[str]
1730    images: Optional[List[Image]]
1731    last_updated: str
1732    parking_restrictions: Optional[List[ParkingRestriction]]
1733    physical_reference: Optional[str]
1734    status: Status
1735    status_schedule: Optional[List[StatusSchedule]]
1736    uid: str
1737
1738    def __init__(self, capabilities: Optional[List[Capability]], connectors: List[Connector], coordinates: Optional[GeoLocation], directions: Optional[List[DisplayText]], evse_id: Optional[str], floor_level: Optional[str], images: Optional[List[Image]], last_updated: str, parking_restrictions: Optional[List[ParkingRestriction]], physical_reference: Optional[str], status: Status, status_schedule: Optional[List[StatusSchedule]], uid: str) -> None:
1739        self.capabilities = capabilities
1740        self.connectors = connectors
1741        self.coordinates = coordinates
1742        self.directions = directions
1743        self.evse_id = evse_id
1744        self.floor_level = floor_level
1745        self.images = images
1746        self.last_updated = last_updated
1747        self.parking_restrictions = parking_restrictions
1748        self.physical_reference = physical_reference
1749        self.status = status
1750        self.status_schedule = status_schedule
1751        self.uid = uid
1752
1753    @staticmethod
1754    def from_dict(obj: Any) -> 'Evse':
1755        assert isinstance(obj, dict)
1756        capabilities = from_union([from_none, lambda x: from_list(Capability, x)], obj.get("capabilities"))
1757        connectors = from_list(Connector.from_dict, obj.get("connectors"))
1758        coordinates = from_union([from_none, GeoLocation.from_dict], obj.get("coordinates"))
1759        directions = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("directions"))
1760        evse_id = from_union([from_none, from_str], obj.get("evse_id"))
1761        floor_level = from_union([from_none, from_str], obj.get("floor_level"))
1762        images = from_union([from_none, lambda x: from_list(Image.from_dict, x)], obj.get("images"))
1763        last_updated = from_str(obj.get("last_updated"))
1764        parking_restrictions = from_union([from_none, lambda x: from_list(ParkingRestriction, x)], obj.get("parking_restrictions"))
1765        physical_reference = from_union([from_none, from_str], obj.get("physical_reference"))
1766        status = Status(obj.get("status"))
1767        status_schedule = from_union([from_none, lambda x: from_list(StatusSchedule.from_dict, x)], obj.get("status_schedule"))
1768        uid = from_str(obj.get("uid"))
1769        return Evse(capabilities, connectors, coordinates, directions, evse_id, floor_level, images, last_updated, parking_restrictions, physical_reference, status, status_schedule, uid)
1770
1771    def to_dict(self) -> dict:
1772        result: dict = {}
1773        if self.capabilities is not None:
1774            result["capabilities"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(Capability, x), x)], self.capabilities)
1775        result["connectors"] = from_list(lambda x: to_class(Connector, x), self.connectors)
1776        if self.coordinates is not None:
1777            result["coordinates"] = from_union([from_none, lambda x: to_class(GeoLocation, x)], self.coordinates)
1778        if self.directions is not None:
1779            result["directions"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.directions)
1780        if self.evse_id is not None:
1781            result["evse_id"] = from_union([from_none, from_str], self.evse_id)
1782        if self.floor_level is not None:
1783            result["floor_level"] = from_union([from_none, from_str], self.floor_level)
1784        if self.images is not None:
1785            result["images"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Image, x), x)], self.images)
1786        result["last_updated"] = from_str(self.last_updated)
1787        if self.parking_restrictions is not None:
1788            result["parking_restrictions"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(ParkingRestriction, x), x)], self.parking_restrictions)
1789        if self.physical_reference is not None:
1790            result["physical_reference"] = from_union([from_none, from_str], self.physical_reference)
1791        result["status"] = to_enum(Status, self.status)
1792        if self.status_schedule is not None:
1793            result["status_schedule"] = from_union([from_none, lambda x: from_list(lambda x: to_class(StatusSchedule, x), x)], self.status_schedule)
1794        result["uid"] = from_str(self.uid)
1795        return result
Evse( capabilities: Optional[List[Capability]], connectors: List[Connector], coordinates: Optional[GeoLocation], directions: Optional[List[DisplayText]], evse_id: Optional[str], floor_level: Optional[str], images: Optional[List[Image]], last_updated: str, parking_restrictions: Optional[List[ParkingRestriction]], physical_reference: Optional[str], status: Status, status_schedule: Optional[List[StatusSchedule]], uid: str)
1738    def __init__(self, capabilities: Optional[List[Capability]], connectors: List[Connector], coordinates: Optional[GeoLocation], directions: Optional[List[DisplayText]], evse_id: Optional[str], floor_level: Optional[str], images: Optional[List[Image]], last_updated: str, parking_restrictions: Optional[List[ParkingRestriction]], physical_reference: Optional[str], status: Status, status_schedule: Optional[List[StatusSchedule]], uid: str) -> None:
1739        self.capabilities = capabilities
1740        self.connectors = connectors
1741        self.coordinates = coordinates
1742        self.directions = directions
1743        self.evse_id = evse_id
1744        self.floor_level = floor_level
1745        self.images = images
1746        self.last_updated = last_updated
1747        self.parking_restrictions = parking_restrictions
1748        self.physical_reference = physical_reference
1749        self.status = status
1750        self.status_schedule = status_schedule
1751        self.uid = uid
capabilities: Optional[List[Capability]]
connectors: List[Connector]
coordinates: Optional[GeoLocation]
directions: Optional[List[DisplayText]]
evse_id: Optional[str]
floor_level: Optional[str]
images: Optional[List[Image]]
last_updated: str
parking_restrictions: Optional[List[ParkingRestriction]]
physical_reference: Optional[str]
status: Status
status_schedule: Optional[List[StatusSchedule]]
uid: str
@staticmethod
def from_dict(obj: Any) -> Evse:
1753    @staticmethod
1754    def from_dict(obj: Any) -> 'Evse':
1755        assert isinstance(obj, dict)
1756        capabilities = from_union([from_none, lambda x: from_list(Capability, x)], obj.get("capabilities"))
1757        connectors = from_list(Connector.from_dict, obj.get("connectors"))
1758        coordinates = from_union([from_none, GeoLocation.from_dict], obj.get("coordinates"))
1759        directions = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("directions"))
1760        evse_id = from_union([from_none, from_str], obj.get("evse_id"))
1761        floor_level = from_union([from_none, from_str], obj.get("floor_level"))
1762        images = from_union([from_none, lambda x: from_list(Image.from_dict, x)], obj.get("images"))
1763        last_updated = from_str(obj.get("last_updated"))
1764        parking_restrictions = from_union([from_none, lambda x: from_list(ParkingRestriction, x)], obj.get("parking_restrictions"))
1765        physical_reference = from_union([from_none, from_str], obj.get("physical_reference"))
1766        status = Status(obj.get("status"))
1767        status_schedule = from_union([from_none, lambda x: from_list(StatusSchedule.from_dict, x)], obj.get("status_schedule"))
1768        uid = from_str(obj.get("uid"))
1769        return Evse(capabilities, connectors, coordinates, directions, evse_id, floor_level, images, last_updated, parking_restrictions, physical_reference, status, status_schedule, uid)
def to_dict(self) -> dict:
1771    def to_dict(self) -> dict:
1772        result: dict = {}
1773        if self.capabilities is not None:
1774            result["capabilities"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(Capability, x), x)], self.capabilities)
1775        result["connectors"] = from_list(lambda x: to_class(Connector, x), self.connectors)
1776        if self.coordinates is not None:
1777            result["coordinates"] = from_union([from_none, lambda x: to_class(GeoLocation, x)], self.coordinates)
1778        if self.directions is not None:
1779            result["directions"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.directions)
1780        if self.evse_id is not None:
1781            result["evse_id"] = from_union([from_none, from_str], self.evse_id)
1782        if self.floor_level is not None:
1783            result["floor_level"] = from_union([from_none, from_str], self.floor_level)
1784        if self.images is not None:
1785            result["images"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Image, x), x)], self.images)
1786        result["last_updated"] = from_str(self.last_updated)
1787        if self.parking_restrictions is not None:
1788            result["parking_restrictions"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(ParkingRestriction, x), x)], self.parking_restrictions)
1789        if self.physical_reference is not None:
1790            result["physical_reference"] = from_union([from_none, from_str], self.physical_reference)
1791        result["status"] = to_enum(Status, self.status)
1792        if self.status_schedule is not None:
1793            result["status_schedule"] = from_union([from_none, lambda x: from_list(lambda x: to_class(StatusSchedule, x), x)], self.status_schedule)
1794        result["uid"] = from_str(self.uid)
1795        return result
class ConnectionStatus(enum.Enum):
1798class ConnectionStatus(Enum):
1799    CONNECTED = "CONNECTED"
1800    OFFLINE = "OFFLINE"
1801    PLANNED = "PLANNED"
1802    SUSPENDED = "SUSPENDED"
CONNECTED = <ConnectionStatus.CONNECTED: 'CONNECTED'>
OFFLINE = <ConnectionStatus.OFFLINE: 'OFFLINE'>
PLANNED = <ConnectionStatus.PLANNED: 'PLANNED'>
SUSPENDED = <ConnectionStatus.SUSPENDED: 'SUSPENDED'>
class HubClientInfo:
1805class HubClientInfo:
1806    country_code: str
1807    last_updated: str
1808    party_id: str
1809    role: Role
1810    status: ConnectionStatus
1811
1812    def __init__(self, country_code: str, last_updated: str, party_id: str, role: Role, status: ConnectionStatus) -> None:
1813        self.country_code = country_code
1814        self.last_updated = last_updated
1815        self.party_id = party_id
1816        self.role = role
1817        self.status = status
1818
1819    @staticmethod
1820    def from_dict(obj: Any) -> 'HubClientInfo':
1821        assert isinstance(obj, dict)
1822        country_code = from_str(obj.get("country_code"))
1823        last_updated = from_str(obj.get("last_updated"))
1824        party_id = from_str(obj.get("party_id"))
1825        role = Role(obj.get("role"))
1826        status = ConnectionStatus(obj.get("status"))
1827        return HubClientInfo(country_code, last_updated, party_id, role, status)
1828
1829    def to_dict(self) -> dict:
1830        result: dict = {}
1831        result["country_code"] = from_str(self.country_code)
1832        result["last_updated"] = from_str(self.last_updated)
1833        result["party_id"] = from_str(self.party_id)
1834        result["role"] = to_enum(Role, self.role)
1835        result["status"] = to_enum(ConnectionStatus, self.status)
1836        return result
HubClientInfo( country_code: str, last_updated: str, party_id: str, role: Role, status: ConnectionStatus)
1812    def __init__(self, country_code: str, last_updated: str, party_id: str, role: Role, status: ConnectionStatus) -> None:
1813        self.country_code = country_code
1814        self.last_updated = last_updated
1815        self.party_id = party_id
1816        self.role = role
1817        self.status = status
country_code: str
last_updated: str
party_id: str
role: Role
@staticmethod
def from_dict(obj: Any) -> HubClientInfo:
1819    @staticmethod
1820    def from_dict(obj: Any) -> 'HubClientInfo':
1821        assert isinstance(obj, dict)
1822        country_code = from_str(obj.get("country_code"))
1823        last_updated = from_str(obj.get("last_updated"))
1824        party_id = from_str(obj.get("party_id"))
1825        role = Role(obj.get("role"))
1826        status = ConnectionStatus(obj.get("status"))
1827        return HubClientInfo(country_code, last_updated, party_id, role, status)
def to_dict(self) -> dict:
1829    def to_dict(self) -> dict:
1830        result: dict = {}
1831        result["country_code"] = from_str(self.country_code)
1832        result["last_updated"] = from_str(self.last_updated)
1833        result["party_id"] = from_str(self.party_id)
1834        result["role"] = to_enum(Role, self.role)
1835        result["status"] = to_enum(ConnectionStatus, self.status)
1836        return result
class Facility(enum.Enum):
1839class Facility(Enum):
1840    AIRPORT = "AIRPORT"
1841    BIKE_SHARING = "BIKE_SHARING"
1842    BUS_STOP = "BUS_STOP"
1843    CAFE = "CAFE"
1844    CARPOOL_PARKING = "CARPOOL_PARKING"
1845    FUEL_STATION = "FUEL_STATION"
1846    HOTEL = "HOTEL"
1847    MALL = "MALL"
1848    METRO_STATION = "METRO_STATION"
1849    MUSEUM = "MUSEUM"
1850    NATURE = "NATURE"
1851    PARKING_LOT = "PARKING_LOT"
1852    RECREATION_AREA = "RECREATION_AREA"
1853    RESTAURANT = "RESTAURANT"
1854    SPORT = "SPORT"
1855    SUPERMARKET = "SUPERMARKET"
1856    TAXI_STAND = "TAXI_STAND"
1857    TRAIN_STATION = "TRAIN_STATION"
1858    TRAM_STOP = "TRAM_STOP"
1859    WIFI = "WIFI"
AIRPORT = <Facility.AIRPORT: 'AIRPORT'>
BIKE_SHARING = <Facility.BIKE_SHARING: 'BIKE_SHARING'>
BUS_STOP = <Facility.BUS_STOP: 'BUS_STOP'>
CAFE = <Facility.CAFE: 'CAFE'>
CARPOOL_PARKING = <Facility.CARPOOL_PARKING: 'CARPOOL_PARKING'>
FUEL_STATION = <Facility.FUEL_STATION: 'FUEL_STATION'>
HOTEL = <Facility.HOTEL: 'HOTEL'>
MALL = <Facility.MALL: 'MALL'>
METRO_STATION = <Facility.METRO_STATION: 'METRO_STATION'>
MUSEUM = <Facility.MUSEUM: 'MUSEUM'>
NATURE = <Facility.NATURE: 'NATURE'>
PARKING_LOT = <Facility.PARKING_LOT: 'PARKING_LOT'>
RECREATION_AREA = <Facility.RECREATION_AREA: 'RECREATION_AREA'>
RESTAURANT = <Facility.RESTAURANT: 'RESTAURANT'>
SPORT = <Facility.SPORT: 'SPORT'>
SUPERMARKET = <Facility.SUPERMARKET: 'SUPERMARKET'>
TAXI_STAND = <Facility.TAXI_STAND: 'TAXI_STAND'>
TRAIN_STATION = <Facility.TRAIN_STATION: 'TRAIN_STATION'>
TRAM_STOP = <Facility.TRAM_STOP: 'TRAM_STOP'>
WIFI = <Facility.WIFI: 'WIFI'>
class ExceptionalPeriod:
1862class ExceptionalPeriod:
1863    period_begin: str
1864    period_end: str
1865
1866    def __init__(self, period_begin: str, period_end: str) -> None:
1867        self.period_begin = period_begin
1868        self.period_end = period_end
1869
1870    @staticmethod
1871    def from_dict(obj: Any) -> 'ExceptionalPeriod':
1872        assert isinstance(obj, dict)
1873        period_begin = from_str(obj.get("period_begin"))
1874        period_end = from_str(obj.get("period_end"))
1875        return ExceptionalPeriod(period_begin, period_end)
1876
1877    def to_dict(self) -> dict:
1878        result: dict = {}
1879        result["period_begin"] = from_str(self.period_begin)
1880        result["period_end"] = from_str(self.period_end)
1881        return result
ExceptionalPeriod(period_begin: str, period_end: str)
1866    def __init__(self, period_begin: str, period_end: str) -> None:
1867        self.period_begin = period_begin
1868        self.period_end = period_end
period_begin: str
period_end: str
@staticmethod
def from_dict(obj: Any) -> ExceptionalPeriod:
1870    @staticmethod
1871    def from_dict(obj: Any) -> 'ExceptionalPeriod':
1872        assert isinstance(obj, dict)
1873        period_begin = from_str(obj.get("period_begin"))
1874        period_end = from_str(obj.get("period_end"))
1875        return ExceptionalPeriod(period_begin, period_end)
def to_dict(self) -> dict:
1877    def to_dict(self) -> dict:
1878        result: dict = {}
1879        result["period_begin"] = from_str(self.period_begin)
1880        result["period_end"] = from_str(self.period_end)
1881        return result
class RegularHours:
1884class RegularHours:
1885    period_begin: str
1886    period_end: str
1887    weekday: int
1888
1889    def __init__(self, period_begin: str, period_end: str, weekday: int) -> None:
1890        self.period_begin = period_begin
1891        self.period_end = period_end
1892        self.weekday = weekday
1893
1894    @staticmethod
1895    def from_dict(obj: Any) -> 'RegularHours':
1896        assert isinstance(obj, dict)
1897        period_begin = from_str(obj.get("period_begin"))
1898        period_end = from_str(obj.get("period_end"))
1899        weekday = from_int(obj.get("weekday"))
1900        return RegularHours(period_begin, period_end, weekday)
1901
1902    def to_dict(self) -> dict:
1903        result: dict = {}
1904        result["period_begin"] = from_str(self.period_begin)
1905        result["period_end"] = from_str(self.period_end)
1906        result["weekday"] = from_int(self.weekday)
1907        return result
RegularHours(period_begin: str, period_end: str, weekday: int)
1889    def __init__(self, period_begin: str, period_end: str, weekday: int) -> None:
1890        self.period_begin = period_begin
1891        self.period_end = period_end
1892        self.weekday = weekday
period_begin: str
period_end: str
weekday: int
@staticmethod
def from_dict(obj: Any) -> RegularHours:
1894    @staticmethod
1895    def from_dict(obj: Any) -> 'RegularHours':
1896        assert isinstance(obj, dict)
1897        period_begin = from_str(obj.get("period_begin"))
1898        period_end = from_str(obj.get("period_end"))
1899        weekday = from_int(obj.get("weekday"))
1900        return RegularHours(period_begin, period_end, weekday)
def to_dict(self) -> dict:
1902    def to_dict(self) -> dict:
1903        result: dict = {}
1904        result["period_begin"] = from_str(self.period_begin)
1905        result["period_end"] = from_str(self.period_end)
1906        result["weekday"] = from_int(self.weekday)
1907        return result
class Hours:
1910class Hours:
1911    exceptional_closings: Optional[List[ExceptionalPeriod]]
1912    exceptional_openings: Optional[List[ExceptionalPeriod]]
1913    regular_hours: Optional[List[RegularHours]]
1914    twentyfourseven: bool
1915
1916    def __init__(self, exceptional_closings: Optional[List[ExceptionalPeriod]], exceptional_openings: Optional[List[ExceptionalPeriod]], regular_hours: Optional[List[RegularHours]], twentyfourseven: bool) -> None:
1917        self.exceptional_closings = exceptional_closings
1918        self.exceptional_openings = exceptional_openings
1919        self.regular_hours = regular_hours
1920        self.twentyfourseven = twentyfourseven
1921
1922    @staticmethod
1923    def from_dict(obj: Any) -> 'Hours':
1924        assert isinstance(obj, dict)
1925        exceptional_closings = from_union([from_none, lambda x: from_list(ExceptionalPeriod.from_dict, x)], obj.get("exceptional_closings"))
1926        exceptional_openings = from_union([from_none, lambda x: from_list(ExceptionalPeriod.from_dict, x)], obj.get("exceptional_openings"))
1927        regular_hours = from_union([from_none, lambda x: from_list(RegularHours.from_dict, x)], obj.get("regular_hours"))
1928        twentyfourseven = from_bool(obj.get("twentyfourseven"))
1929        return Hours(exceptional_closings, exceptional_openings, regular_hours, twentyfourseven)
1930
1931    def to_dict(self) -> dict:
1932        result: dict = {}
1933        if self.exceptional_closings is not None:
1934            result["exceptional_closings"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ExceptionalPeriod, x), x)], self.exceptional_closings)
1935        if self.exceptional_openings is not None:
1936            result["exceptional_openings"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ExceptionalPeriod, x), x)], self.exceptional_openings)
1937        if self.regular_hours is not None:
1938            result["regular_hours"] = from_union([from_none, lambda x: from_list(lambda x: to_class(RegularHours, x), x)], self.regular_hours)
1939        result["twentyfourseven"] = from_bool(self.twentyfourseven)
1940        return result
Hours( exceptional_closings: Optional[List[ExceptionalPeriod]], exceptional_openings: Optional[List[ExceptionalPeriod]], regular_hours: Optional[List[RegularHours]], twentyfourseven: bool)
1916    def __init__(self, exceptional_closings: Optional[List[ExceptionalPeriod]], exceptional_openings: Optional[List[ExceptionalPeriod]], regular_hours: Optional[List[RegularHours]], twentyfourseven: bool) -> None:
1917        self.exceptional_closings = exceptional_closings
1918        self.exceptional_openings = exceptional_openings
1919        self.regular_hours = regular_hours
1920        self.twentyfourseven = twentyfourseven
exceptional_closings: Optional[List[ExceptionalPeriod]]
exceptional_openings: Optional[List[ExceptionalPeriod]]
regular_hours: Optional[List[RegularHours]]
twentyfourseven: bool
@staticmethod
def from_dict(obj: Any) -> Hours:
1922    @staticmethod
1923    def from_dict(obj: Any) -> 'Hours':
1924        assert isinstance(obj, dict)
1925        exceptional_closings = from_union([from_none, lambda x: from_list(ExceptionalPeriod.from_dict, x)], obj.get("exceptional_closings"))
1926        exceptional_openings = from_union([from_none, lambda x: from_list(ExceptionalPeriod.from_dict, x)], obj.get("exceptional_openings"))
1927        regular_hours = from_union([from_none, lambda x: from_list(RegularHours.from_dict, x)], obj.get("regular_hours"))
1928        twentyfourseven = from_bool(obj.get("twentyfourseven"))
1929        return Hours(exceptional_closings, exceptional_openings, regular_hours, twentyfourseven)
def to_dict(self) -> dict:
1931    def to_dict(self) -> dict:
1932        result: dict = {}
1933        if self.exceptional_closings is not None:
1934            result["exceptional_closings"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ExceptionalPeriod, x), x)], self.exceptional_closings)
1935        if self.exceptional_openings is not None:
1936            result["exceptional_openings"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ExceptionalPeriod, x), x)], self.exceptional_openings)
1937        if self.regular_hours is not None:
1938            result["regular_hours"] = from_union([from_none, lambda x: from_list(lambda x: to_class(RegularHours, x), x)], self.regular_hours)
1939        result["twentyfourseven"] = from_bool(self.twentyfourseven)
1940        return result
class ParkingType(enum.Enum):
1943class ParkingType(Enum):
1944    ALONG_MOTORWAY = "ALONG_MOTORWAY"
1945    ON_DRIVEWAY = "ON_DRIVEWAY"
1946    ON_STREET = "ON_STREET"
1947    PARKING_GARAGE = "PARKING_GARAGE"
1948    PARKING_LOT = "PARKING_LOT"
1949    UNDERGROUND_GARAGE = "UNDERGROUND_GARAGE"
ALONG_MOTORWAY = <ParkingType.ALONG_MOTORWAY: 'ALONG_MOTORWAY'>
ON_DRIVEWAY = <ParkingType.ON_DRIVEWAY: 'ON_DRIVEWAY'>
ON_STREET = <ParkingType.ON_STREET: 'ON_STREET'>
PARKING_GARAGE = <ParkingType.PARKING_GARAGE: 'PARKING_GARAGE'>
PARKING_LOT = <ParkingType.PARKING_LOT: 'PARKING_LOT'>
UNDERGROUND_GARAGE = <ParkingType.UNDERGROUND_GARAGE: 'UNDERGROUND_GARAGE'>
class PublishTokenType:
1952class PublishTokenType:
1953    group_id: Optional[str]
1954    issuer: Optional[str]
1955    type: Optional[TokenType]
1956    uid: Optional[str]
1957    visual_number: Optional[str]
1958
1959    def __init__(self, group_id: Optional[str], issuer: Optional[str], type: Optional[TokenType], uid: Optional[str], visual_number: Optional[str]) -> None:
1960        self.group_id = group_id
1961        self.issuer = issuer
1962        self.type = type
1963        self.uid = uid
1964        self.visual_number = visual_number
1965
1966    @staticmethod
1967    def from_dict(obj: Any) -> 'PublishTokenType':
1968        assert isinstance(obj, dict)
1969        group_id = from_union([from_none, from_str], obj.get("group_id"))
1970        issuer = from_union([from_none, from_str], obj.get("issuer"))
1971        type = from_union([from_none, TokenType], obj.get("type"))
1972        uid = from_union([from_none, from_str], obj.get("uid"))
1973        visual_number = from_union([from_none, from_str], obj.get("visual_number"))
1974        return PublishTokenType(group_id, issuer, type, uid, visual_number)
1975
1976    def to_dict(self) -> dict:
1977        result: dict = {}
1978        if self.group_id is not None:
1979            result["group_id"] = from_union([from_none, from_str], self.group_id)
1980        if self.issuer is not None:
1981            result["issuer"] = from_union([from_none, from_str], self.issuer)
1982        if self.type is not None:
1983            result["type"] = from_union([from_none, lambda x: to_enum(TokenType, x)], self.type)
1984        if self.uid is not None:
1985            result["uid"] = from_union([from_none, from_str], self.uid)
1986        if self.visual_number is not None:
1987            result["visual_number"] = from_union([from_none, from_str], self.visual_number)
1988        return result
PublishTokenType( group_id: Optional[str], issuer: Optional[str], type: Optional[TokenType], uid: Optional[str], visual_number: Optional[str])
1959    def __init__(self, group_id: Optional[str], issuer: Optional[str], type: Optional[TokenType], uid: Optional[str], visual_number: Optional[str]) -> None:
1960        self.group_id = group_id
1961        self.issuer = issuer
1962        self.type = type
1963        self.uid = uid
1964        self.visual_number = visual_number
group_id: Optional[str]
issuer: Optional[str]
type: Optional[TokenType]
uid: Optional[str]
visual_number: Optional[str]
@staticmethod
def from_dict(obj: Any) -> PublishTokenType:
1966    @staticmethod
1967    def from_dict(obj: Any) -> 'PublishTokenType':
1968        assert isinstance(obj, dict)
1969        group_id = from_union([from_none, from_str], obj.get("group_id"))
1970        issuer = from_union([from_none, from_str], obj.get("issuer"))
1971        type = from_union([from_none, TokenType], obj.get("type"))
1972        uid = from_union([from_none, from_str], obj.get("uid"))
1973        visual_number = from_union([from_none, from_str], obj.get("visual_number"))
1974        return PublishTokenType(group_id, issuer, type, uid, visual_number)
def to_dict(self) -> dict:
1976    def to_dict(self) -> dict:
1977        result: dict = {}
1978        if self.group_id is not None:
1979            result["group_id"] = from_union([from_none, from_str], self.group_id)
1980        if self.issuer is not None:
1981            result["issuer"] = from_union([from_none, from_str], self.issuer)
1982        if self.type is not None:
1983            result["type"] = from_union([from_none, lambda x: to_enum(TokenType, x)], self.type)
1984        if self.uid is not None:
1985            result["uid"] = from_union([from_none, from_str], self.uid)
1986        if self.visual_number is not None:
1987            result["visual_number"] = from_union([from_none, from_str], self.visual_number)
1988        return result
class AdditionalGeoLocation:
1991class AdditionalGeoLocation:
1992    latitude: str
1993    longitude: str
1994    name: Optional[DisplayText]
1995
1996    def __init__(self, latitude: str, longitude: str, name: Optional[DisplayText]) -> None:
1997        self.latitude = latitude
1998        self.longitude = longitude
1999        self.name = name
2000
2001    @staticmethod
2002    def from_dict(obj: Any) -> 'AdditionalGeoLocation':
2003        assert isinstance(obj, dict)
2004        latitude = from_str(obj.get("latitude"))
2005        longitude = from_str(obj.get("longitude"))
2006        name = from_union([from_none, DisplayText.from_dict], obj.get("name"))
2007        return AdditionalGeoLocation(latitude, longitude, name)
2008
2009    def to_dict(self) -> dict:
2010        result: dict = {}
2011        result["latitude"] = from_str(self.latitude)
2012        result["longitude"] = from_str(self.longitude)
2013        if self.name is not None:
2014            result["name"] = from_union([from_none, lambda x: to_class(DisplayText, x)], self.name)
2015        return result
AdditionalGeoLocation(latitude: str, longitude: str, name: Optional[DisplayText])
1996    def __init__(self, latitude: str, longitude: str, name: Optional[DisplayText]) -> None:
1997        self.latitude = latitude
1998        self.longitude = longitude
1999        self.name = name
latitude: str
longitude: str
name: Optional[DisplayText]
@staticmethod
def from_dict(obj: Any) -> AdditionalGeoLocation:
2001    @staticmethod
2002    def from_dict(obj: Any) -> 'AdditionalGeoLocation':
2003        assert isinstance(obj, dict)
2004        latitude = from_str(obj.get("latitude"))
2005        longitude = from_str(obj.get("longitude"))
2006        name = from_union([from_none, DisplayText.from_dict], obj.get("name"))
2007        return AdditionalGeoLocation(latitude, longitude, name)
def to_dict(self) -> dict:
2009    def to_dict(self) -> dict:
2010        result: dict = {}
2011        result["latitude"] = from_str(self.latitude)
2012        result["longitude"] = from_str(self.longitude)
2013        if self.name is not None:
2014            result["name"] = from_union([from_none, lambda x: to_class(DisplayText, x)], self.name)
2015        return result
class Location:
2018class Location:
2019    address: str
2020    charging_when_closed: Optional[bool]
2021    city: str
2022    coordinates: GeoLocation
2023    country: str
2024    country_code: str
2025    directions: Optional[List[DisplayText]]
2026    energy_mix: Optional[EnergyMix]
2027    evses: Optional[List[Evse]]
2028    facilities: Optional[List[Facility]]
2029    id: str
2030    images: Optional[List[Image]]
2031    last_updated: str
2032    name: Optional[str]
2033    opening_times: Optional[Hours]
2034    operator: Optional[BusinessDetails]
2035    owner: Optional[BusinessDetails]
2036    parking_type: Optional[ParkingType]
2037    party_id: str
2038    postal_code: Optional[str]
2039    publish: bool
2040    publish_allowed_to: Optional[List[PublishTokenType]]
2041    related_locations: Optional[List[AdditionalGeoLocation]]
2042    state: Optional[str]
2043    suboperator: Optional[BusinessDetails]
2044    time_zone: str
2045
2046    def __init__(self, address: str, charging_when_closed: Optional[bool], city: str, coordinates: GeoLocation, country: str, country_code: str, directions: Optional[List[DisplayText]], energy_mix: Optional[EnergyMix], evses: Optional[List[Evse]], facilities: Optional[List[Facility]], id: str, images: Optional[List[Image]], last_updated: str, name: Optional[str], opening_times: Optional[Hours], operator: Optional[BusinessDetails], owner: Optional[BusinessDetails], parking_type: Optional[ParkingType], party_id: str, postal_code: Optional[str], publish: bool, publish_allowed_to: Optional[List[PublishTokenType]], related_locations: Optional[List[AdditionalGeoLocation]], state: Optional[str], suboperator: Optional[BusinessDetails], time_zone: str) -> None:
2047        self.address = address
2048        self.charging_when_closed = charging_when_closed
2049        self.city = city
2050        self.coordinates = coordinates
2051        self.country = country
2052        self.country_code = country_code
2053        self.directions = directions
2054        self.energy_mix = energy_mix
2055        self.evses = evses
2056        self.facilities = facilities
2057        self.id = id
2058        self.images = images
2059        self.last_updated = last_updated
2060        self.name = name
2061        self.opening_times = opening_times
2062        self.operator = operator
2063        self.owner = owner
2064        self.parking_type = parking_type
2065        self.party_id = party_id
2066        self.postal_code = postal_code
2067        self.publish = publish
2068        self.publish_allowed_to = publish_allowed_to
2069        self.related_locations = related_locations
2070        self.state = state
2071        self.suboperator = suboperator
2072        self.time_zone = time_zone
2073
2074    @staticmethod
2075    def from_dict(obj: Any) -> 'Location':
2076        assert isinstance(obj, dict)
2077        address = from_str(obj.get("address"))
2078        charging_when_closed = from_union([from_none, from_bool], obj.get("charging_when_closed"))
2079        city = from_str(obj.get("city"))
2080        coordinates = GeoLocation.from_dict(obj.get("coordinates"))
2081        country = from_str(obj.get("country"))
2082        country_code = from_str(obj.get("country_code"))
2083        directions = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("directions"))
2084        energy_mix = from_union([from_none, EnergyMix.from_dict], obj.get("energy_mix"))
2085        evses = from_union([from_none, lambda x: from_list(Evse.from_dict, x)], obj.get("evses"))
2086        facilities = from_union([from_none, lambda x: from_list(Facility, x)], obj.get("facilities"))
2087        id = from_str(obj.get("id"))
2088        images = from_union([from_none, lambda x: from_list(Image.from_dict, x)], obj.get("images"))
2089        last_updated = from_str(obj.get("last_updated"))
2090        name = from_union([from_none, from_str], obj.get("name"))
2091        opening_times = from_union([from_none, Hours.from_dict], obj.get("opening_times"))
2092        operator = from_union([from_none, BusinessDetails.from_dict], obj.get("operator"))
2093        owner = from_union([from_none, BusinessDetails.from_dict], obj.get("owner"))
2094        parking_type = from_union([from_none, ParkingType], obj.get("parking_type"))
2095        party_id = from_str(obj.get("party_id"))
2096        postal_code = from_union([from_none, from_str], obj.get("postal_code"))
2097        publish = from_bool(obj.get("publish"))
2098        publish_allowed_to = from_union([from_none, lambda x: from_list(PublishTokenType.from_dict, x)], obj.get("publish_allowed_to"))
2099        related_locations = from_union([from_none, lambda x: from_list(AdditionalGeoLocation.from_dict, x)], obj.get("related_locations"))
2100        state = from_union([from_none, from_str], obj.get("state"))
2101        suboperator = from_union([from_none, BusinessDetails.from_dict], obj.get("suboperator"))
2102        time_zone = from_str(obj.get("time_zone"))
2103        return Location(address, charging_when_closed, city, coordinates, country, country_code, directions, energy_mix, evses, facilities, id, images, last_updated, name, opening_times, operator, owner, parking_type, party_id, postal_code, publish, publish_allowed_to, related_locations, state, suboperator, time_zone)
2104
2105    def to_dict(self) -> dict:
2106        result: dict = {}
2107        result["address"] = from_str(self.address)
2108        if self.charging_when_closed is not None:
2109            result["charging_when_closed"] = from_union([from_none, from_bool], self.charging_when_closed)
2110        result["city"] = from_str(self.city)
2111        result["coordinates"] = to_class(GeoLocation, self.coordinates)
2112        result["country"] = from_str(self.country)
2113        result["country_code"] = from_str(self.country_code)
2114        if self.directions is not None:
2115            result["directions"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.directions)
2116        if self.energy_mix is not None:
2117            result["energy_mix"] = from_union([from_none, lambda x: to_class(EnergyMix, x)], self.energy_mix)
2118        if self.evses is not None:
2119            result["evses"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Evse, x), x)], self.evses)
2120        if self.facilities is not None:
2121            result["facilities"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(Facility, x), x)], self.facilities)
2122        result["id"] = from_str(self.id)
2123        if self.images is not None:
2124            result["images"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Image, x), x)], self.images)
2125        result["last_updated"] = from_str(self.last_updated)
2126        if self.name is not None:
2127            result["name"] = from_union([from_none, from_str], self.name)
2128        if self.opening_times is not None:
2129            result["opening_times"] = from_union([from_none, lambda x: to_class(Hours, x)], self.opening_times)
2130        if self.operator is not None:
2131            result["operator"] = from_union([from_none, lambda x: to_class(BusinessDetails, x)], self.operator)
2132        if self.owner is not None:
2133            result["owner"] = from_union([from_none, lambda x: to_class(BusinessDetails, x)], self.owner)
2134        if self.parking_type is not None:
2135            result["parking_type"] = from_union([from_none, lambda x: to_enum(ParkingType, x)], self.parking_type)
2136        result["party_id"] = from_str(self.party_id)
2137        if self.postal_code is not None:
2138            result["postal_code"] = from_union([from_none, from_str], self.postal_code)
2139        result["publish"] = from_bool(self.publish)
2140        if self.publish_allowed_to is not None:
2141            result["publish_allowed_to"] = from_union([from_none, lambda x: from_list(lambda x: to_class(PublishTokenType, x), x)], self.publish_allowed_to)
2142        if self.related_locations is not None:
2143            result["related_locations"] = from_union([from_none, lambda x: from_list(lambda x: to_class(AdditionalGeoLocation, x), x)], self.related_locations)
2144        if self.state is not None:
2145            result["state"] = from_union([from_none, from_str], self.state)
2146        if self.suboperator is not None:
2147            result["suboperator"] = from_union([from_none, lambda x: to_class(BusinessDetails, x)], self.suboperator)
2148        result["time_zone"] = from_str(self.time_zone)
2149        return result
Location( address: str, charging_when_closed: Optional[bool], city: str, coordinates: GeoLocation, country: str, country_code: str, directions: Optional[List[DisplayText]], energy_mix: Optional[EnergyMix], evses: Optional[List[Evse]], facilities: Optional[List[Facility]], id: str, images: Optional[List[Image]], last_updated: str, name: Optional[str], opening_times: Optional[Hours], operator: Optional[BusinessDetails], owner: Optional[BusinessDetails], parking_type: Optional[ParkingType], party_id: str, postal_code: Optional[str], publish: bool, publish_allowed_to: Optional[List[PublishTokenType]], related_locations: Optional[List[AdditionalGeoLocation]], state: Optional[str], suboperator: Optional[BusinessDetails], time_zone: str)
2046    def __init__(self, address: str, charging_when_closed: Optional[bool], city: str, coordinates: GeoLocation, country: str, country_code: str, directions: Optional[List[DisplayText]], energy_mix: Optional[EnergyMix], evses: Optional[List[Evse]], facilities: Optional[List[Facility]], id: str, images: Optional[List[Image]], last_updated: str, name: Optional[str], opening_times: Optional[Hours], operator: Optional[BusinessDetails], owner: Optional[BusinessDetails], parking_type: Optional[ParkingType], party_id: str, postal_code: Optional[str], publish: bool, publish_allowed_to: Optional[List[PublishTokenType]], related_locations: Optional[List[AdditionalGeoLocation]], state: Optional[str], suboperator: Optional[BusinessDetails], time_zone: str) -> None:
2047        self.address = address
2048        self.charging_when_closed = charging_when_closed
2049        self.city = city
2050        self.coordinates = coordinates
2051        self.country = country
2052        self.country_code = country_code
2053        self.directions = directions
2054        self.energy_mix = energy_mix
2055        self.evses = evses
2056        self.facilities = facilities
2057        self.id = id
2058        self.images = images
2059        self.last_updated = last_updated
2060        self.name = name
2061        self.opening_times = opening_times
2062        self.operator = operator
2063        self.owner = owner
2064        self.parking_type = parking_type
2065        self.party_id = party_id
2066        self.postal_code = postal_code
2067        self.publish = publish
2068        self.publish_allowed_to = publish_allowed_to
2069        self.related_locations = related_locations
2070        self.state = state
2071        self.suboperator = suboperator
2072        self.time_zone = time_zone
address: str
charging_when_closed: Optional[bool]
city: str
coordinates: GeoLocation
country: str
country_code: str
directions: Optional[List[DisplayText]]
energy_mix: Optional[EnergyMix]
evses: Optional[List[Evse]]
facilities: Optional[List[Facility]]
id: str
images: Optional[List[Image]]
last_updated: str
name: Optional[str]
opening_times: Optional[Hours]
operator: Optional[BusinessDetails]
owner: Optional[BusinessDetails]
parking_type: Optional[ParkingType]
party_id: str
postal_code: Optional[str]
publish: bool
publish_allowed_to: Optional[List[PublishTokenType]]
related_locations: Optional[List[AdditionalGeoLocation]]
state: Optional[str]
suboperator: Optional[BusinessDetails]
time_zone: str
@staticmethod
def from_dict(obj: Any) -> Location:
2074    @staticmethod
2075    def from_dict(obj: Any) -> 'Location':
2076        assert isinstance(obj, dict)
2077        address = from_str(obj.get("address"))
2078        charging_when_closed = from_union([from_none, from_bool], obj.get("charging_when_closed"))
2079        city = from_str(obj.get("city"))
2080        coordinates = GeoLocation.from_dict(obj.get("coordinates"))
2081        country = from_str(obj.get("country"))
2082        country_code = from_str(obj.get("country_code"))
2083        directions = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("directions"))
2084        energy_mix = from_union([from_none, EnergyMix.from_dict], obj.get("energy_mix"))
2085        evses = from_union([from_none, lambda x: from_list(Evse.from_dict, x)], obj.get("evses"))
2086        facilities = from_union([from_none, lambda x: from_list(Facility, x)], obj.get("facilities"))
2087        id = from_str(obj.get("id"))
2088        images = from_union([from_none, lambda x: from_list(Image.from_dict, x)], obj.get("images"))
2089        last_updated = from_str(obj.get("last_updated"))
2090        name = from_union([from_none, from_str], obj.get("name"))
2091        opening_times = from_union([from_none, Hours.from_dict], obj.get("opening_times"))
2092        operator = from_union([from_none, BusinessDetails.from_dict], obj.get("operator"))
2093        owner = from_union([from_none, BusinessDetails.from_dict], obj.get("owner"))
2094        parking_type = from_union([from_none, ParkingType], obj.get("parking_type"))
2095        party_id = from_str(obj.get("party_id"))
2096        postal_code = from_union([from_none, from_str], obj.get("postal_code"))
2097        publish = from_bool(obj.get("publish"))
2098        publish_allowed_to = from_union([from_none, lambda x: from_list(PublishTokenType.from_dict, x)], obj.get("publish_allowed_to"))
2099        related_locations = from_union([from_none, lambda x: from_list(AdditionalGeoLocation.from_dict, x)], obj.get("related_locations"))
2100        state = from_union([from_none, from_str], obj.get("state"))
2101        suboperator = from_union([from_none, BusinessDetails.from_dict], obj.get("suboperator"))
2102        time_zone = from_str(obj.get("time_zone"))
2103        return Location(address, charging_when_closed, city, coordinates, country, country_code, directions, energy_mix, evses, facilities, id, images, last_updated, name, opening_times, operator, owner, parking_type, party_id, postal_code, publish, publish_allowed_to, related_locations, state, suboperator, time_zone)
def to_dict(self) -> dict:
2105    def to_dict(self) -> dict:
2106        result: dict = {}
2107        result["address"] = from_str(self.address)
2108        if self.charging_when_closed is not None:
2109            result["charging_when_closed"] = from_union([from_none, from_bool], self.charging_when_closed)
2110        result["city"] = from_str(self.city)
2111        result["coordinates"] = to_class(GeoLocation, self.coordinates)
2112        result["country"] = from_str(self.country)
2113        result["country_code"] = from_str(self.country_code)
2114        if self.directions is not None:
2115            result["directions"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.directions)
2116        if self.energy_mix is not None:
2117            result["energy_mix"] = from_union([from_none, lambda x: to_class(EnergyMix, x)], self.energy_mix)
2118        if self.evses is not None:
2119            result["evses"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Evse, x), x)], self.evses)
2120        if self.facilities is not None:
2121            result["facilities"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(Facility, x), x)], self.facilities)
2122        result["id"] = from_str(self.id)
2123        if self.images is not None:
2124            result["images"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Image, x), x)], self.images)
2125        result["last_updated"] = from_str(self.last_updated)
2126        if self.name is not None:
2127            result["name"] = from_union([from_none, from_str], self.name)
2128        if self.opening_times is not None:
2129            result["opening_times"] = from_union([from_none, lambda x: to_class(Hours, x)], self.opening_times)
2130        if self.operator is not None:
2131            result["operator"] = from_union([from_none, lambda x: to_class(BusinessDetails, x)], self.operator)
2132        if self.owner is not None:
2133            result["owner"] = from_union([from_none, lambda x: to_class(BusinessDetails, x)], self.owner)
2134        if self.parking_type is not None:
2135            result["parking_type"] = from_union([from_none, lambda x: to_enum(ParkingType, x)], self.parking_type)
2136        result["party_id"] = from_str(self.party_id)
2137        if self.postal_code is not None:
2138            result["postal_code"] = from_union([from_none, from_str], self.postal_code)
2139        result["publish"] = from_bool(self.publish)
2140        if self.publish_allowed_to is not None:
2141            result["publish_allowed_to"] = from_union([from_none, lambda x: from_list(lambda x: to_class(PublishTokenType, x), x)], self.publish_allowed_to)
2142        if self.related_locations is not None:
2143            result["related_locations"] = from_union([from_none, lambda x: from_list(lambda x: to_class(AdditionalGeoLocation, x), x)], self.related_locations)
2144        if self.state is not None:
2145            result["state"] = from_union([from_none, from_str], self.state)
2146        if self.suboperator is not None:
2147            result["suboperator"] = from_union([from_none, lambda x: to_class(BusinessDetails, x)], self.suboperator)
2148        result["time_zone"] = from_str(self.time_zone)
2149        return result
class ReserveNow:
2152class ReserveNow:
2153    authorization_reference: Optional[str]
2154    evse_uid: Optional[str]
2155    expiry_date: str
2156    location_id: str
2157    reservation_id: str
2158    response_url: str
2159    token: Token
2160
2161    def __init__(self, authorization_reference: Optional[str], evse_uid: Optional[str], expiry_date: str, location_id: str, reservation_id: str, response_url: str, token: Token) -> None:
2162        self.authorization_reference = authorization_reference
2163        self.evse_uid = evse_uid
2164        self.expiry_date = expiry_date
2165        self.location_id = location_id
2166        self.reservation_id = reservation_id
2167        self.response_url = response_url
2168        self.token = token
2169
2170    @staticmethod
2171    def from_dict(obj: Any) -> 'ReserveNow':
2172        assert isinstance(obj, dict)
2173        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
2174        evse_uid = from_union([from_none, from_str], obj.get("evse_uid"))
2175        expiry_date = from_str(obj.get("expiry_date"))
2176        location_id = from_str(obj.get("location_id"))
2177        reservation_id = from_str(obj.get("reservation_id"))
2178        response_url = from_str(obj.get("response_url"))
2179        token = Token.from_dict(obj.get("token"))
2180        return ReserveNow(authorization_reference, evse_uid, expiry_date, location_id, reservation_id, response_url, token)
2181
2182    def to_dict(self) -> dict:
2183        result: dict = {}
2184        if self.authorization_reference is not None:
2185            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
2186        if self.evse_uid is not None:
2187            result["evse_uid"] = from_union([from_none, from_str], self.evse_uid)
2188        result["expiry_date"] = from_str(self.expiry_date)
2189        result["location_id"] = from_str(self.location_id)
2190        result["reservation_id"] = from_str(self.reservation_id)
2191        result["response_url"] = from_str(self.response_url)
2192        result["token"] = to_class(Token, self.token)
2193        return result
ReserveNow( authorization_reference: Optional[str], evse_uid: Optional[str], expiry_date: str, location_id: str, reservation_id: str, response_url: str, token: Token)
2161    def __init__(self, authorization_reference: Optional[str], evse_uid: Optional[str], expiry_date: str, location_id: str, reservation_id: str, response_url: str, token: Token) -> None:
2162        self.authorization_reference = authorization_reference
2163        self.evse_uid = evse_uid
2164        self.expiry_date = expiry_date
2165        self.location_id = location_id
2166        self.reservation_id = reservation_id
2167        self.response_url = response_url
2168        self.token = token
authorization_reference: Optional[str]
evse_uid: Optional[str]
expiry_date: str
location_id: str
reservation_id: str
response_url: str
token: Token
@staticmethod
def from_dict(obj: Any) -> ReserveNow:
2170    @staticmethod
2171    def from_dict(obj: Any) -> 'ReserveNow':
2172        assert isinstance(obj, dict)
2173        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
2174        evse_uid = from_union([from_none, from_str], obj.get("evse_uid"))
2175        expiry_date = from_str(obj.get("expiry_date"))
2176        location_id = from_str(obj.get("location_id"))
2177        reservation_id = from_str(obj.get("reservation_id"))
2178        response_url = from_str(obj.get("response_url"))
2179        token = Token.from_dict(obj.get("token"))
2180        return ReserveNow(authorization_reference, evse_uid, expiry_date, location_id, reservation_id, response_url, token)
def to_dict(self) -> dict:
2182    def to_dict(self) -> dict:
2183        result: dict = {}
2184        if self.authorization_reference is not None:
2185            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
2186        if self.evse_uid is not None:
2187            result["evse_uid"] = from_union([from_none, from_str], self.evse_uid)
2188        result["expiry_date"] = from_str(self.expiry_date)
2189        result["location_id"] = from_str(self.location_id)
2190        result["reservation_id"] = from_str(self.reservation_id)
2191        result["response_url"] = from_str(self.response_url)
2192        result["token"] = to_class(Token, self.token)
2193        return result
class SessionStatus(enum.Enum):
2196class SessionStatus(Enum):
2197    ACTIVE = "ACTIVE"
2198    COMPLETED = "COMPLETED"
2199    INVALID = "INVALID"
2200    PENDING = "PENDING"
2201    RESERVATION = "RESERVATION"
ACTIVE = <SessionStatus.ACTIVE: 'ACTIVE'>
COMPLETED = <SessionStatus.COMPLETED: 'COMPLETED'>
INVALID = <SessionStatus.INVALID: 'INVALID'>
PENDING = <SessionStatus.PENDING: 'PENDING'>
RESERVATION = <SessionStatus.RESERVATION: 'RESERVATION'>
class Session:
2204class Session:
2205    auth_method: AuthMethod
2206    authorization_reference: Optional[str]
2207    cdr_token: CdrToken
2208    charging_periods: Optional[List[ChargingPeriod]]
2209    connector_id: str
2210    country_code: str
2211    currency: str
2212    end_date_time: Optional[str]
2213    evse_uid: str
2214    id: str
2215    kwh: float
2216    last_updated: str
2217    location_id: str
2218    meter_id: Optional[str]
2219    party_id: str
2220    start_date_time: str
2221    status: SessionStatus
2222    total_cost: Optional[Price]
2223
2224    def __init__(self, auth_method: AuthMethod, authorization_reference: Optional[str], cdr_token: CdrToken, charging_periods: Optional[List[ChargingPeriod]], connector_id: str, country_code: str, currency: str, end_date_time: Optional[str], evse_uid: str, id: str, kwh: float, last_updated: str, location_id: str, meter_id: Optional[str], party_id: str, start_date_time: str, status: SessionStatus, total_cost: Optional[Price]) -> None:
2225        self.auth_method = auth_method
2226        self.authorization_reference = authorization_reference
2227        self.cdr_token = cdr_token
2228        self.charging_periods = charging_periods
2229        self.connector_id = connector_id
2230        self.country_code = country_code
2231        self.currency = currency
2232        self.end_date_time = end_date_time
2233        self.evse_uid = evse_uid
2234        self.id = id
2235        self.kwh = kwh
2236        self.last_updated = last_updated
2237        self.location_id = location_id
2238        self.meter_id = meter_id
2239        self.party_id = party_id
2240        self.start_date_time = start_date_time
2241        self.status = status
2242        self.total_cost = total_cost
2243
2244    @staticmethod
2245    def from_dict(obj: Any) -> 'Session':
2246        assert isinstance(obj, dict)
2247        auth_method = AuthMethod(obj.get("auth_method"))
2248        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
2249        cdr_token = CdrToken.from_dict(obj.get("cdr_token"))
2250        charging_periods = from_union([from_none, lambda x: from_list(ChargingPeriod.from_dict, x)], obj.get("charging_periods"))
2251        connector_id = from_str(obj.get("connector_id"))
2252        country_code = from_str(obj.get("country_code"))
2253        currency = from_str(obj.get("currency"))
2254        end_date_time = from_union([from_none, from_str], obj.get("end_date_time"))
2255        evse_uid = from_str(obj.get("evse_uid"))
2256        id = from_str(obj.get("id"))
2257        kwh = from_float(obj.get("kwh"))
2258        last_updated = from_str(obj.get("last_updated"))
2259        location_id = from_str(obj.get("location_id"))
2260        meter_id = from_union([from_none, from_str], obj.get("meter_id"))
2261        party_id = from_str(obj.get("party_id"))
2262        start_date_time = from_str(obj.get("start_date_time"))
2263        status = SessionStatus(obj.get("status"))
2264        total_cost = from_union([from_none, Price.from_dict], obj.get("total_cost"))
2265        return Session(auth_method, authorization_reference, cdr_token, charging_periods, connector_id, country_code, currency, end_date_time, evse_uid, id, kwh, last_updated, location_id, meter_id, party_id, start_date_time, status, total_cost)
2266
2267    def to_dict(self) -> dict:
2268        result: dict = {}
2269        result["auth_method"] = to_enum(AuthMethod, self.auth_method)
2270        if self.authorization_reference is not None:
2271            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
2272        result["cdr_token"] = to_class(CdrToken, self.cdr_token)
2273        if self.charging_periods is not None:
2274            result["charging_periods"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ChargingPeriod, x), x)], self.charging_periods)
2275        result["connector_id"] = from_str(self.connector_id)
2276        result["country_code"] = from_str(self.country_code)
2277        result["currency"] = from_str(self.currency)
2278        if self.end_date_time is not None:
2279            result["end_date_time"] = from_union([from_none, from_str], self.end_date_time)
2280        result["evse_uid"] = from_str(self.evse_uid)
2281        result["id"] = from_str(self.id)
2282        result["kwh"] = to_float(self.kwh)
2283        result["last_updated"] = from_str(self.last_updated)
2284        result["location_id"] = from_str(self.location_id)
2285        if self.meter_id is not None:
2286            result["meter_id"] = from_union([from_none, from_str], self.meter_id)
2287        result["party_id"] = from_str(self.party_id)
2288        result["start_date_time"] = from_str(self.start_date_time)
2289        result["status"] = to_enum(SessionStatus, self.status)
2290        if self.total_cost is not None:
2291            result["total_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_cost)
2292        return result
Session( auth_method: AuthMethod, authorization_reference: Optional[str], cdr_token: CdrToken, charging_periods: Optional[List[ChargingPeriod]], connector_id: str, country_code: str, currency: str, end_date_time: Optional[str], evse_uid: str, id: str, kwh: float, last_updated: str, location_id: str, meter_id: Optional[str], party_id: str, start_date_time: str, status: SessionStatus, total_cost: Optional[Price])
2224    def __init__(self, auth_method: AuthMethod, authorization_reference: Optional[str], cdr_token: CdrToken, charging_periods: Optional[List[ChargingPeriod]], connector_id: str, country_code: str, currency: str, end_date_time: Optional[str], evse_uid: str, id: str, kwh: float, last_updated: str, location_id: str, meter_id: Optional[str], party_id: str, start_date_time: str, status: SessionStatus, total_cost: Optional[Price]) -> None:
2225        self.auth_method = auth_method
2226        self.authorization_reference = authorization_reference
2227        self.cdr_token = cdr_token
2228        self.charging_periods = charging_periods
2229        self.connector_id = connector_id
2230        self.country_code = country_code
2231        self.currency = currency
2232        self.end_date_time = end_date_time
2233        self.evse_uid = evse_uid
2234        self.id = id
2235        self.kwh = kwh
2236        self.last_updated = last_updated
2237        self.location_id = location_id
2238        self.meter_id = meter_id
2239        self.party_id = party_id
2240        self.start_date_time = start_date_time
2241        self.status = status
2242        self.total_cost = total_cost
auth_method: AuthMethod
authorization_reference: Optional[str]
cdr_token: CdrToken
charging_periods: Optional[List[ChargingPeriod]]
connector_id: str
country_code: str
currency: str
end_date_time: Optional[str]
evse_uid: str
id: str
kwh: float
last_updated: str
location_id: str
meter_id: Optional[str]
party_id: str
start_date_time: str
status: SessionStatus
total_cost: Optional[Price]
@staticmethod
def from_dict(obj: Any) -> Session:
2244    @staticmethod
2245    def from_dict(obj: Any) -> 'Session':
2246        assert isinstance(obj, dict)
2247        auth_method = AuthMethod(obj.get("auth_method"))
2248        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
2249        cdr_token = CdrToken.from_dict(obj.get("cdr_token"))
2250        charging_periods = from_union([from_none, lambda x: from_list(ChargingPeriod.from_dict, x)], obj.get("charging_periods"))
2251        connector_id = from_str(obj.get("connector_id"))
2252        country_code = from_str(obj.get("country_code"))
2253        currency = from_str(obj.get("currency"))
2254        end_date_time = from_union([from_none, from_str], obj.get("end_date_time"))
2255        evse_uid = from_str(obj.get("evse_uid"))
2256        id = from_str(obj.get("id"))
2257        kwh = from_float(obj.get("kwh"))
2258        last_updated = from_str(obj.get("last_updated"))
2259        location_id = from_str(obj.get("location_id"))
2260        meter_id = from_union([from_none, from_str], obj.get("meter_id"))
2261        party_id = from_str(obj.get("party_id"))
2262        start_date_time = from_str(obj.get("start_date_time"))
2263        status = SessionStatus(obj.get("status"))
2264        total_cost = from_union([from_none, Price.from_dict], obj.get("total_cost"))
2265        return Session(auth_method, authorization_reference, cdr_token, charging_periods, connector_id, country_code, currency, end_date_time, evse_uid, id, kwh, last_updated, location_id, meter_id, party_id, start_date_time, status, total_cost)
def to_dict(self) -> dict:
2267    def to_dict(self) -> dict:
2268        result: dict = {}
2269        result["auth_method"] = to_enum(AuthMethod, self.auth_method)
2270        if self.authorization_reference is not None:
2271            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
2272        result["cdr_token"] = to_class(CdrToken, self.cdr_token)
2273        if self.charging_periods is not None:
2274            result["charging_periods"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ChargingPeriod, x), x)], self.charging_periods)
2275        result["connector_id"] = from_str(self.connector_id)
2276        result["country_code"] = from_str(self.country_code)
2277        result["currency"] = from_str(self.currency)
2278        if self.end_date_time is not None:
2279            result["end_date_time"] = from_union([from_none, from_str], self.end_date_time)
2280        result["evse_uid"] = from_str(self.evse_uid)
2281        result["id"] = from_str(self.id)
2282        result["kwh"] = to_float(self.kwh)
2283        result["last_updated"] = from_str(self.last_updated)
2284        result["location_id"] = from_str(self.location_id)
2285        if self.meter_id is not None:
2286            result["meter_id"] = from_union([from_none, from_str], self.meter_id)
2287        result["party_id"] = from_str(self.party_id)
2288        result["start_date_time"] = from_str(self.start_date_time)
2289        result["status"] = to_enum(SessionStatus, self.status)
2290        if self.total_cost is not None:
2291            result["total_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_cost)
2292        return result
class SetChargingProfile:
2295class SetChargingProfile:
2296    charging_profile: ChargingProfile
2297    response_url: str
2298
2299    def __init__(self, charging_profile: ChargingProfile, response_url: str) -> None:
2300        self.charging_profile = charging_profile
2301        self.response_url = response_url
2302
2303    @staticmethod
2304    def from_dict(obj: Any) -> 'SetChargingProfile':
2305        assert isinstance(obj, dict)
2306        charging_profile = ChargingProfile.from_dict(obj.get("charging_profile"))
2307        response_url = from_str(obj.get("response_url"))
2308        return SetChargingProfile(charging_profile, response_url)
2309
2310    def to_dict(self) -> dict:
2311        result: dict = {}
2312        result["charging_profile"] = to_class(ChargingProfile, self.charging_profile)
2313        result["response_url"] = from_str(self.response_url)
2314        return result
SetChargingProfile(charging_profile: ChargingProfile, response_url: str)
2299    def __init__(self, charging_profile: ChargingProfile, response_url: str) -> None:
2300        self.charging_profile = charging_profile
2301        self.response_url = response_url
charging_profile: ChargingProfile
response_url: str
@staticmethod
def from_dict(obj: Any) -> SetChargingProfile:
2303    @staticmethod
2304    def from_dict(obj: Any) -> 'SetChargingProfile':
2305        assert isinstance(obj, dict)
2306        charging_profile = ChargingProfile.from_dict(obj.get("charging_profile"))
2307        response_url = from_str(obj.get("response_url"))
2308        return SetChargingProfile(charging_profile, response_url)
def to_dict(self) -> dict:
2310    def to_dict(self) -> dict:
2311        result: dict = {}
2312        result["charging_profile"] = to_class(ChargingProfile, self.charging_profile)
2313        result["response_url"] = from_str(self.response_url)
2314        return result
class StartSession:
2317class StartSession:
2318    authorization_reference: Optional[str]
2319    connector_id: Optional[str]
2320    evse_uid: Optional[str]
2321    location_id: str
2322    response_url: str
2323    token: Token
2324
2325    def __init__(self, authorization_reference: Optional[str], connector_id: Optional[str], evse_uid: Optional[str], location_id: str, response_url: str, token: Token) -> None:
2326        self.authorization_reference = authorization_reference
2327        self.connector_id = connector_id
2328        self.evse_uid = evse_uid
2329        self.location_id = location_id
2330        self.response_url = response_url
2331        self.token = token
2332
2333    @staticmethod
2334    def from_dict(obj: Any) -> 'StartSession':
2335        assert isinstance(obj, dict)
2336        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
2337        connector_id = from_union([from_none, from_str], obj.get("connector_id"))
2338        evse_uid = from_union([from_none, from_str], obj.get("evse_uid"))
2339        location_id = from_str(obj.get("location_id"))
2340        response_url = from_str(obj.get("response_url"))
2341        token = Token.from_dict(obj.get("token"))
2342        return StartSession(authorization_reference, connector_id, evse_uid, location_id, response_url, token)
2343
2344    def to_dict(self) -> dict:
2345        result: dict = {}
2346        if self.authorization_reference is not None:
2347            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
2348        if self.connector_id is not None:
2349            result["connector_id"] = from_union([from_none, from_str], self.connector_id)
2350        if self.evse_uid is not None:
2351            result["evse_uid"] = from_union([from_none, from_str], self.evse_uid)
2352        result["location_id"] = from_str(self.location_id)
2353        result["response_url"] = from_str(self.response_url)
2354        result["token"] = to_class(Token, self.token)
2355        return result
StartSession( authorization_reference: Optional[str], connector_id: Optional[str], evse_uid: Optional[str], location_id: str, response_url: str, token: Token)
2325    def __init__(self, authorization_reference: Optional[str], connector_id: Optional[str], evse_uid: Optional[str], location_id: str, response_url: str, token: Token) -> None:
2326        self.authorization_reference = authorization_reference
2327        self.connector_id = connector_id
2328        self.evse_uid = evse_uid
2329        self.location_id = location_id
2330        self.response_url = response_url
2331        self.token = token
authorization_reference: Optional[str]
connector_id: Optional[str]
evse_uid: Optional[str]
location_id: str
response_url: str
token: Token
@staticmethod
def from_dict(obj: Any) -> StartSession:
2333    @staticmethod
2334    def from_dict(obj: Any) -> 'StartSession':
2335        assert isinstance(obj, dict)
2336        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
2337        connector_id = from_union([from_none, from_str], obj.get("connector_id"))
2338        evse_uid = from_union([from_none, from_str], obj.get("evse_uid"))
2339        location_id = from_str(obj.get("location_id"))
2340        response_url = from_str(obj.get("response_url"))
2341        token = Token.from_dict(obj.get("token"))
2342        return StartSession(authorization_reference, connector_id, evse_uid, location_id, response_url, token)
def to_dict(self) -> dict:
2344    def to_dict(self) -> dict:
2345        result: dict = {}
2346        if self.authorization_reference is not None:
2347            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
2348        if self.connector_id is not None:
2349            result["connector_id"] = from_union([from_none, from_str], self.connector_id)
2350        if self.evse_uid is not None:
2351            result["evse_uid"] = from_union([from_none, from_str], self.evse_uid)
2352        result["location_id"] = from_str(self.location_id)
2353        result["response_url"] = from_str(self.response_url)
2354        result["token"] = to_class(Token, self.token)
2355        return result
class StopSession:
2358class StopSession:
2359    response_url: str
2360    session_id: str
2361
2362    def __init__(self, response_url: str, session_id: str) -> None:
2363        self.response_url = response_url
2364        self.session_id = session_id
2365
2366    @staticmethod
2367    def from_dict(obj: Any) -> 'StopSession':
2368        assert isinstance(obj, dict)
2369        response_url = from_str(obj.get("response_url"))
2370        session_id = from_str(obj.get("session_id"))
2371        return StopSession(response_url, session_id)
2372
2373    def to_dict(self) -> dict:
2374        result: dict = {}
2375        result["response_url"] = from_str(self.response_url)
2376        result["session_id"] = from_str(self.session_id)
2377        return result
StopSession(response_url: str, session_id: str)
2362    def __init__(self, response_url: str, session_id: str) -> None:
2363        self.response_url = response_url
2364        self.session_id = session_id
response_url: str
session_id: str
@staticmethod
def from_dict(obj: Any) -> StopSession:
2366    @staticmethod
2367    def from_dict(obj: Any) -> 'StopSession':
2368        assert isinstance(obj, dict)
2369        response_url = from_str(obj.get("response_url"))
2370        session_id = from_str(obj.get("session_id"))
2371        return StopSession(response_url, session_id)
def to_dict(self) -> dict:
2373    def to_dict(self) -> dict:
2374        result: dict = {}
2375        result["response_url"] = from_str(self.response_url)
2376        result["session_id"] = from_str(self.session_id)
2377        return result
class UnlockConnector:
2380class UnlockConnector:
2381    connector_id: str
2382    evse_uid: str
2383    location_id: str
2384    response_url: str
2385
2386    def __init__(self, connector_id: str, evse_uid: str, location_id: str, response_url: str) -> None:
2387        self.connector_id = connector_id
2388        self.evse_uid = evse_uid
2389        self.location_id = location_id
2390        self.response_url = response_url
2391
2392    @staticmethod
2393    def from_dict(obj: Any) -> 'UnlockConnector':
2394        assert isinstance(obj, dict)
2395        connector_id = from_str(obj.get("connector_id"))
2396        evse_uid = from_str(obj.get("evse_uid"))
2397        location_id = from_str(obj.get("location_id"))
2398        response_url = from_str(obj.get("response_url"))
2399        return UnlockConnector(connector_id, evse_uid, location_id, response_url)
2400
2401    def to_dict(self) -> dict:
2402        result: dict = {}
2403        result["connector_id"] = from_str(self.connector_id)
2404        result["evse_uid"] = from_str(self.evse_uid)
2405        result["location_id"] = from_str(self.location_id)
2406        result["response_url"] = from_str(self.response_url)
2407        return result
UnlockConnector( connector_id: str, evse_uid: str, location_id: str, response_url: str)
2386    def __init__(self, connector_id: str, evse_uid: str, location_id: str, response_url: str) -> None:
2387        self.connector_id = connector_id
2388        self.evse_uid = evse_uid
2389        self.location_id = location_id
2390        self.response_url = response_url
connector_id: str
evse_uid: str
location_id: str
response_url: str
@staticmethod
def from_dict(obj: Any) -> UnlockConnector:
2392    @staticmethod
2393    def from_dict(obj: Any) -> 'UnlockConnector':
2394        assert isinstance(obj, dict)
2395        connector_id = from_str(obj.get("connector_id"))
2396        evse_uid = from_str(obj.get("evse_uid"))
2397        location_id = from_str(obj.get("location_id"))
2398        response_url = from_str(obj.get("response_url"))
2399        return UnlockConnector(connector_id, evse_uid, location_id, response_url)
def to_dict(self) -> dict:
2401    def to_dict(self) -> dict:
2402        result: dict = {}
2403        result["connector_id"] = from_str(self.connector_id)
2404        result["evse_uid"] = from_str(self.evse_uid)
2405        result["location_id"] = from_str(self.location_id)
2406        result["response_url"] = from_str(self.response_url)
2407        return result
class VersionNumber(enum.Enum):
2410class VersionNumber(Enum):
2411    THE_20 = "2.0"
2412    THE_21 = "2.1"
2413    THE_211 = "2.1.1"
2414    THE_22 = "2.2"
2415    THE_221 = "2.2.1"
THE_20 = <VersionNumber.THE_20: '2.0'>
THE_21 = <VersionNumber.THE_21: '2.1'>
THE_211 = <VersionNumber.THE_211: '2.1.1'>
THE_22 = <VersionNumber.THE_22: '2.2'>
THE_221 = <VersionNumber.THE_221: '2.2.1'>
class Version:
2418class Version:
2419    url: str
2420    version: VersionNumber
2421
2422    def __init__(self, url: str, version: VersionNumber) -> None:
2423        self.url = url
2424        self.version = version
2425
2426    @staticmethod
2427    def from_dict(obj: Any) -> 'Version':
2428        assert isinstance(obj, dict)
2429        url = from_str(obj.get("url"))
2430        version = VersionNumber(obj.get("version"))
2431        return Version(url, version)
2432
2433    def to_dict(self) -> dict:
2434        result: dict = {}
2435        result["url"] = from_str(self.url)
2436        result["version"] = to_enum(VersionNumber, self.version)
2437        return result
Version(url: str, version: VersionNumber)
2422    def __init__(self, url: str, version: VersionNumber) -> None:
2423        self.url = url
2424        self.version = version
url: str
version: VersionNumber
@staticmethod
def from_dict(obj: Any) -> Version:
2426    @staticmethod
2427    def from_dict(obj: Any) -> 'Version':
2428        assert isinstance(obj, dict)
2429        url = from_str(obj.get("url"))
2430        version = VersionNumber(obj.get("version"))
2431        return Version(url, version)
def to_dict(self) -> dict:
2433    def to_dict(self) -> dict:
2434        result: dict = {}
2435        result["url"] = from_str(self.url)
2436        result["version"] = to_enum(VersionNumber, self.version)
2437        return result
class VersionDetails:
2440class VersionDetails:
2441    endpoints: List[Endpoint]
2442    version: VersionNumber
2443
2444    def __init__(self, endpoints: List[Endpoint], version: VersionNumber) -> None:
2445        self.endpoints = endpoints
2446        self.version = version
2447
2448    @staticmethod
2449    def from_dict(obj: Any) -> 'VersionDetails':
2450        assert isinstance(obj, dict)
2451        endpoints = from_list(Endpoint.from_dict, obj.get("endpoints"))
2452        version = VersionNumber(obj.get("version"))
2453        return VersionDetails(endpoints, version)
2454
2455    def to_dict(self) -> dict:
2456        result: dict = {}
2457        result["endpoints"] = from_list(lambda x: to_class(Endpoint, x), self.endpoints)
2458        result["version"] = to_enum(VersionNumber, self.version)
2459        return result
VersionDetails(endpoints: List[Endpoint], version: VersionNumber)
2444    def __init__(self, endpoints: List[Endpoint], version: VersionNumber) -> None:
2445        self.endpoints = endpoints
2446        self.version = version
endpoints: List[Endpoint]
version: VersionNumber
@staticmethod
def from_dict(obj: Any) -> VersionDetails:
2448    @staticmethod
2449    def from_dict(obj: Any) -> 'VersionDetails':
2450        assert isinstance(obj, dict)
2451        endpoints = from_list(Endpoint.from_dict, obj.get("endpoints"))
2452        version = VersionNumber(obj.get("version"))
2453        return VersionDetails(endpoints, version)
def to_dict(self) -> dict:
2455    def to_dict(self) -> dict:
2456        result: dict = {}
2457        result["endpoints"] = from_list(lambda x: to_class(Endpoint, x), self.endpoints)
2458        result["version"] = to_enum(VersionNumber, self.version)
2459        return result
class V221:
2462class V221:
2463    active_charging_profile: Optional[ActiveChargingProfile]
2464    active_charging_profile_result: Optional[ActiveChargingProfileResult]
2465    authorization_info: Optional[AuthorizationInfo]
2466    cancel_reservation: Optional[CancelReservation]
2467    cdr: Optional[Cdr]
2468    charging_preferences: Optional[ChargingPreferences]
2469    charging_profile: Optional[ChargingProfile]
2470    charging_profile_response: Optional[ChargingProfileResponse]
2471    charging_profile_result: Optional[ChargingProfileResult]
2472    clear_profile_result: Optional[ClearProfileResult]
2473    command_response: Optional[CommandResponse]
2474    command_result: Optional[CommandResult]
2475    connector: Optional[Connector]
2476    credentials: Optional[Credentials]
2477    endpoint: Optional[Endpoint]
2478    evse: Optional[Evse]
2479    hub_client_info: Optional[HubClientInfo]
2480    location: Optional[Location]
2481    location_references: Optional[LocationReferences]
2482    reserve_now: Optional[ReserveNow]
2483    session: Optional[Session]
2484    set_charging_profile: Optional[SetChargingProfile]
2485    start_session: Optional[StartSession]
2486    stop_session: Optional[StopSession]
2487    tariff: Optional[Tariff]
2488    token: Optional[Token]
2489    unlock_connector: Optional[UnlockConnector]
2490    version: Optional[Version]
2491    version_details: Optional[VersionDetails]
2492
2493    def __init__(self, active_charging_profile: Optional[ActiveChargingProfile], active_charging_profile_result: Optional[ActiveChargingProfileResult], authorization_info: Optional[AuthorizationInfo], cancel_reservation: Optional[CancelReservation], cdr: Optional[Cdr], charging_preferences: Optional[ChargingPreferences], charging_profile: Optional[ChargingProfile], charging_profile_response: Optional[ChargingProfileResponse], charging_profile_result: Optional[ChargingProfileResult], clear_profile_result: Optional[ClearProfileResult], command_response: Optional[CommandResponse], command_result: Optional[CommandResult], connector: Optional[Connector], credentials: Optional[Credentials], endpoint: Optional[Endpoint], evse: Optional[Evse], hub_client_info: Optional[HubClientInfo], location: Optional[Location], location_references: Optional[LocationReferences], reserve_now: Optional[ReserveNow], session: Optional[Session], set_charging_profile: Optional[SetChargingProfile], start_session: Optional[StartSession], stop_session: Optional[StopSession], tariff: Optional[Tariff], token: Optional[Token], unlock_connector: Optional[UnlockConnector], version: Optional[Version], version_details: Optional[VersionDetails]) -> None:
2494        self.active_charging_profile = active_charging_profile
2495        self.active_charging_profile_result = active_charging_profile_result
2496        self.authorization_info = authorization_info
2497        self.cancel_reservation = cancel_reservation
2498        self.cdr = cdr
2499        self.charging_preferences = charging_preferences
2500        self.charging_profile = charging_profile
2501        self.charging_profile_response = charging_profile_response
2502        self.charging_profile_result = charging_profile_result
2503        self.clear_profile_result = clear_profile_result
2504        self.command_response = command_response
2505        self.command_result = command_result
2506        self.connector = connector
2507        self.credentials = credentials
2508        self.endpoint = endpoint
2509        self.evse = evse
2510        self.hub_client_info = hub_client_info
2511        self.location = location
2512        self.location_references = location_references
2513        self.reserve_now = reserve_now
2514        self.session = session
2515        self.set_charging_profile = set_charging_profile
2516        self.start_session = start_session
2517        self.stop_session = stop_session
2518        self.tariff = tariff
2519        self.token = token
2520        self.unlock_connector = unlock_connector
2521        self.version = version
2522        self.version_details = version_details
2523
2524    @staticmethod
2525    def from_dict(obj: Any) -> 'V221':
2526        assert isinstance(obj, dict)
2527        active_charging_profile = from_union([ActiveChargingProfile.from_dict, from_none], obj.get("active_charging_profile"))
2528        active_charging_profile_result = from_union([ActiveChargingProfileResult.from_dict, from_none], obj.get("active_charging_profile_result"))
2529        authorization_info = from_union([AuthorizationInfo.from_dict, from_none], obj.get("authorization_info"))
2530        cancel_reservation = from_union([CancelReservation.from_dict, from_none], obj.get("cancel_reservation"))
2531        cdr = from_union([Cdr.from_dict, from_none], obj.get("cdr"))
2532        charging_preferences = from_union([ChargingPreferences.from_dict, from_none], obj.get("charging_preferences"))
2533        charging_profile = from_union([ChargingProfile.from_dict, from_none], obj.get("charging_profile"))
2534        charging_profile_response = from_union([ChargingProfileResponse.from_dict, from_none], obj.get("charging_profile_response"))
2535        charging_profile_result = from_union([ChargingProfileResult.from_dict, from_none], obj.get("charging_profile_result"))
2536        clear_profile_result = from_union([ClearProfileResult.from_dict, from_none], obj.get("clear_profile_result"))
2537        command_response = from_union([CommandResponse.from_dict, from_none], obj.get("command_response"))
2538        command_result = from_union([CommandResult.from_dict, from_none], obj.get("command_result"))
2539        connector = from_union([Connector.from_dict, from_none], obj.get("connector"))
2540        credentials = from_union([Credentials.from_dict, from_none], obj.get("credentials"))
2541        endpoint = from_union([Endpoint.from_dict, from_none], obj.get("endpoint"))
2542        evse = from_union([Evse.from_dict, from_none], obj.get("evse"))
2543        hub_client_info = from_union([HubClientInfo.from_dict, from_none], obj.get("hub_client_info"))
2544        location = from_union([Location.from_dict, from_none], obj.get("location"))
2545        location_references = from_union([from_none, LocationReferences.from_dict], obj.get("location_references"))
2546        reserve_now = from_union([ReserveNow.from_dict, from_none], obj.get("reserve_now"))
2547        session = from_union([Session.from_dict, from_none], obj.get("session"))
2548        set_charging_profile = from_union([SetChargingProfile.from_dict, from_none], obj.get("set_charging_profile"))
2549        start_session = from_union([StartSession.from_dict, from_none], obj.get("start_session"))
2550        stop_session = from_union([StopSession.from_dict, from_none], obj.get("stop_session"))
2551        tariff = from_union([Tariff.from_dict, from_none], obj.get("tariff"))
2552        token = from_union([Token.from_dict, from_none], obj.get("token"))
2553        unlock_connector = from_union([UnlockConnector.from_dict, from_none], obj.get("unlock_connector"))
2554        version = from_union([Version.from_dict, from_none], obj.get("version"))
2555        version_details = from_union([VersionDetails.from_dict, from_none], obj.get("version_details"))
2556        return V221(active_charging_profile, active_charging_profile_result, authorization_info, cancel_reservation, cdr, charging_preferences, charging_profile, charging_profile_response, charging_profile_result, clear_profile_result, command_response, command_result, connector, credentials, endpoint, evse, hub_client_info, location, location_references, reserve_now, session, set_charging_profile, start_session, stop_session, tariff, token, unlock_connector, version, version_details)
2557
2558    def to_dict(self) -> dict:
2559        result: dict = {}
2560        if self.active_charging_profile is not None:
2561            result["active_charging_profile"] = from_union([lambda x: to_class(ActiveChargingProfile, x), from_none], self.active_charging_profile)
2562        if self.active_charging_profile_result is not None:
2563            result["active_charging_profile_result"] = from_union([lambda x: to_class(ActiveChargingProfileResult, x), from_none], self.active_charging_profile_result)
2564        if self.authorization_info is not None:
2565            result["authorization_info"] = from_union([lambda x: to_class(AuthorizationInfo, x), from_none], self.authorization_info)
2566        if self.cancel_reservation is not None:
2567            result["cancel_reservation"] = from_union([lambda x: to_class(CancelReservation, x), from_none], self.cancel_reservation)
2568        if self.cdr is not None:
2569            result["cdr"] = from_union([lambda x: to_class(Cdr, x), from_none], self.cdr)
2570        if self.charging_preferences is not None:
2571            result["charging_preferences"] = from_union([lambda x: to_class(ChargingPreferences, x), from_none], self.charging_preferences)
2572        if self.charging_profile is not None:
2573            result["charging_profile"] = from_union([lambda x: to_class(ChargingProfile, x), from_none], self.charging_profile)
2574        if self.charging_profile_response is not None:
2575            result["charging_profile_response"] = from_union([lambda x: to_class(ChargingProfileResponse, x), from_none], self.charging_profile_response)
2576        if self.charging_profile_result is not None:
2577            result["charging_profile_result"] = from_union([lambda x: to_class(ChargingProfileResult, x), from_none], self.charging_profile_result)
2578        if self.clear_profile_result is not None:
2579            result["clear_profile_result"] = from_union([lambda x: to_class(ClearProfileResult, x), from_none], self.clear_profile_result)
2580        if self.command_response is not None:
2581            result["command_response"] = from_union([lambda x: to_class(CommandResponse, x), from_none], self.command_response)
2582        if self.command_result is not None:
2583            result["command_result"] = from_union([lambda x: to_class(CommandResult, x), from_none], self.command_result)
2584        if self.connector is not None:
2585            result["connector"] = from_union([lambda x: to_class(Connector, x), from_none], self.connector)
2586        if self.credentials is not None:
2587            result["credentials"] = from_union([lambda x: to_class(Credentials, x), from_none], self.credentials)
2588        if self.endpoint is not None:
2589            result["endpoint"] = from_union([lambda x: to_class(Endpoint, x), from_none], self.endpoint)
2590        if self.evse is not None:
2591            result["evse"] = from_union([lambda x: to_class(Evse, x), from_none], self.evse)
2592        if self.hub_client_info is not None:
2593            result["hub_client_info"] = from_union([lambda x: to_class(HubClientInfo, x), from_none], self.hub_client_info)
2594        if self.location is not None:
2595            result["location"] = from_union([lambda x: to_class(Location, x), from_none], self.location)
2596        if self.location_references is not None:
2597            result["location_references"] = from_union([from_none, lambda x: to_class(LocationReferences, x)], self.location_references)
2598        if self.reserve_now is not None:
2599            result["reserve_now"] = from_union([lambda x: to_class(ReserveNow, x), from_none], self.reserve_now)
2600        if self.session is not None:
2601            result["session"] = from_union([lambda x: to_class(Session, x), from_none], self.session)
2602        if self.set_charging_profile is not None:
2603            result["set_charging_profile"] = from_union([lambda x: to_class(SetChargingProfile, x), from_none], self.set_charging_profile)
2604        if self.start_session is not None:
2605            result["start_session"] = from_union([lambda x: to_class(StartSession, x), from_none], self.start_session)
2606        if self.stop_session is not None:
2607            result["stop_session"] = from_union([lambda x: to_class(StopSession, x), from_none], self.stop_session)
2608        if self.tariff is not None:
2609            result["tariff"] = from_union([lambda x: to_class(Tariff, x), from_none], self.tariff)
2610        if self.token is not None:
2611            result["token"] = from_union([lambda x: to_class(Token, x), from_none], self.token)
2612        if self.unlock_connector is not None:
2613            result["unlock_connector"] = from_union([lambda x: to_class(UnlockConnector, x), from_none], self.unlock_connector)
2614        if self.version is not None:
2615            result["version"] = from_union([lambda x: to_class(Version, x), from_none], self.version)
2616        if self.version_details is not None:
2617            result["version_details"] = from_union([lambda x: to_class(VersionDetails, x), from_none], self.version_details)
2618        return result
V221( active_charging_profile: Optional[ActiveChargingProfile], active_charging_profile_result: Optional[ActiveChargingProfileResult], authorization_info: Optional[AuthorizationInfo], cancel_reservation: Optional[CancelReservation], cdr: Optional[Cdr], charging_preferences: Optional[ChargingPreferences], charging_profile: Optional[ChargingProfile], charging_profile_response: Optional[ChargingProfileResponse], charging_profile_result: Optional[ChargingProfileResult], clear_profile_result: Optional[ClearProfileResult], command_response: Optional[CommandResponse], command_result: Optional[CommandResult], connector: Optional[Connector], credentials: Optional[Credentials], endpoint: Optional[Endpoint], evse: Optional[Evse], hub_client_info: Optional[HubClientInfo], location: Optional[Location], location_references: Optional[LocationReferences], reserve_now: Optional[ReserveNow], session: Optional[Session], set_charging_profile: Optional[SetChargingProfile], start_session: Optional[StartSession], stop_session: Optional[StopSession], tariff: Optional[Tariff], token: Optional[Token], unlock_connector: Optional[UnlockConnector], version: Optional[Version], version_details: Optional[VersionDetails])
2493    def __init__(self, active_charging_profile: Optional[ActiveChargingProfile], active_charging_profile_result: Optional[ActiveChargingProfileResult], authorization_info: Optional[AuthorizationInfo], cancel_reservation: Optional[CancelReservation], cdr: Optional[Cdr], charging_preferences: Optional[ChargingPreferences], charging_profile: Optional[ChargingProfile], charging_profile_response: Optional[ChargingProfileResponse], charging_profile_result: Optional[ChargingProfileResult], clear_profile_result: Optional[ClearProfileResult], command_response: Optional[CommandResponse], command_result: Optional[CommandResult], connector: Optional[Connector], credentials: Optional[Credentials], endpoint: Optional[Endpoint], evse: Optional[Evse], hub_client_info: Optional[HubClientInfo], location: Optional[Location], location_references: Optional[LocationReferences], reserve_now: Optional[ReserveNow], session: Optional[Session], set_charging_profile: Optional[SetChargingProfile], start_session: Optional[StartSession], stop_session: Optional[StopSession], tariff: Optional[Tariff], token: Optional[Token], unlock_connector: Optional[UnlockConnector], version: Optional[Version], version_details: Optional[VersionDetails]) -> None:
2494        self.active_charging_profile = active_charging_profile
2495        self.active_charging_profile_result = active_charging_profile_result
2496        self.authorization_info = authorization_info
2497        self.cancel_reservation = cancel_reservation
2498        self.cdr = cdr
2499        self.charging_preferences = charging_preferences
2500        self.charging_profile = charging_profile
2501        self.charging_profile_response = charging_profile_response
2502        self.charging_profile_result = charging_profile_result
2503        self.clear_profile_result = clear_profile_result
2504        self.command_response = command_response
2505        self.command_result = command_result
2506        self.connector = connector
2507        self.credentials = credentials
2508        self.endpoint = endpoint
2509        self.evse = evse
2510        self.hub_client_info = hub_client_info
2511        self.location = location
2512        self.location_references = location_references
2513        self.reserve_now = reserve_now
2514        self.session = session
2515        self.set_charging_profile = set_charging_profile
2516        self.start_session = start_session
2517        self.stop_session = stop_session
2518        self.tariff = tariff
2519        self.token = token
2520        self.unlock_connector = unlock_connector
2521        self.version = version
2522        self.version_details = version_details
active_charging_profile: Optional[ActiveChargingProfile]
active_charging_profile_result: Optional[ActiveChargingProfileResult]
authorization_info: Optional[AuthorizationInfo]
cancel_reservation: Optional[CancelReservation]
cdr: Optional[Cdr]
charging_preferences: Optional[ChargingPreferences]
charging_profile: Optional[ChargingProfile]
charging_profile_response: Optional[ChargingProfileResponse]
charging_profile_result: Optional[ChargingProfileResult]
clear_profile_result: Optional[ClearProfileResult]
command_response: Optional[CommandResponse]
command_result: Optional[CommandResult]
connector: Optional[Connector]
credentials: Optional[Credentials]
endpoint: Optional[Endpoint]
evse: Optional[Evse]
hub_client_info: Optional[HubClientInfo]
location: Optional[Location]
location_references: Optional[LocationReferences]
reserve_now: Optional[ReserveNow]
session: Optional[Session]
set_charging_profile: Optional[SetChargingProfile]
start_session: Optional[StartSession]
stop_session: Optional[StopSession]
tariff: Optional[Tariff]
token: Optional[Token]
unlock_connector: Optional[UnlockConnector]
version: Optional[Version]
version_details: Optional[VersionDetails]
@staticmethod
def from_dict(obj: Any) -> V221:
2524    @staticmethod
2525    def from_dict(obj: Any) -> 'V221':
2526        assert isinstance(obj, dict)
2527        active_charging_profile = from_union([ActiveChargingProfile.from_dict, from_none], obj.get("active_charging_profile"))
2528        active_charging_profile_result = from_union([ActiveChargingProfileResult.from_dict, from_none], obj.get("active_charging_profile_result"))
2529        authorization_info = from_union([AuthorizationInfo.from_dict, from_none], obj.get("authorization_info"))
2530        cancel_reservation = from_union([CancelReservation.from_dict, from_none], obj.get("cancel_reservation"))
2531        cdr = from_union([Cdr.from_dict, from_none], obj.get("cdr"))
2532        charging_preferences = from_union([ChargingPreferences.from_dict, from_none], obj.get("charging_preferences"))
2533        charging_profile = from_union([ChargingProfile.from_dict, from_none], obj.get("charging_profile"))
2534        charging_profile_response = from_union([ChargingProfileResponse.from_dict, from_none], obj.get("charging_profile_response"))
2535        charging_profile_result = from_union([ChargingProfileResult.from_dict, from_none], obj.get("charging_profile_result"))
2536        clear_profile_result = from_union([ClearProfileResult.from_dict, from_none], obj.get("clear_profile_result"))
2537        command_response = from_union([CommandResponse.from_dict, from_none], obj.get("command_response"))
2538        command_result = from_union([CommandResult.from_dict, from_none], obj.get("command_result"))
2539        connector = from_union([Connector.from_dict, from_none], obj.get("connector"))
2540        credentials = from_union([Credentials.from_dict, from_none], obj.get("credentials"))
2541        endpoint = from_union([Endpoint.from_dict, from_none], obj.get("endpoint"))
2542        evse = from_union([Evse.from_dict, from_none], obj.get("evse"))
2543        hub_client_info = from_union([HubClientInfo.from_dict, from_none], obj.get("hub_client_info"))
2544        location = from_union([Location.from_dict, from_none], obj.get("location"))
2545        location_references = from_union([from_none, LocationReferences.from_dict], obj.get("location_references"))
2546        reserve_now = from_union([ReserveNow.from_dict, from_none], obj.get("reserve_now"))
2547        session = from_union([Session.from_dict, from_none], obj.get("session"))
2548        set_charging_profile = from_union([SetChargingProfile.from_dict, from_none], obj.get("set_charging_profile"))
2549        start_session = from_union([StartSession.from_dict, from_none], obj.get("start_session"))
2550        stop_session = from_union([StopSession.from_dict, from_none], obj.get("stop_session"))
2551        tariff = from_union([Tariff.from_dict, from_none], obj.get("tariff"))
2552        token = from_union([Token.from_dict, from_none], obj.get("token"))
2553        unlock_connector = from_union([UnlockConnector.from_dict, from_none], obj.get("unlock_connector"))
2554        version = from_union([Version.from_dict, from_none], obj.get("version"))
2555        version_details = from_union([VersionDetails.from_dict, from_none], obj.get("version_details"))
2556        return V221(active_charging_profile, active_charging_profile_result, authorization_info, cancel_reservation, cdr, charging_preferences, charging_profile, charging_profile_response, charging_profile_result, clear_profile_result, command_response, command_result, connector, credentials, endpoint, evse, hub_client_info, location, location_references, reserve_now, session, set_charging_profile, start_session, stop_session, tariff, token, unlock_connector, version, version_details)
def to_dict(self) -> dict:
2558    def to_dict(self) -> dict:
2559        result: dict = {}
2560        if self.active_charging_profile is not None:
2561            result["active_charging_profile"] = from_union([lambda x: to_class(ActiveChargingProfile, x), from_none], self.active_charging_profile)
2562        if self.active_charging_profile_result is not None:
2563            result["active_charging_profile_result"] = from_union([lambda x: to_class(ActiveChargingProfileResult, x), from_none], self.active_charging_profile_result)
2564        if self.authorization_info is not None:
2565            result["authorization_info"] = from_union([lambda x: to_class(AuthorizationInfo, x), from_none], self.authorization_info)
2566        if self.cancel_reservation is not None:
2567            result["cancel_reservation"] = from_union([lambda x: to_class(CancelReservation, x), from_none], self.cancel_reservation)
2568        if self.cdr is not None:
2569            result["cdr"] = from_union([lambda x: to_class(Cdr, x), from_none], self.cdr)
2570        if self.charging_preferences is not None:
2571            result["charging_preferences"] = from_union([lambda x: to_class(ChargingPreferences, x), from_none], self.charging_preferences)
2572        if self.charging_profile is not None:
2573            result["charging_profile"] = from_union([lambda x: to_class(ChargingProfile, x), from_none], self.charging_profile)
2574        if self.charging_profile_response is not None:
2575            result["charging_profile_response"] = from_union([lambda x: to_class(ChargingProfileResponse, x), from_none], self.charging_profile_response)
2576        if self.charging_profile_result is not None:
2577            result["charging_profile_result"] = from_union([lambda x: to_class(ChargingProfileResult, x), from_none], self.charging_profile_result)
2578        if self.clear_profile_result is not None:
2579            result["clear_profile_result"] = from_union([lambda x: to_class(ClearProfileResult, x), from_none], self.clear_profile_result)
2580        if self.command_response is not None:
2581            result["command_response"] = from_union([lambda x: to_class(CommandResponse, x), from_none], self.command_response)
2582        if self.command_result is not None:
2583            result["command_result"] = from_union([lambda x: to_class(CommandResult, x), from_none], self.command_result)
2584        if self.connector is not None:
2585            result["connector"] = from_union([lambda x: to_class(Connector, x), from_none], self.connector)
2586        if self.credentials is not None:
2587            result["credentials"] = from_union([lambda x: to_class(Credentials, x), from_none], self.credentials)
2588        if self.endpoint is not None:
2589            result["endpoint"] = from_union([lambda x: to_class(Endpoint, x), from_none], self.endpoint)
2590        if self.evse is not None:
2591            result["evse"] = from_union([lambda x: to_class(Evse, x), from_none], self.evse)
2592        if self.hub_client_info is not None:
2593            result["hub_client_info"] = from_union([lambda x: to_class(HubClientInfo, x), from_none], self.hub_client_info)
2594        if self.location is not None:
2595            result["location"] = from_union([lambda x: to_class(Location, x), from_none], self.location)
2596        if self.location_references is not None:
2597            result["location_references"] = from_union([from_none, lambda x: to_class(LocationReferences, x)], self.location_references)
2598        if self.reserve_now is not None:
2599            result["reserve_now"] = from_union([lambda x: to_class(ReserveNow, x), from_none], self.reserve_now)
2600        if self.session is not None:
2601            result["session"] = from_union([lambda x: to_class(Session, x), from_none], self.session)
2602        if self.set_charging_profile is not None:
2603            result["set_charging_profile"] = from_union([lambda x: to_class(SetChargingProfile, x), from_none], self.set_charging_profile)
2604        if self.start_session is not None:
2605            result["start_session"] = from_union([lambda x: to_class(StartSession, x), from_none], self.start_session)
2606        if self.stop_session is not None:
2607            result["stop_session"] = from_union([lambda x: to_class(StopSession, x), from_none], self.stop_session)
2608        if self.tariff is not None:
2609            result["tariff"] = from_union([lambda x: to_class(Tariff, x), from_none], self.tariff)
2610        if self.token is not None:
2611            result["token"] = from_union([lambda x: to_class(Token, x), from_none], self.token)
2612        if self.unlock_connector is not None:
2613            result["unlock_connector"] = from_union([lambda x: to_class(UnlockConnector, x), from_none], self.unlock_connector)
2614        if self.version is not None:
2615            result["version"] = from_union([lambda x: to_class(Version, x), from_none], self.version)
2616        if self.version_details is not None:
2617            result["version_details"] = from_union([lambda x: to_class(VersionDetails, x), from_none], self.version_details)
2618        return result
def v221_from_dict(s: Any) -> V221:
2621def v221_from_dict(s: Any) -> V221:
2622    return V221.from_dict(s)
def v221_to_dict(x: V221) -> Any:
2625def v221_to_dict(x: V221) -> Any:
2626    return to_class(V221, x)