tesla-api-sdk 1.0.0__py3-none-any.whl → 1.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {tesla_api_sdk-1.0.0.dist-info → tesla_api_sdk-1.0.2.dist-info}/METADATA +40 -34
- {tesla_api_sdk-1.0.0.dist-info → tesla_api_sdk-1.0.2.dist-info}/RECORD +34 -24
- {tesla_api_sdk-1.0.0.dist-info → tesla_api_sdk-1.0.2.dist-info}/WHEEL +1 -1
- teslafleetmanagementapi/configuration.py +13 -11
- teslafleetmanagementapi/controllers/__init__.py +2 -1
- teslafleetmanagementapi/controllers/base_controller.py +1 -1
- teslafleetmanagementapi/controllers/charging_controller.py +6 -3
- teslafleetmanagementapi/controllers/energy_controller.py +14 -11
- teslafleetmanagementapi/controllers/{oauth_authorization_controller.py → o_auth_authorization_controller.py} +24 -24
- teslafleetmanagementapi/controllers/partner_controller.py +7 -4
- teslafleetmanagementapi/controllers/user_controller.py +7 -4
- teslafleetmanagementapi/controllers/vehicle_commands_controller.py +891 -0
- teslafleetmanagementapi/controllers/vehicles_controller.py +24 -21
- teslafleetmanagementapi/exceptions/__init__.py +1 -1
- teslafleetmanagementapi/exceptions/{oauth_provider_exception.py → o_auth_provider_exception.py} +3 -3
- teslafleetmanagementapi/http/auth/__init__.py +1 -1
- teslafleetmanagementapi/http/auth/{oauth_2.py → thirdpartytoken.py} +111 -82
- teslafleetmanagementapi/models/__init__.py +12 -3
- teslafleetmanagementapi/models/actuate_trunk_request.py +92 -0
- teslafleetmanagementapi/models/add_charge_schedule_request.py +272 -0
- teslafleetmanagementapi/models/add_precondition_schedule_request.py +203 -0
- teslafleetmanagementapi/models/adjust_volume_request.py +92 -0
- teslafleetmanagementapi/models/api_1_vehicles_response_get_vehicle.py +1 -1
- teslafleetmanagementapi/models/command_response.py +109 -0
- teslafleetmanagementapi/models/command_result.py +105 -0
- teslafleetmanagementapi/models/guest_mode_request.py +92 -0
- teslafleetmanagementapi/models/kind_get_wall_connector_charging_history.py +1 -1
- teslafleetmanagementapi/models/{oauth_provider_error.py → o_auth_provider_error.py} +1 -1
- teslafleetmanagementapi/models/o_auth_scope_thirdpartytoken.py +84 -0
- teslafleetmanagementapi/models/{oauth_token.py → o_auth_token.py} +2 -2
- teslafleetmanagementapi/models/which_trunk.py +45 -0
- teslafleetmanagementapi/teslafleetmanagementapi_client.py +23 -14
- {tesla_api_sdk-1.0.0.dist-info → tesla_api_sdk-1.0.2.dist-info}/licenses/LICENSE +0 -0
- {tesla_api_sdk-1.0.0.dist-info → tesla_api_sdk-1.0.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"""teslafleetmanagementapi.
|
|
2
|
+
|
|
3
|
+
This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# ruff: noqa: E501
|
|
7
|
+
from teslafleetmanagementapi.api_helper import (
|
|
8
|
+
APIHelper,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ActuateTrunkRequest(object):
|
|
13
|
+
"""Implementation of the 'ActuateTrunkRequest' model.
|
|
14
|
+
|
|
15
|
+
Attributes:
|
|
16
|
+
which_trunk (WhichTrunk): The model property of type WhichTrunk.
|
|
17
|
+
additional_properties (Dict[str, Any]): The additional properties for the
|
|
18
|
+
model.
|
|
19
|
+
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
# Create a mapping from Model property names to API property names
|
|
23
|
+
_names = {
|
|
24
|
+
"which_trunk": "which_trunk",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def __init__(
|
|
28
|
+
self,
|
|
29
|
+
which_trunk=None,
|
|
30
|
+
additional_properties=None):
|
|
31
|
+
"""Initialize a ActuateTrunkRequest instance."""
|
|
32
|
+
# Initialize members of the class
|
|
33
|
+
self.which_trunk = which_trunk
|
|
34
|
+
|
|
35
|
+
# Add additional model properties to the instance
|
|
36
|
+
if additional_properties is None:
|
|
37
|
+
additional_properties = {}
|
|
38
|
+
self.additional_properties = additional_properties
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dictionary(cls,
|
|
42
|
+
dictionary):
|
|
43
|
+
"""Create an instance of this model from a dictionary
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
dictionary (dictionary): A dictionary representation of the object
|
|
47
|
+
as obtained from the deserialization of the server's response. The
|
|
48
|
+
keys MUST match property names in the API description.
|
|
49
|
+
|
|
50
|
+
Returns:
|
|
51
|
+
object: An instance of this structure class.
|
|
52
|
+
|
|
53
|
+
"""
|
|
54
|
+
if not isinstance(dictionary, dict) or dictionary is None:
|
|
55
|
+
return None
|
|
56
|
+
|
|
57
|
+
# Extract variables from the dictionary
|
|
58
|
+
which_trunk =\
|
|
59
|
+
dictionary.get("which_trunk")\
|
|
60
|
+
if dictionary.get("which_trunk")\
|
|
61
|
+
else None
|
|
62
|
+
|
|
63
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
64
|
+
dictionary={k: v for k, v in dictionary.items()
|
|
65
|
+
if k not in cls._names.values()},
|
|
66
|
+
unboxing_function=lambda value: value)
|
|
67
|
+
|
|
68
|
+
# Return an object of this model
|
|
69
|
+
return cls(which_trunk,
|
|
70
|
+
additional_properties)
|
|
71
|
+
|
|
72
|
+
def __repr__(self):
|
|
73
|
+
"""Return a unambiguous string representation."""
|
|
74
|
+
_which_trunk=self.which_trunk
|
|
75
|
+
_additional_properties=self.additional_properties
|
|
76
|
+
return (
|
|
77
|
+
f"{self.__class__.__name__}("
|
|
78
|
+
f"which_trunk={_which_trunk!r}, "
|
|
79
|
+
f"additional_properties={_additional_properties!r}, "
|
|
80
|
+
f")"
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
def __str__(self):
|
|
84
|
+
"""Return a human-readable string representation."""
|
|
85
|
+
_which_trunk=self.which_trunk
|
|
86
|
+
_additional_properties=self.additional_properties
|
|
87
|
+
return (
|
|
88
|
+
f"{self.__class__.__name__}("
|
|
89
|
+
f"which_trunk={_which_trunk!s}, "
|
|
90
|
+
f"additional_properties={_additional_properties!s}, "
|
|
91
|
+
f")"
|
|
92
|
+
)
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
"""teslafleetmanagementapi.
|
|
2
|
+
|
|
3
|
+
This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# ruff: noqa: E501
|
|
7
|
+
from teslafleetmanagementapi.api_helper import (
|
|
8
|
+
APIHelper,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AddChargeScheduleRequest(object):
|
|
13
|
+
"""Implementation of the 'AddChargeScheduleRequest' model.
|
|
14
|
+
|
|
15
|
+
Attributes:
|
|
16
|
+
lat (float): The model property of type float.
|
|
17
|
+
lon (float): The model property of type float.
|
|
18
|
+
id (int): The model property of type int.
|
|
19
|
+
days_of_week (str): The model property of type str.
|
|
20
|
+
start_enabled (bool): The model property of type bool.
|
|
21
|
+
start_time (int): The model property of type int.
|
|
22
|
+
end_enabled (bool): The model property of type bool.
|
|
23
|
+
end_time (int): The model property of type int.
|
|
24
|
+
one_time (bool): The model property of type bool.
|
|
25
|
+
enabled (bool): The model property of type bool.
|
|
26
|
+
additional_properties (Dict[str, Any]): The additional properties for the
|
|
27
|
+
model.
|
|
28
|
+
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
# Create a mapping from Model property names to API property names
|
|
32
|
+
_names = {
|
|
33
|
+
"lat": "lat",
|
|
34
|
+
"lon": "lon",
|
|
35
|
+
"id": "id",
|
|
36
|
+
"enabled": "enabled",
|
|
37
|
+
"days_of_week": "days_of_week",
|
|
38
|
+
"start_enabled": "start_enabled",
|
|
39
|
+
"start_time": "start_time",
|
|
40
|
+
"end_enabled": "end_enabled",
|
|
41
|
+
"end_time": "end_time",
|
|
42
|
+
"one_time": "one_time",
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
_optionals = [
|
|
46
|
+
"days_of_week",
|
|
47
|
+
"start_enabled",
|
|
48
|
+
"start_time",
|
|
49
|
+
"end_enabled",
|
|
50
|
+
"end_time",
|
|
51
|
+
"one_time",
|
|
52
|
+
]
|
|
53
|
+
|
|
54
|
+
def __init__(
|
|
55
|
+
self,
|
|
56
|
+
lat=None,
|
|
57
|
+
lon=None,
|
|
58
|
+
id=None,
|
|
59
|
+
enabled=None,
|
|
60
|
+
days_of_week=APIHelper.SKIP,
|
|
61
|
+
start_enabled=APIHelper.SKIP,
|
|
62
|
+
start_time=APIHelper.SKIP,
|
|
63
|
+
end_enabled=APIHelper.SKIP,
|
|
64
|
+
end_time=APIHelper.SKIP,
|
|
65
|
+
one_time=APIHelper.SKIP,
|
|
66
|
+
additional_properties=None):
|
|
67
|
+
"""Initialize a AddChargeScheduleRequest instance."""
|
|
68
|
+
# Initialize members of the class
|
|
69
|
+
self.lat = lat
|
|
70
|
+
self.lon = lon
|
|
71
|
+
self.id = id
|
|
72
|
+
if days_of_week is not APIHelper.SKIP:
|
|
73
|
+
self.days_of_week = days_of_week
|
|
74
|
+
if start_enabled is not APIHelper.SKIP:
|
|
75
|
+
self.start_enabled = start_enabled
|
|
76
|
+
if start_time is not APIHelper.SKIP:
|
|
77
|
+
self.start_time = start_time
|
|
78
|
+
if end_enabled is not APIHelper.SKIP:
|
|
79
|
+
self.end_enabled = end_enabled
|
|
80
|
+
if end_time is not APIHelper.SKIP:
|
|
81
|
+
self.end_time = end_time
|
|
82
|
+
if one_time is not APIHelper.SKIP:
|
|
83
|
+
self.one_time = one_time
|
|
84
|
+
self.enabled = enabled
|
|
85
|
+
|
|
86
|
+
# Add additional model properties to the instance
|
|
87
|
+
if additional_properties is None:
|
|
88
|
+
additional_properties = {}
|
|
89
|
+
self.additional_properties = additional_properties
|
|
90
|
+
|
|
91
|
+
@classmethod
|
|
92
|
+
def from_dictionary(cls,
|
|
93
|
+
dictionary):
|
|
94
|
+
"""Create an instance of this model from a dictionary
|
|
95
|
+
|
|
96
|
+
Args:
|
|
97
|
+
dictionary (dictionary): A dictionary representation of the object
|
|
98
|
+
as obtained from the deserialization of the server's response. The
|
|
99
|
+
keys MUST match property names in the API description.
|
|
100
|
+
|
|
101
|
+
Returns:
|
|
102
|
+
object: An instance of this structure class.
|
|
103
|
+
|
|
104
|
+
"""
|
|
105
|
+
if not isinstance(dictionary, dict) or dictionary is None:
|
|
106
|
+
return None
|
|
107
|
+
|
|
108
|
+
# Extract variables from the dictionary
|
|
109
|
+
lat =\
|
|
110
|
+
dictionary.get("lat")\
|
|
111
|
+
if dictionary.get("lat")\
|
|
112
|
+
else None
|
|
113
|
+
lon =\
|
|
114
|
+
dictionary.get("lon")\
|
|
115
|
+
if dictionary.get("lon")\
|
|
116
|
+
else None
|
|
117
|
+
id =\
|
|
118
|
+
dictionary.get("id")\
|
|
119
|
+
if dictionary.get("id")\
|
|
120
|
+
else None
|
|
121
|
+
enabled =\
|
|
122
|
+
dictionary.get("enabled")\
|
|
123
|
+
if "enabled" in dictionary.keys()\
|
|
124
|
+
else None
|
|
125
|
+
days_of_week =\
|
|
126
|
+
dictionary.get("days_of_week")\
|
|
127
|
+
if dictionary.get("days_of_week")\
|
|
128
|
+
else APIHelper.SKIP
|
|
129
|
+
start_enabled =\
|
|
130
|
+
dictionary.get("start_enabled")\
|
|
131
|
+
if "start_enabled" in dictionary.keys()\
|
|
132
|
+
else APIHelper.SKIP
|
|
133
|
+
start_time =\
|
|
134
|
+
dictionary.get("start_time")\
|
|
135
|
+
if dictionary.get("start_time")\
|
|
136
|
+
else APIHelper.SKIP
|
|
137
|
+
end_enabled =\
|
|
138
|
+
dictionary.get("end_enabled")\
|
|
139
|
+
if "end_enabled" in dictionary.keys()\
|
|
140
|
+
else APIHelper.SKIP
|
|
141
|
+
end_time =\
|
|
142
|
+
dictionary.get("end_time")\
|
|
143
|
+
if dictionary.get("end_time")\
|
|
144
|
+
else APIHelper.SKIP
|
|
145
|
+
one_time =\
|
|
146
|
+
dictionary.get("one_time")\
|
|
147
|
+
if "one_time" in dictionary.keys()\
|
|
148
|
+
else APIHelper.SKIP
|
|
149
|
+
|
|
150
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
151
|
+
dictionary={k: v for k, v in dictionary.items()
|
|
152
|
+
if k not in cls._names.values()},
|
|
153
|
+
unboxing_function=lambda value: value)
|
|
154
|
+
|
|
155
|
+
# Return an object of this model
|
|
156
|
+
return cls(lat,
|
|
157
|
+
lon,
|
|
158
|
+
id,
|
|
159
|
+
enabled,
|
|
160
|
+
days_of_week,
|
|
161
|
+
start_enabled,
|
|
162
|
+
start_time,
|
|
163
|
+
end_enabled,
|
|
164
|
+
end_time,
|
|
165
|
+
one_time,
|
|
166
|
+
additional_properties)
|
|
167
|
+
|
|
168
|
+
def __repr__(self):
|
|
169
|
+
"""Return a unambiguous string representation."""
|
|
170
|
+
_lat=self.lat
|
|
171
|
+
_lon=self.lon
|
|
172
|
+
_id=self.id
|
|
173
|
+
_days_of_week=(
|
|
174
|
+
self.days_of_week
|
|
175
|
+
if hasattr(self, "days_of_week")
|
|
176
|
+
else None
|
|
177
|
+
)
|
|
178
|
+
_start_enabled=(
|
|
179
|
+
self.start_enabled
|
|
180
|
+
if hasattr(self, "start_enabled")
|
|
181
|
+
else None
|
|
182
|
+
)
|
|
183
|
+
_start_time=(
|
|
184
|
+
self.start_time
|
|
185
|
+
if hasattr(self, "start_time")
|
|
186
|
+
else None
|
|
187
|
+
)
|
|
188
|
+
_end_enabled=(
|
|
189
|
+
self.end_enabled
|
|
190
|
+
if hasattr(self, "end_enabled")
|
|
191
|
+
else None
|
|
192
|
+
)
|
|
193
|
+
_end_time=(
|
|
194
|
+
self.end_time
|
|
195
|
+
if hasattr(self, "end_time")
|
|
196
|
+
else None
|
|
197
|
+
)
|
|
198
|
+
_one_time=(
|
|
199
|
+
self.one_time
|
|
200
|
+
if hasattr(self, "one_time")
|
|
201
|
+
else None
|
|
202
|
+
)
|
|
203
|
+
_enabled=self.enabled
|
|
204
|
+
_additional_properties=self.additional_properties
|
|
205
|
+
return (
|
|
206
|
+
f"{self.__class__.__name__}("
|
|
207
|
+
f"lat={_lat!r}, "
|
|
208
|
+
f"lon={_lon!r}, "
|
|
209
|
+
f"id={_id!r}, "
|
|
210
|
+
f"days_of_week={_days_of_week!r}, "
|
|
211
|
+
f"start_enabled={_start_enabled!r}, "
|
|
212
|
+
f"start_time={_start_time!r}, "
|
|
213
|
+
f"end_enabled={_end_enabled!r}, "
|
|
214
|
+
f"end_time={_end_time!r}, "
|
|
215
|
+
f"one_time={_one_time!r}, "
|
|
216
|
+
f"enabled={_enabled!r}, "
|
|
217
|
+
f"additional_properties={_additional_properties!r}, "
|
|
218
|
+
f")"
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
def __str__(self):
|
|
222
|
+
"""Return a human-readable string representation."""
|
|
223
|
+
_lat=self.lat
|
|
224
|
+
_lon=self.lon
|
|
225
|
+
_id=self.id
|
|
226
|
+
_days_of_week=(
|
|
227
|
+
self.days_of_week
|
|
228
|
+
if hasattr(self, "days_of_week")
|
|
229
|
+
else None
|
|
230
|
+
)
|
|
231
|
+
_start_enabled=(
|
|
232
|
+
self.start_enabled
|
|
233
|
+
if hasattr(self, "start_enabled")
|
|
234
|
+
else None
|
|
235
|
+
)
|
|
236
|
+
_start_time=(
|
|
237
|
+
self.start_time
|
|
238
|
+
if hasattr(self, "start_time")
|
|
239
|
+
else None
|
|
240
|
+
)
|
|
241
|
+
_end_enabled=(
|
|
242
|
+
self.end_enabled
|
|
243
|
+
if hasattr(self, "end_enabled")
|
|
244
|
+
else None
|
|
245
|
+
)
|
|
246
|
+
_end_time=(
|
|
247
|
+
self.end_time
|
|
248
|
+
if hasattr(self, "end_time")
|
|
249
|
+
else None
|
|
250
|
+
)
|
|
251
|
+
_one_time=(
|
|
252
|
+
self.one_time
|
|
253
|
+
if hasattr(self, "one_time")
|
|
254
|
+
else None
|
|
255
|
+
)
|
|
256
|
+
_enabled=self.enabled
|
|
257
|
+
_additional_properties=self.additional_properties
|
|
258
|
+
return (
|
|
259
|
+
f"{self.__class__.__name__}("
|
|
260
|
+
f"lat={_lat!s}, "
|
|
261
|
+
f"lon={_lon!s}, "
|
|
262
|
+
f"id={_id!s}, "
|
|
263
|
+
f"days_of_week={_days_of_week!s}, "
|
|
264
|
+
f"start_enabled={_start_enabled!s}, "
|
|
265
|
+
f"start_time={_start_time!s}, "
|
|
266
|
+
f"end_enabled={_end_enabled!s}, "
|
|
267
|
+
f"end_time={_end_time!s}, "
|
|
268
|
+
f"one_time={_one_time!s}, "
|
|
269
|
+
f"enabled={_enabled!s}, "
|
|
270
|
+
f"additional_properties={_additional_properties!s}, "
|
|
271
|
+
f")"
|
|
272
|
+
)
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"""teslafleetmanagementapi.
|
|
2
|
+
|
|
3
|
+
This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# ruff: noqa: E501
|
|
7
|
+
from teslafleetmanagementapi.api_helper import (
|
|
8
|
+
APIHelper,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AddPreconditionScheduleRequest(object):
|
|
13
|
+
"""Implementation of the 'AddPreconditionScheduleRequest' model.
|
|
14
|
+
|
|
15
|
+
Attributes:
|
|
16
|
+
lat (float): The model property of type float.
|
|
17
|
+
lon (float): The model property of type float.
|
|
18
|
+
id (int): The model property of type int.
|
|
19
|
+
days_of_week (str): The model property of type str.
|
|
20
|
+
precondition_time (int): The model property of type int.
|
|
21
|
+
one_time (bool): The model property of type bool.
|
|
22
|
+
enabled (bool): The model property of type bool.
|
|
23
|
+
additional_properties (Dict[str, Any]): The additional properties for the
|
|
24
|
+
model.
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
# Create a mapping from Model property names to API property names
|
|
29
|
+
_names = {
|
|
30
|
+
"lat": "lat",
|
|
31
|
+
"lon": "lon",
|
|
32
|
+
"id": "id",
|
|
33
|
+
"enabled": "enabled",
|
|
34
|
+
"days_of_week": "days_of_week",
|
|
35
|
+
"precondition_time": "precondition_time",
|
|
36
|
+
"one_time": "one_time",
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
_optionals = [
|
|
40
|
+
"days_of_week",
|
|
41
|
+
"precondition_time",
|
|
42
|
+
"one_time",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
def __init__(
|
|
46
|
+
self,
|
|
47
|
+
lat=None,
|
|
48
|
+
lon=None,
|
|
49
|
+
id=None,
|
|
50
|
+
enabled=None,
|
|
51
|
+
days_of_week=APIHelper.SKIP,
|
|
52
|
+
precondition_time=APIHelper.SKIP,
|
|
53
|
+
one_time=APIHelper.SKIP,
|
|
54
|
+
additional_properties=None):
|
|
55
|
+
"""Initialize a AddPreconditionScheduleRequest instance."""
|
|
56
|
+
# Initialize members of the class
|
|
57
|
+
self.lat = lat
|
|
58
|
+
self.lon = lon
|
|
59
|
+
self.id = id
|
|
60
|
+
if days_of_week is not APIHelper.SKIP:
|
|
61
|
+
self.days_of_week = days_of_week
|
|
62
|
+
if precondition_time is not APIHelper.SKIP:
|
|
63
|
+
self.precondition_time = precondition_time
|
|
64
|
+
if one_time is not APIHelper.SKIP:
|
|
65
|
+
self.one_time = one_time
|
|
66
|
+
self.enabled = enabled
|
|
67
|
+
|
|
68
|
+
# Add additional model properties to the instance
|
|
69
|
+
if additional_properties is None:
|
|
70
|
+
additional_properties = {}
|
|
71
|
+
self.additional_properties = additional_properties
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dictionary(cls,
|
|
75
|
+
dictionary):
|
|
76
|
+
"""Create an instance of this model from a dictionary
|
|
77
|
+
|
|
78
|
+
Args:
|
|
79
|
+
dictionary (dictionary): A dictionary representation of the object
|
|
80
|
+
as obtained from the deserialization of the server's response. The
|
|
81
|
+
keys MUST match property names in the API description.
|
|
82
|
+
|
|
83
|
+
Returns:
|
|
84
|
+
object: An instance of this structure class.
|
|
85
|
+
|
|
86
|
+
"""
|
|
87
|
+
if not isinstance(dictionary, dict) or dictionary is None:
|
|
88
|
+
return None
|
|
89
|
+
|
|
90
|
+
# Extract variables from the dictionary
|
|
91
|
+
lat =\
|
|
92
|
+
dictionary.get("lat")\
|
|
93
|
+
if dictionary.get("lat")\
|
|
94
|
+
else None
|
|
95
|
+
lon =\
|
|
96
|
+
dictionary.get("lon")\
|
|
97
|
+
if dictionary.get("lon")\
|
|
98
|
+
else None
|
|
99
|
+
id =\
|
|
100
|
+
dictionary.get("id")\
|
|
101
|
+
if dictionary.get("id")\
|
|
102
|
+
else None
|
|
103
|
+
enabled =\
|
|
104
|
+
dictionary.get("enabled")\
|
|
105
|
+
if "enabled" in dictionary.keys()\
|
|
106
|
+
else None
|
|
107
|
+
days_of_week =\
|
|
108
|
+
dictionary.get("days_of_week")\
|
|
109
|
+
if dictionary.get("days_of_week")\
|
|
110
|
+
else APIHelper.SKIP
|
|
111
|
+
precondition_time =\
|
|
112
|
+
dictionary.get("precondition_time")\
|
|
113
|
+
if dictionary.get("precondition_time")\
|
|
114
|
+
else APIHelper.SKIP
|
|
115
|
+
one_time =\
|
|
116
|
+
dictionary.get("one_time")\
|
|
117
|
+
if "one_time" in dictionary.keys()\
|
|
118
|
+
else APIHelper.SKIP
|
|
119
|
+
|
|
120
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
121
|
+
dictionary={k: v for k, v in dictionary.items()
|
|
122
|
+
if k not in cls._names.values()},
|
|
123
|
+
unboxing_function=lambda value: value)
|
|
124
|
+
|
|
125
|
+
# Return an object of this model
|
|
126
|
+
return cls(lat,
|
|
127
|
+
lon,
|
|
128
|
+
id,
|
|
129
|
+
enabled,
|
|
130
|
+
days_of_week,
|
|
131
|
+
precondition_time,
|
|
132
|
+
one_time,
|
|
133
|
+
additional_properties)
|
|
134
|
+
|
|
135
|
+
def __repr__(self):
|
|
136
|
+
"""Return a unambiguous string representation."""
|
|
137
|
+
_lat=self.lat
|
|
138
|
+
_lon=self.lon
|
|
139
|
+
_id=self.id
|
|
140
|
+
_days_of_week=(
|
|
141
|
+
self.days_of_week
|
|
142
|
+
if hasattr(self, "days_of_week")
|
|
143
|
+
else None
|
|
144
|
+
)
|
|
145
|
+
_precondition_time=(
|
|
146
|
+
self.precondition_time
|
|
147
|
+
if hasattr(self, "precondition_time")
|
|
148
|
+
else None
|
|
149
|
+
)
|
|
150
|
+
_one_time=(
|
|
151
|
+
self.one_time
|
|
152
|
+
if hasattr(self, "one_time")
|
|
153
|
+
else None
|
|
154
|
+
)
|
|
155
|
+
_enabled=self.enabled
|
|
156
|
+
_additional_properties=self.additional_properties
|
|
157
|
+
return (
|
|
158
|
+
f"{self.__class__.__name__}("
|
|
159
|
+
f"lat={_lat!r}, "
|
|
160
|
+
f"lon={_lon!r}, "
|
|
161
|
+
f"id={_id!r}, "
|
|
162
|
+
f"days_of_week={_days_of_week!r}, "
|
|
163
|
+
f"precondition_time={_precondition_time!r}, "
|
|
164
|
+
f"one_time={_one_time!r}, "
|
|
165
|
+
f"enabled={_enabled!r}, "
|
|
166
|
+
f"additional_properties={_additional_properties!r}, "
|
|
167
|
+
f")"
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
def __str__(self):
|
|
171
|
+
"""Return a human-readable string representation."""
|
|
172
|
+
_lat=self.lat
|
|
173
|
+
_lon=self.lon
|
|
174
|
+
_id=self.id
|
|
175
|
+
_days_of_week=(
|
|
176
|
+
self.days_of_week
|
|
177
|
+
if hasattr(self, "days_of_week")
|
|
178
|
+
else None
|
|
179
|
+
)
|
|
180
|
+
_precondition_time=(
|
|
181
|
+
self.precondition_time
|
|
182
|
+
if hasattr(self, "precondition_time")
|
|
183
|
+
else None
|
|
184
|
+
)
|
|
185
|
+
_one_time=(
|
|
186
|
+
self.one_time
|
|
187
|
+
if hasattr(self, "one_time")
|
|
188
|
+
else None
|
|
189
|
+
)
|
|
190
|
+
_enabled=self.enabled
|
|
191
|
+
_additional_properties=self.additional_properties
|
|
192
|
+
return (
|
|
193
|
+
f"{self.__class__.__name__}("
|
|
194
|
+
f"lat={_lat!s}, "
|
|
195
|
+
f"lon={_lon!s}, "
|
|
196
|
+
f"id={_id!s}, "
|
|
197
|
+
f"days_of_week={_days_of_week!s}, "
|
|
198
|
+
f"precondition_time={_precondition_time!s}, "
|
|
199
|
+
f"one_time={_one_time!s}, "
|
|
200
|
+
f"enabled={_enabled!s}, "
|
|
201
|
+
f"additional_properties={_additional_properties!s}, "
|
|
202
|
+
f")"
|
|
203
|
+
)
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"""teslafleetmanagementapi.
|
|
2
|
+
|
|
3
|
+
This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
# ruff: noqa: E501
|
|
7
|
+
from teslafleetmanagementapi.api_helper import (
|
|
8
|
+
APIHelper,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class AdjustVolumeRequest(object):
|
|
13
|
+
"""Implementation of the 'AdjustVolumeRequest' model.
|
|
14
|
+
|
|
15
|
+
Attributes:
|
|
16
|
+
volume (int): The model property of type int.
|
|
17
|
+
additional_properties (Dict[str, Any]): The additional properties for the
|
|
18
|
+
model.
|
|
19
|
+
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
# Create a mapping from Model property names to API property names
|
|
23
|
+
_names = {
|
|
24
|
+
"volume": "volume",
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
def __init__(
|
|
28
|
+
self,
|
|
29
|
+
volume=None,
|
|
30
|
+
additional_properties=None):
|
|
31
|
+
"""Initialize a AdjustVolumeRequest instance."""
|
|
32
|
+
# Initialize members of the class
|
|
33
|
+
self.volume = volume
|
|
34
|
+
|
|
35
|
+
# Add additional model properties to the instance
|
|
36
|
+
if additional_properties is None:
|
|
37
|
+
additional_properties = {}
|
|
38
|
+
self.additional_properties = additional_properties
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dictionary(cls,
|
|
42
|
+
dictionary):
|
|
43
|
+
"""Create an instance of this model from a dictionary
|
|
44
|
+
|
|
45
|
+
Args:
|
|
46
|
+
dictionary (dictionary): A dictionary representation of the object
|
|
47
|
+
as obtained from the deserialization of the server's response. The
|
|
48
|
+
keys MUST match property names in the API description.
|
|
49
|
+
|
|
50
|
+
Returns:
|
|
51
|
+
object: An instance of this structure class.
|
|
52
|
+
|
|
53
|
+
"""
|
|
54
|
+
if not isinstance(dictionary, dict) or dictionary is None:
|
|
55
|
+
return None
|
|
56
|
+
|
|
57
|
+
# Extract variables from the dictionary
|
|
58
|
+
volume =\
|
|
59
|
+
dictionary.get("volume")\
|
|
60
|
+
if dictionary.get("volume")\
|
|
61
|
+
else None
|
|
62
|
+
|
|
63
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
64
|
+
dictionary={k: v for k, v in dictionary.items()
|
|
65
|
+
if k not in cls._names.values()},
|
|
66
|
+
unboxing_function=lambda value: value)
|
|
67
|
+
|
|
68
|
+
# Return an object of this model
|
|
69
|
+
return cls(volume,
|
|
70
|
+
additional_properties)
|
|
71
|
+
|
|
72
|
+
def __repr__(self):
|
|
73
|
+
"""Return a unambiguous string representation."""
|
|
74
|
+
_volume=self.volume
|
|
75
|
+
_additional_properties=self.additional_properties
|
|
76
|
+
return (
|
|
77
|
+
f"{self.__class__.__name__}("
|
|
78
|
+
f"volume={_volume!r}, "
|
|
79
|
+
f"additional_properties={_additional_properties!r}, "
|
|
80
|
+
f")"
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
def __str__(self):
|
|
84
|
+
"""Return a human-readable string representation."""
|
|
85
|
+
_volume=self.volume
|
|
86
|
+
_additional_properties=self.additional_properties
|
|
87
|
+
return (
|
|
88
|
+
f"{self.__class__.__name__}("
|
|
89
|
+
f"volume={_volume!s}, "
|
|
90
|
+
f"additional_properties={_additional_properties!s}, "
|
|
91
|
+
f")"
|
|
92
|
+
)
|
|
@@ -13,7 +13,7 @@ from teslafleetmanagementapi.models.vehicle_base import (
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class Api1VehiclesResponseGetVehicle(object):
|
|
16
|
-
"""Implementation of the 'Api 1 Vehicles
|
|
16
|
+
"""Implementation of the 'Api 1 Vehicles Response_getVehicle' model.
|
|
17
17
|
|
|
18
18
|
Attributes:
|
|
19
19
|
response (VehicleBase): The model property of type VehicleBase.
|