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,110 @@
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
+ from teslafleetmanagementapi.models.response_api_1_dx_vehicles_options_response import (
11
+ ResponseApi1DxVehiclesOptionsResponse,
12
+ )
13
+
14
+
15
+ class Api1DxVehiclesOptionsResponse(object):
16
+ """Implementation of the 'Api 1 Dx Vehicles Options Response' model.
17
+
18
+ Attributes:
19
+ response (ResponseApi1DxVehiclesOptionsResponse): The model property of type
20
+ ResponseApi1DxVehiclesOptionsResponse.
21
+ additional_properties (Dict[str, Any]): The additional properties for the
22
+ model.
23
+
24
+ """
25
+
26
+ # Create a mapping from Model property names to API property names
27
+ _names = {
28
+ "response": "response",
29
+ }
30
+
31
+ _optionals = [
32
+ "response",
33
+ ]
34
+
35
+ def __init__(
36
+ self,
37
+ response=APIHelper.SKIP,
38
+ additional_properties=None):
39
+ """Initialize a Api1DxVehiclesOptionsResponse instance."""
40
+ # Initialize members of the class
41
+ if response is not APIHelper.SKIP:
42
+ self.response = response
43
+
44
+ # Add additional model properties to the instance
45
+ if additional_properties is None:
46
+ additional_properties = {}
47
+ self.additional_properties = additional_properties
48
+
49
+ @classmethod
50
+ def from_dictionary(cls,
51
+ dictionary):
52
+ """Create an instance of this model from a dictionary
53
+
54
+ Args:
55
+ dictionary (dictionary): A dictionary representation of the object
56
+ as obtained from the deserialization of the server's response. The
57
+ keys MUST match property names in the API description.
58
+
59
+ Returns:
60
+ object: An instance of this structure class.
61
+
62
+ """
63
+ if not isinstance(dictionary, dict) or dictionary is None:
64
+ return None
65
+
66
+ # Extract variables from the dictionary
67
+ response =\
68
+ ResponseApi1DxVehiclesOptionsResponse.from_dictionary(
69
+ dictionary.get("response"))\
70
+ if "response" in dictionary.keys()\
71
+ else APIHelper.SKIP
72
+
73
+ additional_properties = APIHelper.get_additional_properties(
74
+ dictionary={k: v for k, v in dictionary.items()
75
+ if k not in cls._names.values()},
76
+ unboxing_function=lambda value: value)
77
+
78
+ # Return an object of this model
79
+ return cls(response,
80
+ additional_properties)
81
+
82
+ def __repr__(self):
83
+ """Return a unambiguous string representation."""
84
+ _response=(
85
+ self.response
86
+ if hasattr(self, "response")
87
+ else None
88
+ )
89
+ _additional_properties=self.additional_properties
90
+ return (
91
+ f"{self.__class__.__name__}("
92
+ f"response={_response!r}, "
93
+ f"additional_properties={_additional_properties!r}, "
94
+ f")"
95
+ )
96
+
97
+ def __str__(self):
98
+ """Return a human-readable string representation."""
99
+ _response=(
100
+ self.response
101
+ if hasattr(self, "response")
102
+ else None
103
+ )
104
+ _additional_properties=self.additional_properties
105
+ return (
106
+ f"{self.__class__.__name__}("
107
+ f"response={_response!s}, "
108
+ f"additional_properties={_additional_properties!s}, "
109
+ f")"
110
+ )
@@ -0,0 +1,110 @@
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
+ from teslafleetmanagementapi.models.response_api_1_dx_warranty_details_response import (
11
+ ResponseApi1DxWarrantyDetailsResponse,
12
+ )
13
+
14
+
15
+ class Api1DxWarrantyDetailsResponse(object):
16
+ """Implementation of the 'Api 1 Dx Warranty Details Response' model.
17
+
18
+ Attributes:
19
+ response (ResponseApi1DxWarrantyDetailsResponse): The model property of type
20
+ ResponseApi1DxWarrantyDetailsResponse.
21
+ additional_properties (Dict[str, Any]): The additional properties for the
22
+ model.
23
+
24
+ """
25
+
26
+ # Create a mapping from Model property names to API property names
27
+ _names = {
28
+ "response": "response",
29
+ }
30
+
31
+ _optionals = [
32
+ "response",
33
+ ]
34
+
35
+ def __init__(
36
+ self,
37
+ response=APIHelper.SKIP,
38
+ additional_properties=None):
39
+ """Initialize a Api1DxWarrantyDetailsResponse instance."""
40
+ # Initialize members of the class
41
+ if response is not APIHelper.SKIP:
42
+ self.response = response
43
+
44
+ # Add additional model properties to the instance
45
+ if additional_properties is None:
46
+ additional_properties = {}
47
+ self.additional_properties = additional_properties
48
+
49
+ @classmethod
50
+ def from_dictionary(cls,
51
+ dictionary):
52
+ """Create an instance of this model from a dictionary
53
+
54
+ Args:
55
+ dictionary (dictionary): A dictionary representation of the object
56
+ as obtained from the deserialization of the server's response. The
57
+ keys MUST match property names in the API description.
58
+
59
+ Returns:
60
+ object: An instance of this structure class.
61
+
62
+ """
63
+ if not isinstance(dictionary, dict) or dictionary is None:
64
+ return None
65
+
66
+ # Extract variables from the dictionary
67
+ response =\
68
+ ResponseApi1DxWarrantyDetailsResponse.from_dictionary(
69
+ dictionary.get("response"))\
70
+ if "response" in dictionary.keys()\
71
+ else APIHelper.SKIP
72
+
73
+ additional_properties = APIHelper.get_additional_properties(
74
+ dictionary={k: v for k, v in dictionary.items()
75
+ if k not in cls._names.values()},
76
+ unboxing_function=lambda value: value)
77
+
78
+ # Return an object of this model
79
+ return cls(response,
80
+ additional_properties)
81
+
82
+ def __repr__(self):
83
+ """Return a unambiguous string representation."""
84
+ _response=(
85
+ self.response
86
+ if hasattr(self, "response")
87
+ else None
88
+ )
89
+ _additional_properties=self.additional_properties
90
+ return (
91
+ f"{self.__class__.__name__}("
92
+ f"response={_response!r}, "
93
+ f"additional_properties={_additional_properties!r}, "
94
+ f")"
95
+ )
96
+
97
+ def __str__(self):
98
+ """Return a human-readable string representation."""
99
+ _response=(
100
+ self.response
101
+ if hasattr(self, "response")
102
+ else None
103
+ )
104
+ _additional_properties=self.additional_properties
105
+ return (
106
+ f"{self.__class__.__name__}("
107
+ f"response={_response!s}, "
108
+ f"additional_properties={_additional_properties!s}, "
109
+ f")"
110
+ )
@@ -0,0 +1,109 @@
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
+ from teslafleetmanagementapi.models.mobile_enabled import (
11
+ MobileEnabled,
12
+ )
13
+
14
+
15
+ class Api1VehiclesMobileEnabledResponse(object):
16
+ """Implementation of the 'Api 1 Vehicles Mobile Enabled Response' model.
17
+
18
+ Attributes:
19
+ response (MobileEnabled): The model property of type MobileEnabled.
20
+ additional_properties (Dict[str, Any]): The additional properties for the
21
+ model.
22
+
23
+ """
24
+
25
+ # Create a mapping from Model property names to API property names
26
+ _names = {
27
+ "response": "response",
28
+ }
29
+
30
+ _optionals = [
31
+ "response",
32
+ ]
33
+
34
+ def __init__(
35
+ self,
36
+ response=APIHelper.SKIP,
37
+ additional_properties=None):
38
+ """Initialize a Api1VehiclesMobileEnabledResponse instance."""
39
+ # Initialize members of the class
40
+ if response is not APIHelper.SKIP:
41
+ self.response = response
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
+ response =\
67
+ MobileEnabled.from_dictionary(
68
+ dictionary.get("response"))\
69
+ if "response" in dictionary.keys()\
70
+ else APIHelper.SKIP
71
+
72
+ additional_properties = APIHelper.get_additional_properties(
73
+ dictionary={k: v for k, v in dictionary.items()
74
+ if k not in cls._names.values()},
75
+ unboxing_function=lambda value: value)
76
+
77
+ # Return an object of this model
78
+ return cls(response,
79
+ additional_properties)
80
+
81
+ def __repr__(self):
82
+ """Return a unambiguous string representation."""
83
+ _response=(
84
+ self.response
85
+ if hasattr(self, "response")
86
+ else None
87
+ )
88
+ _additional_properties=self.additional_properties
89
+ return (
90
+ f"{self.__class__.__name__}("
91
+ f"response={_response!r}, "
92
+ f"additional_properties={_additional_properties!r}, "
93
+ f")"
94
+ )
95
+
96
+ def __str__(self):
97
+ """Return a human-readable string representation."""
98
+ _response=(
99
+ self.response
100
+ if hasattr(self, "response")
101
+ else None
102
+ )
103
+ _additional_properties=self.additional_properties
104
+ return (
105
+ f"{self.__class__.__name__}("
106
+ f"response={_response!s}, "
107
+ f"additional_properties={_additional_properties!s}, "
108
+ f")"
109
+ )
@@ -0,0 +1,109 @@
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
+ from teslafleetmanagementapi.models.response_3 import (
11
+ Response3,
12
+ )
13
+
14
+
15
+ class Api1VehiclesNearbyChargingSitesResponse(object):
16
+ """Implementation of the 'Api 1 Vehicles Nearby Charging Sites Response' model.
17
+
18
+ Attributes:
19
+ response (Response3): The model property of type Response3.
20
+ additional_properties (Dict[str, Any]): The additional properties for the
21
+ model.
22
+
23
+ """
24
+
25
+ # Create a mapping from Model property names to API property names
26
+ _names = {
27
+ "response": "response",
28
+ }
29
+
30
+ _optionals = [
31
+ "response",
32
+ ]
33
+
34
+ def __init__(
35
+ self,
36
+ response=APIHelper.SKIP,
37
+ additional_properties=None):
38
+ """Initialize a Api1VehiclesNearbyChargingSitesResponse instance."""
39
+ # Initialize members of the class
40
+ if response is not APIHelper.SKIP:
41
+ self.response = response
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
+ response =\
67
+ Response3.from_dictionary(
68
+ dictionary.get("response"))\
69
+ if "response" in dictionary.keys()\
70
+ else APIHelper.SKIP
71
+
72
+ additional_properties = APIHelper.get_additional_properties(
73
+ dictionary={k: v for k, v in dictionary.items()
74
+ if k not in cls._names.values()},
75
+ unboxing_function=lambda value: value)
76
+
77
+ # Return an object of this model
78
+ return cls(response,
79
+ additional_properties)
80
+
81
+ def __repr__(self):
82
+ """Return a unambiguous string representation."""
83
+ _response=(
84
+ self.response
85
+ if hasattr(self, "response")
86
+ else None
87
+ )
88
+ _additional_properties=self.additional_properties
89
+ return (
90
+ f"{self.__class__.__name__}("
91
+ f"response={_response!r}, "
92
+ f"additional_properties={_additional_properties!r}, "
93
+ f")"
94
+ )
95
+
96
+ def __str__(self):
97
+ """Return a human-readable string representation."""
98
+ _response=(
99
+ self.response
100
+ if hasattr(self, "response")
101
+ else None
102
+ )
103
+ _additional_properties=self.additional_properties
104
+ return (
105
+ f"{self.__class__.__name__}("
106
+ f"response={_response!s}, "
107
+ f"additional_properties={_additional_properties!s}, "
108
+ f")"
109
+ )
@@ -0,0 +1,162 @@
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
+ from teslafleetmanagementapi.models.pagination import (
11
+ Pagination,
12
+ )
13
+ from teslafleetmanagementapi.models.vehicle_base import (
14
+ VehicleBase,
15
+ )
16
+
17
+
18
+ class Api1VehiclesResponse(object):
19
+ """Implementation of the 'Api 1 Vehicles Response' model.
20
+
21
+ Attributes:
22
+ response (List[VehicleBase]): The model property of type List[VehicleBase].
23
+ pagination (Pagination): The model property of type Pagination.
24
+ count (int): The model property of type int.
25
+ additional_properties (Dict[str, Any]): The additional properties for the
26
+ model.
27
+
28
+ """
29
+
30
+ # Create a mapping from Model property names to API property names
31
+ _names = {
32
+ "response": "response",
33
+ "pagination": "pagination",
34
+ "count": "count",
35
+ }
36
+
37
+ _optionals = [
38
+ "response",
39
+ "pagination",
40
+ "count",
41
+ ]
42
+
43
+ def __init__(
44
+ self,
45
+ response=APIHelper.SKIP,
46
+ pagination=APIHelper.SKIP,
47
+ count=APIHelper.SKIP,
48
+ additional_properties=None):
49
+ """Initialize a Api1VehiclesResponse instance."""
50
+ # Initialize members of the class
51
+ if response is not APIHelper.SKIP:
52
+ self.response = response
53
+ if pagination is not APIHelper.SKIP:
54
+ self.pagination = pagination
55
+ if count is not APIHelper.SKIP:
56
+ self.count = count
57
+
58
+ # Add additional model properties to the instance
59
+ if additional_properties is None:
60
+ additional_properties = {}
61
+ self.additional_properties = additional_properties
62
+
63
+ @classmethod
64
+ def from_dictionary(cls,
65
+ dictionary):
66
+ """Create an instance of this model from a dictionary
67
+
68
+ Args:
69
+ dictionary (dictionary): A dictionary representation of the object
70
+ as obtained from the deserialization of the server's response. The
71
+ keys MUST match property names in the API description.
72
+
73
+ Returns:
74
+ object: An instance of this structure class.
75
+
76
+ """
77
+ if not isinstance(dictionary, dict) or dictionary is None:
78
+ return None
79
+
80
+ # Extract variables from the dictionary
81
+ response = None
82
+ if dictionary.get("response") is not None:
83
+ response = [
84
+ VehicleBase.from_dictionary(x)
85
+ for x in dictionary.get("response")
86
+ ]
87
+ else:
88
+ response = APIHelper.SKIP
89
+ pagination =\
90
+ Pagination.from_dictionary(
91
+ dictionary.get("pagination"))\
92
+ if "pagination" in dictionary.keys()\
93
+ else APIHelper.SKIP
94
+ count =\
95
+ dictionary.get("count")\
96
+ if dictionary.get("count")\
97
+ else APIHelper.SKIP
98
+
99
+ additional_properties = APIHelper.get_additional_properties(
100
+ dictionary={k: v for k, v in dictionary.items()
101
+ if k not in cls._names.values()},
102
+ unboxing_function=lambda value: value)
103
+
104
+ # Return an object of this model
105
+ return cls(response,
106
+ pagination,
107
+ count,
108
+ additional_properties)
109
+
110
+ def __repr__(self):
111
+ """Return a unambiguous string representation."""
112
+ _response=(
113
+ self.response
114
+ if hasattr(self, "response")
115
+ else None
116
+ )
117
+ _pagination=(
118
+ self.pagination
119
+ if hasattr(self, "pagination")
120
+ else None
121
+ )
122
+ _count=(
123
+ self.count
124
+ if hasattr(self, "count")
125
+ else None
126
+ )
127
+ _additional_properties=self.additional_properties
128
+ return (
129
+ f"{self.__class__.__name__}("
130
+ f"response={_response!r}, "
131
+ f"pagination={_pagination!r}, "
132
+ f"count={_count!r}, "
133
+ f"additional_properties={_additional_properties!r}, "
134
+ f")"
135
+ )
136
+
137
+ def __str__(self):
138
+ """Return a human-readable string representation."""
139
+ _response=(
140
+ self.response
141
+ if hasattr(self, "response")
142
+ else None
143
+ )
144
+ _pagination=(
145
+ self.pagination
146
+ if hasattr(self, "pagination")
147
+ else None
148
+ )
149
+ _count=(
150
+ self.count
151
+ if hasattr(self, "count")
152
+ else None
153
+ )
154
+ _additional_properties=self.additional_properties
155
+ return (
156
+ f"{self.__class__.__name__}("
157
+ f"response={_response!s}, "
158
+ f"pagination={_pagination!s}, "
159
+ f"count={_count!s}, "
160
+ f"additional_properties={_additional_properties!s}, "
161
+ f")"
162
+ )