Skip to content

Commit d39a86e

Browse files
author
Samsara CI
committed
Update Python SDK
1 parent 85f1c94 commit d39a86e

File tree

46 files changed

+516
-24
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+516
-24
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ Class | Method | HTTP request | Description
366366
- [VehicleAuxInputType9](docs/VehicleAuxInputType9.md)
367367
- [VehicleHarshAccelerationSettingType](docs/VehicleHarshAccelerationSettingType.md)
368368
- [VehicleLocation](docs/VehicleLocation.md)
369+
- [VehicleLocationAddress](docs/VehicleLocationAddress.md)
369370
- [VehicleLocationReverseGeo](docs/VehicleLocationReverseGeo.md)
370371
- [VehicleLocationTime](docs/VehicleLocationTime.md)
371372
- [VehicleLocationsListResponse](docs/VehicleLocationsListResponse.md)

docs/SamsaraApi.md

+10-10
Large diffs are not rendered by default.

docs/VehicleLocationAddress.md

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# VehicleLocationAddress
2+
3+
Address that the location is in.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**id** | **str** | Id of the address. | [optional]
8+
**name** | **str** | Name of address. | [optional]
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+

docs/VehicleStatsDecorationsGps.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6+
**address** | [**VehicleLocationAddress**](VehicleLocationAddress.md) | | [optional]
67
**heading_degrees** | **float** | Heading of the vehicle in degrees. | [optional]
78
**latitude** | **float** | GPS latitude represented in degrees |
89
**longitude** | **float** | GPS longitude represented in degrees |

docs/VehicleStatsGps.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ GPS location data for the vehicle.
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7+
**address** | [**VehicleLocationAddress**](VehicleLocationAddress.md) | | [optional]
78
**heading_degrees** | **float** | Heading of the vehicle in degrees. | [optional]
89
**latitude** | **float** | GPS latitude represented in degrees |
910
**longitude** | **float** | GPS longitude represented in degrees |

docs/VehicleStatsListGps.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ GPS location data for the vehicle.
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7+
**address** | [**VehicleLocationAddress**](VehicleLocationAddress.md) | | [optional]
78
**decorations** | [**VehicleStatsDecorations**](VehicleStatsDecorations.md) | | [optional]
89
**heading_degrees** | **float** | Heading of the vehicle in degrees. | [optional]
910
**latitude** | **float** | GPS latitude represented in degrees |

metadata.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"ApiVersion": "2021.03.19",
33
"SemanticVersion": "4.2.0",
4-
"Checksum": "cb173b0643",
4+
"Checksum": "7019437c24",
55
"RelevantChangelogs": [
66
{
77
"Date": "2021.03.19",

samsara/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@
240240
from samsara.models.vehicle_aux_input_type9 import VehicleAuxInputType9
241241
from samsara.models.vehicle_harsh_acceleration_setting_type import VehicleHarshAccelerationSettingType
242242
from samsara.models.vehicle_location import VehicleLocation
243+
from samsara.models.vehicle_location_address import VehicleLocationAddress
243244
from samsara.models.vehicle_location_reverse_geo import VehicleLocationReverseGeo
244245
from samsara.models.vehicle_location_time import VehicleLocationTime
245246
from samsara.models.vehicle_locations_list_response import VehicleLocationsListResponse

samsara/api/samsara_api.py

+10-10
Large diffs are not rendered by default.

samsara/models/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@
226226
from samsara.models.vehicle_aux_input_type9 import VehicleAuxInputType9
227227
from samsara.models.vehicle_harsh_acceleration_setting_type import VehicleHarshAccelerationSettingType
228228
from samsara.models.vehicle_location import VehicleLocation
229+
from samsara.models.vehicle_location_address import VehicleLocationAddress
229230
from samsara.models.vehicle_location_reverse_geo import VehicleLocationReverseGeo
230231
from samsara.models.vehicle_location_time import VehicleLocationTime
231232
from samsara.models.vehicle_locations_list_response import VehicleLocationsListResponse
+150
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
# coding: utf-8
2+
3+
"""
4+
Samsara API
5+
6+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7+
8+
The version of the OpenAPI document: 2020-06-15
9+
Generated by: https://openapi-generator.tech
10+
"""
11+
12+
13+
import pprint
14+
import re # noqa: F401
15+
16+
import six
17+
18+
from samsara.configuration import Configuration
19+
20+
21+
class VehicleLocationAddress(object):
22+
"""NOTE: This class is auto generated by OpenAPI Generator.
23+
Ref: https://openapi-generator.tech
24+
25+
Do not edit the class manually.
26+
"""
27+
28+
"""
29+
Attributes:
30+
openapi_types (dict): The key is attribute name
31+
and the value is attribute type.
32+
attribute_map (dict): The key is attribute name
33+
and the value is json key in definition.
34+
"""
35+
openapi_types = {
36+
'id': 'str',
37+
'name': 'str'
38+
}
39+
40+
attribute_map = {
41+
'id': 'id',
42+
'name': 'name'
43+
}
44+
45+
def __init__(self, id=None, name=None, local_vars_configuration=None): # noqa: E501
46+
"""VehicleLocationAddress - a model defined in OpenAPI""" # noqa: E501
47+
if local_vars_configuration is None:
48+
local_vars_configuration = Configuration()
49+
self.local_vars_configuration = local_vars_configuration
50+
51+
self._id = None
52+
self._name = None
53+
self.discriminator = None
54+
55+
if id is not None:
56+
self.id = id
57+
if name is not None:
58+
self.name = name
59+
60+
@property
61+
def id(self):
62+
"""Gets the id of this VehicleLocationAddress. # noqa: E501
63+
64+
Id of the address. # noqa: E501
65+
66+
:return: The id of this VehicleLocationAddress. # noqa: E501
67+
:rtype: str
68+
"""
69+
return self._id
70+
71+
@id.setter
72+
def id(self, id):
73+
"""Sets the id of this VehicleLocationAddress.
74+
75+
Id of the address. # noqa: E501
76+
77+
:param id: The id of this VehicleLocationAddress. # noqa: E501
78+
:type: str
79+
"""
80+
81+
self._id = id
82+
83+
@property
84+
def name(self):
85+
"""Gets the name of this VehicleLocationAddress. # noqa: E501
86+
87+
Name of address. # noqa: E501
88+
89+
:return: The name of this VehicleLocationAddress. # noqa: E501
90+
:rtype: str
91+
"""
92+
return self._name
93+
94+
@name.setter
95+
def name(self, name):
96+
"""Sets the name of this VehicleLocationAddress.
97+
98+
Name of address. # noqa: E501
99+
100+
:param name: The name of this VehicleLocationAddress. # noqa: E501
101+
:type: str
102+
"""
103+
104+
self._name = name
105+
106+
def to_dict(self):
107+
"""Returns the model properties as a dict"""
108+
result = {}
109+
110+
for attr, _ in six.iteritems(self.openapi_types):
111+
value = getattr(self, attr)
112+
if isinstance(value, list):
113+
result[attr] = list(map(
114+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
115+
value
116+
))
117+
elif hasattr(value, "to_dict"):
118+
result[attr] = value.to_dict()
119+
elif isinstance(value, dict):
120+
result[attr] = dict(map(
121+
lambda item: (item[0], item[1].to_dict())
122+
if hasattr(item[1], "to_dict") else item,
123+
value.items()
124+
))
125+
else:
126+
result[attr] = value
127+
128+
return result
129+
130+
def to_str(self):
131+
"""Returns the string representation of the model"""
132+
return pprint.pformat(self.to_dict())
133+
134+
def __repr__(self):
135+
"""For `print` and `pprint`"""
136+
return self.to_str()
137+
138+
def __eq__(self, other):
139+
"""Returns true if both objects are equal"""
140+
if not isinstance(other, VehicleLocationAddress):
141+
return False
142+
143+
return self.to_dict() == other.to_dict()
144+
145+
def __ne__(self, other):
146+
"""Returns true if both objects are not equal"""
147+
if not isinstance(other, VehicleLocationAddress):
148+
return True
149+
150+
return self.to_dict() != other.to_dict()

samsara/models/vehicle_stats_decorations_gps.py

+27-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class VehicleStatsDecorationsGps(object):
3333
and the value is json key in definition.
3434
"""
3535
openapi_types = {
36+
'address': 'VehicleLocationAddress',
3637
'heading_degrees': 'float',
3738
'latitude': 'float',
3839
'longitude': 'float',
@@ -41,26 +42,30 @@ class VehicleStatsDecorationsGps(object):
4142
}
4243

4344
attribute_map = {
45+
'address': 'address',
4446
'heading_degrees': 'headingDegrees',
4547
'latitude': 'latitude',
4648
'longitude': 'longitude',
4749
'reverse_geo': 'reverseGeo',
4850
'speed_miles_per_hour': 'speedMilesPerHour'
4951
}
5052

51-
def __init__(self, heading_degrees=None, latitude=None, longitude=None, reverse_geo=None, speed_miles_per_hour=None, local_vars_configuration=None): # noqa: E501
53+
def __init__(self, address=None, heading_degrees=None, latitude=None, longitude=None, reverse_geo=None, speed_miles_per_hour=None, local_vars_configuration=None): # noqa: E501
5254
"""VehicleStatsDecorationsGps - a model defined in OpenAPI""" # noqa: E501
5355
if local_vars_configuration is None:
5456
local_vars_configuration = Configuration()
5557
self.local_vars_configuration = local_vars_configuration
5658

59+
self._address = None
5760
self._heading_degrees = None
5861
self._latitude = None
5962
self._longitude = None
6063
self._reverse_geo = None
6164
self._speed_miles_per_hour = None
6265
self.discriminator = None
6366

67+
if address is not None:
68+
self.address = address
6469
if heading_degrees is not None:
6570
self.heading_degrees = heading_degrees
6671
self.latitude = latitude
@@ -70,6 +75,27 @@ def __init__(self, heading_degrees=None, latitude=None, longitude=None, reverse_
7075
if speed_miles_per_hour is not None:
7176
self.speed_miles_per_hour = speed_miles_per_hour
7277

78+
@property
79+
def address(self):
80+
"""Gets the address of this VehicleStatsDecorationsGps. # noqa: E501
81+
82+
83+
:return: The address of this VehicleStatsDecorationsGps. # noqa: E501
84+
:rtype: VehicleLocationAddress
85+
"""
86+
return self._address
87+
88+
@address.setter
89+
def address(self, address):
90+
"""Sets the address of this VehicleStatsDecorationsGps.
91+
92+
93+
:param address: The address of this VehicleStatsDecorationsGps. # noqa: E501
94+
:type: VehicleLocationAddress
95+
"""
96+
97+
self._address = address
98+
7399
@property
74100
def heading_degrees(self):
75101
"""Gets the heading_degrees of this VehicleStatsDecorationsGps. # noqa: E501

samsara/models/vehicle_stats_gps.py

+27-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class VehicleStatsGps(object):
3333
and the value is json key in definition.
3434
"""
3535
openapi_types = {
36+
'address': 'VehicleLocationAddress',
3637
'heading_degrees': 'float',
3738
'latitude': 'float',
3839
'longitude': 'float',
@@ -42,6 +43,7 @@ class VehicleStatsGps(object):
4243
}
4344

4445
attribute_map = {
46+
'address': 'address',
4547
'heading_degrees': 'headingDegrees',
4648
'latitude': 'latitude',
4749
'longitude': 'longitude',
@@ -50,12 +52,13 @@ class VehicleStatsGps(object):
5052
'time': 'time'
5153
}
5254

53-
def __init__(self, heading_degrees=None, latitude=None, longitude=None, reverse_geo=None, speed_miles_per_hour=None, time=None, local_vars_configuration=None): # noqa: E501
55+
def __init__(self, address=None, heading_degrees=None, latitude=None, longitude=None, reverse_geo=None, speed_miles_per_hour=None, time=None, local_vars_configuration=None): # noqa: E501
5456
"""VehicleStatsGps - a model defined in OpenAPI""" # noqa: E501
5557
if local_vars_configuration is None:
5658
local_vars_configuration = Configuration()
5759
self.local_vars_configuration = local_vars_configuration
5860

61+
self._address = None
5962
self._heading_degrees = None
6063
self._latitude = None
6164
self._longitude = None
@@ -64,6 +67,8 @@ def __init__(self, heading_degrees=None, latitude=None, longitude=None, reverse_
6467
self._time = None
6568
self.discriminator = None
6669

70+
if address is not None:
71+
self.address = address
6772
if heading_degrees is not None:
6873
self.heading_degrees = heading_degrees
6974
self.latitude = latitude
@@ -74,6 +79,27 @@ def __init__(self, heading_degrees=None, latitude=None, longitude=None, reverse_
7479
self.speed_miles_per_hour = speed_miles_per_hour
7580
self.time = time
7681

82+
@property
83+
def address(self):
84+
"""Gets the address of this VehicleStatsGps. # noqa: E501
85+
86+
87+
:return: The address of this VehicleStatsGps. # noqa: E501
88+
:rtype: VehicleLocationAddress
89+
"""
90+
return self._address
91+
92+
@address.setter
93+
def address(self, address):
94+
"""Sets the address of this VehicleStatsGps.
95+
96+
97+
:param address: The address of this VehicleStatsGps. # noqa: E501
98+
:type: VehicleLocationAddress
99+
"""
100+
101+
self._address = address
102+
77103
@property
78104
def heading_degrees(self):
79105
"""Gets the heading_degrees of this VehicleStatsGps. # noqa: E501

0 commit comments

Comments
 (0)