-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmodels.py
More file actions
98 lines (70 loc) · 2.6 KB
/
models.py
File metadata and controls
98 lines (70 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
"""Models used by Telenet."""
from __future__ import annotations
from dataclasses import dataclass
from dataclasses import field
from typing import TypedDict
class TelenetConfigEntryData(TypedDict):
"""Config entry for the Telenet integration."""
username: str | None
password: str | None
language: str | None
@dataclass
class TelenetEnvironment:
"""Class to describe a Telenet environment."""
ocapi: str
ocapi_public: str
ocapi_public_api: str
ocapi_oauth: str
openid: str
referer: str
x_alt_referer: str
@dataclass
class TelenetProduct:
"""Telenet product model."""
product_name: str = ""
product_key: str = ""
product_address: dict = field(default_factory=dict)
product_description_key: str = ""
product_state: str = "Inactive"
product_identifier: str = ""
product_type: str = ""
product_specurl: str = ""
product_info: dict = field(default_factory=dict)
product_plan_identifier: str = ""
product_plan_label: str = ""
product_subscription_info: dict = field(default_factory=dict)
product_extra_attributes: dict = field(default_factory=dict)
product_extra_sensor: bool = False
product_price: dict = field(default_factory=dict)
product_ignore_extra_sensor: bool = False
native_unit_of_measurement: str = None
class TelenetBaseProductExtraAttributes:
"""Telenet Product base extra attributes."""
activationDate: str = ""
identifier: str = ""
label: str = ""
status: str = ""
productType: str = ""
specurl: str = ""
class TelenetInternetProductExtraAttributes(TelenetBaseProductExtraAttributes):
"""Telenet Internet extra attributes."""
internetType: str = ""
class TelenetMobileProductExtraAttributes(TelenetBaseProductExtraAttributes):
"""Telenet Mobile extra attributes."""
isDataOnlyPlan: str = ""
bundleIdentifier: str = ""
hasVoiceMail: bool = False
bundleType: str = ""
class TelenetDtvProductExtraAttributes(TelenetBaseProductExtraAttributes):
"""Telenet DTV extra attributes."""
bundleIdentifier: str = ""
isInteractive: bool = False
lineType: str = ""
class TelenetTelephoneProductExtraAttributes(TelenetBaseProductExtraAttributes):
"""Telenet DTV extra attributes."""
hasVoiceMail: bool = False
class TelenetBundleProductExtraAttributes(TelenetBaseProductExtraAttributes):
"""Telenet DTV extra attributes."""
products: list = field(default_factory=list)
bundleFamily: str = ""
hasActiveMyBill: bool = False