v230payments

   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    EMAID = "EMAID"
 266    OTHER = "OTHER"
 267    RFID = "RFID"
 268
 269
 270class WhitelistType(Enum):
 271    ALLOWED = "ALLOWED"
 272    ALLOWED_OFFLINE = "ALLOWED_OFFLINE"
 273    ALWAYS = "ALWAYS"
 274    NEVER = "NEVER"
 275
 276
 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
 350
 351
 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
 387
 388
 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
 409
 410
 411class AuthMethod(Enum):
 412    AUTH_REQUEST = "AUTH_REQUEST"
 413    COMMAND = "COMMAND"
 414    WHITELIST = "WHITELIST"
 415
 416
 417class ConnectorFormat(Enum):
 418    CABLE = "CABLE"
 419    SOCKET = "SOCKET"
 420
 421
 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"
 428
 429
 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    MCS = "MCS"
 461    NEMA_10_30 = "NEMA_10_30"
 462    NEMA_10_50 = "NEMA_10_50"
 463    NEMA_14_30 = "NEMA_14_30"
 464    NEMA_14_50 = "NEMA_14_50"
 465    NEMA_5_20 = "NEMA_5_20"
 466    NEMA_6_30 = "NEMA_6_30"
 467    NEMA_6_50 = "NEMA_6_50"
 468    PANTOGRAPH_BOTTOM_UP = "PANTOGRAPH_BOTTOM_UP"
 469    PANTOGRAPH_TOP_DOWN = "PANTOGRAPH_TOP_DOWN"
 470    SAE_J3400 = "SAE_J3400"
 471    TESLA_R = "TESLA_R"
 472    TESLA_S = "TESLA_S"
 473
 474
 475class GeoLocation:
 476    latitude: str
 477    longitude: str
 478
 479    def __init__(self, latitude: str, longitude: str) -> None:
 480        self.latitude = latitude
 481        self.longitude = longitude
 482
 483    @staticmethod
 484    def from_dict(obj: Any) -> 'GeoLocation':
 485        assert isinstance(obj, dict)
 486        latitude = from_str(obj.get("latitude"))
 487        longitude = from_str(obj.get("longitude"))
 488        return GeoLocation(latitude, longitude)
 489
 490    def to_dict(self) -> dict:
 491        result: dict = {}
 492        result["latitude"] = from_str(self.latitude)
 493        result["longitude"] = from_str(self.longitude)
 494        return result
 495
 496
 497class CdrLocation:
 498    address: str
 499    city: str
 500    connector_format: ConnectorFormat
 501    connector_id: str
 502    connector_power_type: PowerType
 503    connector_standard: ConnectorType
 504    coordinates: GeoLocation
 505    country: str
 506    evse_id: str
 507    evse_uid: str
 508    id: str
 509    name: Optional[str]
 510    postal_code: Optional[str]
 511    state: Optional[str]
 512
 513    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:
 514        self.address = address
 515        self.city = city
 516        self.connector_format = connector_format
 517        self.connector_id = connector_id
 518        self.connector_power_type = connector_power_type
 519        self.connector_standard = connector_standard
 520        self.coordinates = coordinates
 521        self.country = country
 522        self.evse_id = evse_id
 523        self.evse_uid = evse_uid
 524        self.id = id
 525        self.name = name
 526        self.postal_code = postal_code
 527        self.state = state
 528
 529    @staticmethod
 530    def from_dict(obj: Any) -> 'CdrLocation':
 531        assert isinstance(obj, dict)
 532        address = from_str(obj.get("address"))
 533        city = from_str(obj.get("city"))
 534        connector_format = ConnectorFormat(obj.get("connector_format"))
 535        connector_id = from_str(obj.get("connector_id"))
 536        connector_power_type = PowerType(obj.get("connector_power_type"))
 537        connector_standard = ConnectorType(obj.get("connector_standard"))
 538        coordinates = GeoLocation.from_dict(obj.get("coordinates"))
 539        country = from_str(obj.get("country"))
 540        evse_id = from_str(obj.get("evse_id"))
 541        evse_uid = from_str(obj.get("evse_uid"))
 542        id = from_str(obj.get("id"))
 543        name = from_union([from_none, from_str], obj.get("name"))
 544        postal_code = from_union([from_none, from_str], obj.get("postal_code"))
 545        state = from_union([from_none, from_str], obj.get("state"))
 546        return CdrLocation(address, city, connector_format, connector_id, connector_power_type, connector_standard, coordinates, country, evse_id, evse_uid, id, name, postal_code, state)
 547
 548    def to_dict(self) -> dict:
 549        result: dict = {}
 550        result["address"] = from_str(self.address)
 551        result["city"] = from_str(self.city)
 552        result["connector_format"] = to_enum(ConnectorFormat, self.connector_format)
 553        result["connector_id"] = from_str(self.connector_id)
 554        result["connector_power_type"] = to_enum(PowerType, self.connector_power_type)
 555        result["connector_standard"] = to_enum(ConnectorType, self.connector_standard)
 556        result["coordinates"] = to_class(GeoLocation, self.coordinates)
 557        result["country"] = from_str(self.country)
 558        result["evse_id"] = from_str(self.evse_id)
 559        result["evse_uid"] = from_str(self.evse_uid)
 560        result["id"] = from_str(self.id)
 561        if self.name is not None:
 562            result["name"] = from_union([from_none, from_str], self.name)
 563        if self.postal_code is not None:
 564            result["postal_code"] = from_union([from_none, from_str], self.postal_code)
 565        if self.state is not None:
 566            result["state"] = from_union([from_none, from_str], self.state)
 567        return result
 568
 569
 570class CdrToken:
 571    contract_id: str
 572    country_code: str
 573    party_id: str
 574    type: TokenType
 575    uid: str
 576
 577    def __init__(self, contract_id: str, country_code: str, party_id: str, type: TokenType, uid: str) -> None:
 578        self.contract_id = contract_id
 579        self.country_code = country_code
 580        self.party_id = party_id
 581        self.type = type
 582        self.uid = uid
 583
 584    @staticmethod
 585    def from_dict(obj: Any) -> 'CdrToken':
 586        assert isinstance(obj, dict)
 587        contract_id = from_str(obj.get("contract_id"))
 588        country_code = from_str(obj.get("country_code"))
 589        party_id = from_str(obj.get("party_id"))
 590        type = TokenType(obj.get("type"))
 591        uid = from_str(obj.get("uid"))
 592        return CdrToken(contract_id, country_code, party_id, type, uid)
 593
 594    def to_dict(self) -> dict:
 595        result: dict = {}
 596        result["contract_id"] = from_str(self.contract_id)
 597        result["country_code"] = from_str(self.country_code)
 598        result["party_id"] = from_str(self.party_id)
 599        result["type"] = to_enum(TokenType, self.type)
 600        result["uid"] = from_str(self.uid)
 601        return result
 602
 603
 604class CdrDimensionType(Enum):
 605    CURRENT = "CURRENT"
 606    ENERGY = "ENERGY"
 607    ENERGY_EXPORT = "ENERGY_EXPORT"
 608    ENERGY_IMPORT = "ENERGY_IMPORT"
 609    MAX_CURRENT = "MAX_CURRENT"
 610    MAX_POWER = "MAX_POWER"
 611    MIN_CURRENT = "MIN_CURRENT"
 612    MIN_POWER = "MIN_POWER"
 613    PARKING_TIME = "PARKING_TIME"
 614    POWER = "POWER"
 615    RESERVATION_TIME = "RESERVATION_TIME"
 616    STATE_OF_CHARGE = "STATE_OF_CHARGE"
 617    TIME = "TIME"
 618
 619
 620class CdrDimension:
 621    type: CdrDimensionType
 622    volume: float
 623
 624    def __init__(self, type: CdrDimensionType, volume: float) -> None:
 625        self.type = type
 626        self.volume = volume
 627
 628    @staticmethod
 629    def from_dict(obj: Any) -> 'CdrDimension':
 630        assert isinstance(obj, dict)
 631        type = CdrDimensionType(obj.get("type"))
 632        volume = from_float(obj.get("volume"))
 633        return CdrDimension(type, volume)
 634
 635    def to_dict(self) -> dict:
 636        result: dict = {}
 637        result["type"] = to_enum(CdrDimensionType, self.type)
 638        result["volume"] = to_float(self.volume)
 639        return result
 640
 641
 642class ChargingPeriod:
 643    dimensions: List[CdrDimension]
 644    start_date_time: str
 645    tariff_id: Optional[str]
 646
 647    def __init__(self, dimensions: List[CdrDimension], start_date_time: str, tariff_id: Optional[str]) -> None:
 648        self.dimensions = dimensions
 649        self.start_date_time = start_date_time
 650        self.tariff_id = tariff_id
 651
 652    @staticmethod
 653    def from_dict(obj: Any) -> 'ChargingPeriod':
 654        assert isinstance(obj, dict)
 655        dimensions = from_list(CdrDimension.from_dict, obj.get("dimensions"))
 656        start_date_time = from_str(obj.get("start_date_time"))
 657        tariff_id = from_union([from_none, from_str], obj.get("tariff_id"))
 658        return ChargingPeriod(dimensions, start_date_time, tariff_id)
 659
 660    def to_dict(self) -> dict:
 661        result: dict = {}
 662        result["dimensions"] = from_list(lambda x: to_class(CdrDimension, x), self.dimensions)
 663        result["start_date_time"] = from_str(self.start_date_time)
 664        if self.tariff_id is not None:
 665            result["tariff_id"] = from_union([from_none, from_str], self.tariff_id)
 666        return result
 667
 668
 669class SignedValue:
 670    nature: str
 671    plain_data: str
 672    signed_data: str
 673
 674    def __init__(self, nature: str, plain_data: str, signed_data: str) -> None:
 675        self.nature = nature
 676        self.plain_data = plain_data
 677        self.signed_data = signed_data
 678
 679    @staticmethod
 680    def from_dict(obj: Any) -> 'SignedValue':
 681        assert isinstance(obj, dict)
 682        nature = from_str(obj.get("nature"))
 683        plain_data = from_str(obj.get("plain_data"))
 684        signed_data = from_str(obj.get("signed_data"))
 685        return SignedValue(nature, plain_data, signed_data)
 686
 687    def to_dict(self) -> dict:
 688        result: dict = {}
 689        result["nature"] = from_str(self.nature)
 690        result["plain_data"] = from_str(self.plain_data)
 691        result["signed_data"] = from_str(self.signed_data)
 692        return result
 693
 694
 695class SignedData:
 696    encoding_method: str
 697    encoding_method_version: Optional[int]
 698    public_key: Optional[str]
 699    signed_values: List[SignedValue]
 700    url: Optional[str]
 701
 702    def __init__(self, encoding_method: str, encoding_method_version: Optional[int], public_key: Optional[str], signed_values: List[SignedValue], url: Optional[str]) -> None:
 703        self.encoding_method = encoding_method
 704        self.encoding_method_version = encoding_method_version
 705        self.public_key = public_key
 706        self.signed_values = signed_values
 707        self.url = url
 708
 709    @staticmethod
 710    def from_dict(obj: Any) -> 'SignedData':
 711        assert isinstance(obj, dict)
 712        encoding_method = from_str(obj.get("encoding_method"))
 713        encoding_method_version = from_union([from_none, from_int], obj.get("encoding_method_version"))
 714        public_key = from_union([from_none, from_str], obj.get("public_key"))
 715        signed_values = from_list(SignedValue.from_dict, obj.get("signed_values"))
 716        url = from_union([from_none, from_str], obj.get("url"))
 717        return SignedData(encoding_method, encoding_method_version, public_key, signed_values, url)
 718
 719    def to_dict(self) -> dict:
 720        result: dict = {}
 721        result["encoding_method"] = from_str(self.encoding_method)
 722        if self.encoding_method_version is not None:
 723            result["encoding_method_version"] = from_union([from_none, from_int], self.encoding_method_version)
 724        if self.public_key is not None:
 725            result["public_key"] = from_union([from_none, from_str], self.public_key)
 726        result["signed_values"] = from_list(lambda x: to_class(SignedValue, x), self.signed_values)
 727        if self.url is not None:
 728            result["url"] = from_union([from_none, from_str], self.url)
 729        return result
 730
 731
 732class TariffDimensionType(Enum):
 733    ENERGY = "ENERGY"
 734    FLAT = "FLAT"
 735    PARKING_TIME = "PARKING_TIME"
 736    TIME = "TIME"
 737
 738
 739class PriceComponent:
 740    price: float
 741    step_size: int
 742    type: TariffDimensionType
 743    vat: Optional[float]
 744
 745    def __init__(self, price: float, step_size: int, type: TariffDimensionType, vat: Optional[float]) -> None:
 746        self.price = price
 747        self.step_size = step_size
 748        self.type = type
 749        self.vat = vat
 750
 751    @staticmethod
 752    def from_dict(obj: Any) -> 'PriceComponent':
 753        assert isinstance(obj, dict)
 754        price = from_float(obj.get("price"))
 755        step_size = from_int(obj.get("step_size"))
 756        type = TariffDimensionType(obj.get("type"))
 757        vat = from_union([from_none, from_float], obj.get("vat"))
 758        return PriceComponent(price, step_size, type, vat)
 759
 760    def to_dict(self) -> dict:
 761        result: dict = {}
 762        result["price"] = to_float(self.price)
 763        result["step_size"] = from_int(self.step_size)
 764        result["type"] = to_enum(TariffDimensionType, self.type)
 765        if self.vat is not None:
 766            result["vat"] = from_union([from_none, to_float], self.vat)
 767        return result
 768
 769
 770class DayOfWeek(Enum):
 771    FRIDAY = "FRIDAY"
 772    MONDAY = "MONDAY"
 773    SATURDAY = "SATURDAY"
 774    SUNDAY = "SUNDAY"
 775    THURSDAY = "THURSDAY"
 776    TUESDAY = "TUESDAY"
 777    WEDNESDAY = "WEDNESDAY"
 778
 779
 780class ReservationRestrictionType(Enum):
 781    RESERVATION = "RESERVATION"
 782    RESERVATION_EXPIRES = "RESERVATION_EXPIRES"
 783
 784
 785class TariffRestrictions:
 786    day_of_week: Optional[List[DayOfWeek]]
 787    end_date: Optional[str]
 788    end_time: Optional[str]
 789    max_current: Optional[float]
 790    max_duration: Optional[int]
 791    max_kwh: Optional[float]
 792    max_power: Optional[float]
 793    min_current: Optional[float]
 794    min_duration: Optional[int]
 795    min_kwh: Optional[float]
 796    min_power: Optional[float]
 797    reservation: Optional[ReservationRestrictionType]
 798    start_date: Optional[str]
 799    start_time: Optional[str]
 800
 801    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:
 802        self.day_of_week = day_of_week
 803        self.end_date = end_date
 804        self.end_time = end_time
 805        self.max_current = max_current
 806        self.max_duration = max_duration
 807        self.max_kwh = max_kwh
 808        self.max_power = max_power
 809        self.min_current = min_current
 810        self.min_duration = min_duration
 811        self.min_kwh = min_kwh
 812        self.min_power = min_power
 813        self.reservation = reservation
 814        self.start_date = start_date
 815        self.start_time = start_time
 816
 817    @staticmethod
 818    def from_dict(obj: Any) -> 'TariffRestrictions':
 819        assert isinstance(obj, dict)
 820        day_of_week = from_union([from_none, lambda x: from_list(DayOfWeek, x)], obj.get("day_of_week"))
 821        end_date = from_union([from_none, from_str], obj.get("end_date"))
 822        end_time = from_union([from_none, from_str], obj.get("end_time"))
 823        max_current = from_union([from_none, from_float], obj.get("max_current"))
 824        max_duration = from_union([from_none, from_int], obj.get("max_duration"))
 825        max_kwh = from_union([from_none, from_float], obj.get("max_kwh"))
 826        max_power = from_union([from_none, from_float], obj.get("max_power"))
 827        min_current = from_union([from_none, from_float], obj.get("min_current"))
 828        min_duration = from_union([from_none, from_int], obj.get("min_duration"))
 829        min_kwh = from_union([from_none, from_float], obj.get("min_kwh"))
 830        min_power = from_union([from_none, from_float], obj.get("min_power"))
 831        reservation = from_union([from_none, ReservationRestrictionType], obj.get("reservation"))
 832        start_date = from_union([from_none, from_str], obj.get("start_date"))
 833        start_time = from_union([from_none, from_str], obj.get("start_time"))
 834        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)
 835
 836    def to_dict(self) -> dict:
 837        result: dict = {}
 838        if self.day_of_week is not None:
 839            result["day_of_week"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(DayOfWeek, x), x)], self.day_of_week)
 840        if self.end_date is not None:
 841            result["end_date"] = from_union([from_none, from_str], self.end_date)
 842        if self.end_time is not None:
 843            result["end_time"] = from_union([from_none, from_str], self.end_time)
 844        if self.max_current is not None:
 845            result["max_current"] = from_union([from_none, to_float], self.max_current)
 846        if self.max_duration is not None:
 847            result["max_duration"] = from_union([from_none, from_int], self.max_duration)
 848        if self.max_kwh is not None:
 849            result["max_kwh"] = from_union([from_none, to_float], self.max_kwh)
 850        if self.max_power is not None:
 851            result["max_power"] = from_union([from_none, to_float], self.max_power)
 852        if self.min_current is not None:
 853            result["min_current"] = from_union([from_none, to_float], self.min_current)
 854        if self.min_duration is not None:
 855            result["min_duration"] = from_union([from_none, from_int], self.min_duration)
 856        if self.min_kwh is not None:
 857            result["min_kwh"] = from_union([from_none, to_float], self.min_kwh)
 858        if self.min_power is not None:
 859            result["min_power"] = from_union([from_none, to_float], self.min_power)
 860        if self.reservation is not None:
 861            result["reservation"] = from_union([from_none, lambda x: to_enum(ReservationRestrictionType, x)], self.reservation)
 862        if self.start_date is not None:
 863            result["start_date"] = from_union([from_none, from_str], self.start_date)
 864        if self.start_time is not None:
 865            result["start_time"] = from_union([from_none, from_str], self.start_time)
 866        return result
 867
 868
 869class TariffElement:
 870    price_components: List[PriceComponent]
 871    restrictions: Optional[TariffRestrictions]
 872
 873    def __init__(self, price_components: List[PriceComponent], restrictions: Optional[TariffRestrictions]) -> None:
 874        self.price_components = price_components
 875        self.restrictions = restrictions
 876
 877    @staticmethod
 878    def from_dict(obj: Any) -> 'TariffElement':
 879        assert isinstance(obj, dict)
 880        price_components = from_list(PriceComponent.from_dict, obj.get("price_components"))
 881        restrictions = from_union([from_none, TariffRestrictions.from_dict], obj.get("restrictions"))
 882        return TariffElement(price_components, restrictions)
 883
 884    def to_dict(self) -> dict:
 885        result: dict = {}
 886        result["price_components"] = from_list(lambda x: to_class(PriceComponent, x), self.price_components)
 887        if self.restrictions is not None:
 888            result["restrictions"] = from_union([from_none, lambda x: to_class(TariffRestrictions, x)], self.restrictions)
 889        return result
 890
 891
 892class EnergySourceCategory(Enum):
 893    COAL = "COAL"
 894    GAS = "GAS"
 895    GENERAL_FOSSIL = "GENERAL_FOSSIL"
 896    GENERAL_GREEN = "GENERAL_GREEN"
 897    NUCLEAR = "NUCLEAR"
 898    SOLAR = "SOLAR"
 899    WATER = "WATER"
 900    WIND = "WIND"
 901
 902
 903class EnergySource:
 904    percentage: float
 905    source: EnergySourceCategory
 906
 907    def __init__(self, percentage: float, source: EnergySourceCategory) -> None:
 908        self.percentage = percentage
 909        self.source = source
 910
 911    @staticmethod
 912    def from_dict(obj: Any) -> 'EnergySource':
 913        assert isinstance(obj, dict)
 914        percentage = from_float(obj.get("percentage"))
 915        source = EnergySourceCategory(obj.get("source"))
 916        return EnergySource(percentage, source)
 917
 918    def to_dict(self) -> dict:
 919        result: dict = {}
 920        result["percentage"] = to_float(self.percentage)
 921        result["source"] = to_enum(EnergySourceCategory, self.source)
 922        return result
 923
 924
 925class EnvironmentalImpactCategory(Enum):
 926    CARBON_DIOXIDE = "CARBON_DIOXIDE"
 927    NUCLEAR_WASTE = "NUCLEAR_WASTE"
 928
 929
 930class EnvironmentalImpact:
 931    amount: float
 932    category: EnvironmentalImpactCategory
 933
 934    def __init__(self, amount: float, category: EnvironmentalImpactCategory) -> None:
 935        self.amount = amount
 936        self.category = category
 937
 938    @staticmethod
 939    def from_dict(obj: Any) -> 'EnvironmentalImpact':
 940        assert isinstance(obj, dict)
 941        amount = from_float(obj.get("amount"))
 942        category = EnvironmentalImpactCategory(obj.get("category"))
 943        return EnvironmentalImpact(amount, category)
 944
 945    def to_dict(self) -> dict:
 946        result: dict = {}
 947        result["amount"] = to_float(self.amount)
 948        result["category"] = to_enum(EnvironmentalImpactCategory, self.category)
 949        return result
 950
 951
 952class EnergyMix:
 953    energy_product_name: Optional[str]
 954    energy_sources: Optional[List[EnergySource]]
 955    environ_impact: Optional[List[EnvironmentalImpact]]
 956    is_green_energy: bool
 957    supplier_name: Optional[str]
 958
 959    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:
 960        self.energy_product_name = energy_product_name
 961        self.energy_sources = energy_sources
 962        self.environ_impact = environ_impact
 963        self.is_green_energy = is_green_energy
 964        self.supplier_name = supplier_name
 965
 966    @staticmethod
 967    def from_dict(obj: Any) -> 'EnergyMix':
 968        assert isinstance(obj, dict)
 969        energy_product_name = from_union([from_none, from_str], obj.get("energy_product_name"))
 970        energy_sources = from_union([from_none, lambda x: from_list(EnergySource.from_dict, x)], obj.get("energy_sources"))
 971        environ_impact = from_union([from_none, lambda x: from_list(EnvironmentalImpact.from_dict, x)], obj.get("environ_impact"))
 972        is_green_energy = from_bool(obj.get("is_green_energy"))
 973        supplier_name = from_union([from_none, from_str], obj.get("supplier_name"))
 974        return EnergyMix(energy_product_name, energy_sources, environ_impact, is_green_energy, supplier_name)
 975
 976    def to_dict(self) -> dict:
 977        result: dict = {}
 978        if self.energy_product_name is not None:
 979            result["energy_product_name"] = from_union([from_none, from_str], self.energy_product_name)
 980        if self.energy_sources is not None:
 981            result["energy_sources"] = from_union([from_none, lambda x: from_list(lambda x: to_class(EnergySource, x), x)], self.energy_sources)
 982        if self.environ_impact is not None:
 983            result["environ_impact"] = from_union([from_none, lambda x: from_list(lambda x: to_class(EnvironmentalImpact, x), x)], self.environ_impact)
 984        result["is_green_energy"] = from_bool(self.is_green_energy)
 985        if self.supplier_name is not None:
 986            result["supplier_name"] = from_union([from_none, from_str], self.supplier_name)
 987        return result
 988
 989
 990class PriceLimit:
 991    after_taxes: Optional[float]
 992    before_taxes: float
 993
 994    def __init__(self, after_taxes: Optional[float], before_taxes: float) -> None:
 995        self.after_taxes = after_taxes
 996        self.before_taxes = before_taxes
 997
 998    @staticmethod
 999    def from_dict(obj: Any) -> 'PriceLimit':
1000        assert isinstance(obj, dict)
1001        after_taxes = from_union([from_none, from_float], obj.get("after_taxes"))
1002        before_taxes = from_float(obj.get("before_taxes"))
1003        return PriceLimit(after_taxes, before_taxes)
1004
1005    def to_dict(self) -> dict:
1006        result: dict = {}
1007        if self.after_taxes is not None:
1008            result["after_taxes"] = from_union([from_none, to_float], self.after_taxes)
1009        result["before_taxes"] = to_float(self.before_taxes)
1010        return result
1011
1012
1013class TaxIncluded(Enum):
1014    NO = "NO"
1015    N_A = "N/A"
1016    YES = "YES"
1017
1018
1019class TariffType(Enum):
1020    AD_HOC_PAYMENT = "AD_HOC_PAYMENT"
1021    PROFILE_CHEAP = "PROFILE_CHEAP"
1022    PROFILE_FAST = "PROFILE_FAST"
1023    PROFILE_GREEN = "PROFILE_GREEN"
1024    REGULAR = "REGULAR"
1025
1026
1027class Tariff:
1028    country_code: str
1029    currency: str
1030    elements: List[TariffElement]
1031    end_date_time: Optional[str]
1032    energy_mix: Optional[EnergyMix]
1033    id: str
1034    last_updated: str
1035    max_price: Optional[PriceLimit]
1036    min_price: Optional[PriceLimit]
1037    party_id: str
1038    preauthorize_amount: Optional[float]
1039    start_date_time: Optional[str]
1040    tariff_alt_text: Optional[List[DisplayText]]
1041    tariff_alt_url: Optional[str]
1042    tax_included: TaxIncluded
1043    type: Optional[TariffType]
1044
1045    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[PriceLimit], min_price: Optional[PriceLimit], party_id: str, preauthorize_amount: Optional[float], start_date_time: Optional[str], tariff_alt_text: Optional[List[DisplayText]], tariff_alt_url: Optional[str], tax_included: TaxIncluded, type: Optional[TariffType]) -> None:
1046        self.country_code = country_code
1047        self.currency = currency
1048        self.elements = elements
1049        self.end_date_time = end_date_time
1050        self.energy_mix = energy_mix
1051        self.id = id
1052        self.last_updated = last_updated
1053        self.max_price = max_price
1054        self.min_price = min_price
1055        self.party_id = party_id
1056        self.preauthorize_amount = preauthorize_amount
1057        self.start_date_time = start_date_time
1058        self.tariff_alt_text = tariff_alt_text
1059        self.tariff_alt_url = tariff_alt_url
1060        self.tax_included = tax_included
1061        self.type = type
1062
1063    @staticmethod
1064    def from_dict(obj: Any) -> 'Tariff':
1065        assert isinstance(obj, dict)
1066        country_code = from_str(obj.get("country_code"))
1067        currency = from_str(obj.get("currency"))
1068        elements = from_list(TariffElement.from_dict, obj.get("elements"))
1069        end_date_time = from_union([from_none, from_str], obj.get("end_date_time"))
1070        energy_mix = from_union([from_none, EnergyMix.from_dict], obj.get("energy_mix"))
1071        id = from_str(obj.get("id"))
1072        last_updated = from_str(obj.get("last_updated"))
1073        max_price = from_union([from_none, PriceLimit.from_dict], obj.get("max_price"))
1074        min_price = from_union([from_none, PriceLimit.from_dict], obj.get("min_price"))
1075        party_id = from_str(obj.get("party_id"))
1076        preauthorize_amount = from_union([from_none, from_float], obj.get("preauthorize_amount"))
1077        start_date_time = from_union([from_none, from_str], obj.get("start_date_time"))
1078        tariff_alt_text = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("tariff_alt_text"))
1079        tariff_alt_url = from_union([from_none, from_str], obj.get("tariff_alt_url"))
1080        tax_included = TaxIncluded(obj.get("tax_included"))
1081        type = from_union([from_none, TariffType], obj.get("type"))
1082        return Tariff(country_code, currency, elements, end_date_time, energy_mix, id, last_updated, max_price, min_price, party_id, preauthorize_amount, start_date_time, tariff_alt_text, tariff_alt_url, tax_included, type)
1083
1084    def to_dict(self) -> dict:
1085        result: dict = {}
1086        result["country_code"] = from_str(self.country_code)
1087        result["currency"] = from_str(self.currency)
1088        result["elements"] = from_list(lambda x: to_class(TariffElement, x), self.elements)
1089        if self.end_date_time is not None:
1090            result["end_date_time"] = from_union([from_none, from_str], self.end_date_time)
1091        if self.energy_mix is not None:
1092            result["energy_mix"] = from_union([from_none, lambda x: to_class(EnergyMix, x)], self.energy_mix)
1093        result["id"] = from_str(self.id)
1094        result["last_updated"] = from_str(self.last_updated)
1095        if self.max_price is not None:
1096            result["max_price"] = from_union([from_none, lambda x: to_class(PriceLimit, x)], self.max_price)
1097        if self.min_price is not None:
1098            result["min_price"] = from_union([from_none, lambda x: to_class(PriceLimit, x)], self.min_price)
1099        result["party_id"] = from_str(self.party_id)
1100        if self.preauthorize_amount is not None:
1101            result["preauthorize_amount"] = from_union([from_none, to_float], self.preauthorize_amount)
1102        if self.start_date_time is not None:
1103            result["start_date_time"] = from_union([from_none, from_str], self.start_date_time)
1104        if self.tariff_alt_text is not None:
1105            result["tariff_alt_text"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.tariff_alt_text)
1106        if self.tariff_alt_url is not None:
1107            result["tariff_alt_url"] = from_union([from_none, from_str], self.tariff_alt_url)
1108        result["tax_included"] = to_enum(TaxIncluded, self.tax_included)
1109        if self.type is not None:
1110            result["type"] = from_union([from_none, lambda x: to_enum(TariffType, x)], self.type)
1111        return result
1112
1113
1114class TaxAmount:
1115    account_number: Optional[str]
1116    amount: float
1117    name: str
1118    percentage: Optional[float]
1119
1120    def __init__(self, account_number: Optional[str], amount: float, name: str, percentage: Optional[float]) -> None:
1121        self.account_number = account_number
1122        self.amount = amount
1123        self.name = name
1124        self.percentage = percentage
1125
1126    @staticmethod
1127    def from_dict(obj: Any) -> 'TaxAmount':
1128        assert isinstance(obj, dict)
1129        account_number = from_union([from_none, from_str], obj.get("account_number"))
1130        amount = from_float(obj.get("amount"))
1131        name = from_str(obj.get("name"))
1132        percentage = from_union([from_none, from_float], obj.get("percentage"))
1133        return TaxAmount(account_number, amount, name, percentage)
1134
1135    def to_dict(self) -> dict:
1136        result: dict = {}
1137        if self.account_number is not None:
1138            result["account_number"] = from_union([from_none, from_str], self.account_number)
1139        result["amount"] = to_float(self.amount)
1140        result["name"] = from_str(self.name)
1141        if self.percentage is not None:
1142            result["percentage"] = from_union([from_none, to_float], self.percentage)
1143        return result
1144
1145
1146class Price:
1147    before_taxes: float
1148    taxes: Optional[List[TaxAmount]]
1149
1150    def __init__(self, before_taxes: float, taxes: Optional[List[TaxAmount]]) -> None:
1151        self.before_taxes = before_taxes
1152        self.taxes = taxes
1153
1154    @staticmethod
1155    def from_dict(obj: Any) -> 'Price':
1156        assert isinstance(obj, dict)
1157        before_taxes = from_float(obj.get("before_taxes"))
1158        taxes = from_union([from_none, lambda x: from_list(TaxAmount.from_dict, x)], obj.get("taxes"))
1159        return Price(before_taxes, taxes)
1160
1161    def to_dict(self) -> dict:
1162        result: dict = {}
1163        result["before_taxes"] = to_float(self.before_taxes)
1164        if self.taxes is not None:
1165            result["taxes"] = from_union([from_none, lambda x: from_list(lambda x: to_class(TaxAmount, x), x)], self.taxes)
1166        return result
1167
1168
1169class Cdr:
1170    auth_method: AuthMethod
1171    authorization_reference: Optional[str]
1172    cdr_location: CdrLocation
1173    cdr_token: CdrToken
1174    charging_periods: List[ChargingPeriod]
1175    country_code: str
1176    credit: Optional[bool]
1177    credit_reference_id: Optional[str]
1178    currency: str
1179    end_date_time: str
1180    home_charging_compensation: Optional[bool]
1181    id: str
1182    invoice_reference_id: Optional[str]
1183    last_updated: str
1184    meter_id: Optional[str]
1185    party_id: str
1186    remark: Optional[str]
1187    session_id: Optional[str]
1188    signed_data: Optional[SignedData]
1189    start_date_time: str
1190    tariffs: Optional[List[Tariff]]
1191    total_cost: Price
1192    total_energy: float
1193    total_energy_cost: Optional[Price]
1194    total_fixed_cost: Optional[Price]
1195    total_parking_cost: Optional[Price]
1196    total_parking_time: Optional[float]
1197    total_reservation_cost: Optional[Price]
1198    total_time: float
1199    total_time_cost: Optional[Price]
1200
1201    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:
1202        self.auth_method = auth_method
1203        self.authorization_reference = authorization_reference
1204        self.cdr_location = cdr_location
1205        self.cdr_token = cdr_token
1206        self.charging_periods = charging_periods
1207        self.country_code = country_code
1208        self.credit = credit
1209        self.credit_reference_id = credit_reference_id
1210        self.currency = currency
1211        self.end_date_time = end_date_time
1212        self.home_charging_compensation = home_charging_compensation
1213        self.id = id
1214        self.invoice_reference_id = invoice_reference_id
1215        self.last_updated = last_updated
1216        self.meter_id = meter_id
1217        self.party_id = party_id
1218        self.remark = remark
1219        self.session_id = session_id
1220        self.signed_data = signed_data
1221        self.start_date_time = start_date_time
1222        self.tariffs = tariffs
1223        self.total_cost = total_cost
1224        self.total_energy = total_energy
1225        self.total_energy_cost = total_energy_cost
1226        self.total_fixed_cost = total_fixed_cost
1227        self.total_parking_cost = total_parking_cost
1228        self.total_parking_time = total_parking_time
1229        self.total_reservation_cost = total_reservation_cost
1230        self.total_time = total_time
1231        self.total_time_cost = total_time_cost
1232
1233    @staticmethod
1234    def from_dict(obj: Any) -> 'Cdr':
1235        assert isinstance(obj, dict)
1236        auth_method = AuthMethod(obj.get("auth_method"))
1237        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
1238        cdr_location = CdrLocation.from_dict(obj.get("cdr_location"))
1239        cdr_token = CdrToken.from_dict(obj.get("cdr_token"))
1240        charging_periods = from_list(ChargingPeriod.from_dict, obj.get("charging_periods"))
1241        country_code = from_str(obj.get("country_code"))
1242        credit = from_union([from_none, from_bool], obj.get("credit"))
1243        credit_reference_id = from_union([from_none, from_str], obj.get("credit_reference_id"))
1244        currency = from_str(obj.get("currency"))
1245        end_date_time = from_str(obj.get("end_date_time"))
1246        home_charging_compensation = from_union([from_none, from_bool], obj.get("home_charging_compensation"))
1247        id = from_str(obj.get("id"))
1248        invoice_reference_id = from_union([from_none, from_str], obj.get("invoice_reference_id"))
1249        last_updated = from_str(obj.get("last_updated"))
1250        meter_id = from_union([from_none, from_str], obj.get("meter_id"))
1251        party_id = from_str(obj.get("party_id"))
1252        remark = from_union([from_none, from_str], obj.get("remark"))
1253        session_id = from_union([from_none, from_str], obj.get("session_id"))
1254        signed_data = from_union([from_none, SignedData.from_dict], obj.get("signed_data"))
1255        start_date_time = from_str(obj.get("start_date_time"))
1256        tariffs = from_union([from_none, lambda x: from_list(Tariff.from_dict, x)], obj.get("tariffs"))
1257        total_cost = Price.from_dict(obj.get("total_cost"))
1258        total_energy = from_float(obj.get("total_energy"))
1259        total_energy_cost = from_union([from_none, Price.from_dict], obj.get("total_energy_cost"))
1260        total_fixed_cost = from_union([from_none, Price.from_dict], obj.get("total_fixed_cost"))
1261        total_parking_cost = from_union([from_none, Price.from_dict], obj.get("total_parking_cost"))
1262        total_parking_time = from_union([from_none, from_float], obj.get("total_parking_time"))
1263        total_reservation_cost = from_union([from_none, Price.from_dict], obj.get("total_reservation_cost"))
1264        total_time = from_float(obj.get("total_time"))
1265        total_time_cost = from_union([from_none, Price.from_dict], obj.get("total_time_cost"))
1266        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)
1267
1268    def to_dict(self) -> dict:
1269        result: dict = {}
1270        result["auth_method"] = to_enum(AuthMethod, self.auth_method)
1271        if self.authorization_reference is not None:
1272            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
1273        result["cdr_location"] = to_class(CdrLocation, self.cdr_location)
1274        result["cdr_token"] = to_class(CdrToken, self.cdr_token)
1275        result["charging_periods"] = from_list(lambda x: to_class(ChargingPeriod, x), self.charging_periods)
1276        result["country_code"] = from_str(self.country_code)
1277        if self.credit is not None:
1278            result["credit"] = from_union([from_none, from_bool], self.credit)
1279        if self.credit_reference_id is not None:
1280            result["credit_reference_id"] = from_union([from_none, from_str], self.credit_reference_id)
1281        result["currency"] = from_str(self.currency)
1282        result["end_date_time"] = from_str(self.end_date_time)
1283        if self.home_charging_compensation is not None:
1284            result["home_charging_compensation"] = from_union([from_none, from_bool], self.home_charging_compensation)
1285        result["id"] = from_str(self.id)
1286        if self.invoice_reference_id is not None:
1287            result["invoice_reference_id"] = from_union([from_none, from_str], self.invoice_reference_id)
1288        result["last_updated"] = from_str(self.last_updated)
1289        if self.meter_id is not None:
1290            result["meter_id"] = from_union([from_none, from_str], self.meter_id)
1291        result["party_id"] = from_str(self.party_id)
1292        if self.remark is not None:
1293            result["remark"] = from_union([from_none, from_str], self.remark)
1294        if self.session_id is not None:
1295            result["session_id"] = from_union([from_none, from_str], self.session_id)
1296        if self.signed_data is not None:
1297            result["signed_data"] = from_union([from_none, lambda x: to_class(SignedData, x)], self.signed_data)
1298        result["start_date_time"] = from_str(self.start_date_time)
1299        if self.tariffs is not None:
1300            result["tariffs"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Tariff, x), x)], self.tariffs)
1301        result["total_cost"] = to_class(Price, self.total_cost)
1302        result["total_energy"] = to_float(self.total_energy)
1303        if self.total_energy_cost is not None:
1304            result["total_energy_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_energy_cost)
1305        if self.total_fixed_cost is not None:
1306            result["total_fixed_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_fixed_cost)
1307        if self.total_parking_cost is not None:
1308            result["total_parking_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_parking_cost)
1309        if self.total_parking_time is not None:
1310            result["total_parking_time"] = from_union([from_none, to_float], self.total_parking_time)
1311        if self.total_reservation_cost is not None:
1312            result["total_reservation_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_reservation_cost)
1313        result["total_time"] = to_float(self.total_time)
1314        if self.total_time_cost is not None:
1315            result["total_time_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_time_cost)
1316        return result
1317
1318
1319class ChargingPreferences:
1320    departure_time: Optional[str]
1321    discharge_allowed: Optional[bool]
1322    energy_need: Optional[float]
1323    profile_type: ProfileType
1324
1325    def __init__(self, departure_time: Optional[str], discharge_allowed: Optional[bool], energy_need: Optional[float], profile_type: ProfileType) -> None:
1326        self.departure_time = departure_time
1327        self.discharge_allowed = discharge_allowed
1328        self.energy_need = energy_need
1329        self.profile_type = profile_type
1330
1331    @staticmethod
1332    def from_dict(obj: Any) -> 'ChargingPreferences':
1333        assert isinstance(obj, dict)
1334        departure_time = from_union([from_none, from_str], obj.get("departure_time"))
1335        discharge_allowed = from_union([from_none, from_bool], obj.get("discharge_allowed"))
1336        energy_need = from_union([from_none, from_float], obj.get("energy_need"))
1337        profile_type = ProfileType(obj.get("profile_type"))
1338        return ChargingPreferences(departure_time, discharge_allowed, energy_need, profile_type)
1339
1340    def to_dict(self) -> dict:
1341        result: dict = {}
1342        if self.departure_time is not None:
1343            result["departure_time"] = from_union([from_none, from_str], self.departure_time)
1344        if self.discharge_allowed is not None:
1345            result["discharge_allowed"] = from_union([from_none, from_bool], self.discharge_allowed)
1346        if self.energy_need is not None:
1347            result["energy_need"] = from_union([from_none, to_float], self.energy_need)
1348        result["profile_type"] = to_enum(ProfileType, self.profile_type)
1349        return result
1350
1351
1352class ChargingProfileResponseType(Enum):
1353    ACCEPTED = "ACCEPTED"
1354    NOT_SUPPORTED = "NOT_SUPPORTED"
1355    REJECTED = "REJECTED"
1356    TOO_OFTEN = "TOO_OFTEN"
1357    UNKNOWN_SESSION = "UNKNOWN_SESSION"
1358
1359
1360class ChargingProfileResponse:
1361    result: ChargingProfileResponseType
1362    timeout: int
1363
1364    def __init__(self, result: ChargingProfileResponseType, timeout: int) -> None:
1365        self.result = result
1366        self.timeout = timeout
1367
1368    @staticmethod
1369    def from_dict(obj: Any) -> 'ChargingProfileResponse':
1370        assert isinstance(obj, dict)
1371        result = ChargingProfileResponseType(obj.get("result"))
1372        timeout = from_int(obj.get("timeout"))
1373        return ChargingProfileResponse(result, timeout)
1374
1375    def to_dict(self) -> dict:
1376        result: dict = {}
1377        result["result"] = to_enum(ChargingProfileResponseType, self.result)
1378        result["timeout"] = from_int(self.timeout)
1379        return result
1380
1381
1382class ChargingProfileResult:
1383    result: ChargingProfileResultType
1384
1385    def __init__(self, result: ChargingProfileResultType) -> None:
1386        self.result = result
1387
1388    @staticmethod
1389    def from_dict(obj: Any) -> 'ChargingProfileResult':
1390        assert isinstance(obj, dict)
1391        result = ChargingProfileResultType(obj.get("result"))
1392        return ChargingProfileResult(result)
1393
1394    def to_dict(self) -> dict:
1395        result: dict = {}
1396        result["result"] = to_enum(ChargingProfileResultType, self.result)
1397        return result
1398
1399
1400class ClearProfileResult:
1401    result: ChargingProfileResultType
1402
1403    def __init__(self, result: ChargingProfileResultType) -> None:
1404        self.result = result
1405
1406    @staticmethod
1407    def from_dict(obj: Any) -> 'ClearProfileResult':
1408        assert isinstance(obj, dict)
1409        result = ChargingProfileResultType(obj.get("result"))
1410        return ClearProfileResult(result)
1411
1412    def to_dict(self) -> dict:
1413        result: dict = {}
1414        result["result"] = to_enum(ChargingProfileResultType, self.result)
1415        return result
1416
1417
1418class CommandResponseType(Enum):
1419    ACCEPTED = "ACCEPTED"
1420    NOT_SUPPORTED = "NOT_SUPPORTED"
1421    REJECTED = "REJECTED"
1422    UNKNOWN_SESSION = "UNKNOWN_SESSION"
1423
1424
1425class CommandResponse:
1426    message: Optional[List[DisplayText]]
1427    result: CommandResponseType
1428    timeout: int
1429
1430    def __init__(self, message: Optional[List[DisplayText]], result: CommandResponseType, timeout: int) -> None:
1431        self.message = message
1432        self.result = result
1433        self.timeout = timeout
1434
1435    @staticmethod
1436    def from_dict(obj: Any) -> 'CommandResponse':
1437        assert isinstance(obj, dict)
1438        message = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("message"))
1439        result = CommandResponseType(obj.get("result"))
1440        timeout = from_int(obj.get("timeout"))
1441        return CommandResponse(message, result, timeout)
1442
1443    def to_dict(self) -> dict:
1444        result: dict = {}
1445        if self.message is not None:
1446            result["message"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.message)
1447        result["result"] = to_enum(CommandResponseType, self.result)
1448        result["timeout"] = from_int(self.timeout)
1449        return result
1450
1451
1452class CommandResultType(Enum):
1453    ACCEPTED = "ACCEPTED"
1454    CANCELED_RESERVATION = "CANCELED_RESERVATION"
1455    EVSE_INOPERATIVE = "EVSE_INOPERATIVE"
1456    EVSE_OCCUPIED = "EVSE_OCCUPIED"
1457    FAILED = "FAILED"
1458    NOT_SUPPORTED = "NOT_SUPPORTED"
1459    REJECTED = "REJECTED"
1460    TIMEOUT = "TIMEOUT"
1461    UNKNOWN_RESERVATION = "UNKNOWN_RESERVATION"
1462
1463
1464class CommandResult:
1465    message: Optional[List[DisplayText]]
1466    result: CommandResultType
1467
1468    def __init__(self, message: Optional[List[DisplayText]], result: CommandResultType) -> None:
1469        self.message = message
1470        self.result = result
1471
1472    @staticmethod
1473    def from_dict(obj: Any) -> 'CommandResult':
1474        assert isinstance(obj, dict)
1475        message = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("message"))
1476        result = CommandResultType(obj.get("result"))
1477        return CommandResult(message, result)
1478
1479    def to_dict(self) -> dict:
1480        result: dict = {}
1481        if self.message is not None:
1482            result["message"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.message)
1483        result["result"] = to_enum(CommandResultType, self.result)
1484        return result
1485
1486
1487class ConnectorCapability(Enum):
1488    ISO_15118_20__PLUG_AND_CHARGE = "ISO_15118_20_PLUG_AND_CHARGE"
1489    ISO_15118_2__PLUG_AND_CHARGE = "ISO_15118_2_PLUG_AND_CHARGE"
1490
1491
1492class Connector:
1493    capabilities: Optional[List[ConnectorCapability]]
1494    format: ConnectorFormat
1495    id: str
1496    last_updated: str
1497    max_amperage: int
1498    max_electric_power: Optional[int]
1499    max_voltage: int
1500    power_type: PowerType
1501    standard: ConnectorType
1502    tariff_ids: Optional[List[str]]
1503    terms_and_conditions: Optional[str]
1504
1505    def __init__(self, capabilities: Optional[List[ConnectorCapability]], 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:
1506        self.capabilities = capabilities
1507        self.format = format
1508        self.id = id
1509        self.last_updated = last_updated
1510        self.max_amperage = max_amperage
1511        self.max_electric_power = max_electric_power
1512        self.max_voltage = max_voltage
1513        self.power_type = power_type
1514        self.standard = standard
1515        self.tariff_ids = tariff_ids
1516        self.terms_and_conditions = terms_and_conditions
1517
1518    @staticmethod
1519    def from_dict(obj: Any) -> 'Connector':
1520        assert isinstance(obj, dict)
1521        capabilities = from_union([from_none, lambda x: from_list(ConnectorCapability, x)], obj.get("capabilities"))
1522        format = ConnectorFormat(obj.get("format"))
1523        id = from_str(obj.get("id"))
1524        last_updated = from_str(obj.get("last_updated"))
1525        max_amperage = from_int(obj.get("max_amperage"))
1526        max_electric_power = from_union([from_none, from_int], obj.get("max_electric_power"))
1527        max_voltage = from_int(obj.get("max_voltage"))
1528        power_type = PowerType(obj.get("power_type"))
1529        standard = ConnectorType(obj.get("standard"))
1530        tariff_ids = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("tariff_ids"))
1531        terms_and_conditions = from_union([from_none, from_str], obj.get("terms_and_conditions"))
1532        return Connector(capabilities, format, id, last_updated, max_amperage, max_electric_power, max_voltage, power_type, standard, tariff_ids, terms_and_conditions)
1533
1534    def to_dict(self) -> dict:
1535        result: dict = {}
1536        if self.capabilities is not None:
1537            result["capabilities"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(ConnectorCapability, x), x)], self.capabilities)
1538        result["format"] = to_enum(ConnectorFormat, self.format)
1539        result["id"] = from_str(self.id)
1540        result["last_updated"] = from_str(self.last_updated)
1541        result["max_amperage"] = from_int(self.max_amperage)
1542        if self.max_electric_power is not None:
1543            result["max_electric_power"] = from_union([from_none, from_int], self.max_electric_power)
1544        result["max_voltage"] = from_int(self.max_voltage)
1545        result["power_type"] = to_enum(PowerType, self.power_type)
1546        result["standard"] = to_enum(ConnectorType, self.standard)
1547        if self.tariff_ids is not None:
1548            result["tariff_ids"] = from_union([from_none, lambda x: from_list(from_str, x)], self.tariff_ids)
1549        if self.terms_and_conditions is not None:
1550            result["terms_and_conditions"] = from_union([from_none, from_str], self.terms_and_conditions)
1551        return result
1552
1553
1554class ImageCategory(Enum):
1555    CHARGER = "CHARGER"
1556    ENTRANCE = "ENTRANCE"
1557    LOCATION = "LOCATION"
1558    NETWORK = "NETWORK"
1559    OPERATOR = "OPERATOR"
1560    OTHER = "OTHER"
1561    OWNER = "OWNER"
1562
1563
1564class Image:
1565    category: ImageCategory
1566    height: Optional[int]
1567    thumbnail: Optional[str]
1568    type: str
1569    url: str
1570    width: Optional[int]
1571
1572    def __init__(self, category: ImageCategory, height: Optional[int], thumbnail: Optional[str], type: str, url: str, width: Optional[int]) -> None:
1573        self.category = category
1574        self.height = height
1575        self.thumbnail = thumbnail
1576        self.type = type
1577        self.url = url
1578        self.width = width
1579
1580    @staticmethod
1581    def from_dict(obj: Any) -> 'Image':
1582        assert isinstance(obj, dict)
1583        category = ImageCategory(obj.get("category"))
1584        height = from_union([from_none, from_int], obj.get("height"))
1585        thumbnail = from_union([from_none, from_str], obj.get("thumbnail"))
1586        type = from_str(obj.get("type"))
1587        url = from_str(obj.get("url"))
1588        width = from_union([from_none, from_int], obj.get("width"))
1589        return Image(category, height, thumbnail, type, url, width)
1590
1591    def to_dict(self) -> dict:
1592        result: dict = {}
1593        result["category"] = to_enum(ImageCategory, self.category)
1594        if self.height is not None:
1595            result["height"] = from_union([from_none, from_int], self.height)
1596        if self.thumbnail is not None:
1597            result["thumbnail"] = from_union([from_none, from_str], self.thumbnail)
1598        result["type"] = from_str(self.type)
1599        result["url"] = from_str(self.url)
1600        if self.width is not None:
1601            result["width"] = from_union([from_none, from_int], self.width)
1602        return result
1603
1604
1605class BusinessDetails:
1606    logo: Optional[Image]
1607    name: str
1608    website: Optional[str]
1609
1610    def __init__(self, logo: Optional[Image], name: str, website: Optional[str]) -> None:
1611        self.logo = logo
1612        self.name = name
1613        self.website = website
1614
1615    @staticmethod
1616    def from_dict(obj: Any) -> 'BusinessDetails':
1617        assert isinstance(obj, dict)
1618        logo = from_union([from_none, Image.from_dict], obj.get("logo"))
1619        name = from_str(obj.get("name"))
1620        website = from_union([from_none, from_str], obj.get("website"))
1621        return BusinessDetails(logo, name, website)
1622
1623    def to_dict(self) -> dict:
1624        result: dict = {}
1625        if self.logo is not None:
1626            result["logo"] = from_union([from_none, lambda x: to_class(Image, x)], self.logo)
1627        result["name"] = from_str(self.name)
1628        if self.website is not None:
1629            result["website"] = from_union([from_none, from_str], self.website)
1630        return result
1631
1632
1633class Role(Enum):
1634    CPO = "CPO"
1635    EMSP = "EMSP"
1636    NAP = "NAP"
1637    NSP = "NSP"
1638    OTHER = "OTHER"
1639    SCSP = "SCSP"
1640
1641
1642class CredentialsRole:
1643    business_details: BusinessDetails
1644    country_code: str
1645    party_id: str
1646    role: Role
1647
1648    def __init__(self, business_details: BusinessDetails, country_code: str, party_id: str, role: Role) -> None:
1649        self.business_details = business_details
1650        self.country_code = country_code
1651        self.party_id = party_id
1652        self.role = role
1653
1654    @staticmethod
1655    def from_dict(obj: Any) -> 'CredentialsRole':
1656        assert isinstance(obj, dict)
1657        business_details = BusinessDetails.from_dict(obj.get("business_details"))
1658        country_code = from_str(obj.get("country_code"))
1659        party_id = from_str(obj.get("party_id"))
1660        role = Role(obj.get("role"))
1661        return CredentialsRole(business_details, country_code, party_id, role)
1662
1663    def to_dict(self) -> dict:
1664        result: dict = {}
1665        result["business_details"] = to_class(BusinessDetails, self.business_details)
1666        result["country_code"] = from_str(self.country_code)
1667        result["party_id"] = from_str(self.party_id)
1668        result["role"] = to_enum(Role, self.role)
1669        return result
1670
1671
1672class Credentials:
1673    hub_party_id: Optional[str]
1674    roles: List[CredentialsRole]
1675    token: str
1676    url: str
1677
1678    def __init__(self, hub_party_id: Optional[str], roles: List[CredentialsRole], token: str, url: str) -> None:
1679        self.hub_party_id = hub_party_id
1680        self.roles = roles
1681        self.token = token
1682        self.url = url
1683
1684    @staticmethod
1685    def from_dict(obj: Any) -> 'Credentials':
1686        assert isinstance(obj, dict)
1687        hub_party_id = from_union([from_none, from_str], obj.get("hub_party_id"))
1688        roles = from_list(CredentialsRole.from_dict, obj.get("roles"))
1689        token = from_str(obj.get("token"))
1690        url = from_str(obj.get("url"))
1691        return Credentials(hub_party_id, roles, token, url)
1692
1693    def to_dict(self) -> dict:
1694        result: dict = {}
1695        if self.hub_party_id is not None:
1696            result["hub_party_id"] = from_union([from_none, from_str], self.hub_party_id)
1697        result["roles"] = from_list(lambda x: to_class(CredentialsRole, x), self.roles)
1698        result["token"] = from_str(self.token)
1699        result["url"] = from_str(self.url)
1700        return result
1701
1702
1703class ModuleID(Enum):
1704    CDRS = "cdrs"
1705    CHARGINGPROFILES = "chargingprofiles"
1706    COMMANDS = "commands"
1707    CREDENTIALS = "credentials"
1708    HUBCLIENTINFO = "hubclientinfo"
1709    LOCATIONS = "locations"
1710    PAYMENTS = "payments"
1711    SESSIONS = "sessions"
1712    TARIFFS = "tariffs"
1713    TOKENS = "tokens"
1714
1715
1716class InterfaceRole(Enum):
1717    RECEIVER = "RECEIVER"
1718    SENDER = "SENDER"
1719
1720
1721class Endpoint:
1722    identifier: ModuleID
1723    role: InterfaceRole
1724    url: str
1725
1726    def __init__(self, identifier: ModuleID, role: InterfaceRole, url: str) -> None:
1727        self.identifier = identifier
1728        self.role = role
1729        self.url = url
1730
1731    @staticmethod
1732    def from_dict(obj: Any) -> 'Endpoint':
1733        assert isinstance(obj, dict)
1734        identifier = ModuleID(obj.get("identifier"))
1735        role = InterfaceRole(obj.get("role"))
1736        url = from_str(obj.get("url"))
1737        return Endpoint(identifier, role, url)
1738
1739    def to_dict(self) -> dict:
1740        result: dict = {}
1741        result["identifier"] = to_enum(ModuleID, self.identifier)
1742        result["role"] = to_enum(InterfaceRole, self.role)
1743        result["url"] = from_str(self.url)
1744        return result
1745
1746
1747class Capability(Enum):
1748    CHARGING_PREFERENCES_CAPABLE = "CHARGING_PREFERENCES_CAPABLE"
1749    CHARGING_PROFILE_CAPABLE = "CHARGING_PROFILE_CAPABLE"
1750    CHIP_CARD_SUPPORT = "CHIP_CARD_SUPPORT"
1751    CONTACTLESS_CARD_SUPPORT = "CONTACTLESS_CARD_SUPPORT"
1752    CREDIT_CARD_PAYABLE = "CREDIT_CARD_PAYABLE"
1753    DEBIT_CARD_PAYABLE = "DEBIT_CARD_PAYABLE"
1754    PED_TERMINAL = "PED_TERMINAL"
1755    REMOTE_START_STOP_CAPABLE = "REMOTE_START_STOP_CAPABLE"
1756    RESERVABLE = "RESERVABLE"
1757    RFID_READER = "RFID_READER"
1758    START_SESSION_CONNECTOR_REQUIRED = "START_SESSION_CONNECTOR_REQUIRED"
1759    TOKEN_GROUP_CAPABLE = "TOKEN_GROUP_CAPABLE"
1760    UNLOCK_CAPABLE = "UNLOCK_CAPABLE"
1761
1762
1763class EvsePosition(Enum):
1764    CENTER = "CENTER"
1765    LEFT = "LEFT"
1766    RIGHT = "RIGHT"
1767
1768
1769class EvseParking:
1770    evse_position: Optional[EvsePosition]
1771    parking_id: str
1772
1773    def __init__(self, evse_position: Optional[EvsePosition], parking_id: str) -> None:
1774        self.evse_position = evse_position
1775        self.parking_id = parking_id
1776
1777    @staticmethod
1778    def from_dict(obj: Any) -> 'EvseParking':
1779        assert isinstance(obj, dict)
1780        evse_position = from_union([from_none, EvsePosition], obj.get("evse_position"))
1781        parking_id = from_str(obj.get("parking_id"))
1782        return EvseParking(evse_position, parking_id)
1783
1784    def to_dict(self) -> dict:
1785        result: dict = {}
1786        if self.evse_position is not None:
1787            result["evse_position"] = from_union([from_none, lambda x: to_enum(EvsePosition, x)], self.evse_position)
1788        result["parking_id"] = from_str(self.parking_id)
1789        return result
1790
1791
1792class ParkingRestriction(Enum):
1793    CUSTOMERS = "CUSTOMERS"
1794    DISABLED = "DISABLED"
1795    EMPLOYEES = "EMPLOYEES"
1796    EV_ONLY = "EV_ONLY"
1797    MOTORCYCLES = "MOTORCYCLES"
1798    PLUGGED = "PLUGGED"
1799    TAXIS = "TAXIS"
1800    TENANTS = "TENANTS"
1801
1802
1803class Status(Enum):
1804    AVAILABLE = "AVAILABLE"
1805    BLOCKED = "BLOCKED"
1806    CHARGING = "CHARGING"
1807    INOPERATIVE = "INOPERATIVE"
1808    OUTOFORDER = "OUTOFORDER"
1809    PLANNED = "PLANNED"
1810    REMOVED = "REMOVED"
1811    RESERVED = "RESERVED"
1812    UNKNOWN = "UNKNOWN"
1813
1814
1815class StatusSchedule:
1816    period_begin: str
1817    period_end: Optional[str]
1818    status: Status
1819
1820    def __init__(self, period_begin: str, period_end: Optional[str], status: Status) -> None:
1821        self.period_begin = period_begin
1822        self.period_end = period_end
1823        self.status = status
1824
1825    @staticmethod
1826    def from_dict(obj: Any) -> 'StatusSchedule':
1827        assert isinstance(obj, dict)
1828        period_begin = from_str(obj.get("period_begin"))
1829        period_end = from_union([from_none, from_str], obj.get("period_end"))
1830        status = Status(obj.get("status"))
1831        return StatusSchedule(period_begin, period_end, status)
1832
1833    def to_dict(self) -> dict:
1834        result: dict = {}
1835        result["period_begin"] = from_str(self.period_begin)
1836        if self.period_end is not None:
1837            result["period_end"] = from_union([from_none, from_str], self.period_end)
1838        result["status"] = to_enum(Status, self.status)
1839        return result
1840
1841
1842class Evse:
1843    accepted_service_providers: Optional[List[str]]
1844    capabilities: Optional[List[Capability]]
1845    connectors: List[Connector]
1846    coordinates: Optional[GeoLocation]
1847    directions: Optional[List[DisplayText]]
1848    evse_id: Optional[str]
1849    floor_level: Optional[str]
1850    images: Optional[List[Image]]
1851    last_updated: str
1852    parking: Optional[List[EvseParking]]
1853    parking_restrictions: Optional[List[ParkingRestriction]]
1854    physical_reference: Optional[str]
1855    status: Status
1856    status_schedule: Optional[List[StatusSchedule]]
1857    uid: str
1858
1859    def __init__(self, accepted_service_providers: Optional[List[str]], 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: Optional[List[EvseParking]], parking_restrictions: Optional[List[ParkingRestriction]], physical_reference: Optional[str], status: Status, status_schedule: Optional[List[StatusSchedule]], uid: str) -> None:
1860        self.accepted_service_providers = accepted_service_providers
1861        self.capabilities = capabilities
1862        self.connectors = connectors
1863        self.coordinates = coordinates
1864        self.directions = directions
1865        self.evse_id = evse_id
1866        self.floor_level = floor_level
1867        self.images = images
1868        self.last_updated = last_updated
1869        self.parking = parking
1870        self.parking_restrictions = parking_restrictions
1871        self.physical_reference = physical_reference
1872        self.status = status
1873        self.status_schedule = status_schedule
1874        self.uid = uid
1875
1876    @staticmethod
1877    def from_dict(obj: Any) -> 'Evse':
1878        assert isinstance(obj, dict)
1879        accepted_service_providers = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("accepted_service_providers"))
1880        capabilities = from_union([from_none, lambda x: from_list(Capability, x)], obj.get("capabilities"))
1881        connectors = from_list(Connector.from_dict, obj.get("connectors"))
1882        coordinates = from_union([from_none, GeoLocation.from_dict], obj.get("coordinates"))
1883        directions = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("directions"))
1884        evse_id = from_union([from_none, from_str], obj.get("evse_id"))
1885        floor_level = from_union([from_none, from_str], obj.get("floor_level"))
1886        images = from_union([from_none, lambda x: from_list(Image.from_dict, x)], obj.get("images"))
1887        last_updated = from_str(obj.get("last_updated"))
1888        parking = from_union([from_none, lambda x: from_list(EvseParking.from_dict, x)], obj.get("parking"))
1889        parking_restrictions = from_union([from_none, lambda x: from_list(ParkingRestriction, x)], obj.get("parking_restrictions"))
1890        physical_reference = from_union([from_none, from_str], obj.get("physical_reference"))
1891        status = Status(obj.get("status"))
1892        status_schedule = from_union([from_none, lambda x: from_list(StatusSchedule.from_dict, x)], obj.get("status_schedule"))
1893        uid = from_str(obj.get("uid"))
1894        return Evse(accepted_service_providers, capabilities, connectors, coordinates, directions, evse_id, floor_level, images, last_updated, parking, parking_restrictions, physical_reference, status, status_schedule, uid)
1895
1896    def to_dict(self) -> dict:
1897        result: dict = {}
1898        if self.accepted_service_providers is not None:
1899            result["accepted_service_providers"] = from_union([from_none, lambda x: from_list(from_str, x)], self.accepted_service_providers)
1900        if self.capabilities is not None:
1901            result["capabilities"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(Capability, x), x)], self.capabilities)
1902        result["connectors"] = from_list(lambda x: to_class(Connector, x), self.connectors)
1903        if self.coordinates is not None:
1904            result["coordinates"] = from_union([from_none, lambda x: to_class(GeoLocation, x)], self.coordinates)
1905        if self.directions is not None:
1906            result["directions"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.directions)
1907        if self.evse_id is not None:
1908            result["evse_id"] = from_union([from_none, from_str], self.evse_id)
1909        if self.floor_level is not None:
1910            result["floor_level"] = from_union([from_none, from_str], self.floor_level)
1911        if self.images is not None:
1912            result["images"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Image, x), x)], self.images)
1913        result["last_updated"] = from_str(self.last_updated)
1914        if self.parking is not None:
1915            result["parking"] = from_union([from_none, lambda x: from_list(lambda x: to_class(EvseParking, x), x)], self.parking)
1916        if self.parking_restrictions is not None:
1917            result["parking_restrictions"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(ParkingRestriction, x), x)], self.parking_restrictions)
1918        if self.physical_reference is not None:
1919            result["physical_reference"] = from_union([from_none, from_str], self.physical_reference)
1920        result["status"] = to_enum(Status, self.status)
1921        if self.status_schedule is not None:
1922            result["status_schedule"] = from_union([from_none, lambda x: from_list(lambda x: to_class(StatusSchedule, x), x)], self.status_schedule)
1923        result["uid"] = from_str(self.uid)
1924        return result
1925
1926
1927class CaptureStatusCode(Enum):
1928    FAILED = "FAILED"
1929    PARTIAL_SUCCESS = "PARTIAL_SUCCESS"
1930    SUCCESS = "SUCCESS"
1931
1932
1933class FinancialAdviceConfirmation:
1934    authorization_reference: str
1935    capture_status_code: CaptureStatusCode
1936    capture_status_message: Optional[str]
1937    currency: str
1938    eft_data: List[str]
1939    id: str
1940    last_updated: str
1941    total_costs: Price
1942
1943    def __init__(self, authorization_reference: str, capture_status_code: CaptureStatusCode, capture_status_message: Optional[str], currency: str, eft_data: List[str], id: str, last_updated: str, total_costs: Price) -> None:
1944        self.authorization_reference = authorization_reference
1945        self.capture_status_code = capture_status_code
1946        self.capture_status_message = capture_status_message
1947        self.currency = currency
1948        self.eft_data = eft_data
1949        self.id = id
1950        self.last_updated = last_updated
1951        self.total_costs = total_costs
1952
1953    @staticmethod
1954    def from_dict(obj: Any) -> 'FinancialAdviceConfirmation':
1955        assert isinstance(obj, dict)
1956        authorization_reference = from_str(obj.get("authorization_reference"))
1957        capture_status_code = CaptureStatusCode(obj.get("capture_status_code"))
1958        capture_status_message = from_union([from_none, from_str], obj.get("capture_status_message"))
1959        currency = from_str(obj.get("currency"))
1960        eft_data = from_list(from_str, obj.get("eft_data"))
1961        id = from_str(obj.get("id"))
1962        last_updated = from_str(obj.get("last_updated"))
1963        total_costs = Price.from_dict(obj.get("total_costs"))
1964        return FinancialAdviceConfirmation(authorization_reference, capture_status_code, capture_status_message, currency, eft_data, id, last_updated, total_costs)
1965
1966    def to_dict(self) -> dict:
1967        result: dict = {}
1968        result["authorization_reference"] = from_str(self.authorization_reference)
1969        result["capture_status_code"] = to_enum(CaptureStatusCode, self.capture_status_code)
1970        if self.capture_status_message is not None:
1971            result["capture_status_message"] = from_union([from_none, from_str], self.capture_status_message)
1972        result["currency"] = from_str(self.currency)
1973        result["eft_data"] = from_list(from_str, self.eft_data)
1974        result["id"] = from_str(self.id)
1975        result["last_updated"] = from_str(self.last_updated)
1976        result["total_costs"] = to_class(Price, self.total_costs)
1977        return result
1978
1979
1980class ConnectionStatus(Enum):
1981    CONNECTED = "CONNECTED"
1982    OFFLINE = "OFFLINE"
1983    PLANNED = "PLANNED"
1984    SUSPENDED = "SUSPENDED"
1985
1986
1987class HubClientInfo:
1988    country_code: str
1989    last_updated: str
1990    party_id: str
1991    role: Role
1992    status: ConnectionStatus
1993
1994    def __init__(self, country_code: str, last_updated: str, party_id: str, role: Role, status: ConnectionStatus) -> None:
1995        self.country_code = country_code
1996        self.last_updated = last_updated
1997        self.party_id = party_id
1998        self.role = role
1999        self.status = status
2000
2001    @staticmethod
2002    def from_dict(obj: Any) -> 'HubClientInfo':
2003        assert isinstance(obj, dict)
2004        country_code = from_str(obj.get("country_code"))
2005        last_updated = from_str(obj.get("last_updated"))
2006        party_id = from_str(obj.get("party_id"))
2007        role = Role(obj.get("role"))
2008        status = ConnectionStatus(obj.get("status"))
2009        return HubClientInfo(country_code, last_updated, party_id, role, status)
2010
2011    def to_dict(self) -> dict:
2012        result: dict = {}
2013        result["country_code"] = from_str(self.country_code)
2014        result["last_updated"] = from_str(self.last_updated)
2015        result["party_id"] = from_str(self.party_id)
2016        result["role"] = to_enum(Role, self.role)
2017        result["status"] = to_enum(ConnectionStatus, self.status)
2018        return result
2019
2020
2021class Facility(Enum):
2022    AIRPORT = "AIRPORT"
2023    BIKE_SHARING = "BIKE_SHARING"
2024    BUS_STOP = "BUS_STOP"
2025    CAFE = "CAFE"
2026    CARPOOL_PARKING = "CARPOOL_PARKING"
2027    FUEL_STATION = "FUEL_STATION"
2028    HOTEL = "HOTEL"
2029    MALL = "MALL"
2030    METRO_STATION = "METRO_STATION"
2031    MUSEUM = "MUSEUM"
2032    NATURE = "NATURE"
2033    PARKING_LOT = "PARKING_LOT"
2034    RECREATION_AREA = "RECREATION_AREA"
2035    RESTAURANT = "RESTAURANT"
2036    SPORT = "SPORT"
2037    SUPERMARKET = "SUPERMARKET"
2038    TAXI_STAND = "TAXI_STAND"
2039    TRAIN_STATION = "TRAIN_STATION"
2040    TRAM_STOP = "TRAM_STOP"
2041    WIFI = "WIFI"
2042
2043
2044class ExceptionalPeriod:
2045    period_begin: str
2046    period_end: str
2047
2048    def __init__(self, period_begin: str, period_end: str) -> None:
2049        self.period_begin = period_begin
2050        self.period_end = period_end
2051
2052    @staticmethod
2053    def from_dict(obj: Any) -> 'ExceptionalPeriod':
2054        assert isinstance(obj, dict)
2055        period_begin = from_str(obj.get("period_begin"))
2056        period_end = from_str(obj.get("period_end"))
2057        return ExceptionalPeriod(period_begin, period_end)
2058
2059    def to_dict(self) -> dict:
2060        result: dict = {}
2061        result["period_begin"] = from_str(self.period_begin)
2062        result["period_end"] = from_str(self.period_end)
2063        return result
2064
2065
2066class RegularHours:
2067    period_begin: str
2068    period_end: str
2069    weekday: int
2070
2071    def __init__(self, period_begin: str, period_end: str, weekday: int) -> None:
2072        self.period_begin = period_begin
2073        self.period_end = period_end
2074        self.weekday = weekday
2075
2076    @staticmethod
2077    def from_dict(obj: Any) -> 'RegularHours':
2078        assert isinstance(obj, dict)
2079        period_begin = from_str(obj.get("period_begin"))
2080        period_end = from_str(obj.get("period_end"))
2081        weekday = from_int(obj.get("weekday"))
2082        return RegularHours(period_begin, period_end, weekday)
2083
2084    def to_dict(self) -> dict:
2085        result: dict = {}
2086        result["period_begin"] = from_str(self.period_begin)
2087        result["period_end"] = from_str(self.period_end)
2088        result["weekday"] = from_int(self.weekday)
2089        return result
2090
2091
2092class Hours:
2093    exceptional_closings: Optional[List[ExceptionalPeriod]]
2094    exceptional_openings: Optional[List[ExceptionalPeriod]]
2095    regular_hours: Optional[List[RegularHours]]
2096    twentyfourseven: bool
2097
2098    def __init__(self, exceptional_closings: Optional[List[ExceptionalPeriod]], exceptional_openings: Optional[List[ExceptionalPeriod]], regular_hours: Optional[List[RegularHours]], twentyfourseven: bool) -> None:
2099        self.exceptional_closings = exceptional_closings
2100        self.exceptional_openings = exceptional_openings
2101        self.regular_hours = regular_hours
2102        self.twentyfourseven = twentyfourseven
2103
2104    @staticmethod
2105    def from_dict(obj: Any) -> 'Hours':
2106        assert isinstance(obj, dict)
2107        exceptional_closings = from_union([from_none, lambda x: from_list(ExceptionalPeriod.from_dict, x)], obj.get("exceptional_closings"))
2108        exceptional_openings = from_union([from_none, lambda x: from_list(ExceptionalPeriod.from_dict, x)], obj.get("exceptional_openings"))
2109        regular_hours = from_union([from_none, lambda x: from_list(RegularHours.from_dict, x)], obj.get("regular_hours"))
2110        twentyfourseven = from_bool(obj.get("twentyfourseven"))
2111        return Hours(exceptional_closings, exceptional_openings, regular_hours, twentyfourseven)
2112
2113    def to_dict(self) -> dict:
2114        result: dict = {}
2115        if self.exceptional_closings is not None:
2116            result["exceptional_closings"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ExceptionalPeriod, x), x)], self.exceptional_closings)
2117        if self.exceptional_openings is not None:
2118            result["exceptional_openings"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ExceptionalPeriod, x), x)], self.exceptional_openings)
2119        if self.regular_hours is not None:
2120            result["regular_hours"] = from_union([from_none, lambda x: from_list(lambda x: to_class(RegularHours, x), x)], self.regular_hours)
2121        result["twentyfourseven"] = from_bool(self.twentyfourseven)
2122        return result
2123
2124
2125class ParkingDirection(Enum):
2126    ANGLE = "ANGLE"
2127    PARALLEL = "PARALLEL"
2128    PERPENDICULAR = "PERPENDICULAR"
2129
2130
2131class VehicleType(Enum):
2132    BUS = "BUS"
2133    DISABLED = "DISABLED"
2134    MOTORCYCLE = "MOTORCYCLE"
2135    PERSONAL_VEHICLE = "PERSONAL_VEHICLE"
2136    PERSONAL_VEHICLE_WITH_TRAILER = "PERSONAL_VEHICLE_WITH_TRAILER"
2137    RIGID = "RIGID"
2138    SEMI_TRACTOR = "SEMI_TRACTOR"
2139    TRUCK_WITH_TRAILER = "TRUCK_WITH_TRAILER"
2140    VAN = "VAN"
2141
2142
2143class Parking:
2144    apds_reference: Optional[str]
2145    dangerous_goods_allowed: Optional[bool]
2146    direction: Optional[ParkingDirection]
2147    drive_through: Optional[bool]
2148    id: str
2149    images: Optional[List[Image]]
2150    lighting: Optional[bool]
2151    max_vehicle_height: Optional[float]
2152    max_vehicle_length: Optional[float]
2153    max_vehicle_weight: Optional[float]
2154    max_vehicle_width: Optional[float]
2155    parking_space_length: Optional[float]
2156    parking_space_width: Optional[float]
2157    physical_reference: Optional[str]
2158    refrigeration_outlet: Optional[bool]
2159    reservation_required: bool
2160    restricted_to_type: bool
2161    roofed: Optional[bool]
2162    standards: Optional[List[str]]
2163    time_limit: Optional[float]
2164    vehicle_types: List[VehicleType]
2165
2166    def __init__(self, apds_reference: Optional[str], dangerous_goods_allowed: Optional[bool], direction: Optional[ParkingDirection], drive_through: Optional[bool], id: str, images: Optional[List[Image]], lighting: Optional[bool], max_vehicle_height: Optional[float], max_vehicle_length: Optional[float], max_vehicle_weight: Optional[float], max_vehicle_width: Optional[float], parking_space_length: Optional[float], parking_space_width: Optional[float], physical_reference: Optional[str], refrigeration_outlet: Optional[bool], reservation_required: bool, restricted_to_type: bool, roofed: Optional[bool], standards: Optional[List[str]], time_limit: Optional[float], vehicle_types: List[VehicleType]) -> None:
2167        self.apds_reference = apds_reference
2168        self.dangerous_goods_allowed = dangerous_goods_allowed
2169        self.direction = direction
2170        self.drive_through = drive_through
2171        self.id = id
2172        self.images = images
2173        self.lighting = lighting
2174        self.max_vehicle_height = max_vehicle_height
2175        self.max_vehicle_length = max_vehicle_length
2176        self.max_vehicle_weight = max_vehicle_weight
2177        self.max_vehicle_width = max_vehicle_width
2178        self.parking_space_length = parking_space_length
2179        self.parking_space_width = parking_space_width
2180        self.physical_reference = physical_reference
2181        self.refrigeration_outlet = refrigeration_outlet
2182        self.reservation_required = reservation_required
2183        self.restricted_to_type = restricted_to_type
2184        self.roofed = roofed
2185        self.standards = standards
2186        self.time_limit = time_limit
2187        self.vehicle_types = vehicle_types
2188
2189    @staticmethod
2190    def from_dict(obj: Any) -> 'Parking':
2191        assert isinstance(obj, dict)
2192        apds_reference = from_union([from_none, from_str], obj.get("apds_reference"))
2193        dangerous_goods_allowed = from_union([from_none, from_bool], obj.get("dangerous_goods_allowed"))
2194        direction = from_union([from_none, ParkingDirection], obj.get("direction"))
2195        drive_through = from_union([from_none, from_bool], obj.get("drive_through"))
2196        id = from_str(obj.get("id"))
2197        images = from_union([from_none, lambda x: from_list(Image.from_dict, x)], obj.get("images"))
2198        lighting = from_union([from_none, from_bool], obj.get("lighting"))
2199        max_vehicle_height = from_union([from_none, from_float], obj.get("max_vehicle_height"))
2200        max_vehicle_length = from_union([from_none, from_float], obj.get("max_vehicle_length"))
2201        max_vehicle_weight = from_union([from_none, from_float], obj.get("max_vehicle_weight"))
2202        max_vehicle_width = from_union([from_none, from_float], obj.get("max_vehicle_width"))
2203        parking_space_length = from_union([from_none, from_float], obj.get("parking_space_length"))
2204        parking_space_width = from_union([from_none, from_float], obj.get("parking_space_width"))
2205        physical_reference = from_union([from_none, from_str], obj.get("physical_reference"))
2206        refrigeration_outlet = from_union([from_none, from_bool], obj.get("refrigeration_outlet"))
2207        reservation_required = from_bool(obj.get("reservation_required"))
2208        restricted_to_type = from_bool(obj.get("restricted_to_type"))
2209        roofed = from_union([from_none, from_bool], obj.get("roofed"))
2210        standards = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("standards"))
2211        time_limit = from_union([from_none, from_float], obj.get("time_limit"))
2212        vehicle_types = from_list(VehicleType, obj.get("vehicle_types"))
2213        return Parking(apds_reference, dangerous_goods_allowed, direction, drive_through, id, images, lighting, max_vehicle_height, max_vehicle_length, max_vehicle_weight, max_vehicle_width, parking_space_length, parking_space_width, physical_reference, refrigeration_outlet, reservation_required, restricted_to_type, roofed, standards, time_limit, vehicle_types)
2214
2215    def to_dict(self) -> dict:
2216        result: dict = {}
2217        if self.apds_reference is not None:
2218            result["apds_reference"] = from_union([from_none, from_str], self.apds_reference)
2219        if self.dangerous_goods_allowed is not None:
2220            result["dangerous_goods_allowed"] = from_union([from_none, from_bool], self.dangerous_goods_allowed)
2221        if self.direction is not None:
2222            result["direction"] = from_union([from_none, lambda x: to_enum(ParkingDirection, x)], self.direction)
2223        if self.drive_through is not None:
2224            result["drive_through"] = from_union([from_none, from_bool], self.drive_through)
2225        result["id"] = from_str(self.id)
2226        if self.images is not None:
2227            result["images"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Image, x), x)], self.images)
2228        if self.lighting is not None:
2229            result["lighting"] = from_union([from_none, from_bool], self.lighting)
2230        if self.max_vehicle_height is not None:
2231            result["max_vehicle_height"] = from_union([from_none, to_float], self.max_vehicle_height)
2232        if self.max_vehicle_length is not None:
2233            result["max_vehicle_length"] = from_union([from_none, to_float], self.max_vehicle_length)
2234        if self.max_vehicle_weight is not None:
2235            result["max_vehicle_weight"] = from_union([from_none, to_float], self.max_vehicle_weight)
2236        if self.max_vehicle_width is not None:
2237            result["max_vehicle_width"] = from_union([from_none, to_float], self.max_vehicle_width)
2238        if self.parking_space_length is not None:
2239            result["parking_space_length"] = from_union([from_none, to_float], self.parking_space_length)
2240        if self.parking_space_width is not None:
2241            result["parking_space_width"] = from_union([from_none, to_float], self.parking_space_width)
2242        if self.physical_reference is not None:
2243            result["physical_reference"] = from_union([from_none, from_str], self.physical_reference)
2244        if self.refrigeration_outlet is not None:
2245            result["refrigeration_outlet"] = from_union([from_none, from_bool], self.refrigeration_outlet)
2246        result["reservation_required"] = from_bool(self.reservation_required)
2247        result["restricted_to_type"] = from_bool(self.restricted_to_type)
2248        if self.roofed is not None:
2249            result["roofed"] = from_union([from_none, from_bool], self.roofed)
2250        if self.standards is not None:
2251            result["standards"] = from_union([from_none, lambda x: from_list(from_str, x)], self.standards)
2252        if self.time_limit is not None:
2253            result["time_limit"] = from_union([from_none, to_float], self.time_limit)
2254        result["vehicle_types"] = from_list(lambda x: to_enum(VehicleType, x), self.vehicle_types)
2255        return result
2256
2257
2258class ParkingType(Enum):
2259    ALONG_MOTORWAY = "ALONG_MOTORWAY"
2260    ON_DRIVEWAY = "ON_DRIVEWAY"
2261    ON_STREET = "ON_STREET"
2262    PARKING_GARAGE = "PARKING_GARAGE"
2263    PARKING_LOT = "PARKING_LOT"
2264    UNDERGROUND_GARAGE = "UNDERGROUND_GARAGE"
2265
2266
2267class PublishTokenType:
2268    group_id: Optional[str]
2269    issuer: Optional[str]
2270    type: Optional[TokenType]
2271    uid: Optional[str]
2272    visual_number: Optional[str]
2273
2274    def __init__(self, group_id: Optional[str], issuer: Optional[str], type: Optional[TokenType], uid: Optional[str], visual_number: Optional[str]) -> None:
2275        self.group_id = group_id
2276        self.issuer = issuer
2277        self.type = type
2278        self.uid = uid
2279        self.visual_number = visual_number
2280
2281    @staticmethod
2282    def from_dict(obj: Any) -> 'PublishTokenType':
2283        assert isinstance(obj, dict)
2284        group_id = from_union([from_none, from_str], obj.get("group_id"))
2285        issuer = from_union([from_none, from_str], obj.get("issuer"))
2286        type = from_union([from_none, TokenType], obj.get("type"))
2287        uid = from_union([from_none, from_str], obj.get("uid"))
2288        visual_number = from_union([from_none, from_str], obj.get("visual_number"))
2289        return PublishTokenType(group_id, issuer, type, uid, visual_number)
2290
2291    def to_dict(self) -> dict:
2292        result: dict = {}
2293        if self.group_id is not None:
2294            result["group_id"] = from_union([from_none, from_str], self.group_id)
2295        if self.issuer is not None:
2296            result["issuer"] = from_union([from_none, from_str], self.issuer)
2297        if self.type is not None:
2298            result["type"] = from_union([from_none, lambda x: to_enum(TokenType, x)], self.type)
2299        if self.uid is not None:
2300            result["uid"] = from_union([from_none, from_str], self.uid)
2301        if self.visual_number is not None:
2302            result["visual_number"] = from_union([from_none, from_str], self.visual_number)
2303        return result
2304
2305
2306class AdditionalGeoLocation:
2307    latitude: str
2308    longitude: str
2309    name: Optional[DisplayText]
2310
2311    def __init__(self, latitude: str, longitude: str, name: Optional[DisplayText]) -> None:
2312        self.latitude = latitude
2313        self.longitude = longitude
2314        self.name = name
2315
2316    @staticmethod
2317    def from_dict(obj: Any) -> 'AdditionalGeoLocation':
2318        assert isinstance(obj, dict)
2319        latitude = from_str(obj.get("latitude"))
2320        longitude = from_str(obj.get("longitude"))
2321        name = from_union([from_none, DisplayText.from_dict], obj.get("name"))
2322        return AdditionalGeoLocation(latitude, longitude, name)
2323
2324    def to_dict(self) -> dict:
2325        result: dict = {}
2326        result["latitude"] = from_str(self.latitude)
2327        result["longitude"] = from_str(self.longitude)
2328        if self.name is not None:
2329            result["name"] = from_union([from_none, lambda x: to_class(DisplayText, x)], self.name)
2330        return result
2331
2332
2333class Location:
2334    address: str
2335    charging_when_closed: Optional[bool]
2336    city: str
2337    coordinates: GeoLocation
2338    country: str
2339    country_code: str
2340    directions: Optional[List[DisplayText]]
2341    energy_mix: Optional[EnergyMix]
2342    evses: Optional[List[Evse]]
2343    facilities: Optional[List[Facility]]
2344    help_phone: Optional[str]
2345    id: str
2346    images: Optional[List[Image]]
2347    last_updated: str
2348    name: Optional[str]
2349    opening_times: Optional[Hours]
2350    operator: Optional[BusinessDetails]
2351    owner: Optional[BusinessDetails]
2352    parking_places: Optional[List[Parking]]
2353    parking_type: Optional[ParkingType]
2354    party_id: str
2355    postal_code: Optional[str]
2356    publish: bool
2357    publish_allowed_to: Optional[List[PublishTokenType]]
2358    related_locations: Optional[List[AdditionalGeoLocation]]
2359    state: Optional[str]
2360    suboperator: Optional[BusinessDetails]
2361    time_zone: str
2362
2363    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]], help_phone: Optional[str], id: str, images: Optional[List[Image]], last_updated: str, name: Optional[str], opening_times: Optional[Hours], operator: Optional[BusinessDetails], owner: Optional[BusinessDetails], parking_places: Optional[List[Parking]], 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:
2364        self.address = address
2365        self.charging_when_closed = charging_when_closed
2366        self.city = city
2367        self.coordinates = coordinates
2368        self.country = country
2369        self.country_code = country_code
2370        self.directions = directions
2371        self.energy_mix = energy_mix
2372        self.evses = evses
2373        self.facilities = facilities
2374        self.help_phone = help_phone
2375        self.id = id
2376        self.images = images
2377        self.last_updated = last_updated
2378        self.name = name
2379        self.opening_times = opening_times
2380        self.operator = operator
2381        self.owner = owner
2382        self.parking_places = parking_places
2383        self.parking_type = parking_type
2384        self.party_id = party_id
2385        self.postal_code = postal_code
2386        self.publish = publish
2387        self.publish_allowed_to = publish_allowed_to
2388        self.related_locations = related_locations
2389        self.state = state
2390        self.suboperator = suboperator
2391        self.time_zone = time_zone
2392
2393    @staticmethod
2394    def from_dict(obj: Any) -> 'Location':
2395        assert isinstance(obj, dict)
2396        address = from_str(obj.get("address"))
2397        charging_when_closed = from_union([from_none, from_bool], obj.get("charging_when_closed"))
2398        city = from_str(obj.get("city"))
2399        coordinates = GeoLocation.from_dict(obj.get("coordinates"))
2400        country = from_str(obj.get("country"))
2401        country_code = from_str(obj.get("country_code"))
2402        directions = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("directions"))
2403        energy_mix = from_union([from_none, EnergyMix.from_dict], obj.get("energy_mix"))
2404        evses = from_union([from_none, lambda x: from_list(Evse.from_dict, x)], obj.get("evses"))
2405        facilities = from_union([from_none, lambda x: from_list(Facility, x)], obj.get("facilities"))
2406        help_phone = from_union([from_none, from_str], obj.get("help_phone"))
2407        id = from_str(obj.get("id"))
2408        images = from_union([from_none, lambda x: from_list(Image.from_dict, x)], obj.get("images"))
2409        last_updated = from_str(obj.get("last_updated"))
2410        name = from_union([from_none, from_str], obj.get("name"))
2411        opening_times = from_union([from_none, Hours.from_dict], obj.get("opening_times"))
2412        operator = from_union([from_none, BusinessDetails.from_dict], obj.get("operator"))
2413        owner = from_union([from_none, BusinessDetails.from_dict], obj.get("owner"))
2414        parking_places = from_union([from_none, lambda x: from_list(Parking.from_dict, x)], obj.get("parking_places"))
2415        parking_type = from_union([from_none, ParkingType], obj.get("parking_type"))
2416        party_id = from_str(obj.get("party_id"))
2417        postal_code = from_union([from_none, from_str], obj.get("postal_code"))
2418        publish = from_bool(obj.get("publish"))
2419        publish_allowed_to = from_union([from_none, lambda x: from_list(PublishTokenType.from_dict, x)], obj.get("publish_allowed_to"))
2420        related_locations = from_union([from_none, lambda x: from_list(AdditionalGeoLocation.from_dict, x)], obj.get("related_locations"))
2421        state = from_union([from_none, from_str], obj.get("state"))
2422        suboperator = from_union([from_none, BusinessDetails.from_dict], obj.get("suboperator"))
2423        time_zone = from_str(obj.get("time_zone"))
2424        return Location(address, charging_when_closed, city, coordinates, country, country_code, directions, energy_mix, evses, facilities, help_phone, id, images, last_updated, name, opening_times, operator, owner, parking_places, parking_type, party_id, postal_code, publish, publish_allowed_to, related_locations, state, suboperator, time_zone)
2425
2426    def to_dict(self) -> dict:
2427        result: dict = {}
2428        result["address"] = from_str(self.address)
2429        if self.charging_when_closed is not None:
2430            result["charging_when_closed"] = from_union([from_none, from_bool], self.charging_when_closed)
2431        result["city"] = from_str(self.city)
2432        result["coordinates"] = to_class(GeoLocation, self.coordinates)
2433        result["country"] = from_str(self.country)
2434        result["country_code"] = from_str(self.country_code)
2435        if self.directions is not None:
2436            result["directions"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.directions)
2437        if self.energy_mix is not None:
2438            result["energy_mix"] = from_union([from_none, lambda x: to_class(EnergyMix, x)], self.energy_mix)
2439        if self.evses is not None:
2440            result["evses"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Evse, x), x)], self.evses)
2441        if self.facilities is not None:
2442            result["facilities"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(Facility, x), x)], self.facilities)
2443        if self.help_phone is not None:
2444            result["help_phone"] = from_union([from_none, from_str], self.help_phone)
2445        result["id"] = from_str(self.id)
2446        if self.images is not None:
2447            result["images"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Image, x), x)], self.images)
2448        result["last_updated"] = from_str(self.last_updated)
2449        if self.name is not None:
2450            result["name"] = from_union([from_none, from_str], self.name)
2451        if self.opening_times is not None:
2452            result["opening_times"] = from_union([from_none, lambda x: to_class(Hours, x)], self.opening_times)
2453        if self.operator is not None:
2454            result["operator"] = from_union([from_none, lambda x: to_class(BusinessDetails, x)], self.operator)
2455        if self.owner is not None:
2456            result["owner"] = from_union([from_none, lambda x: to_class(BusinessDetails, x)], self.owner)
2457        if self.parking_places is not None:
2458            result["parking_places"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Parking, x), x)], self.parking_places)
2459        if self.parking_type is not None:
2460            result["parking_type"] = from_union([from_none, lambda x: to_enum(ParkingType, x)], self.parking_type)
2461        result["party_id"] = from_str(self.party_id)
2462        if self.postal_code is not None:
2463            result["postal_code"] = from_union([from_none, from_str], self.postal_code)
2464        result["publish"] = from_bool(self.publish)
2465        if self.publish_allowed_to is not None:
2466            result["publish_allowed_to"] = from_union([from_none, lambda x: from_list(lambda x: to_class(PublishTokenType, x), x)], self.publish_allowed_to)
2467        if self.related_locations is not None:
2468            result["related_locations"] = from_union([from_none, lambda x: from_list(lambda x: to_class(AdditionalGeoLocation, x), x)], self.related_locations)
2469        if self.state is not None:
2470            result["state"] = from_union([from_none, from_str], self.state)
2471        if self.suboperator is not None:
2472            result["suboperator"] = from_union([from_none, lambda x: to_class(BusinessDetails, x)], self.suboperator)
2473        result["time_zone"] = from_str(self.time_zone)
2474        return result
2475
2476
2477class ReserveNow:
2478    authorization_reference: Optional[str]
2479    evse_uid: Optional[str]
2480    expiry_date: str
2481    location_id: str
2482    reservation_id: str
2483    response_url: str
2484    token: Token
2485
2486    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:
2487        self.authorization_reference = authorization_reference
2488        self.evse_uid = evse_uid
2489        self.expiry_date = expiry_date
2490        self.location_id = location_id
2491        self.reservation_id = reservation_id
2492        self.response_url = response_url
2493        self.token = token
2494
2495    @staticmethod
2496    def from_dict(obj: Any) -> 'ReserveNow':
2497        assert isinstance(obj, dict)
2498        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
2499        evse_uid = from_union([from_none, from_str], obj.get("evse_uid"))
2500        expiry_date = from_str(obj.get("expiry_date"))
2501        location_id = from_str(obj.get("location_id"))
2502        reservation_id = from_str(obj.get("reservation_id"))
2503        response_url = from_str(obj.get("response_url"))
2504        token = Token.from_dict(obj.get("token"))
2505        return ReserveNow(authorization_reference, evse_uid, expiry_date, location_id, reservation_id, response_url, token)
2506
2507    def to_dict(self) -> dict:
2508        result: dict = {}
2509        if self.authorization_reference is not None:
2510            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
2511        if self.evse_uid is not None:
2512            result["evse_uid"] = from_union([from_none, from_str], self.evse_uid)
2513        result["expiry_date"] = from_str(self.expiry_date)
2514        result["location_id"] = from_str(self.location_id)
2515        result["reservation_id"] = from_str(self.reservation_id)
2516        result["response_url"] = from_str(self.response_url)
2517        result["token"] = to_class(Token, self.token)
2518        return result
2519
2520
2521class SessionStatus(Enum):
2522    ACTIVE = "ACTIVE"
2523    COMPLETED = "COMPLETED"
2524    INVALID = "INVALID"
2525    PENDING = "PENDING"
2526    RESERVATION = "RESERVATION"
2527
2528
2529class Session:
2530    auth_method: AuthMethod
2531    authorization_reference: Optional[str]
2532    cdr_token: CdrToken
2533    charging_periods: Optional[List[ChargingPeriod]]
2534    connector_id: str
2535    country_code: str
2536    currency: str
2537    end_date_time: Optional[str]
2538    evse_uid: str
2539    id: str
2540    kwh: float
2541    last_updated: str
2542    location_id: str
2543    meter_id: Optional[str]
2544    party_id: str
2545    start_date_time: str
2546    status: SessionStatus
2547    total_cost: Optional[Price]
2548
2549    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:
2550        self.auth_method = auth_method
2551        self.authorization_reference = authorization_reference
2552        self.cdr_token = cdr_token
2553        self.charging_periods = charging_periods
2554        self.connector_id = connector_id
2555        self.country_code = country_code
2556        self.currency = currency
2557        self.end_date_time = end_date_time
2558        self.evse_uid = evse_uid
2559        self.id = id
2560        self.kwh = kwh
2561        self.last_updated = last_updated
2562        self.location_id = location_id
2563        self.meter_id = meter_id
2564        self.party_id = party_id
2565        self.start_date_time = start_date_time
2566        self.status = status
2567        self.total_cost = total_cost
2568
2569    @staticmethod
2570    def from_dict(obj: Any) -> 'Session':
2571        assert isinstance(obj, dict)
2572        auth_method = AuthMethod(obj.get("auth_method"))
2573        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
2574        cdr_token = CdrToken.from_dict(obj.get("cdr_token"))
2575        charging_periods = from_union([from_none, lambda x: from_list(ChargingPeriod.from_dict, x)], obj.get("charging_periods"))
2576        connector_id = from_str(obj.get("connector_id"))
2577        country_code = from_str(obj.get("country_code"))
2578        currency = from_str(obj.get("currency"))
2579        end_date_time = from_union([from_none, from_str], obj.get("end_date_time"))
2580        evse_uid = from_str(obj.get("evse_uid"))
2581        id = from_str(obj.get("id"))
2582        kwh = from_float(obj.get("kwh"))
2583        last_updated = from_str(obj.get("last_updated"))
2584        location_id = from_str(obj.get("location_id"))
2585        meter_id = from_union([from_none, from_str], obj.get("meter_id"))
2586        party_id = from_str(obj.get("party_id"))
2587        start_date_time = from_str(obj.get("start_date_time"))
2588        status = SessionStatus(obj.get("status"))
2589        total_cost = from_union([from_none, Price.from_dict], obj.get("total_cost"))
2590        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)
2591
2592    def to_dict(self) -> dict:
2593        result: dict = {}
2594        result["auth_method"] = to_enum(AuthMethod, self.auth_method)
2595        if self.authorization_reference is not None:
2596            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
2597        result["cdr_token"] = to_class(CdrToken, self.cdr_token)
2598        if self.charging_periods is not None:
2599            result["charging_periods"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ChargingPeriod, x), x)], self.charging_periods)
2600        result["connector_id"] = from_str(self.connector_id)
2601        result["country_code"] = from_str(self.country_code)
2602        result["currency"] = from_str(self.currency)
2603        if self.end_date_time is not None:
2604            result["end_date_time"] = from_union([from_none, from_str], self.end_date_time)
2605        result["evse_uid"] = from_str(self.evse_uid)
2606        result["id"] = from_str(self.id)
2607        result["kwh"] = to_float(self.kwh)
2608        result["last_updated"] = from_str(self.last_updated)
2609        result["location_id"] = from_str(self.location_id)
2610        if self.meter_id is not None:
2611            result["meter_id"] = from_union([from_none, from_str], self.meter_id)
2612        result["party_id"] = from_str(self.party_id)
2613        result["start_date_time"] = from_str(self.start_date_time)
2614        result["status"] = to_enum(SessionStatus, self.status)
2615        if self.total_cost is not None:
2616            result["total_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_cost)
2617        return result
2618
2619
2620class SetChargingProfile:
2621    charging_profile: ChargingProfile
2622    response_url: str
2623
2624    def __init__(self, charging_profile: ChargingProfile, response_url: str) -> None:
2625        self.charging_profile = charging_profile
2626        self.response_url = response_url
2627
2628    @staticmethod
2629    def from_dict(obj: Any) -> 'SetChargingProfile':
2630        assert isinstance(obj, dict)
2631        charging_profile = ChargingProfile.from_dict(obj.get("charging_profile"))
2632        response_url = from_str(obj.get("response_url"))
2633        return SetChargingProfile(charging_profile, response_url)
2634
2635    def to_dict(self) -> dict:
2636        result: dict = {}
2637        result["charging_profile"] = to_class(ChargingProfile, self.charging_profile)
2638        result["response_url"] = from_str(self.response_url)
2639        return result
2640
2641
2642class StartSession:
2643    authorization_reference: Optional[str]
2644    connector_id: Optional[str]
2645    evse_uid: Optional[str]
2646    location_id: str
2647    response_url: str
2648    token: Token
2649
2650    def __init__(self, authorization_reference: Optional[str], connector_id: Optional[str], evse_uid: Optional[str], location_id: str, response_url: str, token: Token) -> None:
2651        self.authorization_reference = authorization_reference
2652        self.connector_id = connector_id
2653        self.evse_uid = evse_uid
2654        self.location_id = location_id
2655        self.response_url = response_url
2656        self.token = token
2657
2658    @staticmethod
2659    def from_dict(obj: Any) -> 'StartSession':
2660        assert isinstance(obj, dict)
2661        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
2662        connector_id = from_union([from_none, from_str], obj.get("connector_id"))
2663        evse_uid = from_union([from_none, from_str], obj.get("evse_uid"))
2664        location_id = from_str(obj.get("location_id"))
2665        response_url = from_str(obj.get("response_url"))
2666        token = Token.from_dict(obj.get("token"))
2667        return StartSession(authorization_reference, connector_id, evse_uid, location_id, response_url, token)
2668
2669    def to_dict(self) -> dict:
2670        result: dict = {}
2671        if self.authorization_reference is not None:
2672            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
2673        if self.connector_id is not None:
2674            result["connector_id"] = from_union([from_none, from_str], self.connector_id)
2675        if self.evse_uid is not None:
2676            result["evse_uid"] = from_union([from_none, from_str], self.evse_uid)
2677        result["location_id"] = from_str(self.location_id)
2678        result["response_url"] = from_str(self.response_url)
2679        result["token"] = to_class(Token, self.token)
2680        return result
2681
2682
2683class StopSession:
2684    response_url: str
2685    session_id: str
2686
2687    def __init__(self, response_url: str, session_id: str) -> None:
2688        self.response_url = response_url
2689        self.session_id = session_id
2690
2691    @staticmethod
2692    def from_dict(obj: Any) -> 'StopSession':
2693        assert isinstance(obj, dict)
2694        response_url = from_str(obj.get("response_url"))
2695        session_id = from_str(obj.get("session_id"))
2696        return StopSession(response_url, session_id)
2697
2698    def to_dict(self) -> dict:
2699        result: dict = {}
2700        result["response_url"] = from_str(self.response_url)
2701        result["session_id"] = from_str(self.session_id)
2702        return result
2703
2704
2705class InvoiceCreator(Enum):
2706    CPO = "CPO"
2707    PTP = "PTP"
2708
2709
2710class Terminal:
2711    address: Optional[str]
2712    city: Optional[str]
2713    coordinates: Optional[GeoLocation]
2714    country: Optional[str]
2715    country_code: Optional[str]
2716    customer_reference: Optional[str]
2717    evse_uids: Optional[List[str]]
2718    invoice_base_url: Optional[str]
2719    invoice_creator: Optional[InvoiceCreator]
2720    last_updated: str
2721    location_ids: Optional[List[str]]
2722    party_id: Optional[str]
2723    postal_code: Optional[str]
2724    reference: Optional[str]
2725    state: Optional[str]
2726    terminal_id: str
2727
2728    def __init__(self, address: Optional[str], city: Optional[str], coordinates: Optional[GeoLocation], country: Optional[str], country_code: Optional[str], customer_reference: Optional[str], evse_uids: Optional[List[str]], invoice_base_url: Optional[str], invoice_creator: Optional[InvoiceCreator], last_updated: str, location_ids: Optional[List[str]], party_id: Optional[str], postal_code: Optional[str], reference: Optional[str], state: Optional[str], terminal_id: str) -> None:
2729        self.address = address
2730        self.city = city
2731        self.coordinates = coordinates
2732        self.country = country
2733        self.country_code = country_code
2734        self.customer_reference = customer_reference
2735        self.evse_uids = evse_uids
2736        self.invoice_base_url = invoice_base_url
2737        self.invoice_creator = invoice_creator
2738        self.last_updated = last_updated
2739        self.location_ids = location_ids
2740        self.party_id = party_id
2741        self.postal_code = postal_code
2742        self.reference = reference
2743        self.state = state
2744        self.terminal_id = terminal_id
2745
2746    @staticmethod
2747    def from_dict(obj: Any) -> 'Terminal':
2748        assert isinstance(obj, dict)
2749        address = from_union([from_none, from_str], obj.get("address"))
2750        city = from_union([from_none, from_str], obj.get("city"))
2751        coordinates = from_union([from_none, GeoLocation.from_dict], obj.get("coordinates"))
2752        country = from_union([from_none, from_str], obj.get("country"))
2753        country_code = from_union([from_none, from_str], obj.get("country_code"))
2754        customer_reference = from_union([from_none, from_str], obj.get("customer_reference"))
2755        evse_uids = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("evse_uids"))
2756        invoice_base_url = from_union([from_none, from_str], obj.get("invoice_base_url"))
2757        invoice_creator = from_union([from_none, InvoiceCreator], obj.get("invoice_creator"))
2758        last_updated = from_str(obj.get("last_updated"))
2759        location_ids = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("location_ids"))
2760        party_id = from_union([from_none, from_str], obj.get("party_id"))
2761        postal_code = from_union([from_none, from_str], obj.get("postal_code"))
2762        reference = from_union([from_none, from_str], obj.get("reference"))
2763        state = from_union([from_none, from_str], obj.get("state"))
2764        terminal_id = from_str(obj.get("terminal_id"))
2765        return Terminal(address, city, coordinates, country, country_code, customer_reference, evse_uids, invoice_base_url, invoice_creator, last_updated, location_ids, party_id, postal_code, reference, state, terminal_id)
2766
2767    def to_dict(self) -> dict:
2768        result: dict = {}
2769        if self.address is not None:
2770            result["address"] = from_union([from_none, from_str], self.address)
2771        if self.city is not None:
2772            result["city"] = from_union([from_none, from_str], self.city)
2773        if self.coordinates is not None:
2774            result["coordinates"] = from_union([from_none, lambda x: to_class(GeoLocation, x)], self.coordinates)
2775        if self.country is not None:
2776            result["country"] = from_union([from_none, from_str], self.country)
2777        if self.country_code is not None:
2778            result["country_code"] = from_union([from_none, from_str], self.country_code)
2779        if self.customer_reference is not None:
2780            result["customer_reference"] = from_union([from_none, from_str], self.customer_reference)
2781        if self.evse_uids is not None:
2782            result["evse_uids"] = from_union([from_none, lambda x: from_list(from_str, x)], self.evse_uids)
2783        if self.invoice_base_url is not None:
2784            result["invoice_base_url"] = from_union([from_none, from_str], self.invoice_base_url)
2785        if self.invoice_creator is not None:
2786            result["invoice_creator"] = from_union([from_none, lambda x: to_enum(InvoiceCreator, x)], self.invoice_creator)
2787        result["last_updated"] = from_str(self.last_updated)
2788        if self.location_ids is not None:
2789            result["location_ids"] = from_union([from_none, lambda x: from_list(from_str, x)], self.location_ids)
2790        if self.party_id is not None:
2791            result["party_id"] = from_union([from_none, from_str], self.party_id)
2792        if self.postal_code is not None:
2793            result["postal_code"] = from_union([from_none, from_str], self.postal_code)
2794        if self.reference is not None:
2795            result["reference"] = from_union([from_none, from_str], self.reference)
2796        if self.state is not None:
2797            result["state"] = from_union([from_none, from_str], self.state)
2798        result["terminal_id"] = from_str(self.terminal_id)
2799        return result
2800
2801
2802class UnlockConnector:
2803    connector_id: str
2804    evse_uid: str
2805    location_id: str
2806    response_url: str
2807
2808    def __init__(self, connector_id: str, evse_uid: str, location_id: str, response_url: str) -> None:
2809        self.connector_id = connector_id
2810        self.evse_uid = evse_uid
2811        self.location_id = location_id
2812        self.response_url = response_url
2813
2814    @staticmethod
2815    def from_dict(obj: Any) -> 'UnlockConnector':
2816        assert isinstance(obj, dict)
2817        connector_id = from_str(obj.get("connector_id"))
2818        evse_uid = from_str(obj.get("evse_uid"))
2819        location_id = from_str(obj.get("location_id"))
2820        response_url = from_str(obj.get("response_url"))
2821        return UnlockConnector(connector_id, evse_uid, location_id, response_url)
2822
2823    def to_dict(self) -> dict:
2824        result: dict = {}
2825        result["connector_id"] = from_str(self.connector_id)
2826        result["evse_uid"] = from_str(self.evse_uid)
2827        result["location_id"] = from_str(self.location_id)
2828        result["response_url"] = from_str(self.response_url)
2829        return result
2830
2831
2832class VersionNumber(Enum):
2833    THE_20 = "2.0"
2834    THE_21 = "2.1"
2835    THE_211 = "2.1.1"
2836    THE_22 = "2.2"
2837    THE_221 = "2.2.1"
2838    THE_230 = "2.3.0"
2839
2840
2841class Version:
2842    url: str
2843    version: VersionNumber
2844
2845    def __init__(self, url: str, version: VersionNumber) -> None:
2846        self.url = url
2847        self.version = version
2848
2849    @staticmethod
2850    def from_dict(obj: Any) -> 'Version':
2851        assert isinstance(obj, dict)
2852        url = from_str(obj.get("url"))
2853        version = VersionNumber(obj.get("version"))
2854        return Version(url, version)
2855
2856    def to_dict(self) -> dict:
2857        result: dict = {}
2858        result["url"] = from_str(self.url)
2859        result["version"] = to_enum(VersionNumber, self.version)
2860        return result
2861
2862
2863class VersionDetails:
2864    endpoints: List[Endpoint]
2865    version: VersionNumber
2866
2867    def __init__(self, endpoints: List[Endpoint], version: VersionNumber) -> None:
2868        self.endpoints = endpoints
2869        self.version = version
2870
2871    @staticmethod
2872    def from_dict(obj: Any) -> 'VersionDetails':
2873        assert isinstance(obj, dict)
2874        endpoints = from_list(Endpoint.from_dict, obj.get("endpoints"))
2875        version = VersionNumber(obj.get("version"))
2876        return VersionDetails(endpoints, version)
2877
2878    def to_dict(self) -> dict:
2879        result: dict = {}
2880        result["endpoints"] = from_list(lambda x: to_class(Endpoint, x), self.endpoints)
2881        result["version"] = to_enum(VersionNumber, self.version)
2882        return result
2883
2884
2885class V230Payments:
2886    active_charging_profile: Optional[ActiveChargingProfile]
2887    active_charging_profile_result: Optional[ActiveChargingProfileResult]
2888    authorization_info: Optional[AuthorizationInfo]
2889    cancel_reservation: Optional[CancelReservation]
2890    cdr: Optional[Cdr]
2891    charging_preferences: Optional[ChargingPreferences]
2892    charging_profile: Optional[ChargingProfile]
2893    charging_profile_response: Optional[ChargingProfileResponse]
2894    charging_profile_result: Optional[ChargingProfileResult]
2895    clear_profile_result: Optional[ClearProfileResult]
2896    command_response: Optional[CommandResponse]
2897    command_result: Optional[CommandResult]
2898    connector: Optional[Connector]
2899    credentials: Optional[Credentials]
2900    endpoint: Optional[Endpoint]
2901    evse: Optional[Evse]
2902    financial_advice_confirmation: Optional[FinancialAdviceConfirmation]
2903    hub_client_info: Optional[HubClientInfo]
2904    location: Optional[Location]
2905    location_references: Optional[LocationReferences]
2906    reserve_now: Optional[ReserveNow]
2907    session: Optional[Session]
2908    set_charging_profile: Optional[SetChargingProfile]
2909    start_session: Optional[StartSession]
2910    stop_session: Optional[StopSession]
2911    tariff: Optional[Tariff]
2912    terminal: Optional[Terminal]
2913    token: Optional[Token]
2914    unlock_connector: Optional[UnlockConnector]
2915    version: Optional[Version]
2916    version_details: Optional[VersionDetails]
2917
2918    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], financial_advice_confirmation: Optional[FinancialAdviceConfirmation], 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], terminal: Optional[Terminal], token: Optional[Token], unlock_connector: Optional[UnlockConnector], version: Optional[Version], version_details: Optional[VersionDetails]) -> None:
2919        self.active_charging_profile = active_charging_profile
2920        self.active_charging_profile_result = active_charging_profile_result
2921        self.authorization_info = authorization_info
2922        self.cancel_reservation = cancel_reservation
2923        self.cdr = cdr
2924        self.charging_preferences = charging_preferences
2925        self.charging_profile = charging_profile
2926        self.charging_profile_response = charging_profile_response
2927        self.charging_profile_result = charging_profile_result
2928        self.clear_profile_result = clear_profile_result
2929        self.command_response = command_response
2930        self.command_result = command_result
2931        self.connector = connector
2932        self.credentials = credentials
2933        self.endpoint = endpoint
2934        self.evse = evse
2935        self.financial_advice_confirmation = financial_advice_confirmation
2936        self.hub_client_info = hub_client_info
2937        self.location = location
2938        self.location_references = location_references
2939        self.reserve_now = reserve_now
2940        self.session = session
2941        self.set_charging_profile = set_charging_profile
2942        self.start_session = start_session
2943        self.stop_session = stop_session
2944        self.tariff = tariff
2945        self.terminal = terminal
2946        self.token = token
2947        self.unlock_connector = unlock_connector
2948        self.version = version
2949        self.version_details = version_details
2950
2951    @staticmethod
2952    def from_dict(obj: Any) -> 'V230Payments':
2953        assert isinstance(obj, dict)
2954        active_charging_profile = from_union([ActiveChargingProfile.from_dict, from_none], obj.get("active_charging_profile"))
2955        active_charging_profile_result = from_union([ActiveChargingProfileResult.from_dict, from_none], obj.get("active_charging_profile_result"))
2956        authorization_info = from_union([AuthorizationInfo.from_dict, from_none], obj.get("authorization_info"))
2957        cancel_reservation = from_union([CancelReservation.from_dict, from_none], obj.get("cancel_reservation"))
2958        cdr = from_union([Cdr.from_dict, from_none], obj.get("cdr"))
2959        charging_preferences = from_union([ChargingPreferences.from_dict, from_none], obj.get("charging_preferences"))
2960        charging_profile = from_union([ChargingProfile.from_dict, from_none], obj.get("charging_profile"))
2961        charging_profile_response = from_union([ChargingProfileResponse.from_dict, from_none], obj.get("charging_profile_response"))
2962        charging_profile_result = from_union([ChargingProfileResult.from_dict, from_none], obj.get("charging_profile_result"))
2963        clear_profile_result = from_union([ClearProfileResult.from_dict, from_none], obj.get("clear_profile_result"))
2964        command_response = from_union([CommandResponse.from_dict, from_none], obj.get("command_response"))
2965        command_result = from_union([CommandResult.from_dict, from_none], obj.get("command_result"))
2966        connector = from_union([Connector.from_dict, from_none], obj.get("connector"))
2967        credentials = from_union([Credentials.from_dict, from_none], obj.get("credentials"))
2968        endpoint = from_union([Endpoint.from_dict, from_none], obj.get("endpoint"))
2969        evse = from_union([Evse.from_dict, from_none], obj.get("evse"))
2970        financial_advice_confirmation = from_union([FinancialAdviceConfirmation.from_dict, from_none], obj.get("financial_advice_confirmation"))
2971        hub_client_info = from_union([HubClientInfo.from_dict, from_none], obj.get("hub_client_info"))
2972        location = from_union([Location.from_dict, from_none], obj.get("location"))
2973        location_references = from_union([from_none, LocationReferences.from_dict], obj.get("location_references"))
2974        reserve_now = from_union([ReserveNow.from_dict, from_none], obj.get("reserve_now"))
2975        session = from_union([Session.from_dict, from_none], obj.get("session"))
2976        set_charging_profile = from_union([SetChargingProfile.from_dict, from_none], obj.get("set_charging_profile"))
2977        start_session = from_union([StartSession.from_dict, from_none], obj.get("start_session"))
2978        stop_session = from_union([StopSession.from_dict, from_none], obj.get("stop_session"))
2979        tariff = from_union([Tariff.from_dict, from_none], obj.get("tariff"))
2980        terminal = from_union([Terminal.from_dict, from_none], obj.get("terminal"))
2981        token = from_union([Token.from_dict, from_none], obj.get("token"))
2982        unlock_connector = from_union([UnlockConnector.from_dict, from_none], obj.get("unlock_connector"))
2983        version = from_union([Version.from_dict, from_none], obj.get("version"))
2984        version_details = from_union([VersionDetails.from_dict, from_none], obj.get("version_details"))
2985        return V230Payments(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, financial_advice_confirmation, hub_client_info, location, location_references, reserve_now, session, set_charging_profile, start_session, stop_session, tariff, terminal, token, unlock_connector, version, version_details)
2986
2987    def to_dict(self) -> dict:
2988        result: dict = {}
2989        if self.active_charging_profile is not None:
2990            result["active_charging_profile"] = from_union([lambda x: to_class(ActiveChargingProfile, x), from_none], self.active_charging_profile)
2991        if self.active_charging_profile_result is not None:
2992            result["active_charging_profile_result"] = from_union([lambda x: to_class(ActiveChargingProfileResult, x), from_none], self.active_charging_profile_result)
2993        if self.authorization_info is not None:
2994            result["authorization_info"] = from_union([lambda x: to_class(AuthorizationInfo, x), from_none], self.authorization_info)
2995        if self.cancel_reservation is not None:
2996            result["cancel_reservation"] = from_union([lambda x: to_class(CancelReservation, x), from_none], self.cancel_reservation)
2997        if self.cdr is not None:
2998            result["cdr"] = from_union([lambda x: to_class(Cdr, x), from_none], self.cdr)
2999        if self.charging_preferences is not None:
3000            result["charging_preferences"] = from_union([lambda x: to_class(ChargingPreferences, x), from_none], self.charging_preferences)
3001        if self.charging_profile is not None:
3002            result["charging_profile"] = from_union([lambda x: to_class(ChargingProfile, x), from_none], self.charging_profile)
3003        if self.charging_profile_response is not None:
3004            result["charging_profile_response"] = from_union([lambda x: to_class(ChargingProfileResponse, x), from_none], self.charging_profile_response)
3005        if self.charging_profile_result is not None:
3006            result["charging_profile_result"] = from_union([lambda x: to_class(ChargingProfileResult, x), from_none], self.charging_profile_result)
3007        if self.clear_profile_result is not None:
3008            result["clear_profile_result"] = from_union([lambda x: to_class(ClearProfileResult, x), from_none], self.clear_profile_result)
3009        if self.command_response is not None:
3010            result["command_response"] = from_union([lambda x: to_class(CommandResponse, x), from_none], self.command_response)
3011        if self.command_result is not None:
3012            result["command_result"] = from_union([lambda x: to_class(CommandResult, x), from_none], self.command_result)
3013        if self.connector is not None:
3014            result["connector"] = from_union([lambda x: to_class(Connector, x), from_none], self.connector)
3015        if self.credentials is not None:
3016            result["credentials"] = from_union([lambda x: to_class(Credentials, x), from_none], self.credentials)
3017        if self.endpoint is not None:
3018            result["endpoint"] = from_union([lambda x: to_class(Endpoint, x), from_none], self.endpoint)
3019        if self.evse is not None:
3020            result["evse"] = from_union([lambda x: to_class(Evse, x), from_none], self.evse)
3021        if self.financial_advice_confirmation is not None:
3022            result["financial_advice_confirmation"] = from_union([lambda x: to_class(FinancialAdviceConfirmation, x), from_none], self.financial_advice_confirmation)
3023        if self.hub_client_info is not None:
3024            result["hub_client_info"] = from_union([lambda x: to_class(HubClientInfo, x), from_none], self.hub_client_info)
3025        if self.location is not None:
3026            result["location"] = from_union([lambda x: to_class(Location, x), from_none], self.location)
3027        if self.location_references is not None:
3028            result["location_references"] = from_union([from_none, lambda x: to_class(LocationReferences, x)], self.location_references)
3029        if self.reserve_now is not None:
3030            result["reserve_now"] = from_union([lambda x: to_class(ReserveNow, x), from_none], self.reserve_now)
3031        if self.session is not None:
3032            result["session"] = from_union([lambda x: to_class(Session, x), from_none], self.session)
3033        if self.set_charging_profile is not None:
3034            result["set_charging_profile"] = from_union([lambda x: to_class(SetChargingProfile, x), from_none], self.set_charging_profile)
3035        if self.start_session is not None:
3036            result["start_session"] = from_union([lambda x: to_class(StartSession, x), from_none], self.start_session)
3037        if self.stop_session is not None:
3038            result["stop_session"] = from_union([lambda x: to_class(StopSession, x), from_none], self.stop_session)
3039        if self.tariff is not None:
3040            result["tariff"] = from_union([lambda x: to_class(Tariff, x), from_none], self.tariff)
3041        if self.terminal is not None:
3042            result["terminal"] = from_union([lambda x: to_class(Terminal, x), from_none], self.terminal)
3043        if self.token is not None:
3044            result["token"] = from_union([lambda x: to_class(Token, x), from_none], self.token)
3045        if self.unlock_connector is not None:
3046            result["unlock_connector"] = from_union([lambda x: to_class(UnlockConnector, x), from_none], self.unlock_connector)
3047        if self.version is not None:
3048            result["version"] = from_union([lambda x: to_class(Version, x), from_none], self.version)
3049        if self.version_details is not None:
3050            result["version_details"] = from_union([lambda x: to_class(VersionDetails, x), from_none], self.version_details)
3051        return result
3052
3053
3054def v230_payments_from_dict(s: Any) -> V230Payments:
3055    return V230Payments.from_dict(s)
3056
3057
3058def v230_payments_to_dict(x: V230Payments) -> Any:
3059    return to_class(V230Payments, 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    EMAID = "EMAID"
267    OTHER = "OTHER"
268    RFID = "RFID"
AD_HOC_USER = <TokenType.AD_HOC_USER: 'AD_HOC_USER'>
APP_USER = <TokenType.APP_USER: 'APP_USER'>
EMAID = <TokenType.EMAID: 'EMAID'>
OTHER = <TokenType.OTHER: 'OTHER'>
RFID = <TokenType.RFID: 'RFID'>
class WhitelistType(enum.Enum):
271class WhitelistType(Enum):
272    ALLOWED = "ALLOWED"
273    ALLOWED_OFFLINE = "ALLOWED_OFFLINE"
274    ALWAYS = "ALWAYS"
275    NEVER = "NEVER"
ALLOWED = <WhitelistType.ALLOWED: 'ALLOWED'>
ALLOWED_OFFLINE = <WhitelistType.ALLOWED_OFFLINE: 'ALLOWED_OFFLINE'>
ALWAYS = <WhitelistType.ALWAYS: 'ALWAYS'>
NEVER = <WhitelistType.NEVER: 'NEVER'>
class Token:
278class Token:
279    contract_id: str
280    country_code: str
281    default_profile_type: Optional[ProfileType]
282    energy_contract: Optional[EnergyContract]
283    group_id: Optional[str]
284    issuer: str
285    language: Optional[str]
286    last_updated: str
287    party_id: str
288    type: TokenType
289    uid: str
290    valid: bool
291    visual_number: Optional[str]
292    whitelist: WhitelistType
293
294    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:
295        self.contract_id = contract_id
296        self.country_code = country_code
297        self.default_profile_type = default_profile_type
298        self.energy_contract = energy_contract
299        self.group_id = group_id
300        self.issuer = issuer
301        self.language = language
302        self.last_updated = last_updated
303        self.party_id = party_id
304        self.type = type
305        self.uid = uid
306        self.valid = valid
307        self.visual_number = visual_number
308        self.whitelist = whitelist
309
310    @staticmethod
311    def from_dict(obj: Any) -> 'Token':
312        assert isinstance(obj, dict)
313        contract_id = from_str(obj.get("contract_id"))
314        country_code = from_str(obj.get("country_code"))
315        default_profile_type = from_union([from_none, ProfileType], obj.get("default_profile_type"))
316        energy_contract = from_union([from_none, EnergyContract.from_dict], obj.get("energy_contract"))
317        group_id = from_union([from_none, from_str], obj.get("group_id"))
318        issuer = from_str(obj.get("issuer"))
319        language = from_union([from_none, from_str], obj.get("language"))
320        last_updated = from_str(obj.get("last_updated"))
321        party_id = from_str(obj.get("party_id"))
322        type = TokenType(obj.get("type"))
323        uid = from_str(obj.get("uid"))
324        valid = from_bool(obj.get("valid"))
325        visual_number = from_union([from_none, from_str], obj.get("visual_number"))
326        whitelist = WhitelistType(obj.get("whitelist"))
327        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)
328
329    def to_dict(self) -> dict:
330        result: dict = {}
331        result["contract_id"] = from_str(self.contract_id)
332        result["country_code"] = from_str(self.country_code)
333        if self.default_profile_type is not None:
334            result["default_profile_type"] = from_union([from_none, lambda x: to_enum(ProfileType, x)], self.default_profile_type)
335        if self.energy_contract is not None:
336            result["energy_contract"] = from_union([from_none, lambda x: to_class(EnergyContract, x)], self.energy_contract)
337        if self.group_id is not None:
338            result["group_id"] = from_union([from_none, from_str], self.group_id)
339        result["issuer"] = from_str(self.issuer)
340        if self.language is not None:
341            result["language"] = from_union([from_none, from_str], self.language)
342        result["last_updated"] = from_str(self.last_updated)
343        result["party_id"] = from_str(self.party_id)
344        result["type"] = to_enum(TokenType, self.type)
345        result["uid"] = from_str(self.uid)
346        result["valid"] = from_bool(self.valid)
347        if self.visual_number is not None:
348            result["visual_number"] = from_union([from_none, from_str], self.visual_number)
349        result["whitelist"] = to_enum(WhitelistType, self.whitelist)
350        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)
294    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:
295        self.contract_id = contract_id
296        self.country_code = country_code
297        self.default_profile_type = default_profile_type
298        self.energy_contract = energy_contract
299        self.group_id = group_id
300        self.issuer = issuer
301        self.language = language
302        self.last_updated = last_updated
303        self.party_id = party_id
304        self.type = type
305        self.uid = uid
306        self.valid = valid
307        self.visual_number = visual_number
308        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:
310    @staticmethod
311    def from_dict(obj: Any) -> 'Token':
312        assert isinstance(obj, dict)
313        contract_id = from_str(obj.get("contract_id"))
314        country_code = from_str(obj.get("country_code"))
315        default_profile_type = from_union([from_none, ProfileType], obj.get("default_profile_type"))
316        energy_contract = from_union([from_none, EnergyContract.from_dict], obj.get("energy_contract"))
317        group_id = from_union([from_none, from_str], obj.get("group_id"))
318        issuer = from_str(obj.get("issuer"))
319        language = from_union([from_none, from_str], obj.get("language"))
320        last_updated = from_str(obj.get("last_updated"))
321        party_id = from_str(obj.get("party_id"))
322        type = TokenType(obj.get("type"))
323        uid = from_str(obj.get("uid"))
324        valid = from_bool(obj.get("valid"))
325        visual_number = from_union([from_none, from_str], obj.get("visual_number"))
326        whitelist = WhitelistType(obj.get("whitelist"))
327        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:
329    def to_dict(self) -> dict:
330        result: dict = {}
331        result["contract_id"] = from_str(self.contract_id)
332        result["country_code"] = from_str(self.country_code)
333        if self.default_profile_type is not None:
334            result["default_profile_type"] = from_union([from_none, lambda x: to_enum(ProfileType, x)], self.default_profile_type)
335        if self.energy_contract is not None:
336            result["energy_contract"] = from_union([from_none, lambda x: to_class(EnergyContract, x)], self.energy_contract)
337        if self.group_id is not None:
338            result["group_id"] = from_union([from_none, from_str], self.group_id)
339        result["issuer"] = from_str(self.issuer)
340        if self.language is not None:
341            result["language"] = from_union([from_none, from_str], self.language)
342        result["last_updated"] = from_str(self.last_updated)
343        result["party_id"] = from_str(self.party_id)
344        result["type"] = to_enum(TokenType, self.type)
345        result["uid"] = from_str(self.uid)
346        result["valid"] = from_bool(self.valid)
347        if self.visual_number is not None:
348            result["visual_number"] = from_union([from_none, from_str], self.visual_number)
349        result["whitelist"] = to_enum(WhitelistType, self.whitelist)
350        return result
class AuthorizationInfo:
353class AuthorizationInfo:
354    allowed: AllowedType
355    authorization_reference: Optional[str]
356    info: Optional[DisplayText]
357    location: Optional[LocationReferences]
358    token: Token
359
360    def __init__(self, allowed: AllowedType, authorization_reference: Optional[str], info: Optional[DisplayText], location: Optional[LocationReferences], token: Token) -> None:
361        self.allowed = allowed
362        self.authorization_reference = authorization_reference
363        self.info = info
364        self.location = location
365        self.token = token
366
367    @staticmethod
368    def from_dict(obj: Any) -> 'AuthorizationInfo':
369        assert isinstance(obj, dict)
370        allowed = AllowedType(obj.get("allowed"))
371        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
372        info = from_union([from_none, DisplayText.from_dict], obj.get("info"))
373        location = from_union([from_none, LocationReferences.from_dict], obj.get("location"))
374        token = Token.from_dict(obj.get("token"))
375        return AuthorizationInfo(allowed, authorization_reference, info, location, token)
376
377    def to_dict(self) -> dict:
378        result: dict = {}
379        result["allowed"] = to_enum(AllowedType, self.allowed)
380        if self.authorization_reference is not None:
381            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
382        if self.info is not None:
383            result["info"] = from_union([from_none, lambda x: to_class(DisplayText, x)], self.info)
384        if self.location is not None:
385            result["location"] = from_union([from_none, lambda x: to_class(LocationReferences, x)], self.location)
386        result["token"] = to_class(Token, self.token)
387        return result
AuthorizationInfo( allowed: AllowedType, authorization_reference: Optional[str], info: Optional[DisplayText], location: Optional[LocationReferences], token: Token)
360    def __init__(self, allowed: AllowedType, authorization_reference: Optional[str], info: Optional[DisplayText], location: Optional[LocationReferences], token: Token) -> None:
361        self.allowed = allowed
362        self.authorization_reference = authorization_reference
363        self.info = info
364        self.location = location
365        self.token = token
allowed: AllowedType
authorization_reference: Optional[str]
info: Optional[DisplayText]
location: Optional[LocationReferences]
token: Token
@staticmethod
def from_dict(obj: Any) -> AuthorizationInfo:
367    @staticmethod
368    def from_dict(obj: Any) -> 'AuthorizationInfo':
369        assert isinstance(obj, dict)
370        allowed = AllowedType(obj.get("allowed"))
371        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
372        info = from_union([from_none, DisplayText.from_dict], obj.get("info"))
373        location = from_union([from_none, LocationReferences.from_dict], obj.get("location"))
374        token = Token.from_dict(obj.get("token"))
375        return AuthorizationInfo(allowed, authorization_reference, info, location, token)
def to_dict(self) -> dict:
377    def to_dict(self) -> dict:
378        result: dict = {}
379        result["allowed"] = to_enum(AllowedType, self.allowed)
380        if self.authorization_reference is not None:
381            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
382        if self.info is not None:
383            result["info"] = from_union([from_none, lambda x: to_class(DisplayText, x)], self.info)
384        if self.location is not None:
385            result["location"] = from_union([from_none, lambda x: to_class(LocationReferences, x)], self.location)
386        result["token"] = to_class(Token, self.token)
387        return result
class CancelReservation:
390class CancelReservation:
391    reservation_id: str
392    response_url: str
393
394    def __init__(self, reservation_id: str, response_url: str) -> None:
395        self.reservation_id = reservation_id
396        self.response_url = response_url
397
398    @staticmethod
399    def from_dict(obj: Any) -> 'CancelReservation':
400        assert isinstance(obj, dict)
401        reservation_id = from_str(obj.get("reservation_id"))
402        response_url = from_str(obj.get("response_url"))
403        return CancelReservation(reservation_id, response_url)
404
405    def to_dict(self) -> dict:
406        result: dict = {}
407        result["reservation_id"] = from_str(self.reservation_id)
408        result["response_url"] = from_str(self.response_url)
409        return result
CancelReservation(reservation_id: str, response_url: str)
394    def __init__(self, reservation_id: str, response_url: str) -> None:
395        self.reservation_id = reservation_id
396        self.response_url = response_url
reservation_id: str
response_url: str
@staticmethod
def from_dict(obj: Any) -> CancelReservation:
398    @staticmethod
399    def from_dict(obj: Any) -> 'CancelReservation':
400        assert isinstance(obj, dict)
401        reservation_id = from_str(obj.get("reservation_id"))
402        response_url = from_str(obj.get("response_url"))
403        return CancelReservation(reservation_id, response_url)
def to_dict(self) -> dict:
405    def to_dict(self) -> dict:
406        result: dict = {}
407        result["reservation_id"] = from_str(self.reservation_id)
408        result["response_url"] = from_str(self.response_url)
409        return result
class AuthMethod(enum.Enum):
412class AuthMethod(Enum):
413    AUTH_REQUEST = "AUTH_REQUEST"
414    COMMAND = "COMMAND"
415    WHITELIST = "WHITELIST"
AUTH_REQUEST = <AuthMethod.AUTH_REQUEST: 'AUTH_REQUEST'>
COMMAND = <AuthMethod.COMMAND: 'COMMAND'>
WHITELIST = <AuthMethod.WHITELIST: 'WHITELIST'>
class ConnectorFormat(enum.Enum):
418class ConnectorFormat(Enum):
419    CABLE = "CABLE"
420    SOCKET = "SOCKET"
CABLE = <ConnectorFormat.CABLE: 'CABLE'>
SOCKET = <ConnectorFormat.SOCKET: 'SOCKET'>
class PowerType(enum.Enum):
423class PowerType(Enum):
424    AC_1__PHASE = "AC_1_PHASE"
425    AC_2__PHASE = "AC_2_PHASE"
426    AC_2__PHASE_SPLIT = "AC_2_PHASE_SPLIT"
427    AC_3__PHASE = "AC_3_PHASE"
428    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):
431class ConnectorType(Enum):
432    CHADEMO = "CHADEMO"
433    CHAOJI = "CHAOJI"
434    DOMESTIC_A = "DOMESTIC_A"
435    DOMESTIC_B = "DOMESTIC_B"
436    DOMESTIC_C = "DOMESTIC_C"
437    DOMESTIC_D = "DOMESTIC_D"
438    DOMESTIC_E = "DOMESTIC_E"
439    DOMESTIC_F = "DOMESTIC_F"
440    DOMESTIC_G = "DOMESTIC_G"
441    DOMESTIC_H = "DOMESTIC_H"
442    DOMESTIC_I = "DOMESTIC_I"
443    DOMESTIC_J = "DOMESTIC_J"
444    DOMESTIC_K = "DOMESTIC_K"
445    DOMESTIC_L = "DOMESTIC_L"
446    DOMESTIC_M = "DOMESTIC_M"
447    DOMESTIC_N = "DOMESTIC_N"
448    DOMESTIC_O = "DOMESTIC_O"
449    GBT_AC = "GBT_AC"
450    GBT_DC = "GBT_DC"
451    IEC_60309_2__SINGLE_16 = "IEC_60309_2_single_16"
452    IEC_60309_2__THREE_16 = "IEC_60309_2_three_16"
453    IEC_60309_2__THREE_32 = "IEC_60309_2_three_32"
454    IEC_60309_2__THREE_64 = "IEC_60309_2_three_64"
455    IEC_62196__T1 = "IEC_62196_T1"
456    IEC_62196__T1_COMBO = "IEC_62196_T1_COMBO"
457    IEC_62196__T2 = "IEC_62196_T2"
458    IEC_62196__T2_COMBO = "IEC_62196_T2_COMBO"
459    IEC_62196__T3_A = "IEC_62196_T3A"
460    IEC_62196__T3_C = "IEC_62196_T3C"
461    MCS = "MCS"
462    NEMA_10_30 = "NEMA_10_30"
463    NEMA_10_50 = "NEMA_10_50"
464    NEMA_14_30 = "NEMA_14_30"
465    NEMA_14_50 = "NEMA_14_50"
466    NEMA_5_20 = "NEMA_5_20"
467    NEMA_6_30 = "NEMA_6_30"
468    NEMA_6_50 = "NEMA_6_50"
469    PANTOGRAPH_BOTTOM_UP = "PANTOGRAPH_BOTTOM_UP"
470    PANTOGRAPH_TOP_DOWN = "PANTOGRAPH_TOP_DOWN"
471    SAE_J3400 = "SAE_J3400"
472    TESLA_R = "TESLA_R"
473    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'>
MCS = <ConnectorType.MCS: 'MCS'>
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'>
SAE_J3400 = <ConnectorType.SAE_J3400: 'SAE_J3400'>
TESLA_R = <ConnectorType.TESLA_R: 'TESLA_R'>
TESLA_S = <ConnectorType.TESLA_S: 'TESLA_S'>
class GeoLocation:
476class GeoLocation:
477    latitude: str
478    longitude: str
479
480    def __init__(self, latitude: str, longitude: str) -> None:
481        self.latitude = latitude
482        self.longitude = longitude
483
484    @staticmethod
485    def from_dict(obj: Any) -> 'GeoLocation':
486        assert isinstance(obj, dict)
487        latitude = from_str(obj.get("latitude"))
488        longitude = from_str(obj.get("longitude"))
489        return GeoLocation(latitude, longitude)
490
491    def to_dict(self) -> dict:
492        result: dict = {}
493        result["latitude"] = from_str(self.latitude)
494        result["longitude"] = from_str(self.longitude)
495        return result
GeoLocation(latitude: str, longitude: str)
480    def __init__(self, latitude: str, longitude: str) -> None:
481        self.latitude = latitude
482        self.longitude = longitude
latitude: str
longitude: str
@staticmethod
def from_dict(obj: Any) -> GeoLocation:
484    @staticmethod
485    def from_dict(obj: Any) -> 'GeoLocation':
486        assert isinstance(obj, dict)
487        latitude = from_str(obj.get("latitude"))
488        longitude = from_str(obj.get("longitude"))
489        return GeoLocation(latitude, longitude)
def to_dict(self) -> dict:
491    def to_dict(self) -> dict:
492        result: dict = {}
493        result["latitude"] = from_str(self.latitude)
494        result["longitude"] = from_str(self.longitude)
495        return result
class CdrLocation:
498class CdrLocation:
499    address: str
500    city: str
501    connector_format: ConnectorFormat
502    connector_id: str
503    connector_power_type: PowerType
504    connector_standard: ConnectorType
505    coordinates: GeoLocation
506    country: str
507    evse_id: str
508    evse_uid: str
509    id: str
510    name: Optional[str]
511    postal_code: Optional[str]
512    state: Optional[str]
513
514    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:
515        self.address = address
516        self.city = city
517        self.connector_format = connector_format
518        self.connector_id = connector_id
519        self.connector_power_type = connector_power_type
520        self.connector_standard = connector_standard
521        self.coordinates = coordinates
522        self.country = country
523        self.evse_id = evse_id
524        self.evse_uid = evse_uid
525        self.id = id
526        self.name = name
527        self.postal_code = postal_code
528        self.state = state
529
530    @staticmethod
531    def from_dict(obj: Any) -> 'CdrLocation':
532        assert isinstance(obj, dict)
533        address = from_str(obj.get("address"))
534        city = from_str(obj.get("city"))
535        connector_format = ConnectorFormat(obj.get("connector_format"))
536        connector_id = from_str(obj.get("connector_id"))
537        connector_power_type = PowerType(obj.get("connector_power_type"))
538        connector_standard = ConnectorType(obj.get("connector_standard"))
539        coordinates = GeoLocation.from_dict(obj.get("coordinates"))
540        country = from_str(obj.get("country"))
541        evse_id = from_str(obj.get("evse_id"))
542        evse_uid = from_str(obj.get("evse_uid"))
543        id = from_str(obj.get("id"))
544        name = from_union([from_none, from_str], obj.get("name"))
545        postal_code = from_union([from_none, from_str], obj.get("postal_code"))
546        state = from_union([from_none, from_str], obj.get("state"))
547        return CdrLocation(address, city, connector_format, connector_id, connector_power_type, connector_standard, coordinates, country, evse_id, evse_uid, id, name, postal_code, state)
548
549    def to_dict(self) -> dict:
550        result: dict = {}
551        result["address"] = from_str(self.address)
552        result["city"] = from_str(self.city)
553        result["connector_format"] = to_enum(ConnectorFormat, self.connector_format)
554        result["connector_id"] = from_str(self.connector_id)
555        result["connector_power_type"] = to_enum(PowerType, self.connector_power_type)
556        result["connector_standard"] = to_enum(ConnectorType, self.connector_standard)
557        result["coordinates"] = to_class(GeoLocation, self.coordinates)
558        result["country"] = from_str(self.country)
559        result["evse_id"] = from_str(self.evse_id)
560        result["evse_uid"] = from_str(self.evse_uid)
561        result["id"] = from_str(self.id)
562        if self.name is not None:
563            result["name"] = from_union([from_none, from_str], self.name)
564        if self.postal_code is not None:
565            result["postal_code"] = from_union([from_none, from_str], self.postal_code)
566        if self.state is not None:
567            result["state"] = from_union([from_none, from_str], self.state)
568        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])
514    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:
515        self.address = address
516        self.city = city
517        self.connector_format = connector_format
518        self.connector_id = connector_id
519        self.connector_power_type = connector_power_type
520        self.connector_standard = connector_standard
521        self.coordinates = coordinates
522        self.country = country
523        self.evse_id = evse_id
524        self.evse_uid = evse_uid
525        self.id = id
526        self.name = name
527        self.postal_code = postal_code
528        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:
530    @staticmethod
531    def from_dict(obj: Any) -> 'CdrLocation':
532        assert isinstance(obj, dict)
533        address = from_str(obj.get("address"))
534        city = from_str(obj.get("city"))
535        connector_format = ConnectorFormat(obj.get("connector_format"))
536        connector_id = from_str(obj.get("connector_id"))
537        connector_power_type = PowerType(obj.get("connector_power_type"))
538        connector_standard = ConnectorType(obj.get("connector_standard"))
539        coordinates = GeoLocation.from_dict(obj.get("coordinates"))
540        country = from_str(obj.get("country"))
541        evse_id = from_str(obj.get("evse_id"))
542        evse_uid = from_str(obj.get("evse_uid"))
543        id = from_str(obj.get("id"))
544        name = from_union([from_none, from_str], obj.get("name"))
545        postal_code = from_union([from_none, from_str], obj.get("postal_code"))
546        state = from_union([from_none, from_str], obj.get("state"))
547        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:
549    def to_dict(self) -> dict:
550        result: dict = {}
551        result["address"] = from_str(self.address)
552        result["city"] = from_str(self.city)
553        result["connector_format"] = to_enum(ConnectorFormat, self.connector_format)
554        result["connector_id"] = from_str(self.connector_id)
555        result["connector_power_type"] = to_enum(PowerType, self.connector_power_type)
556        result["connector_standard"] = to_enum(ConnectorType, self.connector_standard)
557        result["coordinates"] = to_class(GeoLocation, self.coordinates)
558        result["country"] = from_str(self.country)
559        result["evse_id"] = from_str(self.evse_id)
560        result["evse_uid"] = from_str(self.evse_uid)
561        result["id"] = from_str(self.id)
562        if self.name is not None:
563            result["name"] = from_union([from_none, from_str], self.name)
564        if self.postal_code is not None:
565            result["postal_code"] = from_union([from_none, from_str], self.postal_code)
566        if self.state is not None:
567            result["state"] = from_union([from_none, from_str], self.state)
568        return result
class CdrToken:
571class CdrToken:
572    contract_id: str
573    country_code: str
574    party_id: str
575    type: TokenType
576    uid: str
577
578    def __init__(self, contract_id: str, country_code: str, party_id: str, type: TokenType, uid: str) -> None:
579        self.contract_id = contract_id
580        self.country_code = country_code
581        self.party_id = party_id
582        self.type = type
583        self.uid = uid
584
585    @staticmethod
586    def from_dict(obj: Any) -> 'CdrToken':
587        assert isinstance(obj, dict)
588        contract_id = from_str(obj.get("contract_id"))
589        country_code = from_str(obj.get("country_code"))
590        party_id = from_str(obj.get("party_id"))
591        type = TokenType(obj.get("type"))
592        uid = from_str(obj.get("uid"))
593        return CdrToken(contract_id, country_code, party_id, type, uid)
594
595    def to_dict(self) -> dict:
596        result: dict = {}
597        result["contract_id"] = from_str(self.contract_id)
598        result["country_code"] = from_str(self.country_code)
599        result["party_id"] = from_str(self.party_id)
600        result["type"] = to_enum(TokenType, self.type)
601        result["uid"] = from_str(self.uid)
602        return result
CdrToken( contract_id: str, country_code: str, party_id: str, type: TokenType, uid: str)
578    def __init__(self, contract_id: str, country_code: str, party_id: str, type: TokenType, uid: str) -> None:
579        self.contract_id = contract_id
580        self.country_code = country_code
581        self.party_id = party_id
582        self.type = type
583        self.uid = uid
contract_id: str
country_code: str
party_id: str
type: TokenType
uid: str
@staticmethod
def from_dict(obj: Any) -> CdrToken:
585    @staticmethod
586    def from_dict(obj: Any) -> 'CdrToken':
587        assert isinstance(obj, dict)
588        contract_id = from_str(obj.get("contract_id"))
589        country_code = from_str(obj.get("country_code"))
590        party_id = from_str(obj.get("party_id"))
591        type = TokenType(obj.get("type"))
592        uid = from_str(obj.get("uid"))
593        return CdrToken(contract_id, country_code, party_id, type, uid)
def to_dict(self) -> dict:
595    def to_dict(self) -> dict:
596        result: dict = {}
597        result["contract_id"] = from_str(self.contract_id)
598        result["country_code"] = from_str(self.country_code)
599        result["party_id"] = from_str(self.party_id)
600        result["type"] = to_enum(TokenType, self.type)
601        result["uid"] = from_str(self.uid)
602        return result
class CdrDimensionType(enum.Enum):
605class CdrDimensionType(Enum):
606    CURRENT = "CURRENT"
607    ENERGY = "ENERGY"
608    ENERGY_EXPORT = "ENERGY_EXPORT"
609    ENERGY_IMPORT = "ENERGY_IMPORT"
610    MAX_CURRENT = "MAX_CURRENT"
611    MAX_POWER = "MAX_POWER"
612    MIN_CURRENT = "MIN_CURRENT"
613    MIN_POWER = "MIN_POWER"
614    PARKING_TIME = "PARKING_TIME"
615    POWER = "POWER"
616    RESERVATION_TIME = "RESERVATION_TIME"
617    STATE_OF_CHARGE = "STATE_OF_CHARGE"
618    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:
621class CdrDimension:
622    type: CdrDimensionType
623    volume: float
624
625    def __init__(self, type: CdrDimensionType, volume: float) -> None:
626        self.type = type
627        self.volume = volume
628
629    @staticmethod
630    def from_dict(obj: Any) -> 'CdrDimension':
631        assert isinstance(obj, dict)
632        type = CdrDimensionType(obj.get("type"))
633        volume = from_float(obj.get("volume"))
634        return CdrDimension(type, volume)
635
636    def to_dict(self) -> dict:
637        result: dict = {}
638        result["type"] = to_enum(CdrDimensionType, self.type)
639        result["volume"] = to_float(self.volume)
640        return result
CdrDimension(type: CdrDimensionType, volume: float)
625    def __init__(self, type: CdrDimensionType, volume: float) -> None:
626        self.type = type
627        self.volume = volume
volume: float
@staticmethod
def from_dict(obj: Any) -> CdrDimension:
629    @staticmethod
630    def from_dict(obj: Any) -> 'CdrDimension':
631        assert isinstance(obj, dict)
632        type = CdrDimensionType(obj.get("type"))
633        volume = from_float(obj.get("volume"))
634        return CdrDimension(type, volume)
def to_dict(self) -> dict:
636    def to_dict(self) -> dict:
637        result: dict = {}
638        result["type"] = to_enum(CdrDimensionType, self.type)
639        result["volume"] = to_float(self.volume)
640        return result
class ChargingPeriod:
643class ChargingPeriod:
644    dimensions: List[CdrDimension]
645    start_date_time: str
646    tariff_id: Optional[str]
647
648    def __init__(self, dimensions: List[CdrDimension], start_date_time: str, tariff_id: Optional[str]) -> None:
649        self.dimensions = dimensions
650        self.start_date_time = start_date_time
651        self.tariff_id = tariff_id
652
653    @staticmethod
654    def from_dict(obj: Any) -> 'ChargingPeriod':
655        assert isinstance(obj, dict)
656        dimensions = from_list(CdrDimension.from_dict, obj.get("dimensions"))
657        start_date_time = from_str(obj.get("start_date_time"))
658        tariff_id = from_union([from_none, from_str], obj.get("tariff_id"))
659        return ChargingPeriod(dimensions, start_date_time, tariff_id)
660
661    def to_dict(self) -> dict:
662        result: dict = {}
663        result["dimensions"] = from_list(lambda x: to_class(CdrDimension, x), self.dimensions)
664        result["start_date_time"] = from_str(self.start_date_time)
665        if self.tariff_id is not None:
666            result["tariff_id"] = from_union([from_none, from_str], self.tariff_id)
667        return result
ChargingPeriod( dimensions: List[CdrDimension], start_date_time: str, tariff_id: Optional[str])
648    def __init__(self, dimensions: List[CdrDimension], start_date_time: str, tariff_id: Optional[str]) -> None:
649        self.dimensions = dimensions
650        self.start_date_time = start_date_time
651        self.tariff_id = tariff_id
dimensions: List[CdrDimension]
start_date_time: str
tariff_id: Optional[str]
@staticmethod
def from_dict(obj: Any) -> ChargingPeriod:
653    @staticmethod
654    def from_dict(obj: Any) -> 'ChargingPeriod':
655        assert isinstance(obj, dict)
656        dimensions = from_list(CdrDimension.from_dict, obj.get("dimensions"))
657        start_date_time = from_str(obj.get("start_date_time"))
658        tariff_id = from_union([from_none, from_str], obj.get("tariff_id"))
659        return ChargingPeriod(dimensions, start_date_time, tariff_id)
def to_dict(self) -> dict:
661    def to_dict(self) -> dict:
662        result: dict = {}
663        result["dimensions"] = from_list(lambda x: to_class(CdrDimension, x), self.dimensions)
664        result["start_date_time"] = from_str(self.start_date_time)
665        if self.tariff_id is not None:
666            result["tariff_id"] = from_union([from_none, from_str], self.tariff_id)
667        return result
class SignedValue:
670class SignedValue:
671    nature: str
672    plain_data: str
673    signed_data: str
674
675    def __init__(self, nature: str, plain_data: str, signed_data: str) -> None:
676        self.nature = nature
677        self.plain_data = plain_data
678        self.signed_data = signed_data
679
680    @staticmethod
681    def from_dict(obj: Any) -> 'SignedValue':
682        assert isinstance(obj, dict)
683        nature = from_str(obj.get("nature"))
684        plain_data = from_str(obj.get("plain_data"))
685        signed_data = from_str(obj.get("signed_data"))
686        return SignedValue(nature, plain_data, signed_data)
687
688    def to_dict(self) -> dict:
689        result: dict = {}
690        result["nature"] = from_str(self.nature)
691        result["plain_data"] = from_str(self.plain_data)
692        result["signed_data"] = from_str(self.signed_data)
693        return result
SignedValue(nature: str, plain_data: str, signed_data: str)
675    def __init__(self, nature: str, plain_data: str, signed_data: str) -> None:
676        self.nature = nature
677        self.plain_data = plain_data
678        self.signed_data = signed_data
nature: str
plain_data: str
signed_data: str
@staticmethod
def from_dict(obj: Any) -> SignedValue:
680    @staticmethod
681    def from_dict(obj: Any) -> 'SignedValue':
682        assert isinstance(obj, dict)
683        nature = from_str(obj.get("nature"))
684        plain_data = from_str(obj.get("plain_data"))
685        signed_data = from_str(obj.get("signed_data"))
686        return SignedValue(nature, plain_data, signed_data)
def to_dict(self) -> dict:
688    def to_dict(self) -> dict:
689        result: dict = {}
690        result["nature"] = from_str(self.nature)
691        result["plain_data"] = from_str(self.plain_data)
692        result["signed_data"] = from_str(self.signed_data)
693        return result
class SignedData:
696class SignedData:
697    encoding_method: str
698    encoding_method_version: Optional[int]
699    public_key: Optional[str]
700    signed_values: List[SignedValue]
701    url: Optional[str]
702
703    def __init__(self, encoding_method: str, encoding_method_version: Optional[int], public_key: Optional[str], signed_values: List[SignedValue], url: Optional[str]) -> None:
704        self.encoding_method = encoding_method
705        self.encoding_method_version = encoding_method_version
706        self.public_key = public_key
707        self.signed_values = signed_values
708        self.url = url
709
710    @staticmethod
711    def from_dict(obj: Any) -> 'SignedData':
712        assert isinstance(obj, dict)
713        encoding_method = from_str(obj.get("encoding_method"))
714        encoding_method_version = from_union([from_none, from_int], obj.get("encoding_method_version"))
715        public_key = from_union([from_none, from_str], obj.get("public_key"))
716        signed_values = from_list(SignedValue.from_dict, obj.get("signed_values"))
717        url = from_union([from_none, from_str], obj.get("url"))
718        return SignedData(encoding_method, encoding_method_version, public_key, signed_values, url)
719
720    def to_dict(self) -> dict:
721        result: dict = {}
722        result["encoding_method"] = from_str(self.encoding_method)
723        if self.encoding_method_version is not None:
724            result["encoding_method_version"] = from_union([from_none, from_int], self.encoding_method_version)
725        if self.public_key is not None:
726            result["public_key"] = from_union([from_none, from_str], self.public_key)
727        result["signed_values"] = from_list(lambda x: to_class(SignedValue, x), self.signed_values)
728        if self.url is not None:
729            result["url"] = from_union([from_none, from_str], self.url)
730        return result
SignedData( encoding_method: str, encoding_method_version: Optional[int], public_key: Optional[str], signed_values: List[SignedValue], url: Optional[str])
703    def __init__(self, encoding_method: str, encoding_method_version: Optional[int], public_key: Optional[str], signed_values: List[SignedValue], url: Optional[str]) -> None:
704        self.encoding_method = encoding_method
705        self.encoding_method_version = encoding_method_version
706        self.public_key = public_key
707        self.signed_values = signed_values
708        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:
710    @staticmethod
711    def from_dict(obj: Any) -> 'SignedData':
712        assert isinstance(obj, dict)
713        encoding_method = from_str(obj.get("encoding_method"))
714        encoding_method_version = from_union([from_none, from_int], obj.get("encoding_method_version"))
715        public_key = from_union([from_none, from_str], obj.get("public_key"))
716        signed_values = from_list(SignedValue.from_dict, obj.get("signed_values"))
717        url = from_union([from_none, from_str], obj.get("url"))
718        return SignedData(encoding_method, encoding_method_version, public_key, signed_values, url)
def to_dict(self) -> dict:
720    def to_dict(self) -> dict:
721        result: dict = {}
722        result["encoding_method"] = from_str(self.encoding_method)
723        if self.encoding_method_version is not None:
724            result["encoding_method_version"] = from_union([from_none, from_int], self.encoding_method_version)
725        if self.public_key is not None:
726            result["public_key"] = from_union([from_none, from_str], self.public_key)
727        result["signed_values"] = from_list(lambda x: to_class(SignedValue, x), self.signed_values)
728        if self.url is not None:
729            result["url"] = from_union([from_none, from_str], self.url)
730        return result
class TariffDimensionType(enum.Enum):
733class TariffDimensionType(Enum):
734    ENERGY = "ENERGY"
735    FLAT = "FLAT"
736    PARKING_TIME = "PARKING_TIME"
737    TIME = "TIME"
ENERGY = <TariffDimensionType.ENERGY: 'ENERGY'>
FLAT = <TariffDimensionType.FLAT: 'FLAT'>
PARKING_TIME = <TariffDimensionType.PARKING_TIME: 'PARKING_TIME'>
TIME = <TariffDimensionType.TIME: 'TIME'>
class PriceComponent:
740class PriceComponent:
741    price: float
742    step_size: int
743    type: TariffDimensionType
744    vat: Optional[float]
745
746    def __init__(self, price: float, step_size: int, type: TariffDimensionType, vat: Optional[float]) -> None:
747        self.price = price
748        self.step_size = step_size
749        self.type = type
750        self.vat = vat
751
752    @staticmethod
753    def from_dict(obj: Any) -> 'PriceComponent':
754        assert isinstance(obj, dict)
755        price = from_float(obj.get("price"))
756        step_size = from_int(obj.get("step_size"))
757        type = TariffDimensionType(obj.get("type"))
758        vat = from_union([from_none, from_float], obj.get("vat"))
759        return PriceComponent(price, step_size, type, vat)
760
761    def to_dict(self) -> dict:
762        result: dict = {}
763        result["price"] = to_float(self.price)
764        result["step_size"] = from_int(self.step_size)
765        result["type"] = to_enum(TariffDimensionType, self.type)
766        if self.vat is not None:
767            result["vat"] = from_union([from_none, to_float], self.vat)
768        return result
PriceComponent( price: float, step_size: int, type: TariffDimensionType, vat: Optional[float])
746    def __init__(self, price: float, step_size: int, type: TariffDimensionType, vat: Optional[float]) -> None:
747        self.price = price
748        self.step_size = step_size
749        self.type = type
750        self.vat = vat
price: float
step_size: int
vat: Optional[float]
@staticmethod
def from_dict(obj: Any) -> PriceComponent:
752    @staticmethod
753    def from_dict(obj: Any) -> 'PriceComponent':
754        assert isinstance(obj, dict)
755        price = from_float(obj.get("price"))
756        step_size = from_int(obj.get("step_size"))
757        type = TariffDimensionType(obj.get("type"))
758        vat = from_union([from_none, from_float], obj.get("vat"))
759        return PriceComponent(price, step_size, type, vat)
def to_dict(self) -> dict:
761    def to_dict(self) -> dict:
762        result: dict = {}
763        result["price"] = to_float(self.price)
764        result["step_size"] = from_int(self.step_size)
765        result["type"] = to_enum(TariffDimensionType, self.type)
766        if self.vat is not None:
767            result["vat"] = from_union([from_none, to_float], self.vat)
768        return result
class DayOfWeek(enum.Enum):
771class DayOfWeek(Enum):
772    FRIDAY = "FRIDAY"
773    MONDAY = "MONDAY"
774    SATURDAY = "SATURDAY"
775    SUNDAY = "SUNDAY"
776    THURSDAY = "THURSDAY"
777    TUESDAY = "TUESDAY"
778    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):
781class ReservationRestrictionType(Enum):
782    RESERVATION = "RESERVATION"
783    RESERVATION_EXPIRES = "RESERVATION_EXPIRES"
RESERVATION = <ReservationRestrictionType.RESERVATION: 'RESERVATION'>
RESERVATION_EXPIRES = <ReservationRestrictionType.RESERVATION_EXPIRES: 'RESERVATION_EXPIRES'>
class TariffRestrictions:
786class TariffRestrictions:
787    day_of_week: Optional[List[DayOfWeek]]
788    end_date: Optional[str]
789    end_time: Optional[str]
790    max_current: Optional[float]
791    max_duration: Optional[int]
792    max_kwh: Optional[float]
793    max_power: Optional[float]
794    min_current: Optional[float]
795    min_duration: Optional[int]
796    min_kwh: Optional[float]
797    min_power: Optional[float]
798    reservation: Optional[ReservationRestrictionType]
799    start_date: Optional[str]
800    start_time: Optional[str]
801
802    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:
803        self.day_of_week = day_of_week
804        self.end_date = end_date
805        self.end_time = end_time
806        self.max_current = max_current
807        self.max_duration = max_duration
808        self.max_kwh = max_kwh
809        self.max_power = max_power
810        self.min_current = min_current
811        self.min_duration = min_duration
812        self.min_kwh = min_kwh
813        self.min_power = min_power
814        self.reservation = reservation
815        self.start_date = start_date
816        self.start_time = start_time
817
818    @staticmethod
819    def from_dict(obj: Any) -> 'TariffRestrictions':
820        assert isinstance(obj, dict)
821        day_of_week = from_union([from_none, lambda x: from_list(DayOfWeek, x)], obj.get("day_of_week"))
822        end_date = from_union([from_none, from_str], obj.get("end_date"))
823        end_time = from_union([from_none, from_str], obj.get("end_time"))
824        max_current = from_union([from_none, from_float], obj.get("max_current"))
825        max_duration = from_union([from_none, from_int], obj.get("max_duration"))
826        max_kwh = from_union([from_none, from_float], obj.get("max_kwh"))
827        max_power = from_union([from_none, from_float], obj.get("max_power"))
828        min_current = from_union([from_none, from_float], obj.get("min_current"))
829        min_duration = from_union([from_none, from_int], obj.get("min_duration"))
830        min_kwh = from_union([from_none, from_float], obj.get("min_kwh"))
831        min_power = from_union([from_none, from_float], obj.get("min_power"))
832        reservation = from_union([from_none, ReservationRestrictionType], obj.get("reservation"))
833        start_date = from_union([from_none, from_str], obj.get("start_date"))
834        start_time = from_union([from_none, from_str], obj.get("start_time"))
835        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)
836
837    def to_dict(self) -> dict:
838        result: dict = {}
839        if self.day_of_week is not None:
840            result["day_of_week"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(DayOfWeek, x), x)], self.day_of_week)
841        if self.end_date is not None:
842            result["end_date"] = from_union([from_none, from_str], self.end_date)
843        if self.end_time is not None:
844            result["end_time"] = from_union([from_none, from_str], self.end_time)
845        if self.max_current is not None:
846            result["max_current"] = from_union([from_none, to_float], self.max_current)
847        if self.max_duration is not None:
848            result["max_duration"] = from_union([from_none, from_int], self.max_duration)
849        if self.max_kwh is not None:
850            result["max_kwh"] = from_union([from_none, to_float], self.max_kwh)
851        if self.max_power is not None:
852            result["max_power"] = from_union([from_none, to_float], self.max_power)
853        if self.min_current is not None:
854            result["min_current"] = from_union([from_none, to_float], self.min_current)
855        if self.min_duration is not None:
856            result["min_duration"] = from_union([from_none, from_int], self.min_duration)
857        if self.min_kwh is not None:
858            result["min_kwh"] = from_union([from_none, to_float], self.min_kwh)
859        if self.min_power is not None:
860            result["min_power"] = from_union([from_none, to_float], self.min_power)
861        if self.reservation is not None:
862            result["reservation"] = from_union([from_none, lambda x: to_enum(ReservationRestrictionType, x)], self.reservation)
863        if self.start_date is not None:
864            result["start_date"] = from_union([from_none, from_str], self.start_date)
865        if self.start_time is not None:
866            result["start_time"] = from_union([from_none, from_str], self.start_time)
867        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])
802    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:
803        self.day_of_week = day_of_week
804        self.end_date = end_date
805        self.end_time = end_time
806        self.max_current = max_current
807        self.max_duration = max_duration
808        self.max_kwh = max_kwh
809        self.max_power = max_power
810        self.min_current = min_current
811        self.min_duration = min_duration
812        self.min_kwh = min_kwh
813        self.min_power = min_power
814        self.reservation = reservation
815        self.start_date = start_date
816        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:
818    @staticmethod
819    def from_dict(obj: Any) -> 'TariffRestrictions':
820        assert isinstance(obj, dict)
821        day_of_week = from_union([from_none, lambda x: from_list(DayOfWeek, x)], obj.get("day_of_week"))
822        end_date = from_union([from_none, from_str], obj.get("end_date"))
823        end_time = from_union([from_none, from_str], obj.get("end_time"))
824        max_current = from_union([from_none, from_float], obj.get("max_current"))
825        max_duration = from_union([from_none, from_int], obj.get("max_duration"))
826        max_kwh = from_union([from_none, from_float], obj.get("max_kwh"))
827        max_power = from_union([from_none, from_float], obj.get("max_power"))
828        min_current = from_union([from_none, from_float], obj.get("min_current"))
829        min_duration = from_union([from_none, from_int], obj.get("min_duration"))
830        min_kwh = from_union([from_none, from_float], obj.get("min_kwh"))
831        min_power = from_union([from_none, from_float], obj.get("min_power"))
832        reservation = from_union([from_none, ReservationRestrictionType], obj.get("reservation"))
833        start_date = from_union([from_none, from_str], obj.get("start_date"))
834        start_time = from_union([from_none, from_str], obj.get("start_time"))
835        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:
837    def to_dict(self) -> dict:
838        result: dict = {}
839        if self.day_of_week is not None:
840            result["day_of_week"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(DayOfWeek, x), x)], self.day_of_week)
841        if self.end_date is not None:
842            result["end_date"] = from_union([from_none, from_str], self.end_date)
843        if self.end_time is not None:
844            result["end_time"] = from_union([from_none, from_str], self.end_time)
845        if self.max_current is not None:
846            result["max_current"] = from_union([from_none, to_float], self.max_current)
847        if self.max_duration is not None:
848            result["max_duration"] = from_union([from_none, from_int], self.max_duration)
849        if self.max_kwh is not None:
850            result["max_kwh"] = from_union([from_none, to_float], self.max_kwh)
851        if self.max_power is not None:
852            result["max_power"] = from_union([from_none, to_float], self.max_power)
853        if self.min_current is not None:
854            result["min_current"] = from_union([from_none, to_float], self.min_current)
855        if self.min_duration is not None:
856            result["min_duration"] = from_union([from_none, from_int], self.min_duration)
857        if self.min_kwh is not None:
858            result["min_kwh"] = from_union([from_none, to_float], self.min_kwh)
859        if self.min_power is not None:
860            result["min_power"] = from_union([from_none, to_float], self.min_power)
861        if self.reservation is not None:
862            result["reservation"] = from_union([from_none, lambda x: to_enum(ReservationRestrictionType, x)], self.reservation)
863        if self.start_date is not None:
864            result["start_date"] = from_union([from_none, from_str], self.start_date)
865        if self.start_time is not None:
866            result["start_time"] = from_union([from_none, from_str], self.start_time)
867        return result
class TariffElement:
870class TariffElement:
871    price_components: List[PriceComponent]
872    restrictions: Optional[TariffRestrictions]
873
874    def __init__(self, price_components: List[PriceComponent], restrictions: Optional[TariffRestrictions]) -> None:
875        self.price_components = price_components
876        self.restrictions = restrictions
877
878    @staticmethod
879    def from_dict(obj: Any) -> 'TariffElement':
880        assert isinstance(obj, dict)
881        price_components = from_list(PriceComponent.from_dict, obj.get("price_components"))
882        restrictions = from_union([from_none, TariffRestrictions.from_dict], obj.get("restrictions"))
883        return TariffElement(price_components, restrictions)
884
885    def to_dict(self) -> dict:
886        result: dict = {}
887        result["price_components"] = from_list(lambda x: to_class(PriceComponent, x), self.price_components)
888        if self.restrictions is not None:
889            result["restrictions"] = from_union([from_none, lambda x: to_class(TariffRestrictions, x)], self.restrictions)
890        return result
TariffElement( price_components: List[PriceComponent], restrictions: Optional[TariffRestrictions])
874    def __init__(self, price_components: List[PriceComponent], restrictions: Optional[TariffRestrictions]) -> None:
875        self.price_components = price_components
876        self.restrictions = restrictions
price_components: List[PriceComponent]
restrictions: Optional[TariffRestrictions]
@staticmethod
def from_dict(obj: Any) -> TariffElement:
878    @staticmethod
879    def from_dict(obj: Any) -> 'TariffElement':
880        assert isinstance(obj, dict)
881        price_components = from_list(PriceComponent.from_dict, obj.get("price_components"))
882        restrictions = from_union([from_none, TariffRestrictions.from_dict], obj.get("restrictions"))
883        return TariffElement(price_components, restrictions)
def to_dict(self) -> dict:
885    def to_dict(self) -> dict:
886        result: dict = {}
887        result["price_components"] = from_list(lambda x: to_class(PriceComponent, x), self.price_components)
888        if self.restrictions is not None:
889            result["restrictions"] = from_union([from_none, lambda x: to_class(TariffRestrictions, x)], self.restrictions)
890        return result
class EnergySourceCategory(enum.Enum):
893class EnergySourceCategory(Enum):
894    COAL = "COAL"
895    GAS = "GAS"
896    GENERAL_FOSSIL = "GENERAL_FOSSIL"
897    GENERAL_GREEN = "GENERAL_GREEN"
898    NUCLEAR = "NUCLEAR"
899    SOLAR = "SOLAR"
900    WATER = "WATER"
901    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:
904class EnergySource:
905    percentage: float
906    source: EnergySourceCategory
907
908    def __init__(self, percentage: float, source: EnergySourceCategory) -> None:
909        self.percentage = percentage
910        self.source = source
911
912    @staticmethod
913    def from_dict(obj: Any) -> 'EnergySource':
914        assert isinstance(obj, dict)
915        percentage = from_float(obj.get("percentage"))
916        source = EnergySourceCategory(obj.get("source"))
917        return EnergySource(percentage, source)
918
919    def to_dict(self) -> dict:
920        result: dict = {}
921        result["percentage"] = to_float(self.percentage)
922        result["source"] = to_enum(EnergySourceCategory, self.source)
923        return result
EnergySource(percentage: float, source: EnergySourceCategory)
908    def __init__(self, percentage: float, source: EnergySourceCategory) -> None:
909        self.percentage = percentage
910        self.source = source
percentage: float
@staticmethod
def from_dict(obj: Any) -> EnergySource:
912    @staticmethod
913    def from_dict(obj: Any) -> 'EnergySource':
914        assert isinstance(obj, dict)
915        percentage = from_float(obj.get("percentage"))
916        source = EnergySourceCategory(obj.get("source"))
917        return EnergySource(percentage, source)
def to_dict(self) -> dict:
919    def to_dict(self) -> dict:
920        result: dict = {}
921        result["percentage"] = to_float(self.percentage)
922        result["source"] = to_enum(EnergySourceCategory, self.source)
923        return result
class EnvironmentalImpactCategory(enum.Enum):
926class EnvironmentalImpactCategory(Enum):
927    CARBON_DIOXIDE = "CARBON_DIOXIDE"
928    NUCLEAR_WASTE = "NUCLEAR_WASTE"
CARBON_DIOXIDE = <EnvironmentalImpactCategory.CARBON_DIOXIDE: 'CARBON_DIOXIDE'>
NUCLEAR_WASTE = <EnvironmentalImpactCategory.NUCLEAR_WASTE: 'NUCLEAR_WASTE'>
class EnvironmentalImpact:
931class EnvironmentalImpact:
932    amount: float
933    category: EnvironmentalImpactCategory
934
935    def __init__(self, amount: float, category: EnvironmentalImpactCategory) -> None:
936        self.amount = amount
937        self.category = category
938
939    @staticmethod
940    def from_dict(obj: Any) -> 'EnvironmentalImpact':
941        assert isinstance(obj, dict)
942        amount = from_float(obj.get("amount"))
943        category = EnvironmentalImpactCategory(obj.get("category"))
944        return EnvironmentalImpact(amount, category)
945
946    def to_dict(self) -> dict:
947        result: dict = {}
948        result["amount"] = to_float(self.amount)
949        result["category"] = to_enum(EnvironmentalImpactCategory, self.category)
950        return result
EnvironmentalImpact(amount: float, category: EnvironmentalImpactCategory)
935    def __init__(self, amount: float, category: EnvironmentalImpactCategory) -> None:
936        self.amount = amount
937        self.category = category
amount: float
@staticmethod
def from_dict(obj: Any) -> EnvironmentalImpact:
939    @staticmethod
940    def from_dict(obj: Any) -> 'EnvironmentalImpact':
941        assert isinstance(obj, dict)
942        amount = from_float(obj.get("amount"))
943        category = EnvironmentalImpactCategory(obj.get("category"))
944        return EnvironmentalImpact(amount, category)
def to_dict(self) -> dict:
946    def to_dict(self) -> dict:
947        result: dict = {}
948        result["amount"] = to_float(self.amount)
949        result["category"] = to_enum(EnvironmentalImpactCategory, self.category)
950        return result
class EnergyMix:
953class EnergyMix:
954    energy_product_name: Optional[str]
955    energy_sources: Optional[List[EnergySource]]
956    environ_impact: Optional[List[EnvironmentalImpact]]
957    is_green_energy: bool
958    supplier_name: Optional[str]
959
960    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:
961        self.energy_product_name = energy_product_name
962        self.energy_sources = energy_sources
963        self.environ_impact = environ_impact
964        self.is_green_energy = is_green_energy
965        self.supplier_name = supplier_name
966
967    @staticmethod
968    def from_dict(obj: Any) -> 'EnergyMix':
969        assert isinstance(obj, dict)
970        energy_product_name = from_union([from_none, from_str], obj.get("energy_product_name"))
971        energy_sources = from_union([from_none, lambda x: from_list(EnergySource.from_dict, x)], obj.get("energy_sources"))
972        environ_impact = from_union([from_none, lambda x: from_list(EnvironmentalImpact.from_dict, x)], obj.get("environ_impact"))
973        is_green_energy = from_bool(obj.get("is_green_energy"))
974        supplier_name = from_union([from_none, from_str], obj.get("supplier_name"))
975        return EnergyMix(energy_product_name, energy_sources, environ_impact, is_green_energy, supplier_name)
976
977    def to_dict(self) -> dict:
978        result: dict = {}
979        if self.energy_product_name is not None:
980            result["energy_product_name"] = from_union([from_none, from_str], self.energy_product_name)
981        if self.energy_sources is not None:
982            result["energy_sources"] = from_union([from_none, lambda x: from_list(lambda x: to_class(EnergySource, x), x)], self.energy_sources)
983        if self.environ_impact is not None:
984            result["environ_impact"] = from_union([from_none, lambda x: from_list(lambda x: to_class(EnvironmentalImpact, x), x)], self.environ_impact)
985        result["is_green_energy"] = from_bool(self.is_green_energy)
986        if self.supplier_name is not None:
987            result["supplier_name"] = from_union([from_none, from_str], self.supplier_name)
988        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])
960    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:
961        self.energy_product_name = energy_product_name
962        self.energy_sources = energy_sources
963        self.environ_impact = environ_impact
964        self.is_green_energy = is_green_energy
965        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:
967    @staticmethod
968    def from_dict(obj: Any) -> 'EnergyMix':
969        assert isinstance(obj, dict)
970        energy_product_name = from_union([from_none, from_str], obj.get("energy_product_name"))
971        energy_sources = from_union([from_none, lambda x: from_list(EnergySource.from_dict, x)], obj.get("energy_sources"))
972        environ_impact = from_union([from_none, lambda x: from_list(EnvironmentalImpact.from_dict, x)], obj.get("environ_impact"))
973        is_green_energy = from_bool(obj.get("is_green_energy"))
974        supplier_name = from_union([from_none, from_str], obj.get("supplier_name"))
975        return EnergyMix(energy_product_name, energy_sources, environ_impact, is_green_energy, supplier_name)
def to_dict(self) -> dict:
977    def to_dict(self) -> dict:
978        result: dict = {}
979        if self.energy_product_name is not None:
980            result["energy_product_name"] = from_union([from_none, from_str], self.energy_product_name)
981        if self.energy_sources is not None:
982            result["energy_sources"] = from_union([from_none, lambda x: from_list(lambda x: to_class(EnergySource, x), x)], self.energy_sources)
983        if self.environ_impact is not None:
984            result["environ_impact"] = from_union([from_none, lambda x: from_list(lambda x: to_class(EnvironmentalImpact, x), x)], self.environ_impact)
985        result["is_green_energy"] = from_bool(self.is_green_energy)
986        if self.supplier_name is not None:
987            result["supplier_name"] = from_union([from_none, from_str], self.supplier_name)
988        return result
class PriceLimit:
 991class PriceLimit:
 992    after_taxes: Optional[float]
 993    before_taxes: float
 994
 995    def __init__(self, after_taxes: Optional[float], before_taxes: float) -> None:
 996        self.after_taxes = after_taxes
 997        self.before_taxes = before_taxes
 998
 999    @staticmethod
1000    def from_dict(obj: Any) -> 'PriceLimit':
1001        assert isinstance(obj, dict)
1002        after_taxes = from_union([from_none, from_float], obj.get("after_taxes"))
1003        before_taxes = from_float(obj.get("before_taxes"))
1004        return PriceLimit(after_taxes, before_taxes)
1005
1006    def to_dict(self) -> dict:
1007        result: dict = {}
1008        if self.after_taxes is not None:
1009            result["after_taxes"] = from_union([from_none, to_float], self.after_taxes)
1010        result["before_taxes"] = to_float(self.before_taxes)
1011        return result
PriceLimit(after_taxes: Optional[float], before_taxes: float)
995    def __init__(self, after_taxes: Optional[float], before_taxes: float) -> None:
996        self.after_taxes = after_taxes
997        self.before_taxes = before_taxes
after_taxes: Optional[float]
before_taxes: float
@staticmethod
def from_dict(obj: Any) -> PriceLimit:
 999    @staticmethod
1000    def from_dict(obj: Any) -> 'PriceLimit':
1001        assert isinstance(obj, dict)
1002        after_taxes = from_union([from_none, from_float], obj.get("after_taxes"))
1003        before_taxes = from_float(obj.get("before_taxes"))
1004        return PriceLimit(after_taxes, before_taxes)
def to_dict(self) -> dict:
1006    def to_dict(self) -> dict:
1007        result: dict = {}
1008        if self.after_taxes is not None:
1009            result["after_taxes"] = from_union([from_none, to_float], self.after_taxes)
1010        result["before_taxes"] = to_float(self.before_taxes)
1011        return result
class TaxIncluded(enum.Enum):
1014class TaxIncluded(Enum):
1015    NO = "NO"
1016    N_A = "N/A"
1017    YES = "YES"
NO = <TaxIncluded.NO: 'NO'>
N_A = <TaxIncluded.N_A: 'N/A'>
YES = <TaxIncluded.YES: 'YES'>
class TariffType(enum.Enum):
1020class TariffType(Enum):
1021    AD_HOC_PAYMENT = "AD_HOC_PAYMENT"
1022    PROFILE_CHEAP = "PROFILE_CHEAP"
1023    PROFILE_FAST = "PROFILE_FAST"
1024    PROFILE_GREEN = "PROFILE_GREEN"
1025    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:
1028class Tariff:
1029    country_code: str
1030    currency: str
1031    elements: List[TariffElement]
1032    end_date_time: Optional[str]
1033    energy_mix: Optional[EnergyMix]
1034    id: str
1035    last_updated: str
1036    max_price: Optional[PriceLimit]
1037    min_price: Optional[PriceLimit]
1038    party_id: str
1039    preauthorize_amount: Optional[float]
1040    start_date_time: Optional[str]
1041    tariff_alt_text: Optional[List[DisplayText]]
1042    tariff_alt_url: Optional[str]
1043    tax_included: TaxIncluded
1044    type: Optional[TariffType]
1045
1046    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[PriceLimit], min_price: Optional[PriceLimit], party_id: str, preauthorize_amount: Optional[float], start_date_time: Optional[str], tariff_alt_text: Optional[List[DisplayText]], tariff_alt_url: Optional[str], tax_included: TaxIncluded, type: Optional[TariffType]) -> None:
1047        self.country_code = country_code
1048        self.currency = currency
1049        self.elements = elements
1050        self.end_date_time = end_date_time
1051        self.energy_mix = energy_mix
1052        self.id = id
1053        self.last_updated = last_updated
1054        self.max_price = max_price
1055        self.min_price = min_price
1056        self.party_id = party_id
1057        self.preauthorize_amount = preauthorize_amount
1058        self.start_date_time = start_date_time
1059        self.tariff_alt_text = tariff_alt_text
1060        self.tariff_alt_url = tariff_alt_url
1061        self.tax_included = tax_included
1062        self.type = type
1063
1064    @staticmethod
1065    def from_dict(obj: Any) -> 'Tariff':
1066        assert isinstance(obj, dict)
1067        country_code = from_str(obj.get("country_code"))
1068        currency = from_str(obj.get("currency"))
1069        elements = from_list(TariffElement.from_dict, obj.get("elements"))
1070        end_date_time = from_union([from_none, from_str], obj.get("end_date_time"))
1071        energy_mix = from_union([from_none, EnergyMix.from_dict], obj.get("energy_mix"))
1072        id = from_str(obj.get("id"))
1073        last_updated = from_str(obj.get("last_updated"))
1074        max_price = from_union([from_none, PriceLimit.from_dict], obj.get("max_price"))
1075        min_price = from_union([from_none, PriceLimit.from_dict], obj.get("min_price"))
1076        party_id = from_str(obj.get("party_id"))
1077        preauthorize_amount = from_union([from_none, from_float], obj.get("preauthorize_amount"))
1078        start_date_time = from_union([from_none, from_str], obj.get("start_date_time"))
1079        tariff_alt_text = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("tariff_alt_text"))
1080        tariff_alt_url = from_union([from_none, from_str], obj.get("tariff_alt_url"))
1081        tax_included = TaxIncluded(obj.get("tax_included"))
1082        type = from_union([from_none, TariffType], obj.get("type"))
1083        return Tariff(country_code, currency, elements, end_date_time, energy_mix, id, last_updated, max_price, min_price, party_id, preauthorize_amount, start_date_time, tariff_alt_text, tariff_alt_url, tax_included, type)
1084
1085    def to_dict(self) -> dict:
1086        result: dict = {}
1087        result["country_code"] = from_str(self.country_code)
1088        result["currency"] = from_str(self.currency)
1089        result["elements"] = from_list(lambda x: to_class(TariffElement, x), self.elements)
1090        if self.end_date_time is not None:
1091            result["end_date_time"] = from_union([from_none, from_str], self.end_date_time)
1092        if self.energy_mix is not None:
1093            result["energy_mix"] = from_union([from_none, lambda x: to_class(EnergyMix, x)], self.energy_mix)
1094        result["id"] = from_str(self.id)
1095        result["last_updated"] = from_str(self.last_updated)
1096        if self.max_price is not None:
1097            result["max_price"] = from_union([from_none, lambda x: to_class(PriceLimit, x)], self.max_price)
1098        if self.min_price is not None:
1099            result["min_price"] = from_union([from_none, lambda x: to_class(PriceLimit, x)], self.min_price)
1100        result["party_id"] = from_str(self.party_id)
1101        if self.preauthorize_amount is not None:
1102            result["preauthorize_amount"] = from_union([from_none, to_float], self.preauthorize_amount)
1103        if self.start_date_time is not None:
1104            result["start_date_time"] = from_union([from_none, from_str], self.start_date_time)
1105        if self.tariff_alt_text is not None:
1106            result["tariff_alt_text"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.tariff_alt_text)
1107        if self.tariff_alt_url is not None:
1108            result["tariff_alt_url"] = from_union([from_none, from_str], self.tariff_alt_url)
1109        result["tax_included"] = to_enum(TaxIncluded, self.tax_included)
1110        if self.type is not None:
1111            result["type"] = from_union([from_none, lambda x: to_enum(TariffType, x)], self.type)
1112        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[PriceLimit], min_price: Optional[PriceLimit], party_id: str, preauthorize_amount: Optional[float], start_date_time: Optional[str], tariff_alt_text: Optional[List[DisplayText]], tariff_alt_url: Optional[str], tax_included: TaxIncluded, type: Optional[TariffType])
1046    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[PriceLimit], min_price: Optional[PriceLimit], party_id: str, preauthorize_amount: Optional[float], start_date_time: Optional[str], tariff_alt_text: Optional[List[DisplayText]], tariff_alt_url: Optional[str], tax_included: TaxIncluded, type: Optional[TariffType]) -> None:
1047        self.country_code = country_code
1048        self.currency = currency
1049        self.elements = elements
1050        self.end_date_time = end_date_time
1051        self.energy_mix = energy_mix
1052        self.id = id
1053        self.last_updated = last_updated
1054        self.max_price = max_price
1055        self.min_price = min_price
1056        self.party_id = party_id
1057        self.preauthorize_amount = preauthorize_amount
1058        self.start_date_time = start_date_time
1059        self.tariff_alt_text = tariff_alt_text
1060        self.tariff_alt_url = tariff_alt_url
1061        self.tax_included = tax_included
1062        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[PriceLimit]
min_price: Optional[PriceLimit]
party_id: str
preauthorize_amount: Optional[float]
start_date_time: Optional[str]
tariff_alt_text: Optional[List[DisplayText]]
tariff_alt_url: Optional[str]
tax_included: TaxIncluded
type: Optional[TariffType]
@staticmethod
def from_dict(obj: Any) -> Tariff:
1064    @staticmethod
1065    def from_dict(obj: Any) -> 'Tariff':
1066        assert isinstance(obj, dict)
1067        country_code = from_str(obj.get("country_code"))
1068        currency = from_str(obj.get("currency"))
1069        elements = from_list(TariffElement.from_dict, obj.get("elements"))
1070        end_date_time = from_union([from_none, from_str], obj.get("end_date_time"))
1071        energy_mix = from_union([from_none, EnergyMix.from_dict], obj.get("energy_mix"))
1072        id = from_str(obj.get("id"))
1073        last_updated = from_str(obj.get("last_updated"))
1074        max_price = from_union([from_none, PriceLimit.from_dict], obj.get("max_price"))
1075        min_price = from_union([from_none, PriceLimit.from_dict], obj.get("min_price"))
1076        party_id = from_str(obj.get("party_id"))
1077        preauthorize_amount = from_union([from_none, from_float], obj.get("preauthorize_amount"))
1078        start_date_time = from_union([from_none, from_str], obj.get("start_date_time"))
1079        tariff_alt_text = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("tariff_alt_text"))
1080        tariff_alt_url = from_union([from_none, from_str], obj.get("tariff_alt_url"))
1081        tax_included = TaxIncluded(obj.get("tax_included"))
1082        type = from_union([from_none, TariffType], obj.get("type"))
1083        return Tariff(country_code, currency, elements, end_date_time, energy_mix, id, last_updated, max_price, min_price, party_id, preauthorize_amount, start_date_time, tariff_alt_text, tariff_alt_url, tax_included, type)
def to_dict(self) -> dict:
1085    def to_dict(self) -> dict:
1086        result: dict = {}
1087        result["country_code"] = from_str(self.country_code)
1088        result["currency"] = from_str(self.currency)
1089        result["elements"] = from_list(lambda x: to_class(TariffElement, x), self.elements)
1090        if self.end_date_time is not None:
1091            result["end_date_time"] = from_union([from_none, from_str], self.end_date_time)
1092        if self.energy_mix is not None:
1093            result["energy_mix"] = from_union([from_none, lambda x: to_class(EnergyMix, x)], self.energy_mix)
1094        result["id"] = from_str(self.id)
1095        result["last_updated"] = from_str(self.last_updated)
1096        if self.max_price is not None:
1097            result["max_price"] = from_union([from_none, lambda x: to_class(PriceLimit, x)], self.max_price)
1098        if self.min_price is not None:
1099            result["min_price"] = from_union([from_none, lambda x: to_class(PriceLimit, x)], self.min_price)
1100        result["party_id"] = from_str(self.party_id)
1101        if self.preauthorize_amount is not None:
1102            result["preauthorize_amount"] = from_union([from_none, to_float], self.preauthorize_amount)
1103        if self.start_date_time is not None:
1104            result["start_date_time"] = from_union([from_none, from_str], self.start_date_time)
1105        if self.tariff_alt_text is not None:
1106            result["tariff_alt_text"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.tariff_alt_text)
1107        if self.tariff_alt_url is not None:
1108            result["tariff_alt_url"] = from_union([from_none, from_str], self.tariff_alt_url)
1109        result["tax_included"] = to_enum(TaxIncluded, self.tax_included)
1110        if self.type is not None:
1111            result["type"] = from_union([from_none, lambda x: to_enum(TariffType, x)], self.type)
1112        return result
class TaxAmount:
1115class TaxAmount:
1116    account_number: Optional[str]
1117    amount: float
1118    name: str
1119    percentage: Optional[float]
1120
1121    def __init__(self, account_number: Optional[str], amount: float, name: str, percentage: Optional[float]) -> None:
1122        self.account_number = account_number
1123        self.amount = amount
1124        self.name = name
1125        self.percentage = percentage
1126
1127    @staticmethod
1128    def from_dict(obj: Any) -> 'TaxAmount':
1129        assert isinstance(obj, dict)
1130        account_number = from_union([from_none, from_str], obj.get("account_number"))
1131        amount = from_float(obj.get("amount"))
1132        name = from_str(obj.get("name"))
1133        percentage = from_union([from_none, from_float], obj.get("percentage"))
1134        return TaxAmount(account_number, amount, name, percentage)
1135
1136    def to_dict(self) -> dict:
1137        result: dict = {}
1138        if self.account_number is not None:
1139            result["account_number"] = from_union([from_none, from_str], self.account_number)
1140        result["amount"] = to_float(self.amount)
1141        result["name"] = from_str(self.name)
1142        if self.percentage is not None:
1143            result["percentage"] = from_union([from_none, to_float], self.percentage)
1144        return result
TaxAmount( account_number: Optional[str], amount: float, name: str, percentage: Optional[float])
1121    def __init__(self, account_number: Optional[str], amount: float, name: str, percentage: Optional[float]) -> None:
1122        self.account_number = account_number
1123        self.amount = amount
1124        self.name = name
1125        self.percentage = percentage
account_number: Optional[str]
amount: float
name: str
percentage: Optional[float]
@staticmethod
def from_dict(obj: Any) -> TaxAmount:
1127    @staticmethod
1128    def from_dict(obj: Any) -> 'TaxAmount':
1129        assert isinstance(obj, dict)
1130        account_number = from_union([from_none, from_str], obj.get("account_number"))
1131        amount = from_float(obj.get("amount"))
1132        name = from_str(obj.get("name"))
1133        percentage = from_union([from_none, from_float], obj.get("percentage"))
1134        return TaxAmount(account_number, amount, name, percentage)
def to_dict(self) -> dict:
1136    def to_dict(self) -> dict:
1137        result: dict = {}
1138        if self.account_number is not None:
1139            result["account_number"] = from_union([from_none, from_str], self.account_number)
1140        result["amount"] = to_float(self.amount)
1141        result["name"] = from_str(self.name)
1142        if self.percentage is not None:
1143            result["percentage"] = from_union([from_none, to_float], self.percentage)
1144        return result
class Price:
1147class Price:
1148    before_taxes: float
1149    taxes: Optional[List[TaxAmount]]
1150
1151    def __init__(self, before_taxes: float, taxes: Optional[List[TaxAmount]]) -> None:
1152        self.before_taxes = before_taxes
1153        self.taxes = taxes
1154
1155    @staticmethod
1156    def from_dict(obj: Any) -> 'Price':
1157        assert isinstance(obj, dict)
1158        before_taxes = from_float(obj.get("before_taxes"))
1159        taxes = from_union([from_none, lambda x: from_list(TaxAmount.from_dict, x)], obj.get("taxes"))
1160        return Price(before_taxes, taxes)
1161
1162    def to_dict(self) -> dict:
1163        result: dict = {}
1164        result["before_taxes"] = to_float(self.before_taxes)
1165        if self.taxes is not None:
1166            result["taxes"] = from_union([from_none, lambda x: from_list(lambda x: to_class(TaxAmount, x), x)], self.taxes)
1167        return result
Price(before_taxes: float, taxes: Optional[List[TaxAmount]])
1151    def __init__(self, before_taxes: float, taxes: Optional[List[TaxAmount]]) -> None:
1152        self.before_taxes = before_taxes
1153        self.taxes = taxes
before_taxes: float
taxes: Optional[List[TaxAmount]]
@staticmethod
def from_dict(obj: Any) -> Price:
1155    @staticmethod
1156    def from_dict(obj: Any) -> 'Price':
1157        assert isinstance(obj, dict)
1158        before_taxes = from_float(obj.get("before_taxes"))
1159        taxes = from_union([from_none, lambda x: from_list(TaxAmount.from_dict, x)], obj.get("taxes"))
1160        return Price(before_taxes, taxes)
def to_dict(self) -> dict:
1162    def to_dict(self) -> dict:
1163        result: dict = {}
1164        result["before_taxes"] = to_float(self.before_taxes)
1165        if self.taxes is not None:
1166            result["taxes"] = from_union([from_none, lambda x: from_list(lambda x: to_class(TaxAmount, x), x)], self.taxes)
1167        return result
class Cdr:
1170class Cdr:
1171    auth_method: AuthMethod
1172    authorization_reference: Optional[str]
1173    cdr_location: CdrLocation
1174    cdr_token: CdrToken
1175    charging_periods: List[ChargingPeriod]
1176    country_code: str
1177    credit: Optional[bool]
1178    credit_reference_id: Optional[str]
1179    currency: str
1180    end_date_time: str
1181    home_charging_compensation: Optional[bool]
1182    id: str
1183    invoice_reference_id: Optional[str]
1184    last_updated: str
1185    meter_id: Optional[str]
1186    party_id: str
1187    remark: Optional[str]
1188    session_id: Optional[str]
1189    signed_data: Optional[SignedData]
1190    start_date_time: str
1191    tariffs: Optional[List[Tariff]]
1192    total_cost: Price
1193    total_energy: float
1194    total_energy_cost: Optional[Price]
1195    total_fixed_cost: Optional[Price]
1196    total_parking_cost: Optional[Price]
1197    total_parking_time: Optional[float]
1198    total_reservation_cost: Optional[Price]
1199    total_time: float
1200    total_time_cost: Optional[Price]
1201
1202    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:
1203        self.auth_method = auth_method
1204        self.authorization_reference = authorization_reference
1205        self.cdr_location = cdr_location
1206        self.cdr_token = cdr_token
1207        self.charging_periods = charging_periods
1208        self.country_code = country_code
1209        self.credit = credit
1210        self.credit_reference_id = credit_reference_id
1211        self.currency = currency
1212        self.end_date_time = end_date_time
1213        self.home_charging_compensation = home_charging_compensation
1214        self.id = id
1215        self.invoice_reference_id = invoice_reference_id
1216        self.last_updated = last_updated
1217        self.meter_id = meter_id
1218        self.party_id = party_id
1219        self.remark = remark
1220        self.session_id = session_id
1221        self.signed_data = signed_data
1222        self.start_date_time = start_date_time
1223        self.tariffs = tariffs
1224        self.total_cost = total_cost
1225        self.total_energy = total_energy
1226        self.total_energy_cost = total_energy_cost
1227        self.total_fixed_cost = total_fixed_cost
1228        self.total_parking_cost = total_parking_cost
1229        self.total_parking_time = total_parking_time
1230        self.total_reservation_cost = total_reservation_cost
1231        self.total_time = total_time
1232        self.total_time_cost = total_time_cost
1233
1234    @staticmethod
1235    def from_dict(obj: Any) -> 'Cdr':
1236        assert isinstance(obj, dict)
1237        auth_method = AuthMethod(obj.get("auth_method"))
1238        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
1239        cdr_location = CdrLocation.from_dict(obj.get("cdr_location"))
1240        cdr_token = CdrToken.from_dict(obj.get("cdr_token"))
1241        charging_periods = from_list(ChargingPeriod.from_dict, obj.get("charging_periods"))
1242        country_code = from_str(obj.get("country_code"))
1243        credit = from_union([from_none, from_bool], obj.get("credit"))
1244        credit_reference_id = from_union([from_none, from_str], obj.get("credit_reference_id"))
1245        currency = from_str(obj.get("currency"))
1246        end_date_time = from_str(obj.get("end_date_time"))
1247        home_charging_compensation = from_union([from_none, from_bool], obj.get("home_charging_compensation"))
1248        id = from_str(obj.get("id"))
1249        invoice_reference_id = from_union([from_none, from_str], obj.get("invoice_reference_id"))
1250        last_updated = from_str(obj.get("last_updated"))
1251        meter_id = from_union([from_none, from_str], obj.get("meter_id"))
1252        party_id = from_str(obj.get("party_id"))
1253        remark = from_union([from_none, from_str], obj.get("remark"))
1254        session_id = from_union([from_none, from_str], obj.get("session_id"))
1255        signed_data = from_union([from_none, SignedData.from_dict], obj.get("signed_data"))
1256        start_date_time = from_str(obj.get("start_date_time"))
1257        tariffs = from_union([from_none, lambda x: from_list(Tariff.from_dict, x)], obj.get("tariffs"))
1258        total_cost = Price.from_dict(obj.get("total_cost"))
1259        total_energy = from_float(obj.get("total_energy"))
1260        total_energy_cost = from_union([from_none, Price.from_dict], obj.get("total_energy_cost"))
1261        total_fixed_cost = from_union([from_none, Price.from_dict], obj.get("total_fixed_cost"))
1262        total_parking_cost = from_union([from_none, Price.from_dict], obj.get("total_parking_cost"))
1263        total_parking_time = from_union([from_none, from_float], obj.get("total_parking_time"))
1264        total_reservation_cost = from_union([from_none, Price.from_dict], obj.get("total_reservation_cost"))
1265        total_time = from_float(obj.get("total_time"))
1266        total_time_cost = from_union([from_none, Price.from_dict], obj.get("total_time_cost"))
1267        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)
1268
1269    def to_dict(self) -> dict:
1270        result: dict = {}
1271        result["auth_method"] = to_enum(AuthMethod, self.auth_method)
1272        if self.authorization_reference is not None:
1273            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
1274        result["cdr_location"] = to_class(CdrLocation, self.cdr_location)
1275        result["cdr_token"] = to_class(CdrToken, self.cdr_token)
1276        result["charging_periods"] = from_list(lambda x: to_class(ChargingPeriod, x), self.charging_periods)
1277        result["country_code"] = from_str(self.country_code)
1278        if self.credit is not None:
1279            result["credit"] = from_union([from_none, from_bool], self.credit)
1280        if self.credit_reference_id is not None:
1281            result["credit_reference_id"] = from_union([from_none, from_str], self.credit_reference_id)
1282        result["currency"] = from_str(self.currency)
1283        result["end_date_time"] = from_str(self.end_date_time)
1284        if self.home_charging_compensation is not None:
1285            result["home_charging_compensation"] = from_union([from_none, from_bool], self.home_charging_compensation)
1286        result["id"] = from_str(self.id)
1287        if self.invoice_reference_id is not None:
1288            result["invoice_reference_id"] = from_union([from_none, from_str], self.invoice_reference_id)
1289        result["last_updated"] = from_str(self.last_updated)
1290        if self.meter_id is not None:
1291            result["meter_id"] = from_union([from_none, from_str], self.meter_id)
1292        result["party_id"] = from_str(self.party_id)
1293        if self.remark is not None:
1294            result["remark"] = from_union([from_none, from_str], self.remark)
1295        if self.session_id is not None:
1296            result["session_id"] = from_union([from_none, from_str], self.session_id)
1297        if self.signed_data is not None:
1298            result["signed_data"] = from_union([from_none, lambda x: to_class(SignedData, x)], self.signed_data)
1299        result["start_date_time"] = from_str(self.start_date_time)
1300        if self.tariffs is not None:
1301            result["tariffs"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Tariff, x), x)], self.tariffs)
1302        result["total_cost"] = to_class(Price, self.total_cost)
1303        result["total_energy"] = to_float(self.total_energy)
1304        if self.total_energy_cost is not None:
1305            result["total_energy_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_energy_cost)
1306        if self.total_fixed_cost is not None:
1307            result["total_fixed_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_fixed_cost)
1308        if self.total_parking_cost is not None:
1309            result["total_parking_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_parking_cost)
1310        if self.total_parking_time is not None:
1311            result["total_parking_time"] = from_union([from_none, to_float], self.total_parking_time)
1312        if self.total_reservation_cost is not None:
1313            result["total_reservation_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_reservation_cost)
1314        result["total_time"] = to_float(self.total_time)
1315        if self.total_time_cost is not None:
1316            result["total_time_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_time_cost)
1317        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])
1202    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:
1203        self.auth_method = auth_method
1204        self.authorization_reference = authorization_reference
1205        self.cdr_location = cdr_location
1206        self.cdr_token = cdr_token
1207        self.charging_periods = charging_periods
1208        self.country_code = country_code
1209        self.credit = credit
1210        self.credit_reference_id = credit_reference_id
1211        self.currency = currency
1212        self.end_date_time = end_date_time
1213        self.home_charging_compensation = home_charging_compensation
1214        self.id = id
1215        self.invoice_reference_id = invoice_reference_id
1216        self.last_updated = last_updated
1217        self.meter_id = meter_id
1218        self.party_id = party_id
1219        self.remark = remark
1220        self.session_id = session_id
1221        self.signed_data = signed_data
1222        self.start_date_time = start_date_time
1223        self.tariffs = tariffs
1224        self.total_cost = total_cost
1225        self.total_energy = total_energy
1226        self.total_energy_cost = total_energy_cost
1227        self.total_fixed_cost = total_fixed_cost
1228        self.total_parking_cost = total_parking_cost
1229        self.total_parking_time = total_parking_time
1230        self.total_reservation_cost = total_reservation_cost
1231        self.total_time = total_time
1232        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:
1234    @staticmethod
1235    def from_dict(obj: Any) -> 'Cdr':
1236        assert isinstance(obj, dict)
1237        auth_method = AuthMethod(obj.get("auth_method"))
1238        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
1239        cdr_location = CdrLocation.from_dict(obj.get("cdr_location"))
1240        cdr_token = CdrToken.from_dict(obj.get("cdr_token"))
1241        charging_periods = from_list(ChargingPeriod.from_dict, obj.get("charging_periods"))
1242        country_code = from_str(obj.get("country_code"))
1243        credit = from_union([from_none, from_bool], obj.get("credit"))
1244        credit_reference_id = from_union([from_none, from_str], obj.get("credit_reference_id"))
1245        currency = from_str(obj.get("currency"))
1246        end_date_time = from_str(obj.get("end_date_time"))
1247        home_charging_compensation = from_union([from_none, from_bool], obj.get("home_charging_compensation"))
1248        id = from_str(obj.get("id"))
1249        invoice_reference_id = from_union([from_none, from_str], obj.get("invoice_reference_id"))
1250        last_updated = from_str(obj.get("last_updated"))
1251        meter_id = from_union([from_none, from_str], obj.get("meter_id"))
1252        party_id = from_str(obj.get("party_id"))
1253        remark = from_union([from_none, from_str], obj.get("remark"))
1254        session_id = from_union([from_none, from_str], obj.get("session_id"))
1255        signed_data = from_union([from_none, SignedData.from_dict], obj.get("signed_data"))
1256        start_date_time = from_str(obj.get("start_date_time"))
1257        tariffs = from_union([from_none, lambda x: from_list(Tariff.from_dict, x)], obj.get("tariffs"))
1258        total_cost = Price.from_dict(obj.get("total_cost"))
1259        total_energy = from_float(obj.get("total_energy"))
1260        total_energy_cost = from_union([from_none, Price.from_dict], obj.get("total_energy_cost"))
1261        total_fixed_cost = from_union([from_none, Price.from_dict], obj.get("total_fixed_cost"))
1262        total_parking_cost = from_union([from_none, Price.from_dict], obj.get("total_parking_cost"))
1263        total_parking_time = from_union([from_none, from_float], obj.get("total_parking_time"))
1264        total_reservation_cost = from_union([from_none, Price.from_dict], obj.get("total_reservation_cost"))
1265        total_time = from_float(obj.get("total_time"))
1266        total_time_cost = from_union([from_none, Price.from_dict], obj.get("total_time_cost"))
1267        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:
1269    def to_dict(self) -> dict:
1270        result: dict = {}
1271        result["auth_method"] = to_enum(AuthMethod, self.auth_method)
1272        if self.authorization_reference is not None:
1273            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
1274        result["cdr_location"] = to_class(CdrLocation, self.cdr_location)
1275        result["cdr_token"] = to_class(CdrToken, self.cdr_token)
1276        result["charging_periods"] = from_list(lambda x: to_class(ChargingPeriod, x), self.charging_periods)
1277        result["country_code"] = from_str(self.country_code)
1278        if self.credit is not None:
1279            result["credit"] = from_union([from_none, from_bool], self.credit)
1280        if self.credit_reference_id is not None:
1281            result["credit_reference_id"] = from_union([from_none, from_str], self.credit_reference_id)
1282        result["currency"] = from_str(self.currency)
1283        result["end_date_time"] = from_str(self.end_date_time)
1284        if self.home_charging_compensation is not None:
1285            result["home_charging_compensation"] = from_union([from_none, from_bool], self.home_charging_compensation)
1286        result["id"] = from_str(self.id)
1287        if self.invoice_reference_id is not None:
1288            result["invoice_reference_id"] = from_union([from_none, from_str], self.invoice_reference_id)
1289        result["last_updated"] = from_str(self.last_updated)
1290        if self.meter_id is not None:
1291            result["meter_id"] = from_union([from_none, from_str], self.meter_id)
1292        result["party_id"] = from_str(self.party_id)
1293        if self.remark is not None:
1294            result["remark"] = from_union([from_none, from_str], self.remark)
1295        if self.session_id is not None:
1296            result["session_id"] = from_union([from_none, from_str], self.session_id)
1297        if self.signed_data is not None:
1298            result["signed_data"] = from_union([from_none, lambda x: to_class(SignedData, x)], self.signed_data)
1299        result["start_date_time"] = from_str(self.start_date_time)
1300        if self.tariffs is not None:
1301            result["tariffs"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Tariff, x), x)], self.tariffs)
1302        result["total_cost"] = to_class(Price, self.total_cost)
1303        result["total_energy"] = to_float(self.total_energy)
1304        if self.total_energy_cost is not None:
1305            result["total_energy_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_energy_cost)
1306        if self.total_fixed_cost is not None:
1307            result["total_fixed_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_fixed_cost)
1308        if self.total_parking_cost is not None:
1309            result["total_parking_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_parking_cost)
1310        if self.total_parking_time is not None:
1311            result["total_parking_time"] = from_union([from_none, to_float], self.total_parking_time)
1312        if self.total_reservation_cost is not None:
1313            result["total_reservation_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_reservation_cost)
1314        result["total_time"] = to_float(self.total_time)
1315        if self.total_time_cost is not None:
1316            result["total_time_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_time_cost)
1317        return result
class ChargingPreferences:
1320class ChargingPreferences:
1321    departure_time: Optional[str]
1322    discharge_allowed: Optional[bool]
1323    energy_need: Optional[float]
1324    profile_type: ProfileType
1325
1326    def __init__(self, departure_time: Optional[str], discharge_allowed: Optional[bool], energy_need: Optional[float], profile_type: ProfileType) -> None:
1327        self.departure_time = departure_time
1328        self.discharge_allowed = discharge_allowed
1329        self.energy_need = energy_need
1330        self.profile_type = profile_type
1331
1332    @staticmethod
1333    def from_dict(obj: Any) -> 'ChargingPreferences':
1334        assert isinstance(obj, dict)
1335        departure_time = from_union([from_none, from_str], obj.get("departure_time"))
1336        discharge_allowed = from_union([from_none, from_bool], obj.get("discharge_allowed"))
1337        energy_need = from_union([from_none, from_float], obj.get("energy_need"))
1338        profile_type = ProfileType(obj.get("profile_type"))
1339        return ChargingPreferences(departure_time, discharge_allowed, energy_need, profile_type)
1340
1341    def to_dict(self) -> dict:
1342        result: dict = {}
1343        if self.departure_time is not None:
1344            result["departure_time"] = from_union([from_none, from_str], self.departure_time)
1345        if self.discharge_allowed is not None:
1346            result["discharge_allowed"] = from_union([from_none, from_bool], self.discharge_allowed)
1347        if self.energy_need is not None:
1348            result["energy_need"] = from_union([from_none, to_float], self.energy_need)
1349        result["profile_type"] = to_enum(ProfileType, self.profile_type)
1350        return result
ChargingPreferences( departure_time: Optional[str], discharge_allowed: Optional[bool], energy_need: Optional[float], profile_type: ProfileType)
1326    def __init__(self, departure_time: Optional[str], discharge_allowed: Optional[bool], energy_need: Optional[float], profile_type: ProfileType) -> None:
1327        self.departure_time = departure_time
1328        self.discharge_allowed = discharge_allowed
1329        self.energy_need = energy_need
1330        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:
1332    @staticmethod
1333    def from_dict(obj: Any) -> 'ChargingPreferences':
1334        assert isinstance(obj, dict)
1335        departure_time = from_union([from_none, from_str], obj.get("departure_time"))
1336        discharge_allowed = from_union([from_none, from_bool], obj.get("discharge_allowed"))
1337        energy_need = from_union([from_none, from_float], obj.get("energy_need"))
1338        profile_type = ProfileType(obj.get("profile_type"))
1339        return ChargingPreferences(departure_time, discharge_allowed, energy_need, profile_type)
def to_dict(self) -> dict:
1341    def to_dict(self) -> dict:
1342        result: dict = {}
1343        if self.departure_time is not None:
1344            result["departure_time"] = from_union([from_none, from_str], self.departure_time)
1345        if self.discharge_allowed is not None:
1346            result["discharge_allowed"] = from_union([from_none, from_bool], self.discharge_allowed)
1347        if self.energy_need is not None:
1348            result["energy_need"] = from_union([from_none, to_float], self.energy_need)
1349        result["profile_type"] = to_enum(ProfileType, self.profile_type)
1350        return result
class ChargingProfileResponseType(enum.Enum):
1353class ChargingProfileResponseType(Enum):
1354    ACCEPTED = "ACCEPTED"
1355    NOT_SUPPORTED = "NOT_SUPPORTED"
1356    REJECTED = "REJECTED"
1357    TOO_OFTEN = "TOO_OFTEN"
1358    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:
1361class ChargingProfileResponse:
1362    result: ChargingProfileResponseType
1363    timeout: int
1364
1365    def __init__(self, result: ChargingProfileResponseType, timeout: int) -> None:
1366        self.result = result
1367        self.timeout = timeout
1368
1369    @staticmethod
1370    def from_dict(obj: Any) -> 'ChargingProfileResponse':
1371        assert isinstance(obj, dict)
1372        result = ChargingProfileResponseType(obj.get("result"))
1373        timeout = from_int(obj.get("timeout"))
1374        return ChargingProfileResponse(result, timeout)
1375
1376    def to_dict(self) -> dict:
1377        result: dict = {}
1378        result["result"] = to_enum(ChargingProfileResponseType, self.result)
1379        result["timeout"] = from_int(self.timeout)
1380        return result
ChargingProfileResponse(result: ChargingProfileResponseType, timeout: int)
1365    def __init__(self, result: ChargingProfileResponseType, timeout: int) -> None:
1366        self.result = result
1367        self.timeout = timeout
timeout: int
@staticmethod
def from_dict(obj: Any) -> ChargingProfileResponse:
1369    @staticmethod
1370    def from_dict(obj: Any) -> 'ChargingProfileResponse':
1371        assert isinstance(obj, dict)
1372        result = ChargingProfileResponseType(obj.get("result"))
1373        timeout = from_int(obj.get("timeout"))
1374        return ChargingProfileResponse(result, timeout)
def to_dict(self) -> dict:
1376    def to_dict(self) -> dict:
1377        result: dict = {}
1378        result["result"] = to_enum(ChargingProfileResponseType, self.result)
1379        result["timeout"] = from_int(self.timeout)
1380        return result
class ChargingProfileResult:
1383class ChargingProfileResult:
1384    result: ChargingProfileResultType
1385
1386    def __init__(self, result: ChargingProfileResultType) -> None:
1387        self.result = result
1388
1389    @staticmethod
1390    def from_dict(obj: Any) -> 'ChargingProfileResult':
1391        assert isinstance(obj, dict)
1392        result = ChargingProfileResultType(obj.get("result"))
1393        return ChargingProfileResult(result)
1394
1395    def to_dict(self) -> dict:
1396        result: dict = {}
1397        result["result"] = to_enum(ChargingProfileResultType, self.result)
1398        return result
ChargingProfileResult(result: ChargingProfileResultType)
1386    def __init__(self, result: ChargingProfileResultType) -> None:
1387        self.result = result
@staticmethod
def from_dict(obj: Any) -> ChargingProfileResult:
1389    @staticmethod
1390    def from_dict(obj: Any) -> 'ChargingProfileResult':
1391        assert isinstance(obj, dict)
1392        result = ChargingProfileResultType(obj.get("result"))
1393        return ChargingProfileResult(result)
def to_dict(self) -> dict:
1395    def to_dict(self) -> dict:
1396        result: dict = {}
1397        result["result"] = to_enum(ChargingProfileResultType, self.result)
1398        return result
class ClearProfileResult:
1401class ClearProfileResult:
1402    result: ChargingProfileResultType
1403
1404    def __init__(self, result: ChargingProfileResultType) -> None:
1405        self.result = result
1406
1407    @staticmethod
1408    def from_dict(obj: Any) -> 'ClearProfileResult':
1409        assert isinstance(obj, dict)
1410        result = ChargingProfileResultType(obj.get("result"))
1411        return ClearProfileResult(result)
1412
1413    def to_dict(self) -> dict:
1414        result: dict = {}
1415        result["result"] = to_enum(ChargingProfileResultType, self.result)
1416        return result
ClearProfileResult(result: ChargingProfileResultType)
1404    def __init__(self, result: ChargingProfileResultType) -> None:
1405        self.result = result
@staticmethod
def from_dict(obj: Any) -> ClearProfileResult:
1407    @staticmethod
1408    def from_dict(obj: Any) -> 'ClearProfileResult':
1409        assert isinstance(obj, dict)
1410        result = ChargingProfileResultType(obj.get("result"))
1411        return ClearProfileResult(result)
def to_dict(self) -> dict:
1413    def to_dict(self) -> dict:
1414        result: dict = {}
1415        result["result"] = to_enum(ChargingProfileResultType, self.result)
1416        return result
class CommandResponseType(enum.Enum):
1419class CommandResponseType(Enum):
1420    ACCEPTED = "ACCEPTED"
1421    NOT_SUPPORTED = "NOT_SUPPORTED"
1422    REJECTED = "REJECTED"
1423    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:
1426class CommandResponse:
1427    message: Optional[List[DisplayText]]
1428    result: CommandResponseType
1429    timeout: int
1430
1431    def __init__(self, message: Optional[List[DisplayText]], result: CommandResponseType, timeout: int) -> None:
1432        self.message = message
1433        self.result = result
1434        self.timeout = timeout
1435
1436    @staticmethod
1437    def from_dict(obj: Any) -> 'CommandResponse':
1438        assert isinstance(obj, dict)
1439        message = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("message"))
1440        result = CommandResponseType(obj.get("result"))
1441        timeout = from_int(obj.get("timeout"))
1442        return CommandResponse(message, result, timeout)
1443
1444    def to_dict(self) -> dict:
1445        result: dict = {}
1446        if self.message is not None:
1447            result["message"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.message)
1448        result["result"] = to_enum(CommandResponseType, self.result)
1449        result["timeout"] = from_int(self.timeout)
1450        return result
CommandResponse( message: Optional[List[DisplayText]], result: CommandResponseType, timeout: int)
1431    def __init__(self, message: Optional[List[DisplayText]], result: CommandResponseType, timeout: int) -> None:
1432        self.message = message
1433        self.result = result
1434        self.timeout = timeout
message: Optional[List[DisplayText]]
timeout: int
@staticmethod
def from_dict(obj: Any) -> CommandResponse:
1436    @staticmethod
1437    def from_dict(obj: Any) -> 'CommandResponse':
1438        assert isinstance(obj, dict)
1439        message = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("message"))
1440        result = CommandResponseType(obj.get("result"))
1441        timeout = from_int(obj.get("timeout"))
1442        return CommandResponse(message, result, timeout)
def to_dict(self) -> dict:
1444    def to_dict(self) -> dict:
1445        result: dict = {}
1446        if self.message is not None:
1447            result["message"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.message)
1448        result["result"] = to_enum(CommandResponseType, self.result)
1449        result["timeout"] = from_int(self.timeout)
1450        return result
class CommandResultType(enum.Enum):
1453class CommandResultType(Enum):
1454    ACCEPTED = "ACCEPTED"
1455    CANCELED_RESERVATION = "CANCELED_RESERVATION"
1456    EVSE_INOPERATIVE = "EVSE_INOPERATIVE"
1457    EVSE_OCCUPIED = "EVSE_OCCUPIED"
1458    FAILED = "FAILED"
1459    NOT_SUPPORTED = "NOT_SUPPORTED"
1460    REJECTED = "REJECTED"
1461    TIMEOUT = "TIMEOUT"
1462    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:
1465class CommandResult:
1466    message: Optional[List[DisplayText]]
1467    result: CommandResultType
1468
1469    def __init__(self, message: Optional[List[DisplayText]], result: CommandResultType) -> None:
1470        self.message = message
1471        self.result = result
1472
1473    @staticmethod
1474    def from_dict(obj: Any) -> 'CommandResult':
1475        assert isinstance(obj, dict)
1476        message = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("message"))
1477        result = CommandResultType(obj.get("result"))
1478        return CommandResult(message, result)
1479
1480    def to_dict(self) -> dict:
1481        result: dict = {}
1482        if self.message is not None:
1483            result["message"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.message)
1484        result["result"] = to_enum(CommandResultType, self.result)
1485        return result
CommandResult( message: Optional[List[DisplayText]], result: CommandResultType)
1469    def __init__(self, message: Optional[List[DisplayText]], result: CommandResultType) -> None:
1470        self.message = message
1471        self.result = result
message: Optional[List[DisplayText]]
@staticmethod
def from_dict(obj: Any) -> CommandResult:
1473    @staticmethod
1474    def from_dict(obj: Any) -> 'CommandResult':
1475        assert isinstance(obj, dict)
1476        message = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("message"))
1477        result = CommandResultType(obj.get("result"))
1478        return CommandResult(message, result)
def to_dict(self) -> dict:
1480    def to_dict(self) -> dict:
1481        result: dict = {}
1482        if self.message is not None:
1483            result["message"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.message)
1484        result["result"] = to_enum(CommandResultType, self.result)
1485        return result
class ConnectorCapability(enum.Enum):
1488class ConnectorCapability(Enum):
1489    ISO_15118_20__PLUG_AND_CHARGE = "ISO_15118_20_PLUG_AND_CHARGE"
1490    ISO_15118_2__PLUG_AND_CHARGE = "ISO_15118_2_PLUG_AND_CHARGE"
ISO_15118_20__PLUG_AND_CHARGE = <ConnectorCapability.ISO_15118_20__PLUG_AND_CHARGE: 'ISO_15118_20_PLUG_AND_CHARGE'>
ISO_15118_2__PLUG_AND_CHARGE = <ConnectorCapability.ISO_15118_2__PLUG_AND_CHARGE: 'ISO_15118_2_PLUG_AND_CHARGE'>
class Connector:
1493class Connector:
1494    capabilities: Optional[List[ConnectorCapability]]
1495    format: ConnectorFormat
1496    id: str
1497    last_updated: str
1498    max_amperage: int
1499    max_electric_power: Optional[int]
1500    max_voltage: int
1501    power_type: PowerType
1502    standard: ConnectorType
1503    tariff_ids: Optional[List[str]]
1504    terms_and_conditions: Optional[str]
1505
1506    def __init__(self, capabilities: Optional[List[ConnectorCapability]], 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:
1507        self.capabilities = capabilities
1508        self.format = format
1509        self.id = id
1510        self.last_updated = last_updated
1511        self.max_amperage = max_amperage
1512        self.max_electric_power = max_electric_power
1513        self.max_voltage = max_voltage
1514        self.power_type = power_type
1515        self.standard = standard
1516        self.tariff_ids = tariff_ids
1517        self.terms_and_conditions = terms_and_conditions
1518
1519    @staticmethod
1520    def from_dict(obj: Any) -> 'Connector':
1521        assert isinstance(obj, dict)
1522        capabilities = from_union([from_none, lambda x: from_list(ConnectorCapability, x)], obj.get("capabilities"))
1523        format = ConnectorFormat(obj.get("format"))
1524        id = from_str(obj.get("id"))
1525        last_updated = from_str(obj.get("last_updated"))
1526        max_amperage = from_int(obj.get("max_amperage"))
1527        max_electric_power = from_union([from_none, from_int], obj.get("max_electric_power"))
1528        max_voltage = from_int(obj.get("max_voltage"))
1529        power_type = PowerType(obj.get("power_type"))
1530        standard = ConnectorType(obj.get("standard"))
1531        tariff_ids = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("tariff_ids"))
1532        terms_and_conditions = from_union([from_none, from_str], obj.get("terms_and_conditions"))
1533        return Connector(capabilities, format, id, last_updated, max_amperage, max_electric_power, max_voltage, power_type, standard, tariff_ids, terms_and_conditions)
1534
1535    def to_dict(self) -> dict:
1536        result: dict = {}
1537        if self.capabilities is not None:
1538            result["capabilities"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(ConnectorCapability, x), x)], self.capabilities)
1539        result["format"] = to_enum(ConnectorFormat, self.format)
1540        result["id"] = from_str(self.id)
1541        result["last_updated"] = from_str(self.last_updated)
1542        result["max_amperage"] = from_int(self.max_amperage)
1543        if self.max_electric_power is not None:
1544            result["max_electric_power"] = from_union([from_none, from_int], self.max_electric_power)
1545        result["max_voltage"] = from_int(self.max_voltage)
1546        result["power_type"] = to_enum(PowerType, self.power_type)
1547        result["standard"] = to_enum(ConnectorType, self.standard)
1548        if self.tariff_ids is not None:
1549            result["tariff_ids"] = from_union([from_none, lambda x: from_list(from_str, x)], self.tariff_ids)
1550        if self.terms_and_conditions is not None:
1551            result["terms_and_conditions"] = from_union([from_none, from_str], self.terms_and_conditions)
1552        return result
Connector( capabilities: Optional[List[ConnectorCapability]], 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])
1506    def __init__(self, capabilities: Optional[List[ConnectorCapability]], 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:
1507        self.capabilities = capabilities
1508        self.format = format
1509        self.id = id
1510        self.last_updated = last_updated
1511        self.max_amperage = max_amperage
1512        self.max_electric_power = max_electric_power
1513        self.max_voltage = max_voltage
1514        self.power_type = power_type
1515        self.standard = standard
1516        self.tariff_ids = tariff_ids
1517        self.terms_and_conditions = terms_and_conditions
capabilities: Optional[List[ConnectorCapability]]
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:
1519    @staticmethod
1520    def from_dict(obj: Any) -> 'Connector':
1521        assert isinstance(obj, dict)
1522        capabilities = from_union([from_none, lambda x: from_list(ConnectorCapability, x)], obj.get("capabilities"))
1523        format = ConnectorFormat(obj.get("format"))
1524        id = from_str(obj.get("id"))
1525        last_updated = from_str(obj.get("last_updated"))
1526        max_amperage = from_int(obj.get("max_amperage"))
1527        max_electric_power = from_union([from_none, from_int], obj.get("max_electric_power"))
1528        max_voltage = from_int(obj.get("max_voltage"))
1529        power_type = PowerType(obj.get("power_type"))
1530        standard = ConnectorType(obj.get("standard"))
1531        tariff_ids = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("tariff_ids"))
1532        terms_and_conditions = from_union([from_none, from_str], obj.get("terms_and_conditions"))
1533        return Connector(capabilities, format, id, last_updated, max_amperage, max_electric_power, max_voltage, power_type, standard, tariff_ids, terms_and_conditions)
def to_dict(self) -> dict:
1535    def to_dict(self) -> dict:
1536        result: dict = {}
1537        if self.capabilities is not None:
1538            result["capabilities"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(ConnectorCapability, x), x)], self.capabilities)
1539        result["format"] = to_enum(ConnectorFormat, self.format)
1540        result["id"] = from_str(self.id)
1541        result["last_updated"] = from_str(self.last_updated)
1542        result["max_amperage"] = from_int(self.max_amperage)
1543        if self.max_electric_power is not None:
1544            result["max_electric_power"] = from_union([from_none, from_int], self.max_electric_power)
1545        result["max_voltage"] = from_int(self.max_voltage)
1546        result["power_type"] = to_enum(PowerType, self.power_type)
1547        result["standard"] = to_enum(ConnectorType, self.standard)
1548        if self.tariff_ids is not None:
1549            result["tariff_ids"] = from_union([from_none, lambda x: from_list(from_str, x)], self.tariff_ids)
1550        if self.terms_and_conditions is not None:
1551            result["terms_and_conditions"] = from_union([from_none, from_str], self.terms_and_conditions)
1552        return result
class ImageCategory(enum.Enum):
1555class ImageCategory(Enum):
1556    CHARGER = "CHARGER"
1557    ENTRANCE = "ENTRANCE"
1558    LOCATION = "LOCATION"
1559    NETWORK = "NETWORK"
1560    OPERATOR = "OPERATOR"
1561    OTHER = "OTHER"
1562    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:
1565class Image:
1566    category: ImageCategory
1567    height: Optional[int]
1568    thumbnail: Optional[str]
1569    type: str
1570    url: str
1571    width: Optional[int]
1572
1573    def __init__(self, category: ImageCategory, height: Optional[int], thumbnail: Optional[str], type: str, url: str, width: Optional[int]) -> None:
1574        self.category = category
1575        self.height = height
1576        self.thumbnail = thumbnail
1577        self.type = type
1578        self.url = url
1579        self.width = width
1580
1581    @staticmethod
1582    def from_dict(obj: Any) -> 'Image':
1583        assert isinstance(obj, dict)
1584        category = ImageCategory(obj.get("category"))
1585        height = from_union([from_none, from_int], obj.get("height"))
1586        thumbnail = from_union([from_none, from_str], obj.get("thumbnail"))
1587        type = from_str(obj.get("type"))
1588        url = from_str(obj.get("url"))
1589        width = from_union([from_none, from_int], obj.get("width"))
1590        return Image(category, height, thumbnail, type, url, width)
1591
1592    def to_dict(self) -> dict:
1593        result: dict = {}
1594        result["category"] = to_enum(ImageCategory, self.category)
1595        if self.height is not None:
1596            result["height"] = from_union([from_none, from_int], self.height)
1597        if self.thumbnail is not None:
1598            result["thumbnail"] = from_union([from_none, from_str], self.thumbnail)
1599        result["type"] = from_str(self.type)
1600        result["url"] = from_str(self.url)
1601        if self.width is not None:
1602            result["width"] = from_union([from_none, from_int], self.width)
1603        return result
Image( category: ImageCategory, height: Optional[int], thumbnail: Optional[str], type: str, url: str, width: Optional[int])
1573    def __init__(self, category: ImageCategory, height: Optional[int], thumbnail: Optional[str], type: str, url: str, width: Optional[int]) -> None:
1574        self.category = category
1575        self.height = height
1576        self.thumbnail = thumbnail
1577        self.type = type
1578        self.url = url
1579        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:
1581    @staticmethod
1582    def from_dict(obj: Any) -> 'Image':
1583        assert isinstance(obj, dict)
1584        category = ImageCategory(obj.get("category"))
1585        height = from_union([from_none, from_int], obj.get("height"))
1586        thumbnail = from_union([from_none, from_str], obj.get("thumbnail"))
1587        type = from_str(obj.get("type"))
1588        url = from_str(obj.get("url"))
1589        width = from_union([from_none, from_int], obj.get("width"))
1590        return Image(category, height, thumbnail, type, url, width)
def to_dict(self) -> dict:
1592    def to_dict(self) -> dict:
1593        result: dict = {}
1594        result["category"] = to_enum(ImageCategory, self.category)
1595        if self.height is not None:
1596            result["height"] = from_union([from_none, from_int], self.height)
1597        if self.thumbnail is not None:
1598            result["thumbnail"] = from_union([from_none, from_str], self.thumbnail)
1599        result["type"] = from_str(self.type)
1600        result["url"] = from_str(self.url)
1601        if self.width is not None:
1602            result["width"] = from_union([from_none, from_int], self.width)
1603        return result
class BusinessDetails:
1606class BusinessDetails:
1607    logo: Optional[Image]
1608    name: str
1609    website: Optional[str]
1610
1611    def __init__(self, logo: Optional[Image], name: str, website: Optional[str]) -> None:
1612        self.logo = logo
1613        self.name = name
1614        self.website = website
1615
1616    @staticmethod
1617    def from_dict(obj: Any) -> 'BusinessDetails':
1618        assert isinstance(obj, dict)
1619        logo = from_union([from_none, Image.from_dict], obj.get("logo"))
1620        name = from_str(obj.get("name"))
1621        website = from_union([from_none, from_str], obj.get("website"))
1622        return BusinessDetails(logo, name, website)
1623
1624    def to_dict(self) -> dict:
1625        result: dict = {}
1626        if self.logo is not None:
1627            result["logo"] = from_union([from_none, lambda x: to_class(Image, x)], self.logo)
1628        result["name"] = from_str(self.name)
1629        if self.website is not None:
1630            result["website"] = from_union([from_none, from_str], self.website)
1631        return result
BusinessDetails( logo: Optional[Image], name: str, website: Optional[str])
1611    def __init__(self, logo: Optional[Image], name: str, website: Optional[str]) -> None:
1612        self.logo = logo
1613        self.name = name
1614        self.website = website
name: str
website: Optional[str]
@staticmethod
def from_dict(obj: Any) -> BusinessDetails:
1616    @staticmethod
1617    def from_dict(obj: Any) -> 'BusinessDetails':
1618        assert isinstance(obj, dict)
1619        logo = from_union([from_none, Image.from_dict], obj.get("logo"))
1620        name = from_str(obj.get("name"))
1621        website = from_union([from_none, from_str], obj.get("website"))
1622        return BusinessDetails(logo, name, website)
def to_dict(self) -> dict:
1624    def to_dict(self) -> dict:
1625        result: dict = {}
1626        if self.logo is not None:
1627            result["logo"] = from_union([from_none, lambda x: to_class(Image, x)], self.logo)
1628        result["name"] = from_str(self.name)
1629        if self.website is not None:
1630            result["website"] = from_union([from_none, from_str], self.website)
1631        return result
class Role(enum.Enum):
1634class Role(Enum):
1635    CPO = "CPO"
1636    EMSP = "EMSP"
1637    NAP = "NAP"
1638    NSP = "NSP"
1639    OTHER = "OTHER"
1640    SCSP = "SCSP"
CPO = <Role.CPO: 'CPO'>
EMSP = <Role.EMSP: 'EMSP'>
NAP = <Role.NAP: 'NAP'>
NSP = <Role.NSP: 'NSP'>
OTHER = <Role.OTHER: 'OTHER'>
SCSP = <Role.SCSP: 'SCSP'>
class CredentialsRole:
1643class CredentialsRole:
1644    business_details: BusinessDetails
1645    country_code: str
1646    party_id: str
1647    role: Role
1648
1649    def __init__(self, business_details: BusinessDetails, country_code: str, party_id: str, role: Role) -> None:
1650        self.business_details = business_details
1651        self.country_code = country_code
1652        self.party_id = party_id
1653        self.role = role
1654
1655    @staticmethod
1656    def from_dict(obj: Any) -> 'CredentialsRole':
1657        assert isinstance(obj, dict)
1658        business_details = BusinessDetails.from_dict(obj.get("business_details"))
1659        country_code = from_str(obj.get("country_code"))
1660        party_id = from_str(obj.get("party_id"))
1661        role = Role(obj.get("role"))
1662        return CredentialsRole(business_details, country_code, party_id, role)
1663
1664    def to_dict(self) -> dict:
1665        result: dict = {}
1666        result["business_details"] = to_class(BusinessDetails, self.business_details)
1667        result["country_code"] = from_str(self.country_code)
1668        result["party_id"] = from_str(self.party_id)
1669        result["role"] = to_enum(Role, self.role)
1670        return result
CredentialsRole( business_details: BusinessDetails, country_code: str, party_id: str, role: Role)
1649    def __init__(self, business_details: BusinessDetails, country_code: str, party_id: str, role: Role) -> None:
1650        self.business_details = business_details
1651        self.country_code = country_code
1652        self.party_id = party_id
1653        self.role = role
business_details: BusinessDetails
country_code: str
party_id: str
role: Role
@staticmethod
def from_dict(obj: Any) -> CredentialsRole:
1655    @staticmethod
1656    def from_dict(obj: Any) -> 'CredentialsRole':
1657        assert isinstance(obj, dict)
1658        business_details = BusinessDetails.from_dict(obj.get("business_details"))
1659        country_code = from_str(obj.get("country_code"))
1660        party_id = from_str(obj.get("party_id"))
1661        role = Role(obj.get("role"))
1662        return CredentialsRole(business_details, country_code, party_id, role)
def to_dict(self) -> dict:
1664    def to_dict(self) -> dict:
1665        result: dict = {}
1666        result["business_details"] = to_class(BusinessDetails, self.business_details)
1667        result["country_code"] = from_str(self.country_code)
1668        result["party_id"] = from_str(self.party_id)
1669        result["role"] = to_enum(Role, self.role)
1670        return result
class Credentials:
1673class Credentials:
1674    hub_party_id: Optional[str]
1675    roles: List[CredentialsRole]
1676    token: str
1677    url: str
1678
1679    def __init__(self, hub_party_id: Optional[str], roles: List[CredentialsRole], token: str, url: str) -> None:
1680        self.hub_party_id = hub_party_id
1681        self.roles = roles
1682        self.token = token
1683        self.url = url
1684
1685    @staticmethod
1686    def from_dict(obj: Any) -> 'Credentials':
1687        assert isinstance(obj, dict)
1688        hub_party_id = from_union([from_none, from_str], obj.get("hub_party_id"))
1689        roles = from_list(CredentialsRole.from_dict, obj.get("roles"))
1690        token = from_str(obj.get("token"))
1691        url = from_str(obj.get("url"))
1692        return Credentials(hub_party_id, roles, token, url)
1693
1694    def to_dict(self) -> dict:
1695        result: dict = {}
1696        if self.hub_party_id is not None:
1697            result["hub_party_id"] = from_union([from_none, from_str], self.hub_party_id)
1698        result["roles"] = from_list(lambda x: to_class(CredentialsRole, x), self.roles)
1699        result["token"] = from_str(self.token)
1700        result["url"] = from_str(self.url)
1701        return result
Credentials( hub_party_id: Optional[str], roles: List[CredentialsRole], token: str, url: str)
1679    def __init__(self, hub_party_id: Optional[str], roles: List[CredentialsRole], token: str, url: str) -> None:
1680        self.hub_party_id = hub_party_id
1681        self.roles = roles
1682        self.token = token
1683        self.url = url
hub_party_id: Optional[str]
roles: List[CredentialsRole]
token: str
url: str
@staticmethod
def from_dict(obj: Any) -> Credentials:
1685    @staticmethod
1686    def from_dict(obj: Any) -> 'Credentials':
1687        assert isinstance(obj, dict)
1688        hub_party_id = from_union([from_none, from_str], obj.get("hub_party_id"))
1689        roles = from_list(CredentialsRole.from_dict, obj.get("roles"))
1690        token = from_str(obj.get("token"))
1691        url = from_str(obj.get("url"))
1692        return Credentials(hub_party_id, roles, token, url)
def to_dict(self) -> dict:
1694    def to_dict(self) -> dict:
1695        result: dict = {}
1696        if self.hub_party_id is not None:
1697            result["hub_party_id"] = from_union([from_none, from_str], self.hub_party_id)
1698        result["roles"] = from_list(lambda x: to_class(CredentialsRole, x), self.roles)
1699        result["token"] = from_str(self.token)
1700        result["url"] = from_str(self.url)
1701        return result
class ModuleID(enum.Enum):
1704class ModuleID(Enum):
1705    CDRS = "cdrs"
1706    CHARGINGPROFILES = "chargingprofiles"
1707    COMMANDS = "commands"
1708    CREDENTIALS = "credentials"
1709    HUBCLIENTINFO = "hubclientinfo"
1710    LOCATIONS = "locations"
1711    PAYMENTS = "payments"
1712    SESSIONS = "sessions"
1713    TARIFFS = "tariffs"
1714    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'>
PAYMENTS = <ModuleID.PAYMENTS: 'payments'>
SESSIONS = <ModuleID.SESSIONS: 'sessions'>
TARIFFS = <ModuleID.TARIFFS: 'tariffs'>
TOKENS = <ModuleID.TOKENS: 'tokens'>
class InterfaceRole(enum.Enum):
1717class InterfaceRole(Enum):
1718    RECEIVER = "RECEIVER"
1719    SENDER = "SENDER"
RECEIVER = <InterfaceRole.RECEIVER: 'RECEIVER'>
SENDER = <InterfaceRole.SENDER: 'SENDER'>
class Endpoint:
1722class Endpoint:
1723    identifier: ModuleID
1724    role: InterfaceRole
1725    url: str
1726
1727    def __init__(self, identifier: ModuleID, role: InterfaceRole, url: str) -> None:
1728        self.identifier = identifier
1729        self.role = role
1730        self.url = url
1731
1732    @staticmethod
1733    def from_dict(obj: Any) -> 'Endpoint':
1734        assert isinstance(obj, dict)
1735        identifier = ModuleID(obj.get("identifier"))
1736        role = InterfaceRole(obj.get("role"))
1737        url = from_str(obj.get("url"))
1738        return Endpoint(identifier, role, url)
1739
1740    def to_dict(self) -> dict:
1741        result: dict = {}
1742        result["identifier"] = to_enum(ModuleID, self.identifier)
1743        result["role"] = to_enum(InterfaceRole, self.role)
1744        result["url"] = from_str(self.url)
1745        return result
Endpoint( identifier: ModuleID, role: InterfaceRole, url: str)
1727    def __init__(self, identifier: ModuleID, role: InterfaceRole, url: str) -> None:
1728        self.identifier = identifier
1729        self.role = role
1730        self.url = url
identifier: ModuleID
url: str
@staticmethod
def from_dict(obj: Any) -> Endpoint:
1732    @staticmethod
1733    def from_dict(obj: Any) -> 'Endpoint':
1734        assert isinstance(obj, dict)
1735        identifier = ModuleID(obj.get("identifier"))
1736        role = InterfaceRole(obj.get("role"))
1737        url = from_str(obj.get("url"))
1738        return Endpoint(identifier, role, url)
def to_dict(self) -> dict:
1740    def to_dict(self) -> dict:
1741        result: dict = {}
1742        result["identifier"] = to_enum(ModuleID, self.identifier)
1743        result["role"] = to_enum(InterfaceRole, self.role)
1744        result["url"] = from_str(self.url)
1745        return result
class Capability(enum.Enum):
1748class Capability(Enum):
1749    CHARGING_PREFERENCES_CAPABLE = "CHARGING_PREFERENCES_CAPABLE"
1750    CHARGING_PROFILE_CAPABLE = "CHARGING_PROFILE_CAPABLE"
1751    CHIP_CARD_SUPPORT = "CHIP_CARD_SUPPORT"
1752    CONTACTLESS_CARD_SUPPORT = "CONTACTLESS_CARD_SUPPORT"
1753    CREDIT_CARD_PAYABLE = "CREDIT_CARD_PAYABLE"
1754    DEBIT_CARD_PAYABLE = "DEBIT_CARD_PAYABLE"
1755    PED_TERMINAL = "PED_TERMINAL"
1756    REMOTE_START_STOP_CAPABLE = "REMOTE_START_STOP_CAPABLE"
1757    RESERVABLE = "RESERVABLE"
1758    RFID_READER = "RFID_READER"
1759    START_SESSION_CONNECTOR_REQUIRED = "START_SESSION_CONNECTOR_REQUIRED"
1760    TOKEN_GROUP_CAPABLE = "TOKEN_GROUP_CAPABLE"
1761    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 EvsePosition(enum.Enum):
1764class EvsePosition(Enum):
1765    CENTER = "CENTER"
1766    LEFT = "LEFT"
1767    RIGHT = "RIGHT"
CENTER = <EvsePosition.CENTER: 'CENTER'>
LEFT = <EvsePosition.LEFT: 'LEFT'>
RIGHT = <EvsePosition.RIGHT: 'RIGHT'>
class EvseParking:
1770class EvseParking:
1771    evse_position: Optional[EvsePosition]
1772    parking_id: str
1773
1774    def __init__(self, evse_position: Optional[EvsePosition], parking_id: str) -> None:
1775        self.evse_position = evse_position
1776        self.parking_id = parking_id
1777
1778    @staticmethod
1779    def from_dict(obj: Any) -> 'EvseParking':
1780        assert isinstance(obj, dict)
1781        evse_position = from_union([from_none, EvsePosition], obj.get("evse_position"))
1782        parking_id = from_str(obj.get("parking_id"))
1783        return EvseParking(evse_position, parking_id)
1784
1785    def to_dict(self) -> dict:
1786        result: dict = {}
1787        if self.evse_position is not None:
1788            result["evse_position"] = from_union([from_none, lambda x: to_enum(EvsePosition, x)], self.evse_position)
1789        result["parking_id"] = from_str(self.parking_id)
1790        return result
EvseParking(evse_position: Optional[EvsePosition], parking_id: str)
1774    def __init__(self, evse_position: Optional[EvsePosition], parking_id: str) -> None:
1775        self.evse_position = evse_position
1776        self.parking_id = parking_id
evse_position: Optional[EvsePosition]
parking_id: str
@staticmethod
def from_dict(obj: Any) -> EvseParking:
1778    @staticmethod
1779    def from_dict(obj: Any) -> 'EvseParking':
1780        assert isinstance(obj, dict)
1781        evse_position = from_union([from_none, EvsePosition], obj.get("evse_position"))
1782        parking_id = from_str(obj.get("parking_id"))
1783        return EvseParking(evse_position, parking_id)
def to_dict(self) -> dict:
1785    def to_dict(self) -> dict:
1786        result: dict = {}
1787        if self.evse_position is not None:
1788            result["evse_position"] = from_union([from_none, lambda x: to_enum(EvsePosition, x)], self.evse_position)
1789        result["parking_id"] = from_str(self.parking_id)
1790        return result
class ParkingRestriction(enum.Enum):
1793class ParkingRestriction(Enum):
1794    CUSTOMERS = "CUSTOMERS"
1795    DISABLED = "DISABLED"
1796    EMPLOYEES = "EMPLOYEES"
1797    EV_ONLY = "EV_ONLY"
1798    MOTORCYCLES = "MOTORCYCLES"
1799    PLUGGED = "PLUGGED"
1800    TAXIS = "TAXIS"
1801    TENANTS = "TENANTS"
CUSTOMERS = <ParkingRestriction.CUSTOMERS: 'CUSTOMERS'>
DISABLED = <ParkingRestriction.DISABLED: 'DISABLED'>
EMPLOYEES = <ParkingRestriction.EMPLOYEES: 'EMPLOYEES'>
EV_ONLY = <ParkingRestriction.EV_ONLY: 'EV_ONLY'>
MOTORCYCLES = <ParkingRestriction.MOTORCYCLES: 'MOTORCYCLES'>
PLUGGED = <ParkingRestriction.PLUGGED: 'PLUGGED'>
TAXIS = <ParkingRestriction.TAXIS: 'TAXIS'>
TENANTS = <ParkingRestriction.TENANTS: 'TENANTS'>
class Status(enum.Enum):
1804class Status(Enum):
1805    AVAILABLE = "AVAILABLE"
1806    BLOCKED = "BLOCKED"
1807    CHARGING = "CHARGING"
1808    INOPERATIVE = "INOPERATIVE"
1809    OUTOFORDER = "OUTOFORDER"
1810    PLANNED = "PLANNED"
1811    REMOVED = "REMOVED"
1812    RESERVED = "RESERVED"
1813    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:
1816class StatusSchedule:
1817    period_begin: str
1818    period_end: Optional[str]
1819    status: Status
1820
1821    def __init__(self, period_begin: str, period_end: Optional[str], status: Status) -> None:
1822        self.period_begin = period_begin
1823        self.period_end = period_end
1824        self.status = status
1825
1826    @staticmethod
1827    def from_dict(obj: Any) -> 'StatusSchedule':
1828        assert isinstance(obj, dict)
1829        period_begin = from_str(obj.get("period_begin"))
1830        period_end = from_union([from_none, from_str], obj.get("period_end"))
1831        status = Status(obj.get("status"))
1832        return StatusSchedule(period_begin, period_end, status)
1833
1834    def to_dict(self) -> dict:
1835        result: dict = {}
1836        result["period_begin"] = from_str(self.period_begin)
1837        if self.period_end is not None:
1838            result["period_end"] = from_union([from_none, from_str], self.period_end)
1839        result["status"] = to_enum(Status, self.status)
1840        return result
StatusSchedule( period_begin: str, period_end: Optional[str], status: Status)
1821    def __init__(self, period_begin: str, period_end: Optional[str], status: Status) -> None:
1822        self.period_begin = period_begin
1823        self.period_end = period_end
1824        self.status = status
period_begin: str
period_end: Optional[str]
status: Status
@staticmethod
def from_dict(obj: Any) -> StatusSchedule:
1826    @staticmethod
1827    def from_dict(obj: Any) -> 'StatusSchedule':
1828        assert isinstance(obj, dict)
1829        period_begin = from_str(obj.get("period_begin"))
1830        period_end = from_union([from_none, from_str], obj.get("period_end"))
1831        status = Status(obj.get("status"))
1832        return StatusSchedule(period_begin, period_end, status)
def to_dict(self) -> dict:
1834    def to_dict(self) -> dict:
1835        result: dict = {}
1836        result["period_begin"] = from_str(self.period_begin)
1837        if self.period_end is not None:
1838            result["period_end"] = from_union([from_none, from_str], self.period_end)
1839        result["status"] = to_enum(Status, self.status)
1840        return result
class Evse:
1843class Evse:
1844    accepted_service_providers: Optional[List[str]]
1845    capabilities: Optional[List[Capability]]
1846    connectors: List[Connector]
1847    coordinates: Optional[GeoLocation]
1848    directions: Optional[List[DisplayText]]
1849    evse_id: Optional[str]
1850    floor_level: Optional[str]
1851    images: Optional[List[Image]]
1852    last_updated: str
1853    parking: Optional[List[EvseParking]]
1854    parking_restrictions: Optional[List[ParkingRestriction]]
1855    physical_reference: Optional[str]
1856    status: Status
1857    status_schedule: Optional[List[StatusSchedule]]
1858    uid: str
1859
1860    def __init__(self, accepted_service_providers: Optional[List[str]], 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: Optional[List[EvseParking]], parking_restrictions: Optional[List[ParkingRestriction]], physical_reference: Optional[str], status: Status, status_schedule: Optional[List[StatusSchedule]], uid: str) -> None:
1861        self.accepted_service_providers = accepted_service_providers
1862        self.capabilities = capabilities
1863        self.connectors = connectors
1864        self.coordinates = coordinates
1865        self.directions = directions
1866        self.evse_id = evse_id
1867        self.floor_level = floor_level
1868        self.images = images
1869        self.last_updated = last_updated
1870        self.parking = parking
1871        self.parking_restrictions = parking_restrictions
1872        self.physical_reference = physical_reference
1873        self.status = status
1874        self.status_schedule = status_schedule
1875        self.uid = uid
1876
1877    @staticmethod
1878    def from_dict(obj: Any) -> 'Evse':
1879        assert isinstance(obj, dict)
1880        accepted_service_providers = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("accepted_service_providers"))
1881        capabilities = from_union([from_none, lambda x: from_list(Capability, x)], obj.get("capabilities"))
1882        connectors = from_list(Connector.from_dict, obj.get("connectors"))
1883        coordinates = from_union([from_none, GeoLocation.from_dict], obj.get("coordinates"))
1884        directions = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("directions"))
1885        evse_id = from_union([from_none, from_str], obj.get("evse_id"))
1886        floor_level = from_union([from_none, from_str], obj.get("floor_level"))
1887        images = from_union([from_none, lambda x: from_list(Image.from_dict, x)], obj.get("images"))
1888        last_updated = from_str(obj.get("last_updated"))
1889        parking = from_union([from_none, lambda x: from_list(EvseParking.from_dict, x)], obj.get("parking"))
1890        parking_restrictions = from_union([from_none, lambda x: from_list(ParkingRestriction, x)], obj.get("parking_restrictions"))
1891        physical_reference = from_union([from_none, from_str], obj.get("physical_reference"))
1892        status = Status(obj.get("status"))
1893        status_schedule = from_union([from_none, lambda x: from_list(StatusSchedule.from_dict, x)], obj.get("status_schedule"))
1894        uid = from_str(obj.get("uid"))
1895        return Evse(accepted_service_providers, capabilities, connectors, coordinates, directions, evse_id, floor_level, images, last_updated, parking, parking_restrictions, physical_reference, status, status_schedule, uid)
1896
1897    def to_dict(self) -> dict:
1898        result: dict = {}
1899        if self.accepted_service_providers is not None:
1900            result["accepted_service_providers"] = from_union([from_none, lambda x: from_list(from_str, x)], self.accepted_service_providers)
1901        if self.capabilities is not None:
1902            result["capabilities"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(Capability, x), x)], self.capabilities)
1903        result["connectors"] = from_list(lambda x: to_class(Connector, x), self.connectors)
1904        if self.coordinates is not None:
1905            result["coordinates"] = from_union([from_none, lambda x: to_class(GeoLocation, x)], self.coordinates)
1906        if self.directions is not None:
1907            result["directions"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.directions)
1908        if self.evse_id is not None:
1909            result["evse_id"] = from_union([from_none, from_str], self.evse_id)
1910        if self.floor_level is not None:
1911            result["floor_level"] = from_union([from_none, from_str], self.floor_level)
1912        if self.images is not None:
1913            result["images"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Image, x), x)], self.images)
1914        result["last_updated"] = from_str(self.last_updated)
1915        if self.parking is not None:
1916            result["parking"] = from_union([from_none, lambda x: from_list(lambda x: to_class(EvseParking, x), x)], self.parking)
1917        if self.parking_restrictions is not None:
1918            result["parking_restrictions"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(ParkingRestriction, x), x)], self.parking_restrictions)
1919        if self.physical_reference is not None:
1920            result["physical_reference"] = from_union([from_none, from_str], self.physical_reference)
1921        result["status"] = to_enum(Status, self.status)
1922        if self.status_schedule is not None:
1923            result["status_schedule"] = from_union([from_none, lambda x: from_list(lambda x: to_class(StatusSchedule, x), x)], self.status_schedule)
1924        result["uid"] = from_str(self.uid)
1925        return result
Evse( accepted_service_providers: Optional[List[str]], 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: Optional[List[EvseParking]], parking_restrictions: Optional[List[ParkingRestriction]], physical_reference: Optional[str], status: Status, status_schedule: Optional[List[StatusSchedule]], uid: str)
1860    def __init__(self, accepted_service_providers: Optional[List[str]], 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: Optional[List[EvseParking]], parking_restrictions: Optional[List[ParkingRestriction]], physical_reference: Optional[str], status: Status, status_schedule: Optional[List[StatusSchedule]], uid: str) -> None:
1861        self.accepted_service_providers = accepted_service_providers
1862        self.capabilities = capabilities
1863        self.connectors = connectors
1864        self.coordinates = coordinates
1865        self.directions = directions
1866        self.evse_id = evse_id
1867        self.floor_level = floor_level
1868        self.images = images
1869        self.last_updated = last_updated
1870        self.parking = parking
1871        self.parking_restrictions = parking_restrictions
1872        self.physical_reference = physical_reference
1873        self.status = status
1874        self.status_schedule = status_schedule
1875        self.uid = uid
accepted_service_providers: Optional[List[str]]
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: Optional[List[EvseParking]]
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:
1877    @staticmethod
1878    def from_dict(obj: Any) -> 'Evse':
1879        assert isinstance(obj, dict)
1880        accepted_service_providers = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("accepted_service_providers"))
1881        capabilities = from_union([from_none, lambda x: from_list(Capability, x)], obj.get("capabilities"))
1882        connectors = from_list(Connector.from_dict, obj.get("connectors"))
1883        coordinates = from_union([from_none, GeoLocation.from_dict], obj.get("coordinates"))
1884        directions = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("directions"))
1885        evse_id = from_union([from_none, from_str], obj.get("evse_id"))
1886        floor_level = from_union([from_none, from_str], obj.get("floor_level"))
1887        images = from_union([from_none, lambda x: from_list(Image.from_dict, x)], obj.get("images"))
1888        last_updated = from_str(obj.get("last_updated"))
1889        parking = from_union([from_none, lambda x: from_list(EvseParking.from_dict, x)], obj.get("parking"))
1890        parking_restrictions = from_union([from_none, lambda x: from_list(ParkingRestriction, x)], obj.get("parking_restrictions"))
1891        physical_reference = from_union([from_none, from_str], obj.get("physical_reference"))
1892        status = Status(obj.get("status"))
1893        status_schedule = from_union([from_none, lambda x: from_list(StatusSchedule.from_dict, x)], obj.get("status_schedule"))
1894        uid = from_str(obj.get("uid"))
1895        return Evse(accepted_service_providers, capabilities, connectors, coordinates, directions, evse_id, floor_level, images, last_updated, parking, parking_restrictions, physical_reference, status, status_schedule, uid)
def to_dict(self) -> dict:
1897    def to_dict(self) -> dict:
1898        result: dict = {}
1899        if self.accepted_service_providers is not None:
1900            result["accepted_service_providers"] = from_union([from_none, lambda x: from_list(from_str, x)], self.accepted_service_providers)
1901        if self.capabilities is not None:
1902            result["capabilities"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(Capability, x), x)], self.capabilities)
1903        result["connectors"] = from_list(lambda x: to_class(Connector, x), self.connectors)
1904        if self.coordinates is not None:
1905            result["coordinates"] = from_union([from_none, lambda x: to_class(GeoLocation, x)], self.coordinates)
1906        if self.directions is not None:
1907            result["directions"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.directions)
1908        if self.evse_id is not None:
1909            result["evse_id"] = from_union([from_none, from_str], self.evse_id)
1910        if self.floor_level is not None:
1911            result["floor_level"] = from_union([from_none, from_str], self.floor_level)
1912        if self.images is not None:
1913            result["images"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Image, x), x)], self.images)
1914        result["last_updated"] = from_str(self.last_updated)
1915        if self.parking is not None:
1916            result["parking"] = from_union([from_none, lambda x: from_list(lambda x: to_class(EvseParking, x), x)], self.parking)
1917        if self.parking_restrictions is not None:
1918            result["parking_restrictions"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(ParkingRestriction, x), x)], self.parking_restrictions)
1919        if self.physical_reference is not None:
1920            result["physical_reference"] = from_union([from_none, from_str], self.physical_reference)
1921        result["status"] = to_enum(Status, self.status)
1922        if self.status_schedule is not None:
1923            result["status_schedule"] = from_union([from_none, lambda x: from_list(lambda x: to_class(StatusSchedule, x), x)], self.status_schedule)
1924        result["uid"] = from_str(self.uid)
1925        return result
class CaptureStatusCode(enum.Enum):
1928class CaptureStatusCode(Enum):
1929    FAILED = "FAILED"
1930    PARTIAL_SUCCESS = "PARTIAL_SUCCESS"
1931    SUCCESS = "SUCCESS"
FAILED = <CaptureStatusCode.FAILED: 'FAILED'>
PARTIAL_SUCCESS = <CaptureStatusCode.PARTIAL_SUCCESS: 'PARTIAL_SUCCESS'>
SUCCESS = <CaptureStatusCode.SUCCESS: 'SUCCESS'>
class FinancialAdviceConfirmation:
1934class FinancialAdviceConfirmation:
1935    authorization_reference: str
1936    capture_status_code: CaptureStatusCode
1937    capture_status_message: Optional[str]
1938    currency: str
1939    eft_data: List[str]
1940    id: str
1941    last_updated: str
1942    total_costs: Price
1943
1944    def __init__(self, authorization_reference: str, capture_status_code: CaptureStatusCode, capture_status_message: Optional[str], currency: str, eft_data: List[str], id: str, last_updated: str, total_costs: Price) -> None:
1945        self.authorization_reference = authorization_reference
1946        self.capture_status_code = capture_status_code
1947        self.capture_status_message = capture_status_message
1948        self.currency = currency
1949        self.eft_data = eft_data
1950        self.id = id
1951        self.last_updated = last_updated
1952        self.total_costs = total_costs
1953
1954    @staticmethod
1955    def from_dict(obj: Any) -> 'FinancialAdviceConfirmation':
1956        assert isinstance(obj, dict)
1957        authorization_reference = from_str(obj.get("authorization_reference"))
1958        capture_status_code = CaptureStatusCode(obj.get("capture_status_code"))
1959        capture_status_message = from_union([from_none, from_str], obj.get("capture_status_message"))
1960        currency = from_str(obj.get("currency"))
1961        eft_data = from_list(from_str, obj.get("eft_data"))
1962        id = from_str(obj.get("id"))
1963        last_updated = from_str(obj.get("last_updated"))
1964        total_costs = Price.from_dict(obj.get("total_costs"))
1965        return FinancialAdviceConfirmation(authorization_reference, capture_status_code, capture_status_message, currency, eft_data, id, last_updated, total_costs)
1966
1967    def to_dict(self) -> dict:
1968        result: dict = {}
1969        result["authorization_reference"] = from_str(self.authorization_reference)
1970        result["capture_status_code"] = to_enum(CaptureStatusCode, self.capture_status_code)
1971        if self.capture_status_message is not None:
1972            result["capture_status_message"] = from_union([from_none, from_str], self.capture_status_message)
1973        result["currency"] = from_str(self.currency)
1974        result["eft_data"] = from_list(from_str, self.eft_data)
1975        result["id"] = from_str(self.id)
1976        result["last_updated"] = from_str(self.last_updated)
1977        result["total_costs"] = to_class(Price, self.total_costs)
1978        return result
FinancialAdviceConfirmation( authorization_reference: str, capture_status_code: CaptureStatusCode, capture_status_message: Optional[str], currency: str, eft_data: List[str], id: str, last_updated: str, total_costs: Price)
1944    def __init__(self, authorization_reference: str, capture_status_code: CaptureStatusCode, capture_status_message: Optional[str], currency: str, eft_data: List[str], id: str, last_updated: str, total_costs: Price) -> None:
1945        self.authorization_reference = authorization_reference
1946        self.capture_status_code = capture_status_code
1947        self.capture_status_message = capture_status_message
1948        self.currency = currency
1949        self.eft_data = eft_data
1950        self.id = id
1951        self.last_updated = last_updated
1952        self.total_costs = total_costs
authorization_reference: str
capture_status_code: CaptureStatusCode
capture_status_message: Optional[str]
currency: str
eft_data: List[str]
id: str
last_updated: str
total_costs: Price
@staticmethod
def from_dict(obj: Any) -> FinancialAdviceConfirmation:
1954    @staticmethod
1955    def from_dict(obj: Any) -> 'FinancialAdviceConfirmation':
1956        assert isinstance(obj, dict)
1957        authorization_reference = from_str(obj.get("authorization_reference"))
1958        capture_status_code = CaptureStatusCode(obj.get("capture_status_code"))
1959        capture_status_message = from_union([from_none, from_str], obj.get("capture_status_message"))
1960        currency = from_str(obj.get("currency"))
1961        eft_data = from_list(from_str, obj.get("eft_data"))
1962        id = from_str(obj.get("id"))
1963        last_updated = from_str(obj.get("last_updated"))
1964        total_costs = Price.from_dict(obj.get("total_costs"))
1965        return FinancialAdviceConfirmation(authorization_reference, capture_status_code, capture_status_message, currency, eft_data, id, last_updated, total_costs)
def to_dict(self) -> dict:
1967    def to_dict(self) -> dict:
1968        result: dict = {}
1969        result["authorization_reference"] = from_str(self.authorization_reference)
1970        result["capture_status_code"] = to_enum(CaptureStatusCode, self.capture_status_code)
1971        if self.capture_status_message is not None:
1972            result["capture_status_message"] = from_union([from_none, from_str], self.capture_status_message)
1973        result["currency"] = from_str(self.currency)
1974        result["eft_data"] = from_list(from_str, self.eft_data)
1975        result["id"] = from_str(self.id)
1976        result["last_updated"] = from_str(self.last_updated)
1977        result["total_costs"] = to_class(Price, self.total_costs)
1978        return result
class ConnectionStatus(enum.Enum):
1981class ConnectionStatus(Enum):
1982    CONNECTED = "CONNECTED"
1983    OFFLINE = "OFFLINE"
1984    PLANNED = "PLANNED"
1985    SUSPENDED = "SUSPENDED"
CONNECTED = <ConnectionStatus.CONNECTED: 'CONNECTED'>
OFFLINE = <ConnectionStatus.OFFLINE: 'OFFLINE'>
PLANNED = <ConnectionStatus.PLANNED: 'PLANNED'>
SUSPENDED = <ConnectionStatus.SUSPENDED: 'SUSPENDED'>
class HubClientInfo:
1988class HubClientInfo:
1989    country_code: str
1990    last_updated: str
1991    party_id: str
1992    role: Role
1993    status: ConnectionStatus
1994
1995    def __init__(self, country_code: str, last_updated: str, party_id: str, role: Role, status: ConnectionStatus) -> None:
1996        self.country_code = country_code
1997        self.last_updated = last_updated
1998        self.party_id = party_id
1999        self.role = role
2000        self.status = status
2001
2002    @staticmethod
2003    def from_dict(obj: Any) -> 'HubClientInfo':
2004        assert isinstance(obj, dict)
2005        country_code = from_str(obj.get("country_code"))
2006        last_updated = from_str(obj.get("last_updated"))
2007        party_id = from_str(obj.get("party_id"))
2008        role = Role(obj.get("role"))
2009        status = ConnectionStatus(obj.get("status"))
2010        return HubClientInfo(country_code, last_updated, party_id, role, status)
2011
2012    def to_dict(self) -> dict:
2013        result: dict = {}
2014        result["country_code"] = from_str(self.country_code)
2015        result["last_updated"] = from_str(self.last_updated)
2016        result["party_id"] = from_str(self.party_id)
2017        result["role"] = to_enum(Role, self.role)
2018        result["status"] = to_enum(ConnectionStatus, self.status)
2019        return result
HubClientInfo( country_code: str, last_updated: str, party_id: str, role: Role, status: ConnectionStatus)
1995    def __init__(self, country_code: str, last_updated: str, party_id: str, role: Role, status: ConnectionStatus) -> None:
1996        self.country_code = country_code
1997        self.last_updated = last_updated
1998        self.party_id = party_id
1999        self.role = role
2000        self.status = status
country_code: str
last_updated: str
party_id: str
role: Role
@staticmethod
def from_dict(obj: Any) -> HubClientInfo:
2002    @staticmethod
2003    def from_dict(obj: Any) -> 'HubClientInfo':
2004        assert isinstance(obj, dict)
2005        country_code = from_str(obj.get("country_code"))
2006        last_updated = from_str(obj.get("last_updated"))
2007        party_id = from_str(obj.get("party_id"))
2008        role = Role(obj.get("role"))
2009        status = ConnectionStatus(obj.get("status"))
2010        return HubClientInfo(country_code, last_updated, party_id, role, status)
def to_dict(self) -> dict:
2012    def to_dict(self) -> dict:
2013        result: dict = {}
2014        result["country_code"] = from_str(self.country_code)
2015        result["last_updated"] = from_str(self.last_updated)
2016        result["party_id"] = from_str(self.party_id)
2017        result["role"] = to_enum(Role, self.role)
2018        result["status"] = to_enum(ConnectionStatus, self.status)
2019        return result
class Facility(enum.Enum):
2022class Facility(Enum):
2023    AIRPORT = "AIRPORT"
2024    BIKE_SHARING = "BIKE_SHARING"
2025    BUS_STOP = "BUS_STOP"
2026    CAFE = "CAFE"
2027    CARPOOL_PARKING = "CARPOOL_PARKING"
2028    FUEL_STATION = "FUEL_STATION"
2029    HOTEL = "HOTEL"
2030    MALL = "MALL"
2031    METRO_STATION = "METRO_STATION"
2032    MUSEUM = "MUSEUM"
2033    NATURE = "NATURE"
2034    PARKING_LOT = "PARKING_LOT"
2035    RECREATION_AREA = "RECREATION_AREA"
2036    RESTAURANT = "RESTAURANT"
2037    SPORT = "SPORT"
2038    SUPERMARKET = "SUPERMARKET"
2039    TAXI_STAND = "TAXI_STAND"
2040    TRAIN_STATION = "TRAIN_STATION"
2041    TRAM_STOP = "TRAM_STOP"
2042    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:
2045class ExceptionalPeriod:
2046    period_begin: str
2047    period_end: str
2048
2049    def __init__(self, period_begin: str, period_end: str) -> None:
2050        self.period_begin = period_begin
2051        self.period_end = period_end
2052
2053    @staticmethod
2054    def from_dict(obj: Any) -> 'ExceptionalPeriod':
2055        assert isinstance(obj, dict)
2056        period_begin = from_str(obj.get("period_begin"))
2057        period_end = from_str(obj.get("period_end"))
2058        return ExceptionalPeriod(period_begin, period_end)
2059
2060    def to_dict(self) -> dict:
2061        result: dict = {}
2062        result["period_begin"] = from_str(self.period_begin)
2063        result["period_end"] = from_str(self.period_end)
2064        return result
ExceptionalPeriod(period_begin: str, period_end: str)
2049    def __init__(self, period_begin: str, period_end: str) -> None:
2050        self.period_begin = period_begin
2051        self.period_end = period_end
period_begin: str
period_end: str
@staticmethod
def from_dict(obj: Any) -> ExceptionalPeriod:
2053    @staticmethod
2054    def from_dict(obj: Any) -> 'ExceptionalPeriod':
2055        assert isinstance(obj, dict)
2056        period_begin = from_str(obj.get("period_begin"))
2057        period_end = from_str(obj.get("period_end"))
2058        return ExceptionalPeriod(period_begin, period_end)
def to_dict(self) -> dict:
2060    def to_dict(self) -> dict:
2061        result: dict = {}
2062        result["period_begin"] = from_str(self.period_begin)
2063        result["period_end"] = from_str(self.period_end)
2064        return result
class RegularHours:
2067class RegularHours:
2068    period_begin: str
2069    period_end: str
2070    weekday: int
2071
2072    def __init__(self, period_begin: str, period_end: str, weekday: int) -> None:
2073        self.period_begin = period_begin
2074        self.period_end = period_end
2075        self.weekday = weekday
2076
2077    @staticmethod
2078    def from_dict(obj: Any) -> 'RegularHours':
2079        assert isinstance(obj, dict)
2080        period_begin = from_str(obj.get("period_begin"))
2081        period_end = from_str(obj.get("period_end"))
2082        weekday = from_int(obj.get("weekday"))
2083        return RegularHours(period_begin, period_end, weekday)
2084
2085    def to_dict(self) -> dict:
2086        result: dict = {}
2087        result["period_begin"] = from_str(self.period_begin)
2088        result["period_end"] = from_str(self.period_end)
2089        result["weekday"] = from_int(self.weekday)
2090        return result
RegularHours(period_begin: str, period_end: str, weekday: int)
2072    def __init__(self, period_begin: str, period_end: str, weekday: int) -> None:
2073        self.period_begin = period_begin
2074        self.period_end = period_end
2075        self.weekday = weekday
period_begin: str
period_end: str
weekday: int
@staticmethod
def from_dict(obj: Any) -> RegularHours:
2077    @staticmethod
2078    def from_dict(obj: Any) -> 'RegularHours':
2079        assert isinstance(obj, dict)
2080        period_begin = from_str(obj.get("period_begin"))
2081        period_end = from_str(obj.get("period_end"))
2082        weekday = from_int(obj.get("weekday"))
2083        return RegularHours(period_begin, period_end, weekday)
def to_dict(self) -> dict:
2085    def to_dict(self) -> dict:
2086        result: dict = {}
2087        result["period_begin"] = from_str(self.period_begin)
2088        result["period_end"] = from_str(self.period_end)
2089        result["weekday"] = from_int(self.weekday)
2090        return result
class Hours:
2093class Hours:
2094    exceptional_closings: Optional[List[ExceptionalPeriod]]
2095    exceptional_openings: Optional[List[ExceptionalPeriod]]
2096    regular_hours: Optional[List[RegularHours]]
2097    twentyfourseven: bool
2098
2099    def __init__(self, exceptional_closings: Optional[List[ExceptionalPeriod]], exceptional_openings: Optional[List[ExceptionalPeriod]], regular_hours: Optional[List[RegularHours]], twentyfourseven: bool) -> None:
2100        self.exceptional_closings = exceptional_closings
2101        self.exceptional_openings = exceptional_openings
2102        self.regular_hours = regular_hours
2103        self.twentyfourseven = twentyfourseven
2104
2105    @staticmethod
2106    def from_dict(obj: Any) -> 'Hours':
2107        assert isinstance(obj, dict)
2108        exceptional_closings = from_union([from_none, lambda x: from_list(ExceptionalPeriod.from_dict, x)], obj.get("exceptional_closings"))
2109        exceptional_openings = from_union([from_none, lambda x: from_list(ExceptionalPeriod.from_dict, x)], obj.get("exceptional_openings"))
2110        regular_hours = from_union([from_none, lambda x: from_list(RegularHours.from_dict, x)], obj.get("regular_hours"))
2111        twentyfourseven = from_bool(obj.get("twentyfourseven"))
2112        return Hours(exceptional_closings, exceptional_openings, regular_hours, twentyfourseven)
2113
2114    def to_dict(self) -> dict:
2115        result: dict = {}
2116        if self.exceptional_closings is not None:
2117            result["exceptional_closings"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ExceptionalPeriod, x), x)], self.exceptional_closings)
2118        if self.exceptional_openings is not None:
2119            result["exceptional_openings"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ExceptionalPeriod, x), x)], self.exceptional_openings)
2120        if self.regular_hours is not None:
2121            result["regular_hours"] = from_union([from_none, lambda x: from_list(lambda x: to_class(RegularHours, x), x)], self.regular_hours)
2122        result["twentyfourseven"] = from_bool(self.twentyfourseven)
2123        return result
Hours( exceptional_closings: Optional[List[ExceptionalPeriod]], exceptional_openings: Optional[List[ExceptionalPeriod]], regular_hours: Optional[List[RegularHours]], twentyfourseven: bool)
2099    def __init__(self, exceptional_closings: Optional[List[ExceptionalPeriod]], exceptional_openings: Optional[List[ExceptionalPeriod]], regular_hours: Optional[List[RegularHours]], twentyfourseven: bool) -> None:
2100        self.exceptional_closings = exceptional_closings
2101        self.exceptional_openings = exceptional_openings
2102        self.regular_hours = regular_hours
2103        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:
2105    @staticmethod
2106    def from_dict(obj: Any) -> 'Hours':
2107        assert isinstance(obj, dict)
2108        exceptional_closings = from_union([from_none, lambda x: from_list(ExceptionalPeriod.from_dict, x)], obj.get("exceptional_closings"))
2109        exceptional_openings = from_union([from_none, lambda x: from_list(ExceptionalPeriod.from_dict, x)], obj.get("exceptional_openings"))
2110        regular_hours = from_union([from_none, lambda x: from_list(RegularHours.from_dict, x)], obj.get("regular_hours"))
2111        twentyfourseven = from_bool(obj.get("twentyfourseven"))
2112        return Hours(exceptional_closings, exceptional_openings, regular_hours, twentyfourseven)
def to_dict(self) -> dict:
2114    def to_dict(self) -> dict:
2115        result: dict = {}
2116        if self.exceptional_closings is not None:
2117            result["exceptional_closings"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ExceptionalPeriod, x), x)], self.exceptional_closings)
2118        if self.exceptional_openings is not None:
2119            result["exceptional_openings"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ExceptionalPeriod, x), x)], self.exceptional_openings)
2120        if self.regular_hours is not None:
2121            result["regular_hours"] = from_union([from_none, lambda x: from_list(lambda x: to_class(RegularHours, x), x)], self.regular_hours)
2122        result["twentyfourseven"] = from_bool(self.twentyfourseven)
2123        return result
class ParkingDirection(enum.Enum):
2126class ParkingDirection(Enum):
2127    ANGLE = "ANGLE"
2128    PARALLEL = "PARALLEL"
2129    PERPENDICULAR = "PERPENDICULAR"
ANGLE = <ParkingDirection.ANGLE: 'ANGLE'>
PARALLEL = <ParkingDirection.PARALLEL: 'PARALLEL'>
PERPENDICULAR = <ParkingDirection.PERPENDICULAR: 'PERPENDICULAR'>
class VehicleType(enum.Enum):
2132class VehicleType(Enum):
2133    BUS = "BUS"
2134    DISABLED = "DISABLED"
2135    MOTORCYCLE = "MOTORCYCLE"
2136    PERSONAL_VEHICLE = "PERSONAL_VEHICLE"
2137    PERSONAL_VEHICLE_WITH_TRAILER = "PERSONAL_VEHICLE_WITH_TRAILER"
2138    RIGID = "RIGID"
2139    SEMI_TRACTOR = "SEMI_TRACTOR"
2140    TRUCK_WITH_TRAILER = "TRUCK_WITH_TRAILER"
2141    VAN = "VAN"
BUS = <VehicleType.BUS: 'BUS'>
DISABLED = <VehicleType.DISABLED: 'DISABLED'>
MOTORCYCLE = <VehicleType.MOTORCYCLE: 'MOTORCYCLE'>
PERSONAL_VEHICLE = <VehicleType.PERSONAL_VEHICLE: 'PERSONAL_VEHICLE'>
PERSONAL_VEHICLE_WITH_TRAILER = <VehicleType.PERSONAL_VEHICLE_WITH_TRAILER: 'PERSONAL_VEHICLE_WITH_TRAILER'>
RIGID = <VehicleType.RIGID: 'RIGID'>
SEMI_TRACTOR = <VehicleType.SEMI_TRACTOR: 'SEMI_TRACTOR'>
TRUCK_WITH_TRAILER = <VehicleType.TRUCK_WITH_TRAILER: 'TRUCK_WITH_TRAILER'>
VAN = <VehicleType.VAN: 'VAN'>
class Parking:
2144class Parking:
2145    apds_reference: Optional[str]
2146    dangerous_goods_allowed: Optional[bool]
2147    direction: Optional[ParkingDirection]
2148    drive_through: Optional[bool]
2149    id: str
2150    images: Optional[List[Image]]
2151    lighting: Optional[bool]
2152    max_vehicle_height: Optional[float]
2153    max_vehicle_length: Optional[float]
2154    max_vehicle_weight: Optional[float]
2155    max_vehicle_width: Optional[float]
2156    parking_space_length: Optional[float]
2157    parking_space_width: Optional[float]
2158    physical_reference: Optional[str]
2159    refrigeration_outlet: Optional[bool]
2160    reservation_required: bool
2161    restricted_to_type: bool
2162    roofed: Optional[bool]
2163    standards: Optional[List[str]]
2164    time_limit: Optional[float]
2165    vehicle_types: List[VehicleType]
2166
2167    def __init__(self, apds_reference: Optional[str], dangerous_goods_allowed: Optional[bool], direction: Optional[ParkingDirection], drive_through: Optional[bool], id: str, images: Optional[List[Image]], lighting: Optional[bool], max_vehicle_height: Optional[float], max_vehicle_length: Optional[float], max_vehicle_weight: Optional[float], max_vehicle_width: Optional[float], parking_space_length: Optional[float], parking_space_width: Optional[float], physical_reference: Optional[str], refrigeration_outlet: Optional[bool], reservation_required: bool, restricted_to_type: bool, roofed: Optional[bool], standards: Optional[List[str]], time_limit: Optional[float], vehicle_types: List[VehicleType]) -> None:
2168        self.apds_reference = apds_reference
2169        self.dangerous_goods_allowed = dangerous_goods_allowed
2170        self.direction = direction
2171        self.drive_through = drive_through
2172        self.id = id
2173        self.images = images
2174        self.lighting = lighting
2175        self.max_vehicle_height = max_vehicle_height
2176        self.max_vehicle_length = max_vehicle_length
2177        self.max_vehicle_weight = max_vehicle_weight
2178        self.max_vehicle_width = max_vehicle_width
2179        self.parking_space_length = parking_space_length
2180        self.parking_space_width = parking_space_width
2181        self.physical_reference = physical_reference
2182        self.refrigeration_outlet = refrigeration_outlet
2183        self.reservation_required = reservation_required
2184        self.restricted_to_type = restricted_to_type
2185        self.roofed = roofed
2186        self.standards = standards
2187        self.time_limit = time_limit
2188        self.vehicle_types = vehicle_types
2189
2190    @staticmethod
2191    def from_dict(obj: Any) -> 'Parking':
2192        assert isinstance(obj, dict)
2193        apds_reference = from_union([from_none, from_str], obj.get("apds_reference"))
2194        dangerous_goods_allowed = from_union([from_none, from_bool], obj.get("dangerous_goods_allowed"))
2195        direction = from_union([from_none, ParkingDirection], obj.get("direction"))
2196        drive_through = from_union([from_none, from_bool], obj.get("drive_through"))
2197        id = from_str(obj.get("id"))
2198        images = from_union([from_none, lambda x: from_list(Image.from_dict, x)], obj.get("images"))
2199        lighting = from_union([from_none, from_bool], obj.get("lighting"))
2200        max_vehicle_height = from_union([from_none, from_float], obj.get("max_vehicle_height"))
2201        max_vehicle_length = from_union([from_none, from_float], obj.get("max_vehicle_length"))
2202        max_vehicle_weight = from_union([from_none, from_float], obj.get("max_vehicle_weight"))
2203        max_vehicle_width = from_union([from_none, from_float], obj.get("max_vehicle_width"))
2204        parking_space_length = from_union([from_none, from_float], obj.get("parking_space_length"))
2205        parking_space_width = from_union([from_none, from_float], obj.get("parking_space_width"))
2206        physical_reference = from_union([from_none, from_str], obj.get("physical_reference"))
2207        refrigeration_outlet = from_union([from_none, from_bool], obj.get("refrigeration_outlet"))
2208        reservation_required = from_bool(obj.get("reservation_required"))
2209        restricted_to_type = from_bool(obj.get("restricted_to_type"))
2210        roofed = from_union([from_none, from_bool], obj.get("roofed"))
2211        standards = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("standards"))
2212        time_limit = from_union([from_none, from_float], obj.get("time_limit"))
2213        vehicle_types = from_list(VehicleType, obj.get("vehicle_types"))
2214        return Parking(apds_reference, dangerous_goods_allowed, direction, drive_through, id, images, lighting, max_vehicle_height, max_vehicle_length, max_vehicle_weight, max_vehicle_width, parking_space_length, parking_space_width, physical_reference, refrigeration_outlet, reservation_required, restricted_to_type, roofed, standards, time_limit, vehicle_types)
2215
2216    def to_dict(self) -> dict:
2217        result: dict = {}
2218        if self.apds_reference is not None:
2219            result["apds_reference"] = from_union([from_none, from_str], self.apds_reference)
2220        if self.dangerous_goods_allowed is not None:
2221            result["dangerous_goods_allowed"] = from_union([from_none, from_bool], self.dangerous_goods_allowed)
2222        if self.direction is not None:
2223            result["direction"] = from_union([from_none, lambda x: to_enum(ParkingDirection, x)], self.direction)
2224        if self.drive_through is not None:
2225            result["drive_through"] = from_union([from_none, from_bool], self.drive_through)
2226        result["id"] = from_str(self.id)
2227        if self.images is not None:
2228            result["images"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Image, x), x)], self.images)
2229        if self.lighting is not None:
2230            result["lighting"] = from_union([from_none, from_bool], self.lighting)
2231        if self.max_vehicle_height is not None:
2232            result["max_vehicle_height"] = from_union([from_none, to_float], self.max_vehicle_height)
2233        if self.max_vehicle_length is not None:
2234            result["max_vehicle_length"] = from_union([from_none, to_float], self.max_vehicle_length)
2235        if self.max_vehicle_weight is not None:
2236            result["max_vehicle_weight"] = from_union([from_none, to_float], self.max_vehicle_weight)
2237        if self.max_vehicle_width is not None:
2238            result["max_vehicle_width"] = from_union([from_none, to_float], self.max_vehicle_width)
2239        if self.parking_space_length is not None:
2240            result["parking_space_length"] = from_union([from_none, to_float], self.parking_space_length)
2241        if self.parking_space_width is not None:
2242            result["parking_space_width"] = from_union([from_none, to_float], self.parking_space_width)
2243        if self.physical_reference is not None:
2244            result["physical_reference"] = from_union([from_none, from_str], self.physical_reference)
2245        if self.refrigeration_outlet is not None:
2246            result["refrigeration_outlet"] = from_union([from_none, from_bool], self.refrigeration_outlet)
2247        result["reservation_required"] = from_bool(self.reservation_required)
2248        result["restricted_to_type"] = from_bool(self.restricted_to_type)
2249        if self.roofed is not None:
2250            result["roofed"] = from_union([from_none, from_bool], self.roofed)
2251        if self.standards is not None:
2252            result["standards"] = from_union([from_none, lambda x: from_list(from_str, x)], self.standards)
2253        if self.time_limit is not None:
2254            result["time_limit"] = from_union([from_none, to_float], self.time_limit)
2255        result["vehicle_types"] = from_list(lambda x: to_enum(VehicleType, x), self.vehicle_types)
2256        return result
Parking( apds_reference: Optional[str], dangerous_goods_allowed: Optional[bool], direction: Optional[ParkingDirection], drive_through: Optional[bool], id: str, images: Optional[List[Image]], lighting: Optional[bool], max_vehicle_height: Optional[float], max_vehicle_length: Optional[float], max_vehicle_weight: Optional[float], max_vehicle_width: Optional[float], parking_space_length: Optional[float], parking_space_width: Optional[float], physical_reference: Optional[str], refrigeration_outlet: Optional[bool], reservation_required: bool, restricted_to_type: bool, roofed: Optional[bool], standards: Optional[List[str]], time_limit: Optional[float], vehicle_types: List[VehicleType])
2167    def __init__(self, apds_reference: Optional[str], dangerous_goods_allowed: Optional[bool], direction: Optional[ParkingDirection], drive_through: Optional[bool], id: str, images: Optional[List[Image]], lighting: Optional[bool], max_vehicle_height: Optional[float], max_vehicle_length: Optional[float], max_vehicle_weight: Optional[float], max_vehicle_width: Optional[float], parking_space_length: Optional[float], parking_space_width: Optional[float], physical_reference: Optional[str], refrigeration_outlet: Optional[bool], reservation_required: bool, restricted_to_type: bool, roofed: Optional[bool], standards: Optional[List[str]], time_limit: Optional[float], vehicle_types: List[VehicleType]) -> None:
2168        self.apds_reference = apds_reference
2169        self.dangerous_goods_allowed = dangerous_goods_allowed
2170        self.direction = direction
2171        self.drive_through = drive_through
2172        self.id = id
2173        self.images = images
2174        self.lighting = lighting
2175        self.max_vehicle_height = max_vehicle_height
2176        self.max_vehicle_length = max_vehicle_length
2177        self.max_vehicle_weight = max_vehicle_weight
2178        self.max_vehicle_width = max_vehicle_width
2179        self.parking_space_length = parking_space_length
2180        self.parking_space_width = parking_space_width
2181        self.physical_reference = physical_reference
2182        self.refrigeration_outlet = refrigeration_outlet
2183        self.reservation_required = reservation_required
2184        self.restricted_to_type = restricted_to_type
2185        self.roofed = roofed
2186        self.standards = standards
2187        self.time_limit = time_limit
2188        self.vehicle_types = vehicle_types
apds_reference: Optional[str]
dangerous_goods_allowed: Optional[bool]
direction: Optional[ParkingDirection]
drive_through: Optional[bool]
id: str
images: Optional[List[Image]]
lighting: Optional[bool]
max_vehicle_height: Optional[float]
max_vehicle_length: Optional[float]
max_vehicle_weight: Optional[float]
max_vehicle_width: Optional[float]
parking_space_length: Optional[float]
parking_space_width: Optional[float]
physical_reference: Optional[str]
refrigeration_outlet: Optional[bool]
reservation_required: bool
restricted_to_type: bool
roofed: Optional[bool]
standards: Optional[List[str]]
time_limit: Optional[float]
vehicle_types: List[VehicleType]
@staticmethod
def from_dict(obj: Any) -> Parking:
2190    @staticmethod
2191    def from_dict(obj: Any) -> 'Parking':
2192        assert isinstance(obj, dict)
2193        apds_reference = from_union([from_none, from_str], obj.get("apds_reference"))
2194        dangerous_goods_allowed = from_union([from_none, from_bool], obj.get("dangerous_goods_allowed"))
2195        direction = from_union([from_none, ParkingDirection], obj.get("direction"))
2196        drive_through = from_union([from_none, from_bool], obj.get("drive_through"))
2197        id = from_str(obj.get("id"))
2198        images = from_union([from_none, lambda x: from_list(Image.from_dict, x)], obj.get("images"))
2199        lighting = from_union([from_none, from_bool], obj.get("lighting"))
2200        max_vehicle_height = from_union([from_none, from_float], obj.get("max_vehicle_height"))
2201        max_vehicle_length = from_union([from_none, from_float], obj.get("max_vehicle_length"))
2202        max_vehicle_weight = from_union([from_none, from_float], obj.get("max_vehicle_weight"))
2203        max_vehicle_width = from_union([from_none, from_float], obj.get("max_vehicle_width"))
2204        parking_space_length = from_union([from_none, from_float], obj.get("parking_space_length"))
2205        parking_space_width = from_union([from_none, from_float], obj.get("parking_space_width"))
2206        physical_reference = from_union([from_none, from_str], obj.get("physical_reference"))
2207        refrigeration_outlet = from_union([from_none, from_bool], obj.get("refrigeration_outlet"))
2208        reservation_required = from_bool(obj.get("reservation_required"))
2209        restricted_to_type = from_bool(obj.get("restricted_to_type"))
2210        roofed = from_union([from_none, from_bool], obj.get("roofed"))
2211        standards = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("standards"))
2212        time_limit = from_union([from_none, from_float], obj.get("time_limit"))
2213        vehicle_types = from_list(VehicleType, obj.get("vehicle_types"))
2214        return Parking(apds_reference, dangerous_goods_allowed, direction, drive_through, id, images, lighting, max_vehicle_height, max_vehicle_length, max_vehicle_weight, max_vehicle_width, parking_space_length, parking_space_width, physical_reference, refrigeration_outlet, reservation_required, restricted_to_type, roofed, standards, time_limit, vehicle_types)
def to_dict(self) -> dict:
2216    def to_dict(self) -> dict:
2217        result: dict = {}
2218        if self.apds_reference is not None:
2219            result["apds_reference"] = from_union([from_none, from_str], self.apds_reference)
2220        if self.dangerous_goods_allowed is not None:
2221            result["dangerous_goods_allowed"] = from_union([from_none, from_bool], self.dangerous_goods_allowed)
2222        if self.direction is not None:
2223            result["direction"] = from_union([from_none, lambda x: to_enum(ParkingDirection, x)], self.direction)
2224        if self.drive_through is not None:
2225            result["drive_through"] = from_union([from_none, from_bool], self.drive_through)
2226        result["id"] = from_str(self.id)
2227        if self.images is not None:
2228            result["images"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Image, x), x)], self.images)
2229        if self.lighting is not None:
2230            result["lighting"] = from_union([from_none, from_bool], self.lighting)
2231        if self.max_vehicle_height is not None:
2232            result["max_vehicle_height"] = from_union([from_none, to_float], self.max_vehicle_height)
2233        if self.max_vehicle_length is not None:
2234            result["max_vehicle_length"] = from_union([from_none, to_float], self.max_vehicle_length)
2235        if self.max_vehicle_weight is not None:
2236            result["max_vehicle_weight"] = from_union([from_none, to_float], self.max_vehicle_weight)
2237        if self.max_vehicle_width is not None:
2238            result["max_vehicle_width"] = from_union([from_none, to_float], self.max_vehicle_width)
2239        if self.parking_space_length is not None:
2240            result["parking_space_length"] = from_union([from_none, to_float], self.parking_space_length)
2241        if self.parking_space_width is not None:
2242            result["parking_space_width"] = from_union([from_none, to_float], self.parking_space_width)
2243        if self.physical_reference is not None:
2244            result["physical_reference"] = from_union([from_none, from_str], self.physical_reference)
2245        if self.refrigeration_outlet is not None:
2246            result["refrigeration_outlet"] = from_union([from_none, from_bool], self.refrigeration_outlet)
2247        result["reservation_required"] = from_bool(self.reservation_required)
2248        result["restricted_to_type"] = from_bool(self.restricted_to_type)
2249        if self.roofed is not None:
2250            result["roofed"] = from_union([from_none, from_bool], self.roofed)
2251        if self.standards is not None:
2252            result["standards"] = from_union([from_none, lambda x: from_list(from_str, x)], self.standards)
2253        if self.time_limit is not None:
2254            result["time_limit"] = from_union([from_none, to_float], self.time_limit)
2255        result["vehicle_types"] = from_list(lambda x: to_enum(VehicleType, x), self.vehicle_types)
2256        return result
class ParkingType(enum.Enum):
2259class ParkingType(Enum):
2260    ALONG_MOTORWAY = "ALONG_MOTORWAY"
2261    ON_DRIVEWAY = "ON_DRIVEWAY"
2262    ON_STREET = "ON_STREET"
2263    PARKING_GARAGE = "PARKING_GARAGE"
2264    PARKING_LOT = "PARKING_LOT"
2265    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:
2268class PublishTokenType:
2269    group_id: Optional[str]
2270    issuer: Optional[str]
2271    type: Optional[TokenType]
2272    uid: Optional[str]
2273    visual_number: Optional[str]
2274
2275    def __init__(self, group_id: Optional[str], issuer: Optional[str], type: Optional[TokenType], uid: Optional[str], visual_number: Optional[str]) -> None:
2276        self.group_id = group_id
2277        self.issuer = issuer
2278        self.type = type
2279        self.uid = uid
2280        self.visual_number = visual_number
2281
2282    @staticmethod
2283    def from_dict(obj: Any) -> 'PublishTokenType':
2284        assert isinstance(obj, dict)
2285        group_id = from_union([from_none, from_str], obj.get("group_id"))
2286        issuer = from_union([from_none, from_str], obj.get("issuer"))
2287        type = from_union([from_none, TokenType], obj.get("type"))
2288        uid = from_union([from_none, from_str], obj.get("uid"))
2289        visual_number = from_union([from_none, from_str], obj.get("visual_number"))
2290        return PublishTokenType(group_id, issuer, type, uid, visual_number)
2291
2292    def to_dict(self) -> dict:
2293        result: dict = {}
2294        if self.group_id is not None:
2295            result["group_id"] = from_union([from_none, from_str], self.group_id)
2296        if self.issuer is not None:
2297            result["issuer"] = from_union([from_none, from_str], self.issuer)
2298        if self.type is not None:
2299            result["type"] = from_union([from_none, lambda x: to_enum(TokenType, x)], self.type)
2300        if self.uid is not None:
2301            result["uid"] = from_union([from_none, from_str], self.uid)
2302        if self.visual_number is not None:
2303            result["visual_number"] = from_union([from_none, from_str], self.visual_number)
2304        return result
PublishTokenType( group_id: Optional[str], issuer: Optional[str], type: Optional[TokenType], uid: Optional[str], visual_number: Optional[str])
2275    def __init__(self, group_id: Optional[str], issuer: Optional[str], type: Optional[TokenType], uid: Optional[str], visual_number: Optional[str]) -> None:
2276        self.group_id = group_id
2277        self.issuer = issuer
2278        self.type = type
2279        self.uid = uid
2280        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:
2282    @staticmethod
2283    def from_dict(obj: Any) -> 'PublishTokenType':
2284        assert isinstance(obj, dict)
2285        group_id = from_union([from_none, from_str], obj.get("group_id"))
2286        issuer = from_union([from_none, from_str], obj.get("issuer"))
2287        type = from_union([from_none, TokenType], obj.get("type"))
2288        uid = from_union([from_none, from_str], obj.get("uid"))
2289        visual_number = from_union([from_none, from_str], obj.get("visual_number"))
2290        return PublishTokenType(group_id, issuer, type, uid, visual_number)
def to_dict(self) -> dict:
2292    def to_dict(self) -> dict:
2293        result: dict = {}
2294        if self.group_id is not None:
2295            result["group_id"] = from_union([from_none, from_str], self.group_id)
2296        if self.issuer is not None:
2297            result["issuer"] = from_union([from_none, from_str], self.issuer)
2298        if self.type is not None:
2299            result["type"] = from_union([from_none, lambda x: to_enum(TokenType, x)], self.type)
2300        if self.uid is not None:
2301            result["uid"] = from_union([from_none, from_str], self.uid)
2302        if self.visual_number is not None:
2303            result["visual_number"] = from_union([from_none, from_str], self.visual_number)
2304        return result
class AdditionalGeoLocation:
2307class AdditionalGeoLocation:
2308    latitude: str
2309    longitude: str
2310    name: Optional[DisplayText]
2311
2312    def __init__(self, latitude: str, longitude: str, name: Optional[DisplayText]) -> None:
2313        self.latitude = latitude
2314        self.longitude = longitude
2315        self.name = name
2316
2317    @staticmethod
2318    def from_dict(obj: Any) -> 'AdditionalGeoLocation':
2319        assert isinstance(obj, dict)
2320        latitude = from_str(obj.get("latitude"))
2321        longitude = from_str(obj.get("longitude"))
2322        name = from_union([from_none, DisplayText.from_dict], obj.get("name"))
2323        return AdditionalGeoLocation(latitude, longitude, name)
2324
2325    def to_dict(self) -> dict:
2326        result: dict = {}
2327        result["latitude"] = from_str(self.latitude)
2328        result["longitude"] = from_str(self.longitude)
2329        if self.name is not None:
2330            result["name"] = from_union([from_none, lambda x: to_class(DisplayText, x)], self.name)
2331        return result
AdditionalGeoLocation( latitude: str, longitude: str, name: Optional[DisplayText])
2312    def __init__(self, latitude: str, longitude: str, name: Optional[DisplayText]) -> None:
2313        self.latitude = latitude
2314        self.longitude = longitude
2315        self.name = name
latitude: str
longitude: str
name: Optional[DisplayText]
@staticmethod
def from_dict(obj: Any) -> AdditionalGeoLocation:
2317    @staticmethod
2318    def from_dict(obj: Any) -> 'AdditionalGeoLocation':
2319        assert isinstance(obj, dict)
2320        latitude = from_str(obj.get("latitude"))
2321        longitude = from_str(obj.get("longitude"))
2322        name = from_union([from_none, DisplayText.from_dict], obj.get("name"))
2323        return AdditionalGeoLocation(latitude, longitude, name)
def to_dict(self) -> dict:
2325    def to_dict(self) -> dict:
2326        result: dict = {}
2327        result["latitude"] = from_str(self.latitude)
2328        result["longitude"] = from_str(self.longitude)
2329        if self.name is not None:
2330            result["name"] = from_union([from_none, lambda x: to_class(DisplayText, x)], self.name)
2331        return result
class Location:
2334class Location:
2335    address: str
2336    charging_when_closed: Optional[bool]
2337    city: str
2338    coordinates: GeoLocation
2339    country: str
2340    country_code: str
2341    directions: Optional[List[DisplayText]]
2342    energy_mix: Optional[EnergyMix]
2343    evses: Optional[List[Evse]]
2344    facilities: Optional[List[Facility]]
2345    help_phone: Optional[str]
2346    id: str
2347    images: Optional[List[Image]]
2348    last_updated: str
2349    name: Optional[str]
2350    opening_times: Optional[Hours]
2351    operator: Optional[BusinessDetails]
2352    owner: Optional[BusinessDetails]
2353    parking_places: Optional[List[Parking]]
2354    parking_type: Optional[ParkingType]
2355    party_id: str
2356    postal_code: Optional[str]
2357    publish: bool
2358    publish_allowed_to: Optional[List[PublishTokenType]]
2359    related_locations: Optional[List[AdditionalGeoLocation]]
2360    state: Optional[str]
2361    suboperator: Optional[BusinessDetails]
2362    time_zone: str
2363
2364    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]], help_phone: Optional[str], id: str, images: Optional[List[Image]], last_updated: str, name: Optional[str], opening_times: Optional[Hours], operator: Optional[BusinessDetails], owner: Optional[BusinessDetails], parking_places: Optional[List[Parking]], 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:
2365        self.address = address
2366        self.charging_when_closed = charging_when_closed
2367        self.city = city
2368        self.coordinates = coordinates
2369        self.country = country
2370        self.country_code = country_code
2371        self.directions = directions
2372        self.energy_mix = energy_mix
2373        self.evses = evses
2374        self.facilities = facilities
2375        self.help_phone = help_phone
2376        self.id = id
2377        self.images = images
2378        self.last_updated = last_updated
2379        self.name = name
2380        self.opening_times = opening_times
2381        self.operator = operator
2382        self.owner = owner
2383        self.parking_places = parking_places
2384        self.parking_type = parking_type
2385        self.party_id = party_id
2386        self.postal_code = postal_code
2387        self.publish = publish
2388        self.publish_allowed_to = publish_allowed_to
2389        self.related_locations = related_locations
2390        self.state = state
2391        self.suboperator = suboperator
2392        self.time_zone = time_zone
2393
2394    @staticmethod
2395    def from_dict(obj: Any) -> 'Location':
2396        assert isinstance(obj, dict)
2397        address = from_str(obj.get("address"))
2398        charging_when_closed = from_union([from_none, from_bool], obj.get("charging_when_closed"))
2399        city = from_str(obj.get("city"))
2400        coordinates = GeoLocation.from_dict(obj.get("coordinates"))
2401        country = from_str(obj.get("country"))
2402        country_code = from_str(obj.get("country_code"))
2403        directions = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("directions"))
2404        energy_mix = from_union([from_none, EnergyMix.from_dict], obj.get("energy_mix"))
2405        evses = from_union([from_none, lambda x: from_list(Evse.from_dict, x)], obj.get("evses"))
2406        facilities = from_union([from_none, lambda x: from_list(Facility, x)], obj.get("facilities"))
2407        help_phone = from_union([from_none, from_str], obj.get("help_phone"))
2408        id = from_str(obj.get("id"))
2409        images = from_union([from_none, lambda x: from_list(Image.from_dict, x)], obj.get("images"))
2410        last_updated = from_str(obj.get("last_updated"))
2411        name = from_union([from_none, from_str], obj.get("name"))
2412        opening_times = from_union([from_none, Hours.from_dict], obj.get("opening_times"))
2413        operator = from_union([from_none, BusinessDetails.from_dict], obj.get("operator"))
2414        owner = from_union([from_none, BusinessDetails.from_dict], obj.get("owner"))
2415        parking_places = from_union([from_none, lambda x: from_list(Parking.from_dict, x)], obj.get("parking_places"))
2416        parking_type = from_union([from_none, ParkingType], obj.get("parking_type"))
2417        party_id = from_str(obj.get("party_id"))
2418        postal_code = from_union([from_none, from_str], obj.get("postal_code"))
2419        publish = from_bool(obj.get("publish"))
2420        publish_allowed_to = from_union([from_none, lambda x: from_list(PublishTokenType.from_dict, x)], obj.get("publish_allowed_to"))
2421        related_locations = from_union([from_none, lambda x: from_list(AdditionalGeoLocation.from_dict, x)], obj.get("related_locations"))
2422        state = from_union([from_none, from_str], obj.get("state"))
2423        suboperator = from_union([from_none, BusinessDetails.from_dict], obj.get("suboperator"))
2424        time_zone = from_str(obj.get("time_zone"))
2425        return Location(address, charging_when_closed, city, coordinates, country, country_code, directions, energy_mix, evses, facilities, help_phone, id, images, last_updated, name, opening_times, operator, owner, parking_places, parking_type, party_id, postal_code, publish, publish_allowed_to, related_locations, state, suboperator, time_zone)
2426
2427    def to_dict(self) -> dict:
2428        result: dict = {}
2429        result["address"] = from_str(self.address)
2430        if self.charging_when_closed is not None:
2431            result["charging_when_closed"] = from_union([from_none, from_bool], self.charging_when_closed)
2432        result["city"] = from_str(self.city)
2433        result["coordinates"] = to_class(GeoLocation, self.coordinates)
2434        result["country"] = from_str(self.country)
2435        result["country_code"] = from_str(self.country_code)
2436        if self.directions is not None:
2437            result["directions"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.directions)
2438        if self.energy_mix is not None:
2439            result["energy_mix"] = from_union([from_none, lambda x: to_class(EnergyMix, x)], self.energy_mix)
2440        if self.evses is not None:
2441            result["evses"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Evse, x), x)], self.evses)
2442        if self.facilities is not None:
2443            result["facilities"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(Facility, x), x)], self.facilities)
2444        if self.help_phone is not None:
2445            result["help_phone"] = from_union([from_none, from_str], self.help_phone)
2446        result["id"] = from_str(self.id)
2447        if self.images is not None:
2448            result["images"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Image, x), x)], self.images)
2449        result["last_updated"] = from_str(self.last_updated)
2450        if self.name is not None:
2451            result["name"] = from_union([from_none, from_str], self.name)
2452        if self.opening_times is not None:
2453            result["opening_times"] = from_union([from_none, lambda x: to_class(Hours, x)], self.opening_times)
2454        if self.operator is not None:
2455            result["operator"] = from_union([from_none, lambda x: to_class(BusinessDetails, x)], self.operator)
2456        if self.owner is not None:
2457            result["owner"] = from_union([from_none, lambda x: to_class(BusinessDetails, x)], self.owner)
2458        if self.parking_places is not None:
2459            result["parking_places"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Parking, x), x)], self.parking_places)
2460        if self.parking_type is not None:
2461            result["parking_type"] = from_union([from_none, lambda x: to_enum(ParkingType, x)], self.parking_type)
2462        result["party_id"] = from_str(self.party_id)
2463        if self.postal_code is not None:
2464            result["postal_code"] = from_union([from_none, from_str], self.postal_code)
2465        result["publish"] = from_bool(self.publish)
2466        if self.publish_allowed_to is not None:
2467            result["publish_allowed_to"] = from_union([from_none, lambda x: from_list(lambda x: to_class(PublishTokenType, x), x)], self.publish_allowed_to)
2468        if self.related_locations is not None:
2469            result["related_locations"] = from_union([from_none, lambda x: from_list(lambda x: to_class(AdditionalGeoLocation, x), x)], self.related_locations)
2470        if self.state is not None:
2471            result["state"] = from_union([from_none, from_str], self.state)
2472        if self.suboperator is not None:
2473            result["suboperator"] = from_union([from_none, lambda x: to_class(BusinessDetails, x)], self.suboperator)
2474        result["time_zone"] = from_str(self.time_zone)
2475        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]], help_phone: Optional[str], id: str, images: Optional[List[Image]], last_updated: str, name: Optional[str], opening_times: Optional[Hours], operator: Optional[BusinessDetails], owner: Optional[BusinessDetails], parking_places: Optional[List[Parking]], 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)
2364    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]], help_phone: Optional[str], id: str, images: Optional[List[Image]], last_updated: str, name: Optional[str], opening_times: Optional[Hours], operator: Optional[BusinessDetails], owner: Optional[BusinessDetails], parking_places: Optional[List[Parking]], 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:
2365        self.address = address
2366        self.charging_when_closed = charging_when_closed
2367        self.city = city
2368        self.coordinates = coordinates
2369        self.country = country
2370        self.country_code = country_code
2371        self.directions = directions
2372        self.energy_mix = energy_mix
2373        self.evses = evses
2374        self.facilities = facilities
2375        self.help_phone = help_phone
2376        self.id = id
2377        self.images = images
2378        self.last_updated = last_updated
2379        self.name = name
2380        self.opening_times = opening_times
2381        self.operator = operator
2382        self.owner = owner
2383        self.parking_places = parking_places
2384        self.parking_type = parking_type
2385        self.party_id = party_id
2386        self.postal_code = postal_code
2387        self.publish = publish
2388        self.publish_allowed_to = publish_allowed_to
2389        self.related_locations = related_locations
2390        self.state = state
2391        self.suboperator = suboperator
2392        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]]
help_phone: Optional[str]
id: str
images: Optional[List[Image]]
last_updated: str
name: Optional[str]
opening_times: Optional[Hours]
operator: Optional[BusinessDetails]
owner: Optional[BusinessDetails]
parking_places: Optional[List[Parking]]
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:
2394    @staticmethod
2395    def from_dict(obj: Any) -> 'Location':
2396        assert isinstance(obj, dict)
2397        address = from_str(obj.get("address"))
2398        charging_when_closed = from_union([from_none, from_bool], obj.get("charging_when_closed"))
2399        city = from_str(obj.get("city"))
2400        coordinates = GeoLocation.from_dict(obj.get("coordinates"))
2401        country = from_str(obj.get("country"))
2402        country_code = from_str(obj.get("country_code"))
2403        directions = from_union([from_none, lambda x: from_list(DisplayText.from_dict, x)], obj.get("directions"))
2404        energy_mix = from_union([from_none, EnergyMix.from_dict], obj.get("energy_mix"))
2405        evses = from_union([from_none, lambda x: from_list(Evse.from_dict, x)], obj.get("evses"))
2406        facilities = from_union([from_none, lambda x: from_list(Facility, x)], obj.get("facilities"))
2407        help_phone = from_union([from_none, from_str], obj.get("help_phone"))
2408        id = from_str(obj.get("id"))
2409        images = from_union([from_none, lambda x: from_list(Image.from_dict, x)], obj.get("images"))
2410        last_updated = from_str(obj.get("last_updated"))
2411        name = from_union([from_none, from_str], obj.get("name"))
2412        opening_times = from_union([from_none, Hours.from_dict], obj.get("opening_times"))
2413        operator = from_union([from_none, BusinessDetails.from_dict], obj.get("operator"))
2414        owner = from_union([from_none, BusinessDetails.from_dict], obj.get("owner"))
2415        parking_places = from_union([from_none, lambda x: from_list(Parking.from_dict, x)], obj.get("parking_places"))
2416        parking_type = from_union([from_none, ParkingType], obj.get("parking_type"))
2417        party_id = from_str(obj.get("party_id"))
2418        postal_code = from_union([from_none, from_str], obj.get("postal_code"))
2419        publish = from_bool(obj.get("publish"))
2420        publish_allowed_to = from_union([from_none, lambda x: from_list(PublishTokenType.from_dict, x)], obj.get("publish_allowed_to"))
2421        related_locations = from_union([from_none, lambda x: from_list(AdditionalGeoLocation.from_dict, x)], obj.get("related_locations"))
2422        state = from_union([from_none, from_str], obj.get("state"))
2423        suboperator = from_union([from_none, BusinessDetails.from_dict], obj.get("suboperator"))
2424        time_zone = from_str(obj.get("time_zone"))
2425        return Location(address, charging_when_closed, city, coordinates, country, country_code, directions, energy_mix, evses, facilities, help_phone, id, images, last_updated, name, opening_times, operator, owner, parking_places, parking_type, party_id, postal_code, publish, publish_allowed_to, related_locations, state, suboperator, time_zone)
def to_dict(self) -> dict:
2427    def to_dict(self) -> dict:
2428        result: dict = {}
2429        result["address"] = from_str(self.address)
2430        if self.charging_when_closed is not None:
2431            result["charging_when_closed"] = from_union([from_none, from_bool], self.charging_when_closed)
2432        result["city"] = from_str(self.city)
2433        result["coordinates"] = to_class(GeoLocation, self.coordinates)
2434        result["country"] = from_str(self.country)
2435        result["country_code"] = from_str(self.country_code)
2436        if self.directions is not None:
2437            result["directions"] = from_union([from_none, lambda x: from_list(lambda x: to_class(DisplayText, x), x)], self.directions)
2438        if self.energy_mix is not None:
2439            result["energy_mix"] = from_union([from_none, lambda x: to_class(EnergyMix, x)], self.energy_mix)
2440        if self.evses is not None:
2441            result["evses"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Evse, x), x)], self.evses)
2442        if self.facilities is not None:
2443            result["facilities"] = from_union([from_none, lambda x: from_list(lambda x: to_enum(Facility, x), x)], self.facilities)
2444        if self.help_phone is not None:
2445            result["help_phone"] = from_union([from_none, from_str], self.help_phone)
2446        result["id"] = from_str(self.id)
2447        if self.images is not None:
2448            result["images"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Image, x), x)], self.images)
2449        result["last_updated"] = from_str(self.last_updated)
2450        if self.name is not None:
2451            result["name"] = from_union([from_none, from_str], self.name)
2452        if self.opening_times is not None:
2453            result["opening_times"] = from_union([from_none, lambda x: to_class(Hours, x)], self.opening_times)
2454        if self.operator is not None:
2455            result["operator"] = from_union([from_none, lambda x: to_class(BusinessDetails, x)], self.operator)
2456        if self.owner is not None:
2457            result["owner"] = from_union([from_none, lambda x: to_class(BusinessDetails, x)], self.owner)
2458        if self.parking_places is not None:
2459            result["parking_places"] = from_union([from_none, lambda x: from_list(lambda x: to_class(Parking, x), x)], self.parking_places)
2460        if self.parking_type is not None:
2461            result["parking_type"] = from_union([from_none, lambda x: to_enum(ParkingType, x)], self.parking_type)
2462        result["party_id"] = from_str(self.party_id)
2463        if self.postal_code is not None:
2464            result["postal_code"] = from_union([from_none, from_str], self.postal_code)
2465        result["publish"] = from_bool(self.publish)
2466        if self.publish_allowed_to is not None:
2467            result["publish_allowed_to"] = from_union([from_none, lambda x: from_list(lambda x: to_class(PublishTokenType, x), x)], self.publish_allowed_to)
2468        if self.related_locations is not None:
2469            result["related_locations"] = from_union([from_none, lambda x: from_list(lambda x: to_class(AdditionalGeoLocation, x), x)], self.related_locations)
2470        if self.state is not None:
2471            result["state"] = from_union([from_none, from_str], self.state)
2472        if self.suboperator is not None:
2473            result["suboperator"] = from_union([from_none, lambda x: to_class(BusinessDetails, x)], self.suboperator)
2474        result["time_zone"] = from_str(self.time_zone)
2475        return result
class ReserveNow:
2478class ReserveNow:
2479    authorization_reference: Optional[str]
2480    evse_uid: Optional[str]
2481    expiry_date: str
2482    location_id: str
2483    reservation_id: str
2484    response_url: str
2485    token: Token
2486
2487    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:
2488        self.authorization_reference = authorization_reference
2489        self.evse_uid = evse_uid
2490        self.expiry_date = expiry_date
2491        self.location_id = location_id
2492        self.reservation_id = reservation_id
2493        self.response_url = response_url
2494        self.token = token
2495
2496    @staticmethod
2497    def from_dict(obj: Any) -> 'ReserveNow':
2498        assert isinstance(obj, dict)
2499        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
2500        evse_uid = from_union([from_none, from_str], obj.get("evse_uid"))
2501        expiry_date = from_str(obj.get("expiry_date"))
2502        location_id = from_str(obj.get("location_id"))
2503        reservation_id = from_str(obj.get("reservation_id"))
2504        response_url = from_str(obj.get("response_url"))
2505        token = Token.from_dict(obj.get("token"))
2506        return ReserveNow(authorization_reference, evse_uid, expiry_date, location_id, reservation_id, response_url, token)
2507
2508    def to_dict(self) -> dict:
2509        result: dict = {}
2510        if self.authorization_reference is not None:
2511            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
2512        if self.evse_uid is not None:
2513            result["evse_uid"] = from_union([from_none, from_str], self.evse_uid)
2514        result["expiry_date"] = from_str(self.expiry_date)
2515        result["location_id"] = from_str(self.location_id)
2516        result["reservation_id"] = from_str(self.reservation_id)
2517        result["response_url"] = from_str(self.response_url)
2518        result["token"] = to_class(Token, self.token)
2519        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)
2487    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:
2488        self.authorization_reference = authorization_reference
2489        self.evse_uid = evse_uid
2490        self.expiry_date = expiry_date
2491        self.location_id = location_id
2492        self.reservation_id = reservation_id
2493        self.response_url = response_url
2494        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:
2496    @staticmethod
2497    def from_dict(obj: Any) -> 'ReserveNow':
2498        assert isinstance(obj, dict)
2499        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
2500        evse_uid = from_union([from_none, from_str], obj.get("evse_uid"))
2501        expiry_date = from_str(obj.get("expiry_date"))
2502        location_id = from_str(obj.get("location_id"))
2503        reservation_id = from_str(obj.get("reservation_id"))
2504        response_url = from_str(obj.get("response_url"))
2505        token = Token.from_dict(obj.get("token"))
2506        return ReserveNow(authorization_reference, evse_uid, expiry_date, location_id, reservation_id, response_url, token)
def to_dict(self) -> dict:
2508    def to_dict(self) -> dict:
2509        result: dict = {}
2510        if self.authorization_reference is not None:
2511            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
2512        if self.evse_uid is not None:
2513            result["evse_uid"] = from_union([from_none, from_str], self.evse_uid)
2514        result["expiry_date"] = from_str(self.expiry_date)
2515        result["location_id"] = from_str(self.location_id)
2516        result["reservation_id"] = from_str(self.reservation_id)
2517        result["response_url"] = from_str(self.response_url)
2518        result["token"] = to_class(Token, self.token)
2519        return result
class SessionStatus(enum.Enum):
2522class SessionStatus(Enum):
2523    ACTIVE = "ACTIVE"
2524    COMPLETED = "COMPLETED"
2525    INVALID = "INVALID"
2526    PENDING = "PENDING"
2527    RESERVATION = "RESERVATION"
ACTIVE = <SessionStatus.ACTIVE: 'ACTIVE'>
COMPLETED = <SessionStatus.COMPLETED: 'COMPLETED'>
INVALID = <SessionStatus.INVALID: 'INVALID'>
PENDING = <SessionStatus.PENDING: 'PENDING'>
RESERVATION = <SessionStatus.RESERVATION: 'RESERVATION'>
class Session:
2530class Session:
2531    auth_method: AuthMethod
2532    authorization_reference: Optional[str]
2533    cdr_token: CdrToken
2534    charging_periods: Optional[List[ChargingPeriod]]
2535    connector_id: str
2536    country_code: str
2537    currency: str
2538    end_date_time: Optional[str]
2539    evse_uid: str
2540    id: str
2541    kwh: float
2542    last_updated: str
2543    location_id: str
2544    meter_id: Optional[str]
2545    party_id: str
2546    start_date_time: str
2547    status: SessionStatus
2548    total_cost: Optional[Price]
2549
2550    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:
2551        self.auth_method = auth_method
2552        self.authorization_reference = authorization_reference
2553        self.cdr_token = cdr_token
2554        self.charging_periods = charging_periods
2555        self.connector_id = connector_id
2556        self.country_code = country_code
2557        self.currency = currency
2558        self.end_date_time = end_date_time
2559        self.evse_uid = evse_uid
2560        self.id = id
2561        self.kwh = kwh
2562        self.last_updated = last_updated
2563        self.location_id = location_id
2564        self.meter_id = meter_id
2565        self.party_id = party_id
2566        self.start_date_time = start_date_time
2567        self.status = status
2568        self.total_cost = total_cost
2569
2570    @staticmethod
2571    def from_dict(obj: Any) -> 'Session':
2572        assert isinstance(obj, dict)
2573        auth_method = AuthMethod(obj.get("auth_method"))
2574        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
2575        cdr_token = CdrToken.from_dict(obj.get("cdr_token"))
2576        charging_periods = from_union([from_none, lambda x: from_list(ChargingPeriod.from_dict, x)], obj.get("charging_periods"))
2577        connector_id = from_str(obj.get("connector_id"))
2578        country_code = from_str(obj.get("country_code"))
2579        currency = from_str(obj.get("currency"))
2580        end_date_time = from_union([from_none, from_str], obj.get("end_date_time"))
2581        evse_uid = from_str(obj.get("evse_uid"))
2582        id = from_str(obj.get("id"))
2583        kwh = from_float(obj.get("kwh"))
2584        last_updated = from_str(obj.get("last_updated"))
2585        location_id = from_str(obj.get("location_id"))
2586        meter_id = from_union([from_none, from_str], obj.get("meter_id"))
2587        party_id = from_str(obj.get("party_id"))
2588        start_date_time = from_str(obj.get("start_date_time"))
2589        status = SessionStatus(obj.get("status"))
2590        total_cost = from_union([from_none, Price.from_dict], obj.get("total_cost"))
2591        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)
2592
2593    def to_dict(self) -> dict:
2594        result: dict = {}
2595        result["auth_method"] = to_enum(AuthMethod, self.auth_method)
2596        if self.authorization_reference is not None:
2597            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
2598        result["cdr_token"] = to_class(CdrToken, self.cdr_token)
2599        if self.charging_periods is not None:
2600            result["charging_periods"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ChargingPeriod, x), x)], self.charging_periods)
2601        result["connector_id"] = from_str(self.connector_id)
2602        result["country_code"] = from_str(self.country_code)
2603        result["currency"] = from_str(self.currency)
2604        if self.end_date_time is not None:
2605            result["end_date_time"] = from_union([from_none, from_str], self.end_date_time)
2606        result["evse_uid"] = from_str(self.evse_uid)
2607        result["id"] = from_str(self.id)
2608        result["kwh"] = to_float(self.kwh)
2609        result["last_updated"] = from_str(self.last_updated)
2610        result["location_id"] = from_str(self.location_id)
2611        if self.meter_id is not None:
2612            result["meter_id"] = from_union([from_none, from_str], self.meter_id)
2613        result["party_id"] = from_str(self.party_id)
2614        result["start_date_time"] = from_str(self.start_date_time)
2615        result["status"] = to_enum(SessionStatus, self.status)
2616        if self.total_cost is not None:
2617            result["total_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_cost)
2618        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])
2550    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:
2551        self.auth_method = auth_method
2552        self.authorization_reference = authorization_reference
2553        self.cdr_token = cdr_token
2554        self.charging_periods = charging_periods
2555        self.connector_id = connector_id
2556        self.country_code = country_code
2557        self.currency = currency
2558        self.end_date_time = end_date_time
2559        self.evse_uid = evse_uid
2560        self.id = id
2561        self.kwh = kwh
2562        self.last_updated = last_updated
2563        self.location_id = location_id
2564        self.meter_id = meter_id
2565        self.party_id = party_id
2566        self.start_date_time = start_date_time
2567        self.status = status
2568        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:
2570    @staticmethod
2571    def from_dict(obj: Any) -> 'Session':
2572        assert isinstance(obj, dict)
2573        auth_method = AuthMethod(obj.get("auth_method"))
2574        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
2575        cdr_token = CdrToken.from_dict(obj.get("cdr_token"))
2576        charging_periods = from_union([from_none, lambda x: from_list(ChargingPeriod.from_dict, x)], obj.get("charging_periods"))
2577        connector_id = from_str(obj.get("connector_id"))
2578        country_code = from_str(obj.get("country_code"))
2579        currency = from_str(obj.get("currency"))
2580        end_date_time = from_union([from_none, from_str], obj.get("end_date_time"))
2581        evse_uid = from_str(obj.get("evse_uid"))
2582        id = from_str(obj.get("id"))
2583        kwh = from_float(obj.get("kwh"))
2584        last_updated = from_str(obj.get("last_updated"))
2585        location_id = from_str(obj.get("location_id"))
2586        meter_id = from_union([from_none, from_str], obj.get("meter_id"))
2587        party_id = from_str(obj.get("party_id"))
2588        start_date_time = from_str(obj.get("start_date_time"))
2589        status = SessionStatus(obj.get("status"))
2590        total_cost = from_union([from_none, Price.from_dict], obj.get("total_cost"))
2591        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:
2593    def to_dict(self) -> dict:
2594        result: dict = {}
2595        result["auth_method"] = to_enum(AuthMethod, self.auth_method)
2596        if self.authorization_reference is not None:
2597            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
2598        result["cdr_token"] = to_class(CdrToken, self.cdr_token)
2599        if self.charging_periods is not None:
2600            result["charging_periods"] = from_union([from_none, lambda x: from_list(lambda x: to_class(ChargingPeriod, x), x)], self.charging_periods)
2601        result["connector_id"] = from_str(self.connector_id)
2602        result["country_code"] = from_str(self.country_code)
2603        result["currency"] = from_str(self.currency)
2604        if self.end_date_time is not None:
2605            result["end_date_time"] = from_union([from_none, from_str], self.end_date_time)
2606        result["evse_uid"] = from_str(self.evse_uid)
2607        result["id"] = from_str(self.id)
2608        result["kwh"] = to_float(self.kwh)
2609        result["last_updated"] = from_str(self.last_updated)
2610        result["location_id"] = from_str(self.location_id)
2611        if self.meter_id is not None:
2612            result["meter_id"] = from_union([from_none, from_str], self.meter_id)
2613        result["party_id"] = from_str(self.party_id)
2614        result["start_date_time"] = from_str(self.start_date_time)
2615        result["status"] = to_enum(SessionStatus, self.status)
2616        if self.total_cost is not None:
2617            result["total_cost"] = from_union([from_none, lambda x: to_class(Price, x)], self.total_cost)
2618        return result
class SetChargingProfile:
2621class SetChargingProfile:
2622    charging_profile: ChargingProfile
2623    response_url: str
2624
2625    def __init__(self, charging_profile: ChargingProfile, response_url: str) -> None:
2626        self.charging_profile = charging_profile
2627        self.response_url = response_url
2628
2629    @staticmethod
2630    def from_dict(obj: Any) -> 'SetChargingProfile':
2631        assert isinstance(obj, dict)
2632        charging_profile = ChargingProfile.from_dict(obj.get("charging_profile"))
2633        response_url = from_str(obj.get("response_url"))
2634        return SetChargingProfile(charging_profile, response_url)
2635
2636    def to_dict(self) -> dict:
2637        result: dict = {}
2638        result["charging_profile"] = to_class(ChargingProfile, self.charging_profile)
2639        result["response_url"] = from_str(self.response_url)
2640        return result
SetChargingProfile(charging_profile: ChargingProfile, response_url: str)
2625    def __init__(self, charging_profile: ChargingProfile, response_url: str) -> None:
2626        self.charging_profile = charging_profile
2627        self.response_url = response_url
charging_profile: ChargingProfile
response_url: str
@staticmethod
def from_dict(obj: Any) -> SetChargingProfile:
2629    @staticmethod
2630    def from_dict(obj: Any) -> 'SetChargingProfile':
2631        assert isinstance(obj, dict)
2632        charging_profile = ChargingProfile.from_dict(obj.get("charging_profile"))
2633        response_url = from_str(obj.get("response_url"))
2634        return SetChargingProfile(charging_profile, response_url)
def to_dict(self) -> dict:
2636    def to_dict(self) -> dict:
2637        result: dict = {}
2638        result["charging_profile"] = to_class(ChargingProfile, self.charging_profile)
2639        result["response_url"] = from_str(self.response_url)
2640        return result
class StartSession:
2643class StartSession:
2644    authorization_reference: Optional[str]
2645    connector_id: Optional[str]
2646    evse_uid: Optional[str]
2647    location_id: str
2648    response_url: str
2649    token: Token
2650
2651    def __init__(self, authorization_reference: Optional[str], connector_id: Optional[str], evse_uid: Optional[str], location_id: str, response_url: str, token: Token) -> None:
2652        self.authorization_reference = authorization_reference
2653        self.connector_id = connector_id
2654        self.evse_uid = evse_uid
2655        self.location_id = location_id
2656        self.response_url = response_url
2657        self.token = token
2658
2659    @staticmethod
2660    def from_dict(obj: Any) -> 'StartSession':
2661        assert isinstance(obj, dict)
2662        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
2663        connector_id = from_union([from_none, from_str], obj.get("connector_id"))
2664        evse_uid = from_union([from_none, from_str], obj.get("evse_uid"))
2665        location_id = from_str(obj.get("location_id"))
2666        response_url = from_str(obj.get("response_url"))
2667        token = Token.from_dict(obj.get("token"))
2668        return StartSession(authorization_reference, connector_id, evse_uid, location_id, response_url, token)
2669
2670    def to_dict(self) -> dict:
2671        result: dict = {}
2672        if self.authorization_reference is not None:
2673            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
2674        if self.connector_id is not None:
2675            result["connector_id"] = from_union([from_none, from_str], self.connector_id)
2676        if self.evse_uid is not None:
2677            result["evse_uid"] = from_union([from_none, from_str], self.evse_uid)
2678        result["location_id"] = from_str(self.location_id)
2679        result["response_url"] = from_str(self.response_url)
2680        result["token"] = to_class(Token, self.token)
2681        return result
StartSession( authorization_reference: Optional[str], connector_id: Optional[str], evse_uid: Optional[str], location_id: str, response_url: str, token: Token)
2651    def __init__(self, authorization_reference: Optional[str], connector_id: Optional[str], evse_uid: Optional[str], location_id: str, response_url: str, token: Token) -> None:
2652        self.authorization_reference = authorization_reference
2653        self.connector_id = connector_id
2654        self.evse_uid = evse_uid
2655        self.location_id = location_id
2656        self.response_url = response_url
2657        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:
2659    @staticmethod
2660    def from_dict(obj: Any) -> 'StartSession':
2661        assert isinstance(obj, dict)
2662        authorization_reference = from_union([from_none, from_str], obj.get("authorization_reference"))
2663        connector_id = from_union([from_none, from_str], obj.get("connector_id"))
2664        evse_uid = from_union([from_none, from_str], obj.get("evse_uid"))
2665        location_id = from_str(obj.get("location_id"))
2666        response_url = from_str(obj.get("response_url"))
2667        token = Token.from_dict(obj.get("token"))
2668        return StartSession(authorization_reference, connector_id, evse_uid, location_id, response_url, token)
def to_dict(self) -> dict:
2670    def to_dict(self) -> dict:
2671        result: dict = {}
2672        if self.authorization_reference is not None:
2673            result["authorization_reference"] = from_union([from_none, from_str], self.authorization_reference)
2674        if self.connector_id is not None:
2675            result["connector_id"] = from_union([from_none, from_str], self.connector_id)
2676        if self.evse_uid is not None:
2677            result["evse_uid"] = from_union([from_none, from_str], self.evse_uid)
2678        result["location_id"] = from_str(self.location_id)
2679        result["response_url"] = from_str(self.response_url)
2680        result["token"] = to_class(Token, self.token)
2681        return result
class StopSession:
2684class StopSession:
2685    response_url: str
2686    session_id: str
2687
2688    def __init__(self, response_url: str, session_id: str) -> None:
2689        self.response_url = response_url
2690        self.session_id = session_id
2691
2692    @staticmethod
2693    def from_dict(obj: Any) -> 'StopSession':
2694        assert isinstance(obj, dict)
2695        response_url = from_str(obj.get("response_url"))
2696        session_id = from_str(obj.get("session_id"))
2697        return StopSession(response_url, session_id)
2698
2699    def to_dict(self) -> dict:
2700        result: dict = {}
2701        result["response_url"] = from_str(self.response_url)
2702        result["session_id"] = from_str(self.session_id)
2703        return result
StopSession(response_url: str, session_id: str)
2688    def __init__(self, response_url: str, session_id: str) -> None:
2689        self.response_url = response_url
2690        self.session_id = session_id
response_url: str
session_id: str
@staticmethod
def from_dict(obj: Any) -> StopSession:
2692    @staticmethod
2693    def from_dict(obj: Any) -> 'StopSession':
2694        assert isinstance(obj, dict)
2695        response_url = from_str(obj.get("response_url"))
2696        session_id = from_str(obj.get("session_id"))
2697        return StopSession(response_url, session_id)
def to_dict(self) -> dict:
2699    def to_dict(self) -> dict:
2700        result: dict = {}
2701        result["response_url"] = from_str(self.response_url)
2702        result["session_id"] = from_str(self.session_id)
2703        return result
class InvoiceCreator(enum.Enum):
2706class InvoiceCreator(Enum):
2707    CPO = "CPO"
2708    PTP = "PTP"
CPO = <InvoiceCreator.CPO: 'CPO'>
PTP = <InvoiceCreator.PTP: 'PTP'>
class Terminal:
2711class Terminal:
2712    address: Optional[str]
2713    city: Optional[str]
2714    coordinates: Optional[GeoLocation]
2715    country: Optional[str]
2716    country_code: Optional[str]
2717    customer_reference: Optional[str]
2718    evse_uids: Optional[List[str]]
2719    invoice_base_url: Optional[str]
2720    invoice_creator: Optional[InvoiceCreator]
2721    last_updated: str
2722    location_ids: Optional[List[str]]
2723    party_id: Optional[str]
2724    postal_code: Optional[str]
2725    reference: Optional[str]
2726    state: Optional[str]
2727    terminal_id: str
2728
2729    def __init__(self, address: Optional[str], city: Optional[str], coordinates: Optional[GeoLocation], country: Optional[str], country_code: Optional[str], customer_reference: Optional[str], evse_uids: Optional[List[str]], invoice_base_url: Optional[str], invoice_creator: Optional[InvoiceCreator], last_updated: str, location_ids: Optional[List[str]], party_id: Optional[str], postal_code: Optional[str], reference: Optional[str], state: Optional[str], terminal_id: str) -> None:
2730        self.address = address
2731        self.city = city
2732        self.coordinates = coordinates
2733        self.country = country
2734        self.country_code = country_code
2735        self.customer_reference = customer_reference
2736        self.evse_uids = evse_uids
2737        self.invoice_base_url = invoice_base_url
2738        self.invoice_creator = invoice_creator
2739        self.last_updated = last_updated
2740        self.location_ids = location_ids
2741        self.party_id = party_id
2742        self.postal_code = postal_code
2743        self.reference = reference
2744        self.state = state
2745        self.terminal_id = terminal_id
2746
2747    @staticmethod
2748    def from_dict(obj: Any) -> 'Terminal':
2749        assert isinstance(obj, dict)
2750        address = from_union([from_none, from_str], obj.get("address"))
2751        city = from_union([from_none, from_str], obj.get("city"))
2752        coordinates = from_union([from_none, GeoLocation.from_dict], obj.get("coordinates"))
2753        country = from_union([from_none, from_str], obj.get("country"))
2754        country_code = from_union([from_none, from_str], obj.get("country_code"))
2755        customer_reference = from_union([from_none, from_str], obj.get("customer_reference"))
2756        evse_uids = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("evse_uids"))
2757        invoice_base_url = from_union([from_none, from_str], obj.get("invoice_base_url"))
2758        invoice_creator = from_union([from_none, InvoiceCreator], obj.get("invoice_creator"))
2759        last_updated = from_str(obj.get("last_updated"))
2760        location_ids = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("location_ids"))
2761        party_id = from_union([from_none, from_str], obj.get("party_id"))
2762        postal_code = from_union([from_none, from_str], obj.get("postal_code"))
2763        reference = from_union([from_none, from_str], obj.get("reference"))
2764        state = from_union([from_none, from_str], obj.get("state"))
2765        terminal_id = from_str(obj.get("terminal_id"))
2766        return Terminal(address, city, coordinates, country, country_code, customer_reference, evse_uids, invoice_base_url, invoice_creator, last_updated, location_ids, party_id, postal_code, reference, state, terminal_id)
2767
2768    def to_dict(self) -> dict:
2769        result: dict = {}
2770        if self.address is not None:
2771            result["address"] = from_union([from_none, from_str], self.address)
2772        if self.city is not None:
2773            result["city"] = from_union([from_none, from_str], self.city)
2774        if self.coordinates is not None:
2775            result["coordinates"] = from_union([from_none, lambda x: to_class(GeoLocation, x)], self.coordinates)
2776        if self.country is not None:
2777            result["country"] = from_union([from_none, from_str], self.country)
2778        if self.country_code is not None:
2779            result["country_code"] = from_union([from_none, from_str], self.country_code)
2780        if self.customer_reference is not None:
2781            result["customer_reference"] = from_union([from_none, from_str], self.customer_reference)
2782        if self.evse_uids is not None:
2783            result["evse_uids"] = from_union([from_none, lambda x: from_list(from_str, x)], self.evse_uids)
2784        if self.invoice_base_url is not None:
2785            result["invoice_base_url"] = from_union([from_none, from_str], self.invoice_base_url)
2786        if self.invoice_creator is not None:
2787            result["invoice_creator"] = from_union([from_none, lambda x: to_enum(InvoiceCreator, x)], self.invoice_creator)
2788        result["last_updated"] = from_str(self.last_updated)
2789        if self.location_ids is not None:
2790            result["location_ids"] = from_union([from_none, lambda x: from_list(from_str, x)], self.location_ids)
2791        if self.party_id is not None:
2792            result["party_id"] = from_union([from_none, from_str], self.party_id)
2793        if self.postal_code is not None:
2794            result["postal_code"] = from_union([from_none, from_str], self.postal_code)
2795        if self.reference is not None:
2796            result["reference"] = from_union([from_none, from_str], self.reference)
2797        if self.state is not None:
2798            result["state"] = from_union([from_none, from_str], self.state)
2799        result["terminal_id"] = from_str(self.terminal_id)
2800        return result
Terminal( address: Optional[str], city: Optional[str], coordinates: Optional[GeoLocation], country: Optional[str], country_code: Optional[str], customer_reference: Optional[str], evse_uids: Optional[List[str]], invoice_base_url: Optional[str], invoice_creator: Optional[InvoiceCreator], last_updated: str, location_ids: Optional[List[str]], party_id: Optional[str], postal_code: Optional[str], reference: Optional[str], state: Optional[str], terminal_id: str)
2729    def __init__(self, address: Optional[str], city: Optional[str], coordinates: Optional[GeoLocation], country: Optional[str], country_code: Optional[str], customer_reference: Optional[str], evse_uids: Optional[List[str]], invoice_base_url: Optional[str], invoice_creator: Optional[InvoiceCreator], last_updated: str, location_ids: Optional[List[str]], party_id: Optional[str], postal_code: Optional[str], reference: Optional[str], state: Optional[str], terminal_id: str) -> None:
2730        self.address = address
2731        self.city = city
2732        self.coordinates = coordinates
2733        self.country = country
2734        self.country_code = country_code
2735        self.customer_reference = customer_reference
2736        self.evse_uids = evse_uids
2737        self.invoice_base_url = invoice_base_url
2738        self.invoice_creator = invoice_creator
2739        self.last_updated = last_updated
2740        self.location_ids = location_ids
2741        self.party_id = party_id
2742        self.postal_code = postal_code
2743        self.reference = reference
2744        self.state = state
2745        self.terminal_id = terminal_id
address: Optional[str]
city: Optional[str]
coordinates: Optional[GeoLocation]
country: Optional[str]
country_code: Optional[str]
customer_reference: Optional[str]
evse_uids: Optional[List[str]]
invoice_base_url: Optional[str]
invoice_creator: Optional[InvoiceCreator]
last_updated: str
location_ids: Optional[List[str]]
party_id: Optional[str]
postal_code: Optional[str]
reference: Optional[str]
state: Optional[str]
terminal_id: str
@staticmethod
def from_dict(obj: Any) -> Terminal:
2747    @staticmethod
2748    def from_dict(obj: Any) -> 'Terminal':
2749        assert isinstance(obj, dict)
2750        address = from_union([from_none, from_str], obj.get("address"))
2751        city = from_union([from_none, from_str], obj.get("city"))
2752        coordinates = from_union([from_none, GeoLocation.from_dict], obj.get("coordinates"))
2753        country = from_union([from_none, from_str], obj.get("country"))
2754        country_code = from_union([from_none, from_str], obj.get("country_code"))
2755        customer_reference = from_union([from_none, from_str], obj.get("customer_reference"))
2756        evse_uids = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("evse_uids"))
2757        invoice_base_url = from_union([from_none, from_str], obj.get("invoice_base_url"))
2758        invoice_creator = from_union([from_none, InvoiceCreator], obj.get("invoice_creator"))
2759        last_updated = from_str(obj.get("last_updated"))
2760        location_ids = from_union([from_none, lambda x: from_list(from_str, x)], obj.get("location_ids"))
2761        party_id = from_union([from_none, from_str], obj.get("party_id"))
2762        postal_code = from_union([from_none, from_str], obj.get("postal_code"))
2763        reference = from_union([from_none, from_str], obj.get("reference"))
2764        state = from_union([from_none, from_str], obj.get("state"))
2765        terminal_id = from_str(obj.get("terminal_id"))
2766        return Terminal(address, city, coordinates, country, country_code, customer_reference, evse_uids, invoice_base_url, invoice_creator, last_updated, location_ids, party_id, postal_code, reference, state, terminal_id)
def to_dict(self) -> dict:
2768    def to_dict(self) -> dict:
2769        result: dict = {}
2770        if self.address is not None:
2771            result["address"] = from_union([from_none, from_str], self.address)
2772        if self.city is not None:
2773            result["city"] = from_union([from_none, from_str], self.city)
2774        if self.coordinates is not None:
2775            result["coordinates"] = from_union([from_none, lambda x: to_class(GeoLocation, x)], self.coordinates)
2776        if self.country is not None:
2777            result["country"] = from_union([from_none, from_str], self.country)
2778        if self.country_code is not None:
2779            result["country_code"] = from_union([from_none, from_str], self.country_code)
2780        if self.customer_reference is not None:
2781            result["customer_reference"] = from_union([from_none, from_str], self.customer_reference)
2782        if self.evse_uids is not None:
2783            result["evse_uids"] = from_union([from_none, lambda x: from_list(from_str, x)], self.evse_uids)
2784        if self.invoice_base_url is not None:
2785            result["invoice_base_url"] = from_union([from_none, from_str], self.invoice_base_url)
2786        if self.invoice_creator is not None:
2787            result["invoice_creator"] = from_union([from_none, lambda x: to_enum(InvoiceCreator, x)], self.invoice_creator)
2788        result["last_updated"] = from_str(self.last_updated)
2789        if self.location_ids is not None:
2790            result["location_ids"] = from_union([from_none, lambda x: from_list(from_str, x)], self.location_ids)
2791        if self.party_id is not None:
2792            result["party_id"] = from_union([from_none, from_str], self.party_id)
2793        if self.postal_code is not None:
2794            result["postal_code"] = from_union([from_none, from_str], self.postal_code)
2795        if self.reference is not None:
2796            result["reference"] = from_union([from_none, from_str], self.reference)
2797        if self.state is not None:
2798            result["state"] = from_union([from_none, from_str], self.state)
2799        result["terminal_id"] = from_str(self.terminal_id)
2800        return result
class UnlockConnector:
2803class UnlockConnector:
2804    connector_id: str
2805    evse_uid: str
2806    location_id: str
2807    response_url: str
2808
2809    def __init__(self, connector_id: str, evse_uid: str, location_id: str, response_url: str) -> None:
2810        self.connector_id = connector_id
2811        self.evse_uid = evse_uid
2812        self.location_id = location_id
2813        self.response_url = response_url
2814
2815    @staticmethod
2816    def from_dict(obj: Any) -> 'UnlockConnector':
2817        assert isinstance(obj, dict)
2818        connector_id = from_str(obj.get("connector_id"))
2819        evse_uid = from_str(obj.get("evse_uid"))
2820        location_id = from_str(obj.get("location_id"))
2821        response_url = from_str(obj.get("response_url"))
2822        return UnlockConnector(connector_id, evse_uid, location_id, response_url)
2823
2824    def to_dict(self) -> dict:
2825        result: dict = {}
2826        result["connector_id"] = from_str(self.connector_id)
2827        result["evse_uid"] = from_str(self.evse_uid)
2828        result["location_id"] = from_str(self.location_id)
2829        result["response_url"] = from_str(self.response_url)
2830        return result
UnlockConnector( connector_id: str, evse_uid: str, location_id: str, response_url: str)
2809    def __init__(self, connector_id: str, evse_uid: str, location_id: str, response_url: str) -> None:
2810        self.connector_id = connector_id
2811        self.evse_uid = evse_uid
2812        self.location_id = location_id
2813        self.response_url = response_url
connector_id: str
evse_uid: str
location_id: str
response_url: str
@staticmethod
def from_dict(obj: Any) -> UnlockConnector:
2815    @staticmethod
2816    def from_dict(obj: Any) -> 'UnlockConnector':
2817        assert isinstance(obj, dict)
2818        connector_id = from_str(obj.get("connector_id"))
2819        evse_uid = from_str(obj.get("evse_uid"))
2820        location_id = from_str(obj.get("location_id"))
2821        response_url = from_str(obj.get("response_url"))
2822        return UnlockConnector(connector_id, evse_uid, location_id, response_url)
def to_dict(self) -> dict:
2824    def to_dict(self) -> dict:
2825        result: dict = {}
2826        result["connector_id"] = from_str(self.connector_id)
2827        result["evse_uid"] = from_str(self.evse_uid)
2828        result["location_id"] = from_str(self.location_id)
2829        result["response_url"] = from_str(self.response_url)
2830        return result
class VersionNumber(enum.Enum):
2833class VersionNumber(Enum):
2834    THE_20 = "2.0"
2835    THE_21 = "2.1"
2836    THE_211 = "2.1.1"
2837    THE_22 = "2.2"
2838    THE_221 = "2.2.1"
2839    THE_230 = "2.3.0"
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'>
THE_230 = <VersionNumber.THE_230: '2.3.0'>
class Version:
2842class Version:
2843    url: str
2844    version: VersionNumber
2845
2846    def __init__(self, url: str, version: VersionNumber) -> None:
2847        self.url = url
2848        self.version = version
2849
2850    @staticmethod
2851    def from_dict(obj: Any) -> 'Version':
2852        assert isinstance(obj, dict)
2853        url = from_str(obj.get("url"))
2854        version = VersionNumber(obj.get("version"))
2855        return Version(url, version)
2856
2857    def to_dict(self) -> dict:
2858        result: dict = {}
2859        result["url"] = from_str(self.url)
2860        result["version"] = to_enum(VersionNumber, self.version)
2861        return result
Version(url: str, version: VersionNumber)
2846    def __init__(self, url: str, version: VersionNumber) -> None:
2847        self.url = url
2848        self.version = version
url: str
version: VersionNumber
@staticmethod
def from_dict(obj: Any) -> Version:
2850    @staticmethod
2851    def from_dict(obj: Any) -> 'Version':
2852        assert isinstance(obj, dict)
2853        url = from_str(obj.get("url"))
2854        version = VersionNumber(obj.get("version"))
2855        return Version(url, version)
def to_dict(self) -> dict:
2857    def to_dict(self) -> dict:
2858        result: dict = {}
2859        result["url"] = from_str(self.url)
2860        result["version"] = to_enum(VersionNumber, self.version)
2861        return result
class VersionDetails:
2864class VersionDetails:
2865    endpoints: List[Endpoint]
2866    version: VersionNumber
2867
2868    def __init__(self, endpoints: List[Endpoint], version: VersionNumber) -> None:
2869        self.endpoints = endpoints
2870        self.version = version
2871
2872    @staticmethod
2873    def from_dict(obj: Any) -> 'VersionDetails':
2874        assert isinstance(obj, dict)
2875        endpoints = from_list(Endpoint.from_dict, obj.get("endpoints"))
2876        version = VersionNumber(obj.get("version"))
2877        return VersionDetails(endpoints, version)
2878
2879    def to_dict(self) -> dict:
2880        result: dict = {}
2881        result["endpoints"] = from_list(lambda x: to_class(Endpoint, x), self.endpoints)
2882        result["version"] = to_enum(VersionNumber, self.version)
2883        return result
VersionDetails( endpoints: List[Endpoint], version: VersionNumber)
2868    def __init__(self, endpoints: List[Endpoint], version: VersionNumber) -> None:
2869        self.endpoints = endpoints
2870        self.version = version
endpoints: List[Endpoint]
version: VersionNumber
@staticmethod
def from_dict(obj: Any) -> VersionDetails:
2872    @staticmethod
2873    def from_dict(obj: Any) -> 'VersionDetails':
2874        assert isinstance(obj, dict)
2875        endpoints = from_list(Endpoint.from_dict, obj.get("endpoints"))
2876        version = VersionNumber(obj.get("version"))
2877        return VersionDetails(endpoints, version)
def to_dict(self) -> dict:
2879    def to_dict(self) -> dict:
2880        result: dict = {}
2881        result["endpoints"] = from_list(lambda x: to_class(Endpoint, x), self.endpoints)
2882        result["version"] = to_enum(VersionNumber, self.version)
2883        return result
class V230Payments:
2886class V230Payments:
2887    active_charging_profile: Optional[ActiveChargingProfile]
2888    active_charging_profile_result: Optional[ActiveChargingProfileResult]
2889    authorization_info: Optional[AuthorizationInfo]
2890    cancel_reservation: Optional[CancelReservation]
2891    cdr: Optional[Cdr]
2892    charging_preferences: Optional[ChargingPreferences]
2893    charging_profile: Optional[ChargingProfile]
2894    charging_profile_response: Optional[ChargingProfileResponse]
2895    charging_profile_result: Optional[ChargingProfileResult]
2896    clear_profile_result: Optional[ClearProfileResult]
2897    command_response: Optional[CommandResponse]
2898    command_result: Optional[CommandResult]
2899    connector: Optional[Connector]
2900    credentials: Optional[Credentials]
2901    endpoint: Optional[Endpoint]
2902    evse: Optional[Evse]
2903    financial_advice_confirmation: Optional[FinancialAdviceConfirmation]
2904    hub_client_info: Optional[HubClientInfo]
2905    location: Optional[Location]
2906    location_references: Optional[LocationReferences]
2907    reserve_now: Optional[ReserveNow]
2908    session: Optional[Session]
2909    set_charging_profile: Optional[SetChargingProfile]
2910    start_session: Optional[StartSession]
2911    stop_session: Optional[StopSession]
2912    tariff: Optional[Tariff]
2913    terminal: Optional[Terminal]
2914    token: Optional[Token]
2915    unlock_connector: Optional[UnlockConnector]
2916    version: Optional[Version]
2917    version_details: Optional[VersionDetails]
2918
2919    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], financial_advice_confirmation: Optional[FinancialAdviceConfirmation], 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], terminal: Optional[Terminal], token: Optional[Token], unlock_connector: Optional[UnlockConnector], version: Optional[Version], version_details: Optional[VersionDetails]) -> None:
2920        self.active_charging_profile = active_charging_profile
2921        self.active_charging_profile_result = active_charging_profile_result
2922        self.authorization_info = authorization_info
2923        self.cancel_reservation = cancel_reservation
2924        self.cdr = cdr
2925        self.charging_preferences = charging_preferences
2926        self.charging_profile = charging_profile
2927        self.charging_profile_response = charging_profile_response
2928        self.charging_profile_result = charging_profile_result
2929        self.clear_profile_result = clear_profile_result
2930        self.command_response = command_response
2931        self.command_result = command_result
2932        self.connector = connector
2933        self.credentials = credentials
2934        self.endpoint = endpoint
2935        self.evse = evse
2936        self.financial_advice_confirmation = financial_advice_confirmation
2937        self.hub_client_info = hub_client_info
2938        self.location = location
2939        self.location_references = location_references
2940        self.reserve_now = reserve_now
2941        self.session = session
2942        self.set_charging_profile = set_charging_profile
2943        self.start_session = start_session
2944        self.stop_session = stop_session
2945        self.tariff = tariff
2946        self.terminal = terminal
2947        self.token = token
2948        self.unlock_connector = unlock_connector
2949        self.version = version
2950        self.version_details = version_details
2951
2952    @staticmethod
2953    def from_dict(obj: Any) -> 'V230Payments':
2954        assert isinstance(obj, dict)
2955        active_charging_profile = from_union([ActiveChargingProfile.from_dict, from_none], obj.get("active_charging_profile"))
2956        active_charging_profile_result = from_union([ActiveChargingProfileResult.from_dict, from_none], obj.get("active_charging_profile_result"))
2957        authorization_info = from_union([AuthorizationInfo.from_dict, from_none], obj.get("authorization_info"))
2958        cancel_reservation = from_union([CancelReservation.from_dict, from_none], obj.get("cancel_reservation"))
2959        cdr = from_union([Cdr.from_dict, from_none], obj.get("cdr"))
2960        charging_preferences = from_union([ChargingPreferences.from_dict, from_none], obj.get("charging_preferences"))
2961        charging_profile = from_union([ChargingProfile.from_dict, from_none], obj.get("charging_profile"))
2962        charging_profile_response = from_union([ChargingProfileResponse.from_dict, from_none], obj.get("charging_profile_response"))
2963        charging_profile_result = from_union([ChargingProfileResult.from_dict, from_none], obj.get("charging_profile_result"))
2964        clear_profile_result = from_union([ClearProfileResult.from_dict, from_none], obj.get("clear_profile_result"))
2965        command_response = from_union([CommandResponse.from_dict, from_none], obj.get("command_response"))
2966        command_result = from_union([CommandResult.from_dict, from_none], obj.get("command_result"))
2967        connector = from_union([Connector.from_dict, from_none], obj.get("connector"))
2968        credentials = from_union([Credentials.from_dict, from_none], obj.get("credentials"))
2969        endpoint = from_union([Endpoint.from_dict, from_none], obj.get("endpoint"))
2970        evse = from_union([Evse.from_dict, from_none], obj.get("evse"))
2971        financial_advice_confirmation = from_union([FinancialAdviceConfirmation.from_dict, from_none], obj.get("financial_advice_confirmation"))
2972        hub_client_info = from_union([HubClientInfo.from_dict, from_none], obj.get("hub_client_info"))
2973        location = from_union([Location.from_dict, from_none], obj.get("location"))
2974        location_references = from_union([from_none, LocationReferences.from_dict], obj.get("location_references"))
2975        reserve_now = from_union([ReserveNow.from_dict, from_none], obj.get("reserve_now"))
2976        session = from_union([Session.from_dict, from_none], obj.get("session"))
2977        set_charging_profile = from_union([SetChargingProfile.from_dict, from_none], obj.get("set_charging_profile"))
2978        start_session = from_union([StartSession.from_dict, from_none], obj.get("start_session"))
2979        stop_session = from_union([StopSession.from_dict, from_none], obj.get("stop_session"))
2980        tariff = from_union([Tariff.from_dict, from_none], obj.get("tariff"))
2981        terminal = from_union([Terminal.from_dict, from_none], obj.get("terminal"))
2982        token = from_union([Token.from_dict, from_none], obj.get("token"))
2983        unlock_connector = from_union([UnlockConnector.from_dict, from_none], obj.get("unlock_connector"))
2984        version = from_union([Version.from_dict, from_none], obj.get("version"))
2985        version_details = from_union([VersionDetails.from_dict, from_none], obj.get("version_details"))
2986        return V230Payments(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, financial_advice_confirmation, hub_client_info, location, location_references, reserve_now, session, set_charging_profile, start_session, stop_session, tariff, terminal, token, unlock_connector, version, version_details)
2987
2988    def to_dict(self) -> dict:
2989        result: dict = {}
2990        if self.active_charging_profile is not None:
2991            result["active_charging_profile"] = from_union([lambda x: to_class(ActiveChargingProfile, x), from_none], self.active_charging_profile)
2992        if self.active_charging_profile_result is not None:
2993            result["active_charging_profile_result"] = from_union([lambda x: to_class(ActiveChargingProfileResult, x), from_none], self.active_charging_profile_result)
2994        if self.authorization_info is not None:
2995            result["authorization_info"] = from_union([lambda x: to_class(AuthorizationInfo, x), from_none], self.authorization_info)
2996        if self.cancel_reservation is not None:
2997            result["cancel_reservation"] = from_union([lambda x: to_class(CancelReservation, x), from_none], self.cancel_reservation)
2998        if self.cdr is not None:
2999            result["cdr"] = from_union([lambda x: to_class(Cdr, x), from_none], self.cdr)
3000        if self.charging_preferences is not None:
3001            result["charging_preferences"] = from_union([lambda x: to_class(ChargingPreferences, x), from_none], self.charging_preferences)
3002        if self.charging_profile is not None:
3003            result["charging_profile"] = from_union([lambda x: to_class(ChargingProfile, x), from_none], self.charging_profile)
3004        if self.charging_profile_response is not None:
3005            result["charging_profile_response"] = from_union([lambda x: to_class(ChargingProfileResponse, x), from_none], self.charging_profile_response)
3006        if self.charging_profile_result is not None:
3007            result["charging_profile_result"] = from_union([lambda x: to_class(ChargingProfileResult, x), from_none], self.charging_profile_result)
3008        if self.clear_profile_result is not None:
3009            result["clear_profile_result"] = from_union([lambda x: to_class(ClearProfileResult, x), from_none], self.clear_profile_result)
3010        if self.command_response is not None:
3011            result["command_response"] = from_union([lambda x: to_class(CommandResponse, x), from_none], self.command_response)
3012        if self.command_result is not None:
3013            result["command_result"] = from_union([lambda x: to_class(CommandResult, x), from_none], self.command_result)
3014        if self.connector is not None:
3015            result["connector"] = from_union([lambda x: to_class(Connector, x), from_none], self.connector)
3016        if self.credentials is not None:
3017            result["credentials"] = from_union([lambda x: to_class(Credentials, x), from_none], self.credentials)
3018        if self.endpoint is not None:
3019            result["endpoint"] = from_union([lambda x: to_class(Endpoint, x), from_none], self.endpoint)
3020        if self.evse is not None:
3021            result["evse"] = from_union([lambda x: to_class(Evse, x), from_none], self.evse)
3022        if self.financial_advice_confirmation is not None:
3023            result["financial_advice_confirmation"] = from_union([lambda x: to_class(FinancialAdviceConfirmation, x), from_none], self.financial_advice_confirmation)
3024        if self.hub_client_info is not None:
3025            result["hub_client_info"] = from_union([lambda x: to_class(HubClientInfo, x), from_none], self.hub_client_info)
3026        if self.location is not None:
3027            result["location"] = from_union([lambda x: to_class(Location, x), from_none], self.location)
3028        if self.location_references is not None:
3029            result["location_references"] = from_union([from_none, lambda x: to_class(LocationReferences, x)], self.location_references)
3030        if self.reserve_now is not None:
3031            result["reserve_now"] = from_union([lambda x: to_class(ReserveNow, x), from_none], self.reserve_now)
3032        if self.session is not None:
3033            result["session"] = from_union([lambda x: to_class(Session, x), from_none], self.session)
3034        if self.set_charging_profile is not None:
3035            result["set_charging_profile"] = from_union([lambda x: to_class(SetChargingProfile, x), from_none], self.set_charging_profile)
3036        if self.start_session is not None:
3037            result["start_session"] = from_union([lambda x: to_class(StartSession, x), from_none], self.start_session)
3038        if self.stop_session is not None:
3039            result["stop_session"] = from_union([lambda x: to_class(StopSession, x), from_none], self.stop_session)
3040        if self.tariff is not None:
3041            result["tariff"] = from_union([lambda x: to_class(Tariff, x), from_none], self.tariff)
3042        if self.terminal is not None:
3043            result["terminal"] = from_union([lambda x: to_class(Terminal, x), from_none], self.terminal)
3044        if self.token is not None:
3045            result["token"] = from_union([lambda x: to_class(Token, x), from_none], self.token)
3046        if self.unlock_connector is not None:
3047            result["unlock_connector"] = from_union([lambda x: to_class(UnlockConnector, x), from_none], self.unlock_connector)
3048        if self.version is not None:
3049            result["version"] = from_union([lambda x: to_class(Version, x), from_none], self.version)
3050        if self.version_details is not None:
3051            result["version_details"] = from_union([lambda x: to_class(VersionDetails, x), from_none], self.version_details)
3052        return result
V230Payments( 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], financial_advice_confirmation: Optional[FinancialAdviceConfirmation], 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], terminal: Optional[Terminal], token: Optional[Token], unlock_connector: Optional[UnlockConnector], version: Optional[Version], version_details: Optional[VersionDetails])
2919    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], financial_advice_confirmation: Optional[FinancialAdviceConfirmation], 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], terminal: Optional[Terminal], token: Optional[Token], unlock_connector: Optional[UnlockConnector], version: Optional[Version], version_details: Optional[VersionDetails]) -> None:
2920        self.active_charging_profile = active_charging_profile
2921        self.active_charging_profile_result = active_charging_profile_result
2922        self.authorization_info = authorization_info
2923        self.cancel_reservation = cancel_reservation
2924        self.cdr = cdr
2925        self.charging_preferences = charging_preferences
2926        self.charging_profile = charging_profile
2927        self.charging_profile_response = charging_profile_response
2928        self.charging_profile_result = charging_profile_result
2929        self.clear_profile_result = clear_profile_result
2930        self.command_response = command_response
2931        self.command_result = command_result
2932        self.connector = connector
2933        self.credentials = credentials
2934        self.endpoint = endpoint
2935        self.evse = evse
2936        self.financial_advice_confirmation = financial_advice_confirmation
2937        self.hub_client_info = hub_client_info
2938        self.location = location
2939        self.location_references = location_references
2940        self.reserve_now = reserve_now
2941        self.session = session
2942        self.set_charging_profile = set_charging_profile
2943        self.start_session = start_session
2944        self.stop_session = stop_session
2945        self.tariff = tariff
2946        self.terminal = terminal
2947        self.token = token
2948        self.unlock_connector = unlock_connector
2949        self.version = version
2950        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]
financial_advice_confirmation: Optional[FinancialAdviceConfirmation]
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]
terminal: Optional[Terminal]
token: Optional[Token]
unlock_connector: Optional[UnlockConnector]
version: Optional[Version]
version_details: Optional[VersionDetails]
@staticmethod
def from_dict(obj: Any) -> V230Payments:
2952    @staticmethod
2953    def from_dict(obj: Any) -> 'V230Payments':
2954        assert isinstance(obj, dict)
2955        active_charging_profile = from_union([ActiveChargingProfile.from_dict, from_none], obj.get("active_charging_profile"))
2956        active_charging_profile_result = from_union([ActiveChargingProfileResult.from_dict, from_none], obj.get("active_charging_profile_result"))
2957        authorization_info = from_union([AuthorizationInfo.from_dict, from_none], obj.get("authorization_info"))
2958        cancel_reservation = from_union([CancelReservation.from_dict, from_none], obj.get("cancel_reservation"))
2959        cdr = from_union([Cdr.from_dict, from_none], obj.get("cdr"))
2960        charging_preferences = from_union([ChargingPreferences.from_dict, from_none], obj.get("charging_preferences"))
2961        charging_profile = from_union([ChargingProfile.from_dict, from_none], obj.get("charging_profile"))
2962        charging_profile_response = from_union([ChargingProfileResponse.from_dict, from_none], obj.get("charging_profile_response"))
2963        charging_profile_result = from_union([ChargingProfileResult.from_dict, from_none], obj.get("charging_profile_result"))
2964        clear_profile_result = from_union([ClearProfileResult.from_dict, from_none], obj.get("clear_profile_result"))
2965        command_response = from_union([CommandResponse.from_dict, from_none], obj.get("command_response"))
2966        command_result = from_union([CommandResult.from_dict, from_none], obj.get("command_result"))
2967        connector = from_union([Connector.from_dict, from_none], obj.get("connector"))
2968        credentials = from_union([Credentials.from_dict, from_none], obj.get("credentials"))
2969        endpoint = from_union([Endpoint.from_dict, from_none], obj.get("endpoint"))
2970        evse = from_union([Evse.from_dict, from_none], obj.get("evse"))
2971        financial_advice_confirmation = from_union([FinancialAdviceConfirmation.from_dict, from_none], obj.get("financial_advice_confirmation"))
2972        hub_client_info = from_union([HubClientInfo.from_dict, from_none], obj.get("hub_client_info"))
2973        location = from_union([Location.from_dict, from_none], obj.get("location"))
2974        location_references = from_union([from_none, LocationReferences.from_dict], obj.get("location_references"))
2975        reserve_now = from_union([ReserveNow.from_dict, from_none], obj.get("reserve_now"))
2976        session = from_union([Session.from_dict, from_none], obj.get("session"))
2977        set_charging_profile = from_union([SetChargingProfile.from_dict, from_none], obj.get("set_charging_profile"))
2978        start_session = from_union([StartSession.from_dict, from_none], obj.get("start_session"))
2979        stop_session = from_union([StopSession.from_dict, from_none], obj.get("stop_session"))
2980        tariff = from_union([Tariff.from_dict, from_none], obj.get("tariff"))
2981        terminal = from_union([Terminal.from_dict, from_none], obj.get("terminal"))
2982        token = from_union([Token.from_dict, from_none], obj.get("token"))
2983        unlock_connector = from_union([UnlockConnector.from_dict, from_none], obj.get("unlock_connector"))
2984        version = from_union([Version.from_dict, from_none], obj.get("version"))
2985        version_details = from_union([VersionDetails.from_dict, from_none], obj.get("version_details"))
2986        return V230Payments(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, financial_advice_confirmation, hub_client_info, location, location_references, reserve_now, session, set_charging_profile, start_session, stop_session, tariff, terminal, token, unlock_connector, version, version_details)
def to_dict(self) -> dict:
2988    def to_dict(self) -> dict:
2989        result: dict = {}
2990        if self.active_charging_profile is not None:
2991            result["active_charging_profile"] = from_union([lambda x: to_class(ActiveChargingProfile, x), from_none], self.active_charging_profile)
2992        if self.active_charging_profile_result is not None:
2993            result["active_charging_profile_result"] = from_union([lambda x: to_class(ActiveChargingProfileResult, x), from_none], self.active_charging_profile_result)
2994        if self.authorization_info is not None:
2995            result["authorization_info"] = from_union([lambda x: to_class(AuthorizationInfo, x), from_none], self.authorization_info)
2996        if self.cancel_reservation is not None:
2997            result["cancel_reservation"] = from_union([lambda x: to_class(CancelReservation, x), from_none], self.cancel_reservation)
2998        if self.cdr is not None:
2999            result["cdr"] = from_union([lambda x: to_class(Cdr, x), from_none], self.cdr)
3000        if self.charging_preferences is not None:
3001            result["charging_preferences"] = from_union([lambda x: to_class(ChargingPreferences, x), from_none], self.charging_preferences)
3002        if self.charging_profile is not None:
3003            result["charging_profile"] = from_union([lambda x: to_class(ChargingProfile, x), from_none], self.charging_profile)
3004        if self.charging_profile_response is not None:
3005            result["charging_profile_response"] = from_union([lambda x: to_class(ChargingProfileResponse, x), from_none], self.charging_profile_response)
3006        if self.charging_profile_result is not None:
3007            result["charging_profile_result"] = from_union([lambda x: to_class(ChargingProfileResult, x), from_none], self.charging_profile_result)
3008        if self.clear_profile_result is not None:
3009            result["clear_profile_result"] = from_union([lambda x: to_class(ClearProfileResult, x), from_none], self.clear_profile_result)
3010        if self.command_response is not None:
3011            result["command_response"] = from_union([lambda x: to_class(CommandResponse, x), from_none], self.command_response)
3012        if self.command_result is not None:
3013            result["command_result"] = from_union([lambda x: to_class(CommandResult, x), from_none], self.command_result)
3014        if self.connector is not None:
3015            result["connector"] = from_union([lambda x: to_class(Connector, x), from_none], self.connector)
3016        if self.credentials is not None:
3017            result["credentials"] = from_union([lambda x: to_class(Credentials, x), from_none], self.credentials)
3018        if self.endpoint is not None:
3019            result["endpoint"] = from_union([lambda x: to_class(Endpoint, x), from_none], self.endpoint)
3020        if self.evse is not None:
3021            result["evse"] = from_union([lambda x: to_class(Evse, x), from_none], self.evse)
3022        if self.financial_advice_confirmation is not None:
3023            result["financial_advice_confirmation"] = from_union([lambda x: to_class(FinancialAdviceConfirmation, x), from_none], self.financial_advice_confirmation)
3024        if self.hub_client_info is not None:
3025            result["hub_client_info"] = from_union([lambda x: to_class(HubClientInfo, x), from_none], self.hub_client_info)
3026        if self.location is not None:
3027            result["location"] = from_union([lambda x: to_class(Location, x), from_none], self.location)
3028        if self.location_references is not None:
3029            result["location_references"] = from_union([from_none, lambda x: to_class(LocationReferences, x)], self.location_references)
3030        if self.reserve_now is not None:
3031            result["reserve_now"] = from_union([lambda x: to_class(ReserveNow, x), from_none], self.reserve_now)
3032        if self.session is not None:
3033            result["session"] = from_union([lambda x: to_class(Session, x), from_none], self.session)
3034        if self.set_charging_profile is not None:
3035            result["set_charging_profile"] = from_union([lambda x: to_class(SetChargingProfile, x), from_none], self.set_charging_profile)
3036        if self.start_session is not None:
3037            result["start_session"] = from_union([lambda x: to_class(StartSession, x), from_none], self.start_session)
3038        if self.stop_session is not None:
3039            result["stop_session"] = from_union([lambda x: to_class(StopSession, x), from_none], self.stop_session)
3040        if self.tariff is not None:
3041            result["tariff"] = from_union([lambda x: to_class(Tariff, x), from_none], self.tariff)
3042        if self.terminal is not None:
3043            result["terminal"] = from_union([lambda x: to_class(Terminal, x), from_none], self.terminal)
3044        if self.token is not None:
3045            result["token"] = from_union([lambda x: to_class(Token, x), from_none], self.token)
3046        if self.unlock_connector is not None:
3047            result["unlock_connector"] = from_union([lambda x: to_class(UnlockConnector, x), from_none], self.unlock_connector)
3048        if self.version is not None:
3049            result["version"] = from_union([lambda x: to_class(Version, x), from_none], self.version)
3050        if self.version_details is not None:
3051            result["version_details"] = from_union([lambda x: to_class(VersionDetails, x), from_none], self.version_details)
3052        return result
def v230_payments_from_dict(s: Any) -> V230Payments:
3055def v230_payments_from_dict(s: Any) -> V230Payments:
3056    return V230Payments.from_dict(s)
def v230_payments_to_dict(x: V230Payments) -> Any:
3059def v230_payments_to_dict(x: V230Payments) -> Any:
3060    return to_class(V230Payments, x)