mirror of
https://github.com/flobz/psa_car_controller.git
synced 2026-08-24 02:16:14 +00:00
350 lines
11 KiB
Python
350 lines
11 KiB
Python
# coding: utf-8
|
|
|
|
"""
|
|
Groupe PSA Connected Car - WEB API B2C
|
|
|
|
*PSA B2C Connected Car API* # Introduction This is the description of the *Groupe PSA Connected Car V2 API*. The speccification is is based on **OpenAPI Specification version 3** and can be displayed via [ReDoc](https://github.com/Rebilly/ReDoc)a or [Swagger](http://swagger.io). This API allows applications to fetch data from the connected Vehicles data platform. # Authentication PSA Connected Car APIs uses the [OAuth 2.0](https://tools.ietf.org/html/rfc6749) protocol for authentication and Authorization. any application require a valid [Access Token](https://tools.ietf.org/html/rfc6749#section-1.4) to access to user data. # Errors Error codes returned by all REST APIs comply with the standard. Nevertheless, PSA Services (callers) need to have more complete data structures (even when the answer is not Http-OK) to better detail the type of error by providing application code, message and a debugging code(for investigation purposes). The http code of the response is managed by the protocol itself (in the header). **Errors are returned as a generic error response:** * ```xError``` object model. # noqa: E501
|
|
|
|
OpenAPI spec version: 4.0
|
|
|
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
"""
|
|
|
|
|
|
import pprint
|
|
import re # noqa: F401
|
|
|
|
import six
|
|
|
|
|
|
class TelemetryMessageVehicle(object):
|
|
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
|
|
Do not edit the class manually.
|
|
"""
|
|
|
|
"""
|
|
Attributes:
|
|
swagger_types (dict): The key is attribute name
|
|
and the value is attribute type.
|
|
attribute_map (dict): The key is attribute name
|
|
and the value is json key in definition.
|
|
"""
|
|
swagger_types = {
|
|
'adas': 'Adas',
|
|
'battery': 'Battery',
|
|
'braking_system': 'TelemetryMessageVehicleBrakingSystem',
|
|
'doors_state': 'DoorsState',
|
|
'energy': 'Energy',
|
|
'engines': 'list[Engine]',
|
|
'ignition': 'Ignition',
|
|
'lighting': 'Lighting',
|
|
'safety': 'Safety',
|
|
'transmission': 'TelemetryMessageVehicleTransmission'
|
|
}
|
|
|
|
attribute_map = {
|
|
'adas': 'adas',
|
|
'battery': 'battery',
|
|
'braking_system': 'brakingSystem',
|
|
'doors_state': 'doorsState',
|
|
'energy': 'energy',
|
|
'engines': 'engines',
|
|
'ignition': 'ignition',
|
|
'lighting': 'lighting',
|
|
'safety': 'safety',
|
|
'transmission': 'transmission'
|
|
}
|
|
|
|
def __init__(self, adas=None, battery=None, braking_system=None, doors_state=None, energy=None, engines=None, ignition=None, lighting=None, safety=None, transmission=None): # noqa: E501
|
|
"""TelemetryMessageVehicle - a model defined in Swagger""" # noqa: E501
|
|
|
|
self._adas = None
|
|
self._battery = None
|
|
self._braking_system = None
|
|
self._doors_state = None
|
|
self._energy = None
|
|
self._engines = None
|
|
self._ignition = None
|
|
self._lighting = None
|
|
self._safety = None
|
|
self._transmission = None
|
|
self.discriminator = None
|
|
|
|
if adas is not None:
|
|
self.adas = adas
|
|
if battery is not None:
|
|
self.battery = battery
|
|
if braking_system is not None:
|
|
self.braking_system = braking_system
|
|
if doors_state is not None:
|
|
self.doors_state = doors_state
|
|
if energy is not None:
|
|
self.energy = energy
|
|
if engines is not None:
|
|
self.engines = engines
|
|
if ignition is not None:
|
|
self.ignition = ignition
|
|
if lighting is not None:
|
|
self.lighting = lighting
|
|
if safety is not None:
|
|
self.safety = safety
|
|
if transmission is not None:
|
|
self.transmission = transmission
|
|
|
|
@property
|
|
def adas(self):
|
|
"""Gets the adas of this TelemetryMessageVehicle. # noqa: E501
|
|
|
|
|
|
:return: The adas of this TelemetryMessageVehicle. # noqa: E501
|
|
:rtype: Adas
|
|
"""
|
|
return self._adas
|
|
|
|
@adas.setter
|
|
def adas(self, adas):
|
|
"""Sets the adas of this TelemetryMessageVehicle.
|
|
|
|
|
|
:param adas: The adas of this TelemetryMessageVehicle. # noqa: E501
|
|
:type: Adas
|
|
"""
|
|
|
|
self._adas = adas
|
|
|
|
@property
|
|
def battery(self):
|
|
"""Gets the battery of this TelemetryMessageVehicle. # noqa: E501
|
|
|
|
|
|
:return: The battery of this TelemetryMessageVehicle. # noqa: E501
|
|
:rtype: Battery
|
|
"""
|
|
return self._battery
|
|
|
|
@battery.setter
|
|
def battery(self, battery):
|
|
"""Sets the battery of this TelemetryMessageVehicle.
|
|
|
|
|
|
:param battery: The battery of this TelemetryMessageVehicle. # noqa: E501
|
|
:type: Battery
|
|
"""
|
|
|
|
self._battery = battery
|
|
|
|
@property
|
|
def braking_system(self):
|
|
"""Gets the braking_system of this TelemetryMessageVehicle. # noqa: E501
|
|
|
|
|
|
:return: The braking_system of this TelemetryMessageVehicle. # noqa: E501
|
|
:rtype: TelemetryMessageVehicleBrakingSystem
|
|
"""
|
|
return self._braking_system
|
|
|
|
@braking_system.setter
|
|
def braking_system(self, braking_system):
|
|
"""Sets the braking_system of this TelemetryMessageVehicle.
|
|
|
|
|
|
:param braking_system: The braking_system of this TelemetryMessageVehicle. # noqa: E501
|
|
:type: TelemetryMessageVehicleBrakingSystem
|
|
"""
|
|
|
|
self._braking_system = braking_system
|
|
|
|
@property
|
|
def doors_state(self):
|
|
"""Gets the doors_state of this TelemetryMessageVehicle. # noqa: E501
|
|
|
|
|
|
:return: The doors_state of this TelemetryMessageVehicle. # noqa: E501
|
|
:rtype: DoorsState
|
|
"""
|
|
return self._doors_state
|
|
|
|
@doors_state.setter
|
|
def doors_state(self, doors_state):
|
|
"""Sets the doors_state of this TelemetryMessageVehicle.
|
|
|
|
|
|
:param doors_state: The doors_state of this TelemetryMessageVehicle. # noqa: E501
|
|
:type: DoorsState
|
|
"""
|
|
|
|
self._doors_state = doors_state
|
|
|
|
@property
|
|
def energy(self):
|
|
"""Gets the energy of this TelemetryMessageVehicle. # noqa: E501
|
|
|
|
|
|
:return: The energy of this TelemetryMessageVehicle. # noqa: E501
|
|
:rtype: Energy
|
|
"""
|
|
return self._energy
|
|
|
|
@energy.setter
|
|
def energy(self, energy):
|
|
"""Sets the energy of this TelemetryMessageVehicle.
|
|
|
|
|
|
:param energy: The energy of this TelemetryMessageVehicle. # noqa: E501
|
|
:type: Energy
|
|
"""
|
|
|
|
self._energy = energy
|
|
|
|
@property
|
|
def engines(self):
|
|
"""Gets the engines of this TelemetryMessageVehicle. # noqa: E501
|
|
|
|
|
|
:return: The engines of this TelemetryMessageVehicle. # noqa: E501
|
|
:rtype: list[Engine]
|
|
"""
|
|
return self._engines
|
|
|
|
@engines.setter
|
|
def engines(self, engines):
|
|
"""Sets the engines of this TelemetryMessageVehicle.
|
|
|
|
|
|
:param engines: The engines of this TelemetryMessageVehicle. # noqa: E501
|
|
:type: list[Engine]
|
|
"""
|
|
|
|
self._engines = engines
|
|
|
|
@property
|
|
def ignition(self):
|
|
"""Gets the ignition of this TelemetryMessageVehicle. # noqa: E501
|
|
|
|
|
|
:return: The ignition of this TelemetryMessageVehicle. # noqa: E501
|
|
:rtype: Ignition
|
|
"""
|
|
return self._ignition
|
|
|
|
@ignition.setter
|
|
def ignition(self, ignition):
|
|
"""Sets the ignition of this TelemetryMessageVehicle.
|
|
|
|
|
|
:param ignition: The ignition of this TelemetryMessageVehicle. # noqa: E501
|
|
:type: Ignition
|
|
"""
|
|
|
|
self._ignition = ignition
|
|
|
|
@property
|
|
def lighting(self):
|
|
"""Gets the lighting of this TelemetryMessageVehicle. # noqa: E501
|
|
|
|
|
|
:return: The lighting of this TelemetryMessageVehicle. # noqa: E501
|
|
:rtype: Lighting
|
|
"""
|
|
return self._lighting
|
|
|
|
@lighting.setter
|
|
def lighting(self, lighting):
|
|
"""Sets the lighting of this TelemetryMessageVehicle.
|
|
|
|
|
|
:param lighting: The lighting of this TelemetryMessageVehicle. # noqa: E501
|
|
:type: Lighting
|
|
"""
|
|
|
|
self._lighting = lighting
|
|
|
|
@property
|
|
def safety(self):
|
|
"""Gets the safety of this TelemetryMessageVehicle. # noqa: E501
|
|
|
|
|
|
:return: The safety of this TelemetryMessageVehicle. # noqa: E501
|
|
:rtype: Safety
|
|
"""
|
|
return self._safety
|
|
|
|
@safety.setter
|
|
def safety(self, safety):
|
|
"""Sets the safety of this TelemetryMessageVehicle.
|
|
|
|
|
|
:param safety: The safety of this TelemetryMessageVehicle. # noqa: E501
|
|
:type: Safety
|
|
"""
|
|
|
|
self._safety = safety
|
|
|
|
@property
|
|
def transmission(self):
|
|
"""Gets the transmission of this TelemetryMessageVehicle. # noqa: E501
|
|
|
|
|
|
:return: The transmission of this TelemetryMessageVehicle. # noqa: E501
|
|
:rtype: TelemetryMessageVehicleTransmission
|
|
"""
|
|
return self._transmission
|
|
|
|
@transmission.setter
|
|
def transmission(self, transmission):
|
|
"""Sets the transmission of this TelemetryMessageVehicle.
|
|
|
|
|
|
:param transmission: The transmission of this TelemetryMessageVehicle. # noqa: E501
|
|
:type: TelemetryMessageVehicleTransmission
|
|
"""
|
|
|
|
self._transmission = transmission
|
|
|
|
def to_dict(self):
|
|
"""Returns the model properties as a dict"""
|
|
result = {}
|
|
|
|
for attr, _ in six.iteritems(self.swagger_types):
|
|
value = getattr(self, attr)
|
|
if isinstance(value, list):
|
|
result[attr] = list(map(
|
|
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
value
|
|
))
|
|
elif hasattr(value, "to_dict"):
|
|
result[attr] = value.to_dict()
|
|
elif isinstance(value, dict):
|
|
result[attr] = dict(map(
|
|
lambda item: (item[0], item[1].to_dict())
|
|
if hasattr(item[1], "to_dict") else item,
|
|
value.items()
|
|
))
|
|
else:
|
|
result[attr] = value
|
|
if issubclass(TelemetryMessageVehicle, dict):
|
|
for key, value in self.items():
|
|
result[key] = value
|
|
|
|
return result
|
|
|
|
def to_str(self):
|
|
"""Returns the string representation of the model"""
|
|
return pprint.pformat(self.to_dict())
|
|
|
|
def __repr__(self):
|
|
"""For `print` and `pprint`"""
|
|
return self.to_str()
|
|
|
|
def __eq__(self, other):
|
|
"""Returns true if both objects are equal"""
|
|
if not isinstance(other, TelemetryMessageVehicle):
|
|
return False
|
|
|
|
return self.__dict__ == other.__dict__
|
|
|
|
def __ne__(self, other):
|
|
"""Returns true if both objects are not equal"""
|
|
return not self == other
|