v230bookings

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