# coding: utf-8

"""
    Kimai 2 - API Docs

    JSON API for the Kimai 2 time-tracking software. Read more about its usage in the [API documentation](https://www.kimai.org/documentation/rest-api.html) and then download a [Swagger file](doc.json) for import e.g. in Postman. Be aware: it is not yet considered stable and BC breaks might happen.   # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class CustomerRate(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',
        'rate': 'float',
        'internal_rate': 'float',
        'is_fixed': 'bool',
        'user': 'User'
    }

    attribute_map = {
        'id': 'id',
        'rate': 'rate',
        'internal_rate': 'internalRate',
        'is_fixed': 'isFixed',
        'user': 'user'
    }

    def __init__(self, id=None, rate=None, internal_rate=None, is_fixed=None, user=None):  # noqa: E501
        """CustomerRate - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._rate = None
        self._internal_rate = None
        self._is_fixed = None
        self._user = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if rate is not None:
            self.rate = rate
        if internal_rate is not None:
            self.internal_rate = internal_rate
        self.is_fixed = is_fixed
        if user is not None:
            self.user = user

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


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

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


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

        self._id = id

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


        :return: The rate of this CustomerRate.  # noqa: E501
        :rtype: float
        """
        return self._rate

    @rate.setter
    def rate(self, rate):
        """Sets the rate of this CustomerRate.


        :param rate: The rate of this CustomerRate.  # noqa: E501
        :type: float
        """

        self._rate = rate

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


        :return: The internal_rate of this CustomerRate.  # noqa: E501
        :rtype: float
        """
        return self._internal_rate

    @internal_rate.setter
    def internal_rate(self, internal_rate):
        """Sets the internal_rate of this CustomerRate.


        :param internal_rate: The internal_rate of this CustomerRate.  # noqa: E501
        :type: float
        """

        self._internal_rate = internal_rate

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


        :return: The is_fixed of this CustomerRate.  # noqa: E501
        :rtype: bool
        """
        return self._is_fixed

    @is_fixed.setter
    def is_fixed(self, is_fixed):
        """Sets the is_fixed of this CustomerRate.


        :param is_fixed: The is_fixed of this CustomerRate.  # noqa: E501
        :type: bool
        """
        if is_fixed is None:
            raise ValueError("Invalid value for `is_fixed`, must not be `None`")  # noqa: E501

        self._is_fixed = is_fixed

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


        :return: The user of this CustomerRate.  # noqa: E501
        :rtype: User
        """
        return self._user

    @user.setter
    def user(self, user):
        """Sets the user of this CustomerRate.


        :param user: The user of this CustomerRate.  # noqa: E501
        :type: User
        """

        self._user = user

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

        return self.__dict__ == other.__dict__

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