tesla-api-sdk 1.0.0__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.
Files changed (119) hide show
  1. tesla_api_sdk-1.0.0.dist-info/METADATA +145 -0
  2. tesla_api_sdk-1.0.0.dist-info/RECORD +119 -0
  3. tesla_api_sdk-1.0.0.dist-info/WHEEL +5 -0
  4. tesla_api_sdk-1.0.0.dist-info/licenses/LICENSE +28 -0
  5. tesla_api_sdk-1.0.0.dist-info/top_level.txt +1 -0
  6. teslafleetmanagementapi/__init__.py +13 -0
  7. teslafleetmanagementapi/api_helper.py +19 -0
  8. teslafleetmanagementapi/configuration.py +270 -0
  9. teslafleetmanagementapi/controllers/__init__.py +11 -0
  10. teslafleetmanagementapi/controllers/base_controller.py +70 -0
  11. teslafleetmanagementapi/controllers/charging_controller.py +140 -0
  12. teslafleetmanagementapi/controllers/energy_controller.py +572 -0
  13. teslafleetmanagementapi/controllers/oauth_authorization_controller.py +165 -0
  14. teslafleetmanagementapi/controllers/partner_controller.py +181 -0
  15. teslafleetmanagementapi/controllers/user_controller.py +158 -0
  16. teslafleetmanagementapi/controllers/vehicles_controller.py +832 -0
  17. teslafleetmanagementapi/exceptions/__init__.py +6 -0
  18. teslafleetmanagementapi/exceptions/api_exception.py +36 -0
  19. teslafleetmanagementapi/exceptions/oauth_provider_exception.py +75 -0
  20. teslafleetmanagementapi/http/__init__.py +11 -0
  21. teslafleetmanagementapi/http/api_response.py +67 -0
  22. teslafleetmanagementapi/http/auth/__init__.py +6 -0
  23. teslafleetmanagementapi/http/auth/bearer_auth.py +103 -0
  24. teslafleetmanagementapi/http/auth/oauth_2.py +311 -0
  25. teslafleetmanagementapi/http/http_call_back.py +20 -0
  26. teslafleetmanagementapi/http/http_client_provider.py +23 -0
  27. teslafleetmanagementapi/http/http_method_enum.py +25 -0
  28. teslafleetmanagementapi/http/http_request.py +55 -0
  29. teslafleetmanagementapi/http/http_response.py +45 -0
  30. teslafleetmanagementapi/http/proxy_settings.py +50 -0
  31. teslafleetmanagementapi/logging/__init__.py +6 -0
  32. teslafleetmanagementapi/logging/configuration/__init__.py +5 -0
  33. teslafleetmanagementapi/logging/configuration/api_logging_configuration.py +398 -0
  34. teslafleetmanagementapi/logging/sdk_logger.py +28 -0
  35. teslafleetmanagementapi/models/__init__.py +85 -0
  36. teslafleetmanagementapi/models/api_1_dx_vehicles_options_response.py +110 -0
  37. teslafleetmanagementapi/models/api_1_dx_warranty_details_response.py +110 -0
  38. teslafleetmanagementapi/models/api_1_vehicles_mobile_enabled_response.py +109 -0
  39. teslafleetmanagementapi/models/api_1_vehicles_nearby_charging_sites_response.py +109 -0
  40. teslafleetmanagementapi/models/api_1_vehicles_response.py +162 -0
  41. teslafleetmanagementapi/models/api_1_vehicles_response_get_vehicle.py +109 -0
  42. teslafleetmanagementapi/models/api_1_vehicles_wake_up_response.py +109 -0
  43. teslafleetmanagementapi/models/backup_request.py +92 -0
  44. teslafleetmanagementapi/models/backup_response.py +95 -0
  45. teslafleetmanagementapi/models/calendar_history_response.py +96 -0
  46. teslafleetmanagementapi/models/charge_duration.py +92 -0
  47. teslafleetmanagementapi/models/charge_history.py +125 -0
  48. teslafleetmanagementapi/models/charge_history_response.py +96 -0
  49. teslafleetmanagementapi/models/charge_start_time.py +92 -0
  50. teslafleetmanagementapi/models/charging_dimension.py +128 -0
  51. teslafleetmanagementapi/models/charging_fee.py +641 -0
  52. teslafleetmanagementapi/models/charging_history_data.py +98 -0
  53. teslafleetmanagementapi/models/charging_history_item.py +336 -0
  54. teslafleetmanagementapi/models/charging_history_response.py +96 -0
  55. teslafleetmanagementapi/models/charging_invoice.py +151 -0
  56. teslafleetmanagementapi/models/charging_location.py +293 -0
  57. teslafleetmanagementapi/models/charging_period.py +136 -0
  58. teslafleetmanagementapi/models/charging_session.py +355 -0
  59. teslafleetmanagementapi/models/charging_sessions_data.py +182 -0
  60. teslafleetmanagementapi/models/charging_sessions_response.py +96 -0
  61. teslafleetmanagementapi/models/default_real_mode.py +45 -0
  62. teslafleetmanagementapi/models/driver.py +289 -0
  63. teslafleetmanagementapi/models/drivers_response.py +135 -0
  64. teslafleetmanagementapi/models/enterprise_payer_request.py +141 -0
  65. teslafleetmanagementapi/models/event.py +107 -0
  66. teslafleetmanagementapi/models/fleet_status_request.py +105 -0
  67. teslafleetmanagementapi/models/fleet_telemetry_error.py +118 -0
  68. teslafleetmanagementapi/models/fleet_telemetry_errors_response.py +96 -0
  69. teslafleetmanagementapi/models/fleet_telemetry_jws_request.py +128 -0
  70. teslafleetmanagementapi/models/generic_update_response.py +95 -0
  71. teslafleetmanagementapi/models/kind.py +45 -0
  72. teslafleetmanagementapi/models/kind_get_wall_connector_charging_history.py +42 -0
  73. teslafleetmanagementapi/models/live_status_response.py +96 -0
  74. teslafleetmanagementapi/models/location.py +128 -0
  75. teslafleetmanagementapi/models/location_1.py +128 -0
  76. teslafleetmanagementapi/models/me_response.py +95 -0
  77. teslafleetmanagementapi/models/mobile_enabled.py +128 -0
  78. teslafleetmanagementapi/models/oauth_provider_error.py +67 -0
  79. teslafleetmanagementapi/models/oauth_token.py +115 -0
  80. teslafleetmanagementapi/models/off_grid_vehicle_charging_reserve_request.py +95 -0
  81. teslafleetmanagementapi/models/operation_request.py +93 -0
  82. teslafleetmanagementapi/models/orders_response.py +111 -0
  83. teslafleetmanagementapi/models/pagination.py +225 -0
  84. teslafleetmanagementapi/models/price_component.py +151 -0
  85. teslafleetmanagementapi/models/products_response.py +128 -0
  86. teslafleetmanagementapi/models/public_key_response.py +96 -0
  87. teslafleetmanagementapi/models/region_response.py +96 -0
  88. teslafleetmanagementapi/models/register_partner_request.py +92 -0
  89. teslafleetmanagementapi/models/register_partner_response.py +96 -0
  90. teslafleetmanagementapi/models/response.py +105 -0
  91. teslafleetmanagementapi/models/response_1.py +92 -0
  92. teslafleetmanagementapi/models/response_2.py +95 -0
  93. teslafleetmanagementapi/models/response_3.py +164 -0
  94. teslafleetmanagementapi/models/response_api_1_dx_vehicles_options_response.py +112 -0
  95. teslafleetmanagementapi/models/response_api_1_dx_warranty_details_response.py +169 -0
  96. teslafleetmanagementapi/models/response_calendar_history_response.py +110 -0
  97. teslafleetmanagementapi/models/response_charge_history_response.py +98 -0
  98. teslafleetmanagementapi/models/response_fleet_telemetry_errors_response.py +98 -0
  99. teslafleetmanagementapi/models/response_live_status_response.py +310 -0
  100. teslafleetmanagementapi/models/response_me_response.py +131 -0
  101. teslafleetmanagementapi/models/response_orders_response.py +209 -0
  102. teslafleetmanagementapi/models/response_public_key_response.py +92 -0
  103. teslafleetmanagementapi/models/response_region_response.py +105 -0
  104. teslafleetmanagementapi/models/response_register_partner_response.py +331 -0
  105. teslafleetmanagementapi/models/signaling.py +118 -0
  106. teslafleetmanagementapi/models/simple_ok_response.py +105 -0
  107. teslafleetmanagementapi/models/site_info_response.py +105 -0
  108. teslafleetmanagementapi/models/storm_mode_request.py +92 -0
  109. teslafleetmanagementapi/models/tariff_element.py +136 -0
  110. teslafleetmanagementapi/models/tariffs.py +136 -0
  111. teslafleetmanagementapi/models/time_of_use_settings_request.py +95 -0
  112. teslafleetmanagementapi/models/total_cost.py +151 -0
  113. teslafleetmanagementapi/models/tou_settings.py +105 -0
  114. teslafleetmanagementapi/models/vehicle_base.py +266 -0
  115. teslafleetmanagementapi/models/vehicle_option.py +178 -0
  116. teslafleetmanagementapi/models/warranty_item.py +249 -0
  117. teslafleetmanagementapi/teslafleetmanagementapi_client.py +128 -0
  118. teslafleetmanagementapi/utilities/__init__.py +6 -0
  119. teslafleetmanagementapi/utilities/file_wrapper.py +45 -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 ResponsePublicKeyResponse(object):
13
+ """Implementation of the 'Response_PublicKeyResponse' model.
14
+
15
+ Attributes:
16
+ public_key (str): The model property of type str.
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
+ "public_key": "public_key",
25
+ }
26
+
27
+ def __init__(
28
+ self,
29
+ public_key=None,
30
+ additional_properties=None):
31
+ """Initialize a ResponsePublicKeyResponse instance."""
32
+ # Initialize members of the class
33
+ self.public_key = public_key
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
+ public_key =\
59
+ dictionary.get("public_key")\
60
+ if dictionary.get("public_key")\
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(public_key,
70
+ additional_properties)
71
+
72
+ def __repr__(self):
73
+ """Return a unambiguous string representation."""
74
+ _public_key=self.public_key
75
+ _additional_properties=self.additional_properties
76
+ return (
77
+ f"{self.__class__.__name__}("
78
+ f"public_key={_public_key!r}, "
79
+ f"additional_properties={_additional_properties!r}, "
80
+ f")"
81
+ )
82
+
83
+ def __str__(self):
84
+ """Return a human-readable string representation."""
85
+ _public_key=self.public_key
86
+ _additional_properties=self.additional_properties
87
+ return (
88
+ f"{self.__class__.__name__}("
89
+ f"public_key={_public_key!s}, "
90
+ f"additional_properties={_additional_properties!s}, "
91
+ f")"
92
+ )
@@ -0,0 +1,105 @@
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 ResponseRegionResponse(object):
13
+ """Implementation of the 'Response_RegionResponse' model.
14
+
15
+ Attributes:
16
+ region (str): The model property of type str.
17
+ fleet_api_base_url (str): The model property of type str.
18
+ additional_properties (Dict[str, Any]): The additional properties for the
19
+ model.
20
+
21
+ """
22
+
23
+ # Create a mapping from Model property names to API property names
24
+ _names = {
25
+ "region": "region",
26
+ "fleet_api_base_url": "fleet_api_base_url",
27
+ }
28
+
29
+ def __init__(
30
+ self,
31
+ region=None,
32
+ fleet_api_base_url=None,
33
+ additional_properties=None):
34
+ """Initialize a ResponseRegionResponse instance."""
35
+ # Initialize members of the class
36
+ self.region = region
37
+ self.fleet_api_base_url = fleet_api_base_url
38
+
39
+ # Add additional model properties to the instance
40
+ if additional_properties is None:
41
+ additional_properties = {}
42
+ self.additional_properties = additional_properties
43
+
44
+ @classmethod
45
+ def from_dictionary(cls,
46
+ dictionary):
47
+ """Create an instance of this model from a dictionary
48
+
49
+ Args:
50
+ dictionary (dictionary): A dictionary representation of the object
51
+ as obtained from the deserialization of the server's response. The
52
+ keys MUST match property names in the API description.
53
+
54
+ Returns:
55
+ object: An instance of this structure class.
56
+
57
+ """
58
+ if not isinstance(dictionary, dict) or dictionary is None:
59
+ return None
60
+
61
+ # Extract variables from the dictionary
62
+ region =\
63
+ dictionary.get("region")\
64
+ if dictionary.get("region")\
65
+ else None
66
+ fleet_api_base_url =\
67
+ dictionary.get("fleet_api_base_url")\
68
+ if dictionary.get("fleet_api_base_url")\
69
+ else None
70
+
71
+ additional_properties = APIHelper.get_additional_properties(
72
+ dictionary={k: v for k, v in dictionary.items()
73
+ if k not in cls._names.values()},
74
+ unboxing_function=lambda value: value)
75
+
76
+ # Return an object of this model
77
+ return cls(region,
78
+ fleet_api_base_url,
79
+ additional_properties)
80
+
81
+ def __repr__(self):
82
+ """Return a unambiguous string representation."""
83
+ _region=self.region
84
+ _fleet_api_base_url=self.fleet_api_base_url
85
+ _additional_properties=self.additional_properties
86
+ return (
87
+ f"{self.__class__.__name__}("
88
+ f"region={_region!r}, "
89
+ f"fleet_api_base_url={_fleet_api_base_url!r}, "
90
+ f"additional_properties={_additional_properties!r}, "
91
+ f")"
92
+ )
93
+
94
+ def __str__(self):
95
+ """Return a human-readable string representation."""
96
+ _region=self.region
97
+ _fleet_api_base_url=self.fleet_api_base_url
98
+ _additional_properties=self.additional_properties
99
+ return (
100
+ f"{self.__class__.__name__}("
101
+ f"region={_region!s}, "
102
+ f"fleet_api_base_url={_fleet_api_base_url!s}, "
103
+ f"additional_properties={_additional_properties!s}, "
104
+ f")"
105
+ )
@@ -0,0 +1,331 @@
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 ResponseRegisterPartnerResponse(object):
13
+ """Implementation of the 'Response_RegisterPartnerResponse' model.
14
+
15
+ Attributes:
16
+ client_id (str): The model property of type str.
17
+ name (str): The model property of type str.
18
+ description (str): The model property of type str.
19
+ domain (str): The model property of type str.
20
+ ca (str): The model property of type str.
21
+ created_at (datetime): The model property of type datetime.
22
+ updated_at (datetime): The model property of type datetime.
23
+ enterprise_tier (str): The model property of type str.
24
+ account_id (str): The model property of type str.
25
+ issuer (str): The model property of type str.
26
+ csr (str): The model property of type str.
27
+ csr_updated_at (datetime): The model property of type datetime.
28
+ public_key (str): The model property of type str.
29
+ public_key_hash (str): The model property of type str.
30
+ additional_properties (Dict[str, Any]): The additional properties for the
31
+ model.
32
+
33
+ """
34
+
35
+ # Create a mapping from Model property names to API property names
36
+ _names = {
37
+ "client_id": "client_id",
38
+ "name": "name",
39
+ "domain": "domain",
40
+ "created_at": "created_at",
41
+ "updated_at": "updated_at",
42
+ "enterprise_tier": "enterprise_tier",
43
+ "account_id": "account_id",
44
+ "public_key": "public_key",
45
+ "public_key_hash": "public_key_hash",
46
+ "description": "description",
47
+ "ca": "ca",
48
+ "issuer": "issuer",
49
+ "csr": "csr",
50
+ "csr_updated_at": "csr_updated_at",
51
+ }
52
+
53
+ _optionals = [
54
+ "description",
55
+ "ca",
56
+ "issuer",
57
+ "csr",
58
+ "csr_updated_at",
59
+ ]
60
+
61
+ _nullables = [
62
+ "ca",
63
+ "issuer",
64
+ "csr",
65
+ "csr_updated_at",
66
+ ]
67
+
68
+ def __init__(
69
+ self,
70
+ client_id=None,
71
+ name=None,
72
+ domain=None,
73
+ created_at=None,
74
+ updated_at=None,
75
+ enterprise_tier=None,
76
+ account_id=None,
77
+ public_key=None,
78
+ public_key_hash=None,
79
+ description=APIHelper.SKIP,
80
+ ca=APIHelper.SKIP,
81
+ issuer=APIHelper.SKIP,
82
+ csr=APIHelper.SKIP,
83
+ csr_updated_at=APIHelper.SKIP,
84
+ additional_properties=None):
85
+ """Initialize a ResponseRegisterPartnerResponse instance."""
86
+ # Initialize members of the class
87
+ self.client_id = client_id
88
+ self.name = name
89
+ if description is not APIHelper.SKIP:
90
+ self.description = description
91
+ self.domain = domain
92
+ if ca is not APIHelper.SKIP:
93
+ self.ca = ca
94
+ self.created_at =\
95
+ APIHelper.apply_datetime_converter(
96
+ created_at, APIHelper.RFC3339DateTime)\
97
+ if created_at else None
98
+ self.updated_at =\
99
+ APIHelper.apply_datetime_converter(
100
+ updated_at, APIHelper.RFC3339DateTime)\
101
+ if updated_at else None
102
+ self.enterprise_tier = enterprise_tier
103
+ self.account_id = account_id
104
+ if issuer is not APIHelper.SKIP:
105
+ self.issuer = issuer
106
+ if csr is not APIHelper.SKIP:
107
+ self.csr = csr
108
+ if csr_updated_at is not APIHelper.SKIP:
109
+ self.csr_updated_at =\
110
+ APIHelper.apply_datetime_converter(
111
+ csr_updated_at, APIHelper.RFC3339DateTime)\
112
+ if csr_updated_at else None
113
+ self.public_key = public_key
114
+ self.public_key_hash = public_key_hash
115
+
116
+ # Add additional model properties to the instance
117
+ if additional_properties is None:
118
+ additional_properties = {}
119
+ self.additional_properties = additional_properties
120
+
121
+ @classmethod
122
+ def from_dictionary(cls,
123
+ dictionary):
124
+ """Create an instance of this model from a dictionary
125
+
126
+ Args:
127
+ dictionary (dictionary): A dictionary representation of the object
128
+ as obtained from the deserialization of the server's response. The
129
+ keys MUST match property names in the API description.
130
+
131
+ Returns:
132
+ object: An instance of this structure class.
133
+
134
+ """
135
+ if not isinstance(dictionary, dict) or dictionary is None:
136
+ return None
137
+
138
+ # Extract variables from the dictionary
139
+ client_id =\
140
+ dictionary.get("client_id")\
141
+ if dictionary.get("client_id")\
142
+ else None
143
+ name =\
144
+ dictionary.get("name")\
145
+ if dictionary.get("name")\
146
+ else None
147
+ domain =\
148
+ dictionary.get("domain")\
149
+ if dictionary.get("domain")\
150
+ else None
151
+ created_at = APIHelper.RFC3339DateTime.from_value(
152
+ dictionary.get("created_at")).datetime\
153
+ if dictionary.get("created_at") else None
154
+ updated_at = APIHelper.RFC3339DateTime.from_value(
155
+ dictionary.get("updated_at")).datetime\
156
+ if dictionary.get("updated_at") else None
157
+ enterprise_tier =\
158
+ dictionary.get("enterprise_tier")\
159
+ if dictionary.get("enterprise_tier")\
160
+ else None
161
+ account_id =\
162
+ dictionary.get("account_id")\
163
+ if dictionary.get("account_id")\
164
+ else None
165
+ public_key =\
166
+ dictionary.get("public_key")\
167
+ if dictionary.get("public_key")\
168
+ else None
169
+ public_key_hash =\
170
+ dictionary.get("public_key_hash")\
171
+ if dictionary.get("public_key_hash")\
172
+ else None
173
+ description =\
174
+ dictionary.get("description")\
175
+ if dictionary.get("description")\
176
+ else APIHelper.SKIP
177
+ ca =\
178
+ dictionary.get("ca")\
179
+ if "ca" in dictionary.keys()\
180
+ else APIHelper.SKIP
181
+ issuer =\
182
+ dictionary.get("issuer")\
183
+ if "issuer" in dictionary.keys()\
184
+ else APIHelper.SKIP
185
+ csr =\
186
+ dictionary.get("csr")\
187
+ if "csr" in dictionary.keys()\
188
+ else APIHelper.SKIP
189
+ if "csr_updated_at" in dictionary.keys():
190
+ csr_updated_at = APIHelper.RFC3339DateTime.from_value(
191
+ dictionary.get("csr_updated_at")).datetime\
192
+ if dictionary.get("csr_updated_at") else None
193
+
194
+ else:
195
+ csr_updated_at = APIHelper.SKIP
196
+
197
+ additional_properties = APIHelper.get_additional_properties(
198
+ dictionary={k: v for k, v in dictionary.items()
199
+ if k not in cls._names.values()},
200
+ unboxing_function=lambda value: value)
201
+
202
+ # Return an object of this model
203
+ return cls(client_id,
204
+ name,
205
+ domain,
206
+ created_at,
207
+ updated_at,
208
+ enterprise_tier,
209
+ account_id,
210
+ public_key,
211
+ public_key_hash,
212
+ description,
213
+ ca,
214
+ issuer,
215
+ csr,
216
+ csr_updated_at,
217
+ additional_properties)
218
+
219
+ def __repr__(self):
220
+ """Return a unambiguous string representation."""
221
+ _client_id=self.client_id
222
+ _name=self.name
223
+ _description=(
224
+ self.description
225
+ if hasattr(self, "description")
226
+ else None
227
+ )
228
+ _domain=self.domain
229
+ _ca=(
230
+ self.ca
231
+ if hasattr(self, "ca")
232
+ else None
233
+ )
234
+ _created_at=self.created_at
235
+ _updated_at=self.updated_at
236
+ _enterprise_tier=self.enterprise_tier
237
+ _account_id=self.account_id
238
+ _issuer=(
239
+ self.issuer
240
+ if hasattr(self, "issuer")
241
+ else None
242
+ )
243
+ _csr=(
244
+ self.csr
245
+ if hasattr(self, "csr")
246
+ else None
247
+ )
248
+ _csr_updated_at=(
249
+ self.csr_updated_at
250
+ if hasattr(self, "csr_updated_at")
251
+ else None
252
+ )
253
+ _public_key=self.public_key
254
+ _public_key_hash=self.public_key_hash
255
+ _additional_properties=self.additional_properties
256
+ return (
257
+ f"{self.__class__.__name__}("
258
+ f"client_id={_client_id!r}, "
259
+ f"name={_name!r}, "
260
+ f"description={_description!r}, "
261
+ f"domain={_domain!r}, "
262
+ f"ca={_ca!r}, "
263
+ f"created_at={_created_at!r}, "
264
+ f"updated_at={_updated_at!r}, "
265
+ f"enterprise_tier={_enterprise_tier!r}, "
266
+ f"account_id={_account_id!r}, "
267
+ f"issuer={_issuer!r}, "
268
+ f"csr={_csr!r}, "
269
+ f"csr_updated_at={_csr_updated_at!r}, "
270
+ f"public_key={_public_key!r}, "
271
+ f"public_key_hash={_public_key_hash!r}, "
272
+ f"additional_properties={_additional_properties!r}, "
273
+ f")"
274
+ )
275
+
276
+ def __str__(self):
277
+ """Return a human-readable string representation."""
278
+ _client_id=self.client_id
279
+ _name=self.name
280
+ _description=(
281
+ self.description
282
+ if hasattr(self, "description")
283
+ else None
284
+ )
285
+ _domain=self.domain
286
+ _ca=(
287
+ self.ca
288
+ if hasattr(self, "ca")
289
+ else None
290
+ )
291
+ _created_at=self.created_at
292
+ _updated_at=self.updated_at
293
+ _enterprise_tier=self.enterprise_tier
294
+ _account_id=self.account_id
295
+ _issuer=(
296
+ self.issuer
297
+ if hasattr(self, "issuer")
298
+ else None
299
+ )
300
+ _csr=(
301
+ self.csr
302
+ if hasattr(self, "csr")
303
+ else None
304
+ )
305
+ _csr_updated_at=(
306
+ self.csr_updated_at
307
+ if hasattr(self, "csr_updated_at")
308
+ else None
309
+ )
310
+ _public_key=self.public_key
311
+ _public_key_hash=self.public_key_hash
312
+ _additional_properties=self.additional_properties
313
+ return (
314
+ f"{self.__class__.__name__}("
315
+ f"client_id={_client_id!s}, "
316
+ f"name={_name!s}, "
317
+ f"description={_description!s}, "
318
+ f"domain={_domain!s}, "
319
+ f"ca={_ca!s}, "
320
+ f"created_at={_created_at!s}, "
321
+ f"updated_at={_updated_at!s}, "
322
+ f"enterprise_tier={_enterprise_tier!s}, "
323
+ f"account_id={_account_id!s}, "
324
+ f"issuer={_issuer!s}, "
325
+ f"csr={_csr!s}, "
326
+ f"csr_updated_at={_csr_updated_at!s}, "
327
+ f"public_key={_public_key!s}, "
328
+ f"public_key_hash={_public_key_hash!s}, "
329
+ f"additional_properties={_additional_properties!s}, "
330
+ f")"
331
+ )
@@ -0,0 +1,118 @@
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 Signaling(object):
13
+ """Implementation of the 'Signaling' model.
14
+
15
+ Attributes:
16
+ enabled (bool): The model property of type bool.
17
+ subscribe_connectivity (bool): The model property of type bool.
18
+ use_auth_token (bool): The model property of type bool.
19
+ additional_properties (Dict[str, Any]): The additional properties for the
20
+ model.
21
+
22
+ """
23
+
24
+ # Create a mapping from Model property names to API property names
25
+ _names = {
26
+ "enabled": "enabled",
27
+ "subscribe_connectivity": "subscribe_connectivity",
28
+ "use_auth_token": "use_auth_token",
29
+ }
30
+
31
+ def __init__(
32
+ self,
33
+ enabled=None,
34
+ subscribe_connectivity=None,
35
+ use_auth_token=None,
36
+ additional_properties=None):
37
+ """Initialize a Signaling instance."""
38
+ # Initialize members of the class
39
+ self.enabled = enabled
40
+ self.subscribe_connectivity = subscribe_connectivity
41
+ self.use_auth_token = use_auth_token
42
+
43
+ # Add additional model properties to the instance
44
+ if additional_properties is None:
45
+ additional_properties = {}
46
+ self.additional_properties = additional_properties
47
+
48
+ @classmethod
49
+ def from_dictionary(cls,
50
+ dictionary):
51
+ """Create an instance of this model from a dictionary
52
+
53
+ Args:
54
+ dictionary (dictionary): A dictionary representation of the object
55
+ as obtained from the deserialization of the server's response. The
56
+ keys MUST match property names in the API description.
57
+
58
+ Returns:
59
+ object: An instance of this structure class.
60
+
61
+ """
62
+ if not isinstance(dictionary, dict) or dictionary is None:
63
+ return None
64
+
65
+ # Extract variables from the dictionary
66
+ enabled =\
67
+ dictionary.get("enabled")\
68
+ if "enabled" in dictionary.keys()\
69
+ else None
70
+ subscribe_connectivity =\
71
+ dictionary.get("subscribe_connectivity")\
72
+ if "subscribe_connectivity" in dictionary.keys()\
73
+ else None
74
+ use_auth_token =\
75
+ dictionary.get("use_auth_token")\
76
+ if "use_auth_token" in dictionary.keys()\
77
+ else None
78
+
79
+ additional_properties = APIHelper.get_additional_properties(
80
+ dictionary={k: v for k, v in dictionary.items()
81
+ if k not in cls._names.values()},
82
+ unboxing_function=lambda value: value)
83
+
84
+ # Return an object of this model
85
+ return cls(enabled,
86
+ subscribe_connectivity,
87
+ use_auth_token,
88
+ additional_properties)
89
+
90
+ def __repr__(self):
91
+ """Return a unambiguous string representation."""
92
+ _enabled=self.enabled
93
+ _subscribe_connectivity=self.subscribe_connectivity
94
+ _use_auth_token=self.use_auth_token
95
+ _additional_properties=self.additional_properties
96
+ return (
97
+ f"{self.__class__.__name__}("
98
+ f"enabled={_enabled!r}, "
99
+ f"subscribe_connectivity={_subscribe_connectivity!r}, "
100
+ f"use_auth_token={_use_auth_token!r}, "
101
+ f"additional_properties={_additional_properties!r}, "
102
+ f")"
103
+ )
104
+
105
+ def __str__(self):
106
+ """Return a human-readable string representation."""
107
+ _enabled=self.enabled
108
+ _subscribe_connectivity=self.subscribe_connectivity
109
+ _use_auth_token=self.use_auth_token
110
+ _additional_properties=self.additional_properties
111
+ return (
112
+ f"{self.__class__.__name__}("
113
+ f"enabled={_enabled!s}, "
114
+ f"subscribe_connectivity={_subscribe_connectivity!s}, "
115
+ f"use_auth_token={_use_auth_token!s}, "
116
+ f"additional_properties={_additional_properties!s}, "
117
+ f")"
118
+ )