# coding: utf-8

"""
    XTRF Home Portal API

    XTRF Home Portal API enables you to perform operations on Projects, Quotes, Customers, Vendors etc. as a XTRF Home Portal user. <br>The documentation is generated from OpenAPI specification 3.0 available <a href=\"/home-api/openapi.json\">here</a> <br>   The API client/consumer code may be easily generated in 60+ programming languages using an open source code generator available at the time of writing this documentation at <a href='https://editor.swagger.io/'>https://editor.swagger.io/</a> Thank you for using XTRF Application Programming interface (XTRF API). By using the API you agree to the terms below. If you disagree with any of these terms, XTRF does not grant you a license to use the XTRF API. XTRF reserves the right to update and change these terms from time to time without a prior notice of API users. You can always find the most recent version of these terms here:   # noqa: E501

    OpenAPI spec version: 2.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class CalculationUnitDTO(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': 'int',
        'name': 'str',
        'active': 'bool',
        'preferred': 'bool',
        'symbol': 'str',
        'type': 'str',
        'exchange_ratio': 'float',
        'can_be_used_in_cat_analysis': 'bool',
        'cat_quantity_conversion_expression': 'str',
        'file_stats_conversion_expression': 'str',
        'time_to_quantity_conversion_expression': 'str',
        'job_type_ids': 'list[int]',
        'default': 'bool'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'active': 'active',
        'preferred': 'preferred',
        'symbol': 'symbol',
        'type': 'type',
        'exchange_ratio': 'exchangeRatio',
        'can_be_used_in_cat_analysis': 'canBeUsedInCatAnalysis',
        'cat_quantity_conversion_expression': 'catQuantityConversionExpression',
        'file_stats_conversion_expression': 'fileStatsConversionExpression',
        'time_to_quantity_conversion_expression': 'timeToQuantityConversionExpression',
        'job_type_ids': 'jobTypeIds',
        'default': 'default'
    }

    def __init__(self, id=None, name=None, active=None, preferred=None, symbol=None, type=None, exchange_ratio=None, can_be_used_in_cat_analysis=None, cat_quantity_conversion_expression=None, file_stats_conversion_expression=None, time_to_quantity_conversion_expression=None, job_type_ids=None, default=None):  # noqa: E501
        """CalculationUnitDTO - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._name = None
        self._active = None
        self._preferred = None
        self._symbol = None
        self._type = None
        self._exchange_ratio = None
        self._can_be_used_in_cat_analysis = None
        self._cat_quantity_conversion_expression = None
        self._file_stats_conversion_expression = None
        self._time_to_quantity_conversion_expression = None
        self._job_type_ids = None
        self._default = None
        self.discriminator = None
        if id is not None:
            self.id = id
        if name is not None:
            self.name = name
        if active is not None:
            self.active = active
        if preferred is not None:
            self.preferred = preferred
        if symbol is not None:
            self.symbol = symbol
        if type is not None:
            self.type = type
        if exchange_ratio is not None:
            self.exchange_ratio = exchange_ratio
        if can_be_used_in_cat_analysis is not None:
            self.can_be_used_in_cat_analysis = can_be_used_in_cat_analysis
        if cat_quantity_conversion_expression is not None:
            self.cat_quantity_conversion_expression = cat_quantity_conversion_expression
        if file_stats_conversion_expression is not None:
            self.file_stats_conversion_expression = file_stats_conversion_expression
        if time_to_quantity_conversion_expression is not None:
            self.time_to_quantity_conversion_expression = time_to_quantity_conversion_expression
        if job_type_ids is not None:
            self.job_type_ids = job_type_ids
        if default is not None:
            self.default = default

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

        internal identifier  # noqa: E501

        :return: The id of this CalculationUnitDTO.  # noqa: E501
        :rtype: int
        """
        return self._id

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

        internal identifier  # noqa: E501

        :param id: The id of this CalculationUnitDTO.  # noqa: E501
        :type: int
        """

        self._id = id

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

        localised name (formatted in the current user's locale)  # noqa: E501

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

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

        localised name (formatted in the current user's locale)  # noqa: E501

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

        self._name = name

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

        should this value be available on the XTRF selection lists  # noqa: E501

        :return: The active of this CalculationUnitDTO.  # noqa: E501
        :rtype: bool
        """
        return self._active

    @active.setter
    def active(self, active):
        """Sets the active of this CalculationUnitDTO.

        should this value be available on the XTRF selection lists  # noqa: E501

        :param active: The active of this CalculationUnitDTO.  # noqa: E501
        :type: bool
        """

        self._active = active

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

        should this value be available on the top of XTRF selection lists, in the Preferred section  # noqa: E501

        :return: The preferred of this CalculationUnitDTO.  # noqa: E501
        :rtype: bool
        """
        return self._preferred

    @preferred.setter
    def preferred(self, preferred):
        """Sets the preferred of this CalculationUnitDTO.

        should this value be available on the top of XTRF selection lists, in the Preferred section  # noqa: E501

        :param preferred: The preferred of this CalculationUnitDTO.  # noqa: E501
        :type: bool
        """

        self._preferred = preferred

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


        :return: The symbol of this CalculationUnitDTO.  # noqa: E501
        :rtype: str
        """
        return self._symbol

    @symbol.setter
    def symbol(self, symbol):
        """Sets the symbol of this CalculationUnitDTO.


        :param symbol: The symbol of this CalculationUnitDTO.  # noqa: E501
        :type: str
        """

        self._symbol = symbol

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


        :return: The type of this CalculationUnitDTO.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this CalculationUnitDTO.


        :param type: The type of this CalculationUnitDTO.  # noqa: E501
        :type: str
        """
        allowed_values = ["TIME", "VOLUME", "PERCENT"]  # noqa: E501
        if type not in allowed_values:
            raise ValueError(
                "Invalid value for `type` ({0}), must be one of {1}"  # noqa: E501
                .format(type, allowed_values)
            )

        self._type = type

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


        :return: The exchange_ratio of this CalculationUnitDTO.  # noqa: E501
        :rtype: float
        """
        return self._exchange_ratio

    @exchange_ratio.setter
    def exchange_ratio(self, exchange_ratio):
        """Sets the exchange_ratio of this CalculationUnitDTO.


        :param exchange_ratio: The exchange_ratio of this CalculationUnitDTO.  # noqa: E501
        :type: float
        """

        self._exchange_ratio = exchange_ratio

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


        :return: The can_be_used_in_cat_analysis of this CalculationUnitDTO.  # noqa: E501
        :rtype: bool
        """
        return self._can_be_used_in_cat_analysis

    @can_be_used_in_cat_analysis.setter
    def can_be_used_in_cat_analysis(self, can_be_used_in_cat_analysis):
        """Sets the can_be_used_in_cat_analysis of this CalculationUnitDTO.


        :param can_be_used_in_cat_analysis: The can_be_used_in_cat_analysis of this CalculationUnitDTO.  # noqa: E501
        :type: bool
        """

        self._can_be_used_in_cat_analysis = can_be_used_in_cat_analysis

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


        :return: The cat_quantity_conversion_expression of this CalculationUnitDTO.  # noqa: E501
        :rtype: str
        """
        return self._cat_quantity_conversion_expression

    @cat_quantity_conversion_expression.setter
    def cat_quantity_conversion_expression(self, cat_quantity_conversion_expression):
        """Sets the cat_quantity_conversion_expression of this CalculationUnitDTO.


        :param cat_quantity_conversion_expression: The cat_quantity_conversion_expression of this CalculationUnitDTO.  # noqa: E501
        :type: str
        """

        self._cat_quantity_conversion_expression = cat_quantity_conversion_expression

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


        :return: The file_stats_conversion_expression of this CalculationUnitDTO.  # noqa: E501
        :rtype: str
        """
        return self._file_stats_conversion_expression

    @file_stats_conversion_expression.setter
    def file_stats_conversion_expression(self, file_stats_conversion_expression):
        """Sets the file_stats_conversion_expression of this CalculationUnitDTO.


        :param file_stats_conversion_expression: The file_stats_conversion_expression of this CalculationUnitDTO.  # noqa: E501
        :type: str
        """

        self._file_stats_conversion_expression = file_stats_conversion_expression

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


        :return: The time_to_quantity_conversion_expression of this CalculationUnitDTO.  # noqa: E501
        :rtype: str
        """
        return self._time_to_quantity_conversion_expression

    @time_to_quantity_conversion_expression.setter
    def time_to_quantity_conversion_expression(self, time_to_quantity_conversion_expression):
        """Sets the time_to_quantity_conversion_expression of this CalculationUnitDTO.


        :param time_to_quantity_conversion_expression: The time_to_quantity_conversion_expression of this CalculationUnitDTO.  # noqa: E501
        :type: str
        """

        self._time_to_quantity_conversion_expression = time_to_quantity_conversion_expression

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


        :return: The job_type_ids of this CalculationUnitDTO.  # noqa: E501
        :rtype: list[int]
        """
        return self._job_type_ids

    @job_type_ids.setter
    def job_type_ids(self, job_type_ids):
        """Sets the job_type_ids of this CalculationUnitDTO.


        :param job_type_ids: The job_type_ids of this CalculationUnitDTO.  # noqa: E501
        :type: list[int]
        """

        self._job_type_ids = job_type_ids

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

        should this value be set by default in XTRF selection lists  # noqa: E501

        :return: The default of this CalculationUnitDTO.  # noqa: E501
        :rtype: bool
        """
        return self._default

    @default.setter
    def default(self, default):
        """Sets the default of this CalculationUnitDTO.

        should this value be set by default in XTRF selection lists  # noqa: E501

        :param default: The default of this CalculationUnitDTO.  # noqa: E501
        :type: bool
        """

        self._default = default

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

        return self.__dict__ == other.__dict__

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