# 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 Calibration(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 = {
        'name': 'str',
        'description': 'str',
        'reference': 'str',
        'data': 'list[object]',
        'data_type': 'str',
        'nx': 'int',
        'ny': 'int',
        'nz': 'int',
        'axe_x': 'str',
        'axe_y': 'str',
        'axe_z': 'str',
        'calibration_type': 'str',
        'groupe_path': 'str',
        'unit': 'str',
        'data_axe_x': 'list[float]',
        'data_axe_y': 'list[float]',
        'data_axe_z': 'list[float]',
        'is_axe': 'bool',
        'group_full_path': 'str',
        'string_format': 'str',
        'upper_limit': 'float',
        'lower_limit': 'float',
        'read_only': 'bool'
    }

    attribute_map = {
        'name': 'Name',
        'description': 'Description',
        'reference': 'Reference',
        'data': 'Data',
        'data_type': 'DataType',
        'nx': 'NX',
        'ny': 'NY',
        'nz': 'NZ',
        'axe_x': 'AxeX',
        'axe_y': 'AxeY',
        'axe_z': 'AxeZ',
        'calibration_type': 'CalibrationType',
        'groupe_path': 'GroupePath',
        'unit': 'Unit',
        'data_axe_x': 'DataAxeX',
        'data_axe_y': 'DataAxeY',
        'data_axe_z': 'DataAxeZ',
        'is_axe': 'IsAxe',
        'group_full_path': 'GroupFullPath',
        'string_format': 'StringFormat',
        'upper_limit': 'UpperLimit',
        'lower_limit': 'LowerLimit',
        'read_only': 'ReadOnly'
    }

    def __init__(self, name=None, description=None, reference=None, data=None, data_type=None, nx=None, ny=None, nz=None, axe_x=None, axe_y=None, axe_z=None, calibration_type=None, groupe_path=None, unit=None, data_axe_x=None, data_axe_y=None, data_axe_z=None, is_axe=None, group_full_path=None, string_format=None, upper_limit=None, lower_limit=None, read_only=None, _configuration=None):  # noqa: E501
        """Calibration - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._name = None
        self._description = None
        self._reference = None
        self._data = None
        self._data_type = None
        self._nx = None
        self._ny = None
        self._nz = None
        self._axe_x = None
        self._axe_y = None
        self._axe_z = None
        self._calibration_type = None
        self._groupe_path = None
        self._unit = None
        self._data_axe_x = None
        self._data_axe_y = None
        self._data_axe_z = None
        self._is_axe = None
        self._group_full_path = None
        self._string_format = None
        self._upper_limit = None
        self._lower_limit = None
        self._read_only = None
        self.discriminator = None

        if name is not None:
            self.name = name
        if description is not None:
            self.description = description
        if reference is not None:
            self.reference = reference
        if data is not None:
            self.data = data
        if data_type is not None:
            self.data_type = data_type
        if nx is not None:
            self.nx = nx
        if ny is not None:
            self.ny = ny
        if nz is not None:
            self.nz = nz
        if axe_x is not None:
            self.axe_x = axe_x
        if axe_y is not None:
            self.axe_y = axe_y
        if axe_z is not None:
            self.axe_z = axe_z
        if calibration_type is not None:
            self.calibration_type = calibration_type
        if groupe_path is not None:
            self.groupe_path = groupe_path
        if unit is not None:
            self.unit = unit
        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
        if is_axe is not None:
            self.is_axe = is_axe
        if group_full_path is not None:
            self.group_full_path = group_full_path
        if string_format is not None:
            self.string_format = string_format
        if upper_limit is not None:
            self.upper_limit = upper_limit
        if lower_limit is not None:
            self.lower_limit = lower_limit
        if read_only is not None:
            self.read_only = read_only

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

        The parameter name  # noqa: E501

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

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

        The parameter name  # noqa: E501

        :param name: The name of this Calibration.  # noqa: E501
        :type: str
        """

        self._name = name

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

        The parameter description  # noqa: E501

        :return: The description of this Calibration.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this Calibration.

        The parameter description  # noqa: E501

        :param description: The description of this Calibration.  # noqa: E501
        :type: str
        """

        self._description = description

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

        The parameter reference in the external system  # noqa: E501

        :return: The reference of this Calibration.  # noqa: E501
        :rtype: str
        """
        return self._reference

    @reference.setter
    def reference(self, reference):
        """Sets the reference of this Calibration.

        The parameter reference in the external system  # noqa: E501

        :param reference: The reference of this Calibration.  # noqa: E501
        :type: str
        """

        self._reference = reference

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

        The parameter data.  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 data of this Calibration.  # noqa: E501
        :rtype: list[object]
        """
        return self._data

    @data.setter
    def data(self, data):
        """Sets the data of this Calibration.

        The parameter data.  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 data: The data of this Calibration.  # noqa: E501
        :type: list[object]
        """

        self._data = data

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

        The data type  None, Byte, SByte, Word, SWord, DWord, SDWord, Floatx, Float3, Group, Text, ULong, SLong, Float6  # noqa: E501

        :return: The data_type of this Calibration.  # noqa: E501
        :rtype: str
        """
        return self._data_type

    @data_type.setter
    def data_type(self, data_type):
        """Sets the data_type of this Calibration.

        The data type  None, Byte, SByte, Word, SWord, DWord, SDWord, Floatx, Float3, Group, Text, ULong, SLong, Float6  # noqa: E501

        :param data_type: The data_type of this Calibration.  # noqa: E501
        :type: str
        """
        allowed_values = ["None", "Byte", "SByte", "Word", "SWord", "DWord", "SDWord", "Floatx", "Float3", "Group", "Text", "ULong", "SLong", "Float6"]  # noqa: E501
        if (self._configuration.client_side_validation and
                data_type not in allowed_values):
            raise ValueError(
                "Invalid value for `data_type` ({0}), must be one of {1}"  # noqa: E501
                .format(data_type, allowed_values)
            )

        self._data_type = data_type

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

        The X dimension of the data array  # noqa: E501

        :return: The nx of this Calibration.  # noqa: E501
        :rtype: int
        """
        return self._nx

    @nx.setter
    def nx(self, nx):
        """Sets the nx of this Calibration.

        The X dimension of the data array  # noqa: E501

        :param nx: The nx of this Calibration.  # noqa: E501
        :type: int
        """

        self._nx = nx

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

        The Y dimension of the data array  # noqa: E501

        :return: The ny of this Calibration.  # noqa: E501
        :rtype: int
        """
        return self._ny

    @ny.setter
    def ny(self, ny):
        """Sets the ny of this Calibration.

        The Y dimension of the data array  # noqa: E501

        :param ny: The ny of this Calibration.  # noqa: E501
        :type: int
        """

        self._ny = ny

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

        The Z dimension of the data array  # noqa: E501

        :return: The nz of this Calibration.  # noqa: E501
        :rtype: int
        """
        return self._nz

    @nz.setter
    def nz(self, nz):
        """Sets the nz of this Calibration.

        The Z dimension of the data array  # noqa: E501

        :param nz: The nz of this Calibration.  # noqa: E501
        :type: int
        """

        self._nz = nz

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

        The reference name of the X axis (if the parameter needs axis)  # noqa: E501

        :return: The axe_x of this Calibration.  # noqa: E501
        :rtype: str
        """
        return self._axe_x

    @axe_x.setter
    def axe_x(self, axe_x):
        """Sets the axe_x of this Calibration.

        The reference name of the X axis (if the parameter needs axis)  # noqa: E501

        :param axe_x: The axe_x of this Calibration.  # noqa: E501
        :type: str
        """

        self._axe_x = axe_x

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

        The reference name of the Y axis (if the parameter needs axis)  # noqa: E501

        :return: The axe_y of this Calibration.  # noqa: E501
        :rtype: str
        """
        return self._axe_y

    @axe_y.setter
    def axe_y(self, axe_y):
        """Sets the axe_y of this Calibration.

        The reference name of the Y axis (if the parameter needs axis)  # noqa: E501

        :param axe_y: The axe_y of this Calibration.  # noqa: E501
        :type: str
        """

        self._axe_y = axe_y

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

        The reference name of the Z axis (if the parameter needs axis)  # noqa: E501

        :return: The axe_z of this Calibration.  # noqa: E501
        :rtype: str
        """
        return self._axe_z

    @axe_z.setter
    def axe_z(self, axe_z):
        """Sets the axe_z of this Calibration.

        The reference name of the Z axis (if the parameter needs axis)  # noqa: E501

        :param axe_z: The axe_z of this Calibration.  # noqa: E501
        :type: str
        """

        self._axe_z = axe_z

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

        The parameter definition type (Single, 1D, 2D, 3D)  # noqa: E501

        :return: The calibration_type of this Calibration.  # noqa: E501
        :rtype: str
        """
        return self._calibration_type

    @calibration_type.setter
    def calibration_type(self, calibration_type):
        """Sets the calibration_type of this Calibration.

        The parameter definition type (Single, 1D, 2D, 3D)  # noqa: E501

        :param calibration_type: The calibration_type of this Calibration.  # noqa: E501
        :type: str
        """
        allowed_values = ["Single", "OneDimension", "TwoDimension", "ThreeDimension"]  # noqa: E501
        if (self._configuration.client_side_validation and
                calibration_type not in allowed_values):
            raise ValueError(
                "Invalid value for `calibration_type` ({0}), must be one of {1}"  # noqa: E501
                .format(calibration_type, allowed_values)
            )

        self._calibration_type = calibration_type

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

        The group name to which the parameter belongs to.  # noqa: E501

        :return: The groupe_path of this Calibration.  # noqa: E501
        :rtype: str
        """
        return self._groupe_path

    @groupe_path.setter
    def groupe_path(self, groupe_path):
        """Sets the groupe_path of this Calibration.

        The group name to which the parameter belongs to.  # noqa: E501

        :param groupe_path: The groupe_path of this Calibration.  # noqa: E501
        :type: str
        """

        self._groupe_path = groupe_path

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

        The parameter unit  # noqa: E501

        :return: The unit of this Calibration.  # noqa: E501
        :rtype: str
        """
        return self._unit

    @unit.setter
    def unit(self, unit):
        """Sets the unit of this Calibration.

        The parameter unit  # noqa: E501

        :param unit: The unit of this Calibration.  # noqa: E501
        :type: str
        """

        self._unit = unit

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

        The X axis data embedded in the parameter  # noqa: E501

        :return: The data_axe_x of this Calibration.  # 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 Calibration.

        The X axis data embedded in the parameter  # noqa: E501

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

        The Y axis data embedded in the parameter  # noqa: E501

        :return: The data_axe_y of this Calibration.  # 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 Calibration.

        The Y axis data embedded in the parameter  # noqa: E501

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

        The Z axis data embedded in the parameter  # noqa: E501

        :return: The data_axe_z of this Calibration.  # 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 Calibration.

        The Z axis data embedded in the parameter  # noqa: E501

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

        self._data_axe_z = data_axe_z

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

        True if the parameter is an axis  # noqa: E501

        :return: The is_axe of this Calibration.  # noqa: E501
        :rtype: bool
        """
        return self._is_axe

    @is_axe.setter
    def is_axe(self, is_axe):
        """Sets the is_axe of this Calibration.

        True if the parameter is an axis  # noqa: E501

        :param is_axe: The is_axe of this Calibration.  # noqa: E501
        :type: bool
        """

        self._is_axe = is_axe

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

        The group full path in which the parameter is located  # noqa: E501

        :return: The group_full_path of this Calibration.  # noqa: E501
        :rtype: str
        """
        return self._group_full_path

    @group_full_path.setter
    def group_full_path(self, group_full_path):
        """Sets the group_full_path of this Calibration.

        The group full path in which the parameter is located  # noqa: E501

        :param group_full_path: The group_full_path of this Calibration.  # noqa: E501
        :type: str
        """

        self._group_full_path = group_full_path

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

        The parameter string format  # noqa: E501

        :return: The string_format of this Calibration.  # noqa: E501
        :rtype: str
        """
        return self._string_format

    @string_format.setter
    def string_format(self, string_format):
        """Sets the string_format of this Calibration.

        The parameter string format  # noqa: E501

        :param string_format: The string_format of this Calibration.  # noqa: E501
        :type: str
        """

        self._string_format = string_format

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

        The upper value authorized  # noqa: E501

        :return: The upper_limit of this Calibration.  # noqa: E501
        :rtype: float
        """
        return self._upper_limit

    @upper_limit.setter
    def upper_limit(self, upper_limit):
        """Sets the upper_limit of this Calibration.

        The upper value authorized  # noqa: E501

        :param upper_limit: The upper_limit of this Calibration.  # noqa: E501
        :type: float
        """

        self._upper_limit = upper_limit

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

        The lower value authorized  # noqa: E501

        :return: The lower_limit of this Calibration.  # noqa: E501
        :rtype: float
        """
        return self._lower_limit

    @lower_limit.setter
    def lower_limit(self, lower_limit):
        """Sets the lower_limit of this Calibration.

        The lower value authorized  # noqa: E501

        :param lower_limit: The lower_limit of this Calibration.  # noqa: E501
        :type: float
        """

        self._lower_limit = lower_limit

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

        True if the parameter is read only  # noqa: E501

        :return: The read_only of this Calibration.  # noqa: E501
        :rtype: bool
        """
        return self._read_only

    @read_only.setter
    def read_only(self, read_only):
        """Sets the read_only of this Calibration.

        True if the parameter is read only  # noqa: E501

        :param read_only: The read_only of this Calibration.  # noqa: E501
        :type: bool
        """

        self._read_only = read_only

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

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