# coding: utf-8

"""
    Trackside Software TeamDB API v2.0

    This API enables you to access TeamDB data  # noqa: E501

    OpenAPI spec version: 2.0
    Contact: support@trackside.fr
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from teamdbapi.configuration import Configuration


class Tire(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 = {
        'id': 'str',
        'name': 'str',
        'tire_serial': 'str',
        'comment': 'str',
        'initial_km': 'int',
        'rim_serial': 'str',
        'type_tire_id': 'str',
        'event_id': 'str',
        'km_basic_forward_total': 'float',
        'km_basic_reverse_total': 'float',
        'km_real_forward_total': 'float',
        'km_real_reverse_total': 'float',
        'km_basic_overall': 'float',
        'km_real_overall': 'float',
        'last_update_date_utc': 'datetime',
        'last_update_user': 'str',
        'cold_pressure': 'float',
        'lap_count_forward_total': 'int',
        'lap_count_reverse_total': 'int',
        'bleed_adjust': 'list[BleedAdjustment]',
        'status': 'str',
        'weight': 'float',
        'return_weight': 'float',
        'initial_sliding_energy': 'float',
        'sliding_energy_total': 'float'
    }

    attribute_map = {
        'id': 'Id',
        'name': 'Name',
        'tire_serial': 'TireSerial',
        'comment': 'Comment',
        'initial_km': 'InitialKm',
        'rim_serial': 'RimSerial',
        'type_tire_id': 'TypeTireId',
        'event_id': 'EventId',
        'km_basic_forward_total': 'KmBasicForwardTotal',
        'km_basic_reverse_total': 'KmBasicReverseTotal',
        'km_real_forward_total': 'KmRealForwardTotal',
        'km_real_reverse_total': 'KmRealReverseTotal',
        'km_basic_overall': 'KmBasicOverall',
        'km_real_overall': 'KmRealOverall',
        'last_update_date_utc': 'LastUpdateDateUtc',
        'last_update_user': 'LastUpdateUser',
        'cold_pressure': 'ColdPressure',
        'lap_count_forward_total': 'LapCountForwardTotal',
        'lap_count_reverse_total': 'LapCountReverseTotal',
        'bleed_adjust': 'BleedAdjust',
        'status': 'Status',
        'weight': 'Weight',
        'return_weight': 'ReturnWeight',
        'initial_sliding_energy': 'InitialSlidingEnergy',
        'sliding_energy_total': 'SlidingEnergyTotal'
    }

    def __init__(self, id=None, name=None, tire_serial=None, comment=None, initial_km=None, rim_serial=None, type_tire_id=None, event_id=None, km_basic_forward_total=None, km_basic_reverse_total=None, km_real_forward_total=None, km_real_reverse_total=None, km_basic_overall=None, km_real_overall=None, last_update_date_utc=None, last_update_user=None, cold_pressure=None, lap_count_forward_total=None, lap_count_reverse_total=None, bleed_adjust=None, status=None, weight=None, return_weight=None, initial_sliding_energy=None, sliding_energy_total=None, _configuration=None):  # noqa: E501
        """Tire - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._id = None
        self._name = None
        self._tire_serial = None
        self._comment = None
        self._initial_km = None
        self._rim_serial = None
        self._type_tire_id = None
        self._event_id = None
        self._km_basic_forward_total = None
        self._km_basic_reverse_total = None
        self._km_real_forward_total = None
        self._km_real_reverse_total = None
        self._km_basic_overall = None
        self._km_real_overall = None
        self._last_update_date_utc = None
        self._last_update_user = None
        self._cold_pressure = None
        self._lap_count_forward_total = None
        self._lap_count_reverse_total = None
        self._bleed_adjust = None
        self._status = None
        self._weight = None
        self._return_weight = None
        self._initial_sliding_energy = None
        self._sliding_energy_total = None
        self.discriminator = None

        self.id = id
        self.name = name
        if tire_serial is not None:
            self.tire_serial = tire_serial
        if comment is not None:
            self.comment = comment
        if initial_km is not None:
            self.initial_km = initial_km
        if rim_serial is not None:
            self.rim_serial = rim_serial
        self.type_tire_id = type_tire_id
        self.event_id = event_id
        if km_basic_forward_total is not None:
            self.km_basic_forward_total = km_basic_forward_total
        if km_basic_reverse_total is not None:
            self.km_basic_reverse_total = km_basic_reverse_total
        if km_real_forward_total is not None:
            self.km_real_forward_total = km_real_forward_total
        if km_real_reverse_total is not None:
            self.km_real_reverse_total = km_real_reverse_total
        if km_basic_overall is not None:
            self.km_basic_overall = km_basic_overall
        if km_real_overall is not None:
            self.km_real_overall = km_real_overall
        if last_update_date_utc is not None:
            self.last_update_date_utc = last_update_date_utc
        if last_update_user is not None:
            self.last_update_user = last_update_user
        if cold_pressure is not None:
            self.cold_pressure = cold_pressure
        if lap_count_forward_total is not None:
            self.lap_count_forward_total = lap_count_forward_total
        if lap_count_reverse_total is not None:
            self.lap_count_reverse_total = lap_count_reverse_total
        if bleed_adjust is not None:
            self.bleed_adjust = bleed_adjust
        if status is not None:
            self.status = status
        if weight is not None:
            self.weight = weight
        if return_weight is not None:
            self.return_weight = return_weight
        if initial_sliding_energy is not None:
            self.initial_sliding_energy = initial_sliding_energy
        if sliding_energy_total is not None:
            self.sliding_energy_total = sliding_energy_total

    @property
    def id(self):
        """Gets the id of this Tire.  # noqa: E501

        Tire unique identifier  # noqa: E501

        :return: The id of this Tire.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Tire.

        Tire unique identifier  # noqa: E501

        :param id: The id of this Tire.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

    @property
    def name(self):
        """Gets the name of this Tire.  # noqa: E501

        Tire name  # noqa: E501

        :return: The name of this Tire.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this Tire.

        Tire name  # noqa: E501

        :param name: The name of this Tire.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                name is not None and len(name) < 1):
            raise ValueError("Invalid value for `name`, length must be greater than or equal to `1`")  # noqa: E501

        self._name = name

    @property
    def tire_serial(self):
        """Gets the tire_serial of this Tire.  # noqa: E501

        Tire serial number  # noqa: E501

        :return: The tire_serial of this Tire.  # noqa: E501
        :rtype: str
        """
        return self._tire_serial

    @tire_serial.setter
    def tire_serial(self, tire_serial):
        """Sets the tire_serial of this Tire.

        Tire serial number  # noqa: E501

        :param tire_serial: The tire_serial of this Tire.  # noqa: E501
        :type: str
        """

        self._tire_serial = tire_serial

    @property
    def comment(self):
        """Gets the comment of this Tire.  # noqa: E501

        Tire comments  # noqa: E501

        :return: The comment of this Tire.  # noqa: E501
        :rtype: str
        """
        return self._comment

    @comment.setter
    def comment(self, comment):
        """Sets the comment of this Tire.

        Tire comments  # noqa: E501

        :param comment: The comment of this Tire.  # noqa: E501
        :type: str
        """

        self._comment = comment

    @property
    def initial_km(self):
        """Gets the initial_km of this Tire.  # noqa: E501

        Initial tire km  # noqa: E501

        :return: The initial_km of this Tire.  # noqa: E501
        :rtype: int
        """
        return self._initial_km

    @initial_km.setter
    def initial_km(self, initial_km):
        """Sets the initial_km of this Tire.

        Initial tire km  # noqa: E501

        :param initial_km: The initial_km of this Tire.  # noqa: E501
        :type: int
        """

        self._initial_km = initial_km

    @property
    def rim_serial(self):
        """Gets the rim_serial of this Tire.  # noqa: E501

        Rim serial number  # noqa: E501

        :return: The rim_serial of this Tire.  # noqa: E501
        :rtype: str
        """
        return self._rim_serial

    @rim_serial.setter
    def rim_serial(self, rim_serial):
        """Sets the rim_serial of this Tire.

        Rim serial number  # noqa: E501

        :param rim_serial: The rim_serial of this Tire.  # noqa: E501
        :type: str
        """

        self._rim_serial = rim_serial

    @property
    def type_tire_id(self):
        """Gets the type_tire_id of this Tire.  # noqa: E501

        Unique identifier of the Tire rubber type. You must choose an Id from the TeamDBListItem collection corresponding to the TeamDBList named TypeTireRubber.  # noqa: E501

        :return: The type_tire_id of this Tire.  # noqa: E501
        :rtype: str
        """
        return self._type_tire_id

    @type_tire_id.setter
    def type_tire_id(self, type_tire_id):
        """Sets the type_tire_id of this Tire.

        Unique identifier of the Tire rubber type. You must choose an Id from the TeamDBListItem collection corresponding to the TeamDBList named TypeTireRubber.  # noqa: E501

        :param type_tire_id: The type_tire_id of this Tire.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and type_tire_id is None:
            raise ValueError("Invalid value for `type_tire_id`, must not be `None`")  # noqa: E501

        self._type_tire_id = type_tire_id

    @property
    def event_id(self):
        """Gets the event_id of this Tire.  # noqa: E501

        Unique identifier corresponding to the event to which the tire belongs  # noqa: E501

        :return: The event_id of this Tire.  # noqa: E501
        :rtype: str
        """
        return self._event_id

    @event_id.setter
    def event_id(self, event_id):
        """Sets the event_id of this Tire.

        Unique identifier corresponding to the event to which the tire belongs  # noqa: E501

        :param event_id: The event_id of this Tire.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and event_id is None:
            raise ValueError("Invalid value for `event_id`, must not be `None`")  # noqa: E501

        self._event_id = event_id

    @property
    def km_basic_forward_total(self):
        """Gets the km_basic_forward_total of this Tire.  # noqa: E501

        Total distance performed by the tire mounted in the forward direction (readonly).  This field is automatically computed by the system.  # noqa: E501

        :return: The km_basic_forward_total of this Tire.  # noqa: E501
        :rtype: float
        """
        return self._km_basic_forward_total

    @km_basic_forward_total.setter
    def km_basic_forward_total(self, km_basic_forward_total):
        """Sets the km_basic_forward_total of this Tire.

        Total distance performed by the tire mounted in the forward direction (readonly).  This field is automatically computed by the system.  # noqa: E501

        :param km_basic_forward_total: The km_basic_forward_total of this Tire.  # noqa: E501
        :type: float
        """

        self._km_basic_forward_total = km_basic_forward_total

    @property
    def km_basic_reverse_total(self):
        """Gets the km_basic_reverse_total of this Tire.  # noqa: E501

        Total distance performed by the tire mounted in the reverse direction (readonly).  This field is automatically computed by the system.  # noqa: E501

        :return: The km_basic_reverse_total of this Tire.  # noqa: E501
        :rtype: float
        """
        return self._km_basic_reverse_total

    @km_basic_reverse_total.setter
    def km_basic_reverse_total(self, km_basic_reverse_total):
        """Sets the km_basic_reverse_total of this Tire.

        Total distance performed by the tire mounted in the reverse direction (readonly).  This field is automatically computed by the system.  # noqa: E501

        :param km_basic_reverse_total: The km_basic_reverse_total of this Tire.  # noqa: E501
        :type: float
        """

        self._km_basic_reverse_total = km_basic_reverse_total

    @property
    def km_real_forward_total(self):
        """Gets the km_real_forward_total of this Tire.  # noqa: E501

        Total real distance performed lap by lap by the tire mounted in the forward direction (readonly).  This field is automatically computed by the system.  # noqa: E501

        :return: The km_real_forward_total of this Tire.  # noqa: E501
        :rtype: float
        """
        return self._km_real_forward_total

    @km_real_forward_total.setter
    def km_real_forward_total(self, km_real_forward_total):
        """Sets the km_real_forward_total of this Tire.

        Total real distance performed lap by lap by the tire mounted in the forward direction (readonly).  This field is automatically computed by the system.  # noqa: E501

        :param km_real_forward_total: The km_real_forward_total of this Tire.  # noqa: E501
        :type: float
        """

        self._km_real_forward_total = km_real_forward_total

    @property
    def km_real_reverse_total(self):
        """Gets the km_real_reverse_total of this Tire.  # noqa: E501

        Total real distance performed lap by lap by the tire mounted in the reverse direction (readonly).  This field is automatically computed by the system.  # noqa: E501

        :return: The km_real_reverse_total of this Tire.  # noqa: E501
        :rtype: float
        """
        return self._km_real_reverse_total

    @km_real_reverse_total.setter
    def km_real_reverse_total(self, km_real_reverse_total):
        """Sets the km_real_reverse_total of this Tire.

        Total real distance performed lap by lap by the tire mounted in the reverse direction (readonly).  This field is automatically computed by the system.  # noqa: E501

        :param km_real_reverse_total: The km_real_reverse_total of this Tire.  # noqa: E501
        :type: float
        """

        self._km_real_reverse_total = km_real_reverse_total

    @property
    def km_basic_overall(self):
        """Gets the km_basic_overall of this Tire.  # noqa: E501

        Global distance performed by the tire (readonly).  This field is automatically computed by the system.  # noqa: E501

        :return: The km_basic_overall of this Tire.  # noqa: E501
        :rtype: float
        """
        return self._km_basic_overall

    @km_basic_overall.setter
    def km_basic_overall(self, km_basic_overall):
        """Sets the km_basic_overall of this Tire.

        Global distance performed by the tire (readonly).  This field is automatically computed by the system.  # noqa: E501

        :param km_basic_overall: The km_basic_overall of this Tire.  # noqa: E501
        :type: float
        """

        self._km_basic_overall = km_basic_overall

    @property
    def km_real_overall(self):
        """Gets the km_real_overall of this Tire.  # noqa: E501

        Global real distance performed by the tire (readonly).  This field is automatically computed by the system.  # noqa: E501

        :return: The km_real_overall of this Tire.  # noqa: E501
        :rtype: float
        """
        return self._km_real_overall

    @km_real_overall.setter
    def km_real_overall(self, km_real_overall):
        """Sets the km_real_overall of this Tire.

        Global real distance performed by the tire (readonly).  This field is automatically computed by the system.  # noqa: E501

        :param km_real_overall: The km_real_overall of this Tire.  # noqa: E501
        :type: float
        """

        self._km_real_overall = km_real_overall

    @property
    def last_update_date_utc(self):
        """Gets the last_update_date_utc of this Tire.  # noqa: E501

        Last updated utc date time. This field is automatically filled by the system.  # noqa: E501

        :return: The last_update_date_utc of this Tire.  # noqa: E501
        :rtype: datetime
        """
        return self._last_update_date_utc

    @last_update_date_utc.setter
    def last_update_date_utc(self, last_update_date_utc):
        """Sets the last_update_date_utc of this Tire.

        Last updated utc date time. This field is automatically filled by the system.  # noqa: E501

        :param last_update_date_utc: The last_update_date_utc of this Tire.  # noqa: E501
        :type: datetime
        """

        self._last_update_date_utc = last_update_date_utc

    @property
    def last_update_user(self):
        """Gets the last_update_user of this Tire.  # noqa: E501

        Name of the last user who updated the data. This field is automatically filled by the system.  # noqa: E501

        :return: The last_update_user of this Tire.  # noqa: E501
        :rtype: str
        """
        return self._last_update_user

    @last_update_user.setter
    def last_update_user(self, last_update_user):
        """Sets the last_update_user of this Tire.

        Name of the last user who updated the data. This field is automatically filled by the system.  # noqa: E501

        :param last_update_user: The last_update_user of this Tire.  # noqa: E501
        :type: str
        """

        self._last_update_user = last_update_user

    @property
    def cold_pressure(self):
        """Gets the cold_pressure of this Tire.  # noqa: E501

        The cold pressure value  # noqa: E501

        :return: The cold_pressure of this Tire.  # noqa: E501
        :rtype: float
        """
        return self._cold_pressure

    @cold_pressure.setter
    def cold_pressure(self, cold_pressure):
        """Sets the cold_pressure of this Tire.

        The cold pressure value  # noqa: E501

        :param cold_pressure: The cold_pressure of this Tire.  # noqa: E501
        :type: float
        """

        self._cold_pressure = cold_pressure

    @property
    def lap_count_forward_total(self):
        """Gets the lap_count_forward_total of this Tire.  # noqa: E501

        Total lap count performed by the tire mounted in the forward direction (readonly).  This field is automatically computed by the system.  # noqa: E501

        :return: The lap_count_forward_total of this Tire.  # noqa: E501
        :rtype: int
        """
        return self._lap_count_forward_total

    @lap_count_forward_total.setter
    def lap_count_forward_total(self, lap_count_forward_total):
        """Sets the lap_count_forward_total of this Tire.

        Total lap count performed by the tire mounted in the forward direction (readonly).  This field is automatically computed by the system.  # noqa: E501

        :param lap_count_forward_total: The lap_count_forward_total of this Tire.  # noqa: E501
        :type: int
        """

        self._lap_count_forward_total = lap_count_forward_total

    @property
    def lap_count_reverse_total(self):
        """Gets the lap_count_reverse_total of this Tire.  # noqa: E501

        Total lap count performed by the tire mounted in the reverse direction (readonly).  This field is automatically computed by the system.  # noqa: E501

        :return: The lap_count_reverse_total of this Tire.  # noqa: E501
        :rtype: int
        """
        return self._lap_count_reverse_total

    @lap_count_reverse_total.setter
    def lap_count_reverse_total(self, lap_count_reverse_total):
        """Sets the lap_count_reverse_total of this Tire.

        Total lap count performed by the tire mounted in the reverse direction (readonly).  This field is automatically computed by the system.  # noqa: E501

        :param lap_count_reverse_total: The lap_count_reverse_total of this Tire.  # noqa: E501
        :type: int
        """

        self._lap_count_reverse_total = lap_count_reverse_total

    @property
    def bleed_adjust(self):
        """Gets the bleed_adjust of this Tire.  # noqa: E501

        the collection of bleed ajustements  # noqa: E501

        :return: The bleed_adjust of this Tire.  # noqa: E501
        :rtype: list[BleedAdjustment]
        """
        return self._bleed_adjust

    @bleed_adjust.setter
    def bleed_adjust(self, bleed_adjust):
        """Sets the bleed_adjust of this Tire.

        the collection of bleed ajustements  # noqa: E501

        :param bleed_adjust: The bleed_adjust of this Tire.  # noqa: E501
        :type: list[BleedAdjustment]
        """

        self._bleed_adjust = bleed_adjust

    @property
    def status(self):
        """Gets the status of this Tire.  # noqa: E501

        The tire status (value from the TireStatus enumeration)  # noqa: E501

        :return: The status of this Tire.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this Tire.

        The tire status (value from the TireStatus enumeration)  # noqa: E501

        :param status: The status of this Tire.  # noqa: E501
        :type: str
        """
        allowed_values = ["NotMounted", "Scrapped", "Mounted", "Heating", "Hot", "OnCar"]  # noqa: E501
        if (self._configuration.client_side_validation and
                status not in allowed_values):
            raise ValueError(
                "Invalid value for `status` ({0}), must be one of {1}"  # noqa: E501
                .format(status, allowed_values)
            )

        self._status = status

    @property
    def weight(self):
        """Gets the weight of this Tire.  # noqa: E501

        The tire weight  # noqa: E501

        :return: The weight of this Tire.  # noqa: E501
        :rtype: float
        """
        return self._weight

    @weight.setter
    def weight(self, weight):
        """Sets the weight of this Tire.

        The tire weight  # noqa: E501

        :param weight: The weight of this Tire.  # noqa: E501
        :type: float
        """

        self._weight = weight

    @property
    def return_weight(self):
        """Gets the return_weight of this Tire.  # noqa: E501

        The tire return weight  # noqa: E501

        :return: The return_weight of this Tire.  # noqa: E501
        :rtype: float
        """
        return self._return_weight

    @return_weight.setter
    def return_weight(self, return_weight):
        """Sets the return_weight of this Tire.

        The tire return weight  # noqa: E501

        :param return_weight: The return_weight of this Tire.  # noqa: E501
        :type: float
        """

        self._return_weight = return_weight

    @property
    def initial_sliding_energy(self):
        """Gets the initial_sliding_energy of this Tire.  # noqa: E501

        Energie initial du pneu  # noqa: E501

        :return: The initial_sliding_energy of this Tire.  # noqa: E501
        :rtype: float
        """
        return self._initial_sliding_energy

    @initial_sliding_energy.setter
    def initial_sliding_energy(self, initial_sliding_energy):
        """Sets the initial_sliding_energy of this Tire.

        Energie initial du pneu  # noqa: E501

        :param initial_sliding_energy: The initial_sliding_energy of this Tire.  # noqa: E501
        :type: float
        """

        self._initial_sliding_energy = initial_sliding_energy

    @property
    def sliding_energy_total(self):
        """Gets the sliding_energy_total of this Tire.  # noqa: E501

        Energie total du pneu  # noqa: E501

        :return: The sliding_energy_total of this Tire.  # noqa: E501
        :rtype: float
        """
        return self._sliding_energy_total

    @sliding_energy_total.setter
    def sliding_energy_total(self, sliding_energy_total):
        """Sets the sliding_energy_total of this Tire.

        Energie total du pneu  # noqa: E501

        :param sliding_energy_total: The sliding_energy_total of this Tire.  # noqa: E501
        :type: float
        """

        self._sliding_energy_total = sliding_energy_total

    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(Tire, 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, Tire):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, Tire):
            return True

        return self.to_dict() != other.to_dict()
