# 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 Revision(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',
        'date_revision': 'datetime',
        'maturity': 'int',
        'value': 'list[object]',
        'parameter_id': 'str',
        'is_obsolete': 'bool',
        'parameter_value_check_sum': 'str',
        'comment': 'str',
        'user_name': 'str',
        'last_update_date_utc': 'datetime',
        'is_new': 'bool',
        'data_updated_date': 'datetime',
        'data_axe_x': 'list[float]',
        'data_axe_y': 'list[float]',
        'data_axe_z': 'list[float]'
    }

    attribute_map = {
        'id': 'Id',
        'name': 'Name',
        'date_revision': 'DateRevision',
        'maturity': 'Maturity',
        'value': 'Value',
        'parameter_id': 'ParameterId',
        'is_obsolete': 'IsObsolete',
        'parameter_value_check_sum': 'ParameterValueCheckSum',
        'comment': 'Comment',
        'user_name': 'UserName',
        'last_update_date_utc': 'LastUpdateDateUtc',
        'is_new': 'IsNew',
        'data_updated_date': 'DataUpdatedDate',
        'data_axe_x': 'DataAxeX',
        'data_axe_y': 'DataAxeY',
        'data_axe_z': 'DataAxeZ'
    }

    def __init__(self, id=None, name=None, date_revision=None, maturity=None, value=None, parameter_id=None, is_obsolete=None, parameter_value_check_sum=None, comment=None, user_name=None, last_update_date_utc=None, is_new=None, data_updated_date=None, data_axe_x=None, data_axe_y=None, data_axe_z=None, _configuration=None):  # noqa: E501
        """Revision - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._id = None
        self._name = None
        self._date_revision = None
        self._maturity = None
        self._value = None
        self._parameter_id = None
        self._is_obsolete = None
        self._parameter_value_check_sum = None
        self._comment = None
        self._user_name = None
        self._last_update_date_utc = None
        self._is_new = None
        self._data_updated_date = None
        self._data_axe_x = None
        self._data_axe_y = None
        self._data_axe_z = None
        self.discriminator = None

        self.id = id
        self.name = name
        self.date_revision = date_revision
        if maturity is not None:
            self.maturity = maturity
        self.value = value
        self.parameter_id = parameter_id
        if is_obsolete is not None:
            self.is_obsolete = is_obsolete
        if parameter_value_check_sum is not None:
            self.parameter_value_check_sum = parameter_value_check_sum
        if comment is not None:
            self.comment = comment
        if user_name is not None:
            self.user_name = user_name
        if last_update_date_utc is not None:
            self.last_update_date_utc = last_update_date_utc
        if is_new is not None:
            self.is_new = is_new
        if data_updated_date is not None:
            self.data_updated_date = data_updated_date
        if data_axe_x is not None:
            self.data_axe_x = data_axe_x
        if data_axe_y is not None:
            self.data_axe_y = data_axe_y
        if data_axe_z is not None:
            self.data_axe_z = data_axe_z

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

        The unique revision id.  Set the Id to Guid.Empty (00000000-0000-0000-0000-000000000000) if you want to create a new revision.  # noqa: E501

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

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

        The unique revision id.  Set the Id to Guid.Empty (00000000-0000-0000-0000-000000000000) if you want to create a new revision.  # noqa: E501

        :param id: The id of this Revision.  # 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 Revision.  # noqa: E501

        The revision name.  Must be unique for a parameter.  # noqa: E501

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

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

        The revision name.  Must be unique for a parameter.  # noqa: E501

        :param name: The name of this Revision.  # 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 date_revision(self):
        """Gets the date_revision of this Revision.  # noqa: E501

        The creation date of the revision.  The date must be an UTC date time. Here is an example : 2018-06-05T12:36:34.168Z  # noqa: E501

        :return: The date_revision of this Revision.  # noqa: E501
        :rtype: datetime
        """
        return self._date_revision

    @date_revision.setter
    def date_revision(self, date_revision):
        """Sets the date_revision of this Revision.

        The creation date of the revision.  The date must be an UTC date time. Here is an example : 2018-06-05T12:36:34.168Z  # noqa: E501

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

        self._date_revision = date_revision

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

        The revision maturity. Should be an integer value between [0 and 100]  # noqa: E501

        :return: The maturity of this Revision.  # noqa: E501
        :rtype: int
        """
        return self._maturity

    @maturity.setter
    def maturity(self, maturity):
        """Sets the maturity of this Revision.

        The revision maturity. Should be an integer value between [0 and 100]  # noqa: E501

        :param maturity: The maturity of this Revision.  # noqa: E501
        :type: int
        """

        self._maturity = maturity

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

        The revision value.  Depending on the parameter definition the value can be a single value or 2D value or 3D.  For this reason, the Value is represented as a 3 dimensionals JSON array.  The value type can be a string or double depending on the parameter.  For this reason, you have to serialize the value with invariant culture format.  Decimal separator must be the point. The coma is use to separate the elements inside the array.  Single Value sample : [[[0.7]]]  1D Value sample : [[[0.0]],[[0.1]],[[0.2]]]  2D Value sample : [[[1.0],[1.0],[1.0]], [[1.0],[1.0],[1.0],[1.0]]]  # noqa: E501

        :return: The value of this Revision.  # noqa: E501
        :rtype: list[object]
        """
        return self._value

    @value.setter
    def value(self, value):
        """Sets the value of this Revision.

        The revision value.  Depending on the parameter definition the value can be a single value or 2D value or 3D.  For this reason, the Value is represented as a 3 dimensionals JSON array.  The value type can be a string or double depending on the parameter.  For this reason, you have to serialize the value with invariant culture format.  Decimal separator must be the point. The coma is use to separate the elements inside the array.  Single Value sample : [[[0.7]]]  1D Value sample : [[[0.0]],[[0.1]],[[0.2]]]  2D Value sample : [[[1.0],[1.0],[1.0]], [[1.0],[1.0],[1.0],[1.0]]]  # noqa: E501

        :param value: The value of this Revision.  # noqa: E501
        :type: list[object]
        """
        if self._configuration.client_side_validation and value is None:
            raise ValueError("Invalid value for `value`, must not be `None`")  # noqa: E501

        self._value = value

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

        The parameter unique Id to which the revision belongs to  # noqa: E501

        :return: The parameter_id of this Revision.  # noqa: E501
        :rtype: str
        """
        return self._parameter_id

    @parameter_id.setter
    def parameter_id(self, parameter_id):
        """Sets the parameter_id of this Revision.

        The parameter unique Id to which the revision belongs to  # noqa: E501

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

        self._parameter_id = parameter_id

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

        Return true if the revision is obsolete  # noqa: E501

        :return: The is_obsolete of this Revision.  # noqa: E501
        :rtype: bool
        """
        return self._is_obsolete

    @is_obsolete.setter
    def is_obsolete(self, is_obsolete):
        """Sets the is_obsolete of this Revision.

        Return true if the revision is obsolete  # noqa: E501

        :param is_obsolete: The is_obsolete of this Revision.  # noqa: E501
        :type: bool
        """

        self._is_obsolete = is_obsolete

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

        The checksum of the value used to check the revision unicity for each parameter.  This value will be automatically computed during the create or update. You can ignore it while editing the revision.  # noqa: E501

        :return: The parameter_value_check_sum of this Revision.  # noqa: E501
        :rtype: str
        """
        return self._parameter_value_check_sum

    @parameter_value_check_sum.setter
    def parameter_value_check_sum(self, parameter_value_check_sum):
        """Sets the parameter_value_check_sum of this Revision.

        The checksum of the value used to check the revision unicity for each parameter.  This value will be automatically computed during the create or update. You can ignore it while editing the revision.  # noqa: E501

        :param parameter_value_check_sum: The parameter_value_check_sum of this Revision.  # noqa: E501
        :type: str
        """

        self._parameter_value_check_sum = parameter_value_check_sum

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

        The revision comment  # noqa: E501

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

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

        The revision comment  # noqa: E501

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

        self._comment = comment

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

        The name of the last user having updated the revision  This field will be automatically updated from the server side each time you update the object.  # noqa: E501

        :return: The user_name of this Revision.  # noqa: E501
        :rtype: str
        """
        return self._user_name

    @user_name.setter
    def user_name(self, user_name):
        """Sets the user_name of this Revision.

        The name of the last user having updated the revision  This field will be automatically updated from the server side each time you update the object.  # noqa: E501

        :param user_name: The user_name of this Revision.  # noqa: E501
        :type: str
        """

        self._user_name = user_name

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

        The last utc date time when the properties of the revision have been updated  This field will be automatically updated from the server side each time you update the object.  # noqa: E501

        :return: The last_update_date_utc of this Revision.  # 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 Revision.

        The last utc date time when the properties of the revision have been updated  This field will be automatically updated from the server side each time you update the object.  # noqa: E501

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

        self._last_update_date_utc = last_update_date_utc

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

        Return true if the revision is new  # noqa: E501

        :return: The is_new of this Revision.  # noqa: E501
        :rtype: bool
        """
        return self._is_new

    @is_new.setter
    def is_new(self, is_new):
        """Sets the is_new of this Revision.

        Return true if the revision is new  # noqa: E501

        :param is_new: The is_new of this Revision.  # noqa: E501
        :type: bool
        """

        self._is_new = is_new

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

        The last utc date time when the value of the revision have been updated (independently of the others properties)  # noqa: E501

        :return: The data_updated_date of this Revision.  # noqa: E501
        :rtype: datetime
        """
        return self._data_updated_date

    @data_updated_date.setter
    def data_updated_date(self, data_updated_date):
        """Sets the data_updated_date of this Revision.

        The last utc date time when the value of the revision have been updated (independently of the others properties)  # noqa: E501

        :param data_updated_date: The data_updated_date of this Revision.  # noqa: E501
        :type: datetime
        """

        self._data_updated_date = data_updated_date

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

        X axis data : filled only when the axis data are embedded inside the parameter definition  # noqa: E501

        :return: The data_axe_x of this Revision.  # noqa: E501
        :rtype: list[float]
        """
        return self._data_axe_x

    @data_axe_x.setter
    def data_axe_x(self, data_axe_x):
        """Sets the data_axe_x of this Revision.

        X axis data : filled only when the axis data are embedded inside the parameter definition  # noqa: E501

        :param data_axe_x: The data_axe_x of this Revision.  # noqa: E501
        :type: list[float]
        """

        self._data_axe_x = data_axe_x

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

        Y axis data : filled only when the axis data are embedded inside the parameter definition  # noqa: E501

        :return: The data_axe_y of this Revision.  # noqa: E501
        :rtype: list[float]
        """
        return self._data_axe_y

    @data_axe_y.setter
    def data_axe_y(self, data_axe_y):
        """Sets the data_axe_y of this Revision.

        Y axis data : filled only when the axis data are embedded inside the parameter definition  # noqa: E501

        :param data_axe_y: The data_axe_y of this Revision.  # noqa: E501
        :type: list[float]
        """

        self._data_axe_y = data_axe_y

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

        Z axis data : filled only when the axis data are embedded inside the parameter definition  # noqa: E501

        :return: The data_axe_z of this Revision.  # noqa: E501
        :rtype: list[float]
        """
        return self._data_axe_z

    @data_axe_z.setter
    def data_axe_z(self, data_axe_z):
        """Sets the data_axe_z of this Revision.

        Z axis data : filled only when the axis data are embedded inside the parameter definition  # noqa: E501

        :param data_axe_z: The data_axe_z of this Revision.  # noqa: E501
        :type: list[float]
        """

        self._data_axe_z = data_axe_z

    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(Revision, 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, Revision):
            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, Revision):
            return True

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