# coding: utf-8

"""
    SparkWorks Core (CaRGO) API

    Access Interface for the SparkWorks IoT Data Analytics Platform  # noqa: E501

    OpenAPI spec version: 2.0.0
    Contact: info@sparkworks.net
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class FoodDiaryDTO(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',
        'user': 'str',
        'local_time': 'datetime',
        'meal_type': 'str',
        'order': 'int',
        'product_code': 'int',
        'product_name': 'str',
        'measure_code': 'int',
        'measure_name': 'str',
        'measure_count': 'int',
        'measure_unit': 'str',
        'measure_unit_count': 'float',
        'kilocalories': 'float',
        'carbohydrates': 'float',
        'food_db_version': 'int',
        'created_time': 'int',
        'created_time_zone': 'FoodDiaryDTOCreatedTimeZone',
        'extra': 'str'
    }

    attribute_map = {
        'id': 'id',
        'user': 'user',
        'local_time': 'localTime',
        'meal_type': 'mealType',
        'order': 'order',
        'product_code': 'productCode',
        'product_name': 'productName',
        'measure_code': 'measureCode',
        'measure_name': 'measureName',
        'measure_count': 'measureCount',
        'measure_unit': 'measureUnit',
        'measure_unit_count': 'measureUnitCount',
        'kilocalories': 'kilocalories',
        'carbohydrates': 'carbohydrates',
        'food_db_version': 'foodDbVersion',
        'created_time': 'createdTime',
        'created_time_zone': 'createdTimeZone',
        'extra': 'extra'
    }

    def __init__(self, id=None, user=None, local_time=None, meal_type=None, order=None, product_code=None, product_name=None, measure_code=None, measure_name=None, measure_count=None, measure_unit=None, measure_unit_count=None, kilocalories=None, carbohydrates=None, food_db_version=None, created_time=None, created_time_zone=None, extra=None):  # noqa: E501
        """FoodDiaryDTO - a model defined in Swagger"""  # noqa: E501
        self._id = None
        self._user = None
        self._local_time = None
        self._meal_type = None
        self._order = None
        self._product_code = None
        self._product_name = None
        self._measure_code = None
        self._measure_name = None
        self._measure_count = None
        self._measure_unit = None
        self._measure_unit_count = None
        self._kilocalories = None
        self._carbohydrates = None
        self._food_db_version = None
        self._created_time = None
        self._created_time_zone = None
        self._extra = None
        self.discriminator = None
        if id is not None:
            self.id = id
        if user is not None:
            self.user = user
        if local_time is not None:
            self.local_time = local_time
        if meal_type is not None:
            self.meal_type = meal_type
        if order is not None:
            self.order = order
        if product_code is not None:
            self.product_code = product_code
        if product_name is not None:
            self.product_name = product_name
        if measure_code is not None:
            self.measure_code = measure_code
        if measure_name is not None:
            self.measure_name = measure_name
        if measure_count is not None:
            self.measure_count = measure_count
        if measure_unit is not None:
            self.measure_unit = measure_unit
        if measure_unit_count is not None:
            self.measure_unit_count = measure_unit_count
        if kilocalories is not None:
            self.kilocalories = kilocalories
        if carbohydrates is not None:
            self.carbohydrates = carbohydrates
        if food_db_version is not None:
            self.food_db_version = food_db_version
        if created_time is not None:
            self.created_time = created_time
        if created_time_zone is not None:
            self.created_time_zone = created_time_zone
        if extra is not None:
            self.extra = extra

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


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

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


        :param id: The id of this FoodDiaryDTO.  # noqa: E501
        :type: str
        """

        self._id = id

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


        :return: The user of this FoodDiaryDTO.  # noqa: E501
        :rtype: str
        """
        return self._user

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


        :param user: The user of this FoodDiaryDTO.  # noqa: E501
        :type: str
        """

        self._user = user

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


        :return: The local_time of this FoodDiaryDTO.  # noqa: E501
        :rtype: datetime
        """
        return self._local_time

    @local_time.setter
    def local_time(self, local_time):
        """Sets the local_time of this FoodDiaryDTO.


        :param local_time: The local_time of this FoodDiaryDTO.  # noqa: E501
        :type: datetime
        """

        self._local_time = local_time

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


        :return: The meal_type of this FoodDiaryDTO.  # noqa: E501
        :rtype: str
        """
        return self._meal_type

    @meal_type.setter
    def meal_type(self, meal_type):
        """Sets the meal_type of this FoodDiaryDTO.


        :param meal_type: The meal_type of this FoodDiaryDTO.  # noqa: E501
        :type: str
        """
        allowed_values = ["BREAKFAST", "MAIN_MEAL", "OTHER_MEAL", "SNACK_DRINK"]  # noqa: E501
        if meal_type not in allowed_values:
            raise ValueError(
                "Invalid value for `meal_type` ({0}), must be one of {1}"  # noqa: E501
                .format(meal_type, allowed_values)
            )

        self._meal_type = meal_type

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


        :return: The order of this FoodDiaryDTO.  # noqa: E501
        :rtype: int
        """
        return self._order

    @order.setter
    def order(self, order):
        """Sets the order of this FoodDiaryDTO.


        :param order: The order of this FoodDiaryDTO.  # noqa: E501
        :type: int
        """

        self._order = order

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


        :return: The product_code of this FoodDiaryDTO.  # noqa: E501
        :rtype: int
        """
        return self._product_code

    @product_code.setter
    def product_code(self, product_code):
        """Sets the product_code of this FoodDiaryDTO.


        :param product_code: The product_code of this FoodDiaryDTO.  # noqa: E501
        :type: int
        """

        self._product_code = product_code

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


        :return: The product_name of this FoodDiaryDTO.  # noqa: E501
        :rtype: str
        """
        return self._product_name

    @product_name.setter
    def product_name(self, product_name):
        """Sets the product_name of this FoodDiaryDTO.


        :param product_name: The product_name of this FoodDiaryDTO.  # noqa: E501
        :type: str
        """

        self._product_name = product_name

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


        :return: The measure_code of this FoodDiaryDTO.  # noqa: E501
        :rtype: int
        """
        return self._measure_code

    @measure_code.setter
    def measure_code(self, measure_code):
        """Sets the measure_code of this FoodDiaryDTO.


        :param measure_code: The measure_code of this FoodDiaryDTO.  # noqa: E501
        :type: int
        """

        self._measure_code = measure_code

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


        :return: The measure_name of this FoodDiaryDTO.  # noqa: E501
        :rtype: str
        """
        return self._measure_name

    @measure_name.setter
    def measure_name(self, measure_name):
        """Sets the measure_name of this FoodDiaryDTO.


        :param measure_name: The measure_name of this FoodDiaryDTO.  # noqa: E501
        :type: str
        """

        self._measure_name = measure_name

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


        :return: The measure_count of this FoodDiaryDTO.  # noqa: E501
        :rtype: int
        """
        return self._measure_count

    @measure_count.setter
    def measure_count(self, measure_count):
        """Sets the measure_count of this FoodDiaryDTO.


        :param measure_count: The measure_count of this FoodDiaryDTO.  # noqa: E501
        :type: int
        """

        self._measure_count = measure_count

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


        :return: The measure_unit of this FoodDiaryDTO.  # noqa: E501
        :rtype: str
        """
        return self._measure_unit

    @measure_unit.setter
    def measure_unit(self, measure_unit):
        """Sets the measure_unit of this FoodDiaryDTO.


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

        self._measure_unit = measure_unit

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


        :return: The measure_unit_count of this FoodDiaryDTO.  # noqa: E501
        :rtype: float
        """
        return self._measure_unit_count

    @measure_unit_count.setter
    def measure_unit_count(self, measure_unit_count):
        """Sets the measure_unit_count of this FoodDiaryDTO.


        :param measure_unit_count: The measure_unit_count of this FoodDiaryDTO.  # noqa: E501
        :type: float
        """

        self._measure_unit_count = measure_unit_count

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


        :return: The kilocalories of this FoodDiaryDTO.  # noqa: E501
        :rtype: float
        """
        return self._kilocalories

    @kilocalories.setter
    def kilocalories(self, kilocalories):
        """Sets the kilocalories of this FoodDiaryDTO.


        :param kilocalories: The kilocalories of this FoodDiaryDTO.  # noqa: E501
        :type: float
        """

        self._kilocalories = kilocalories

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


        :return: The carbohydrates of this FoodDiaryDTO.  # noqa: E501
        :rtype: float
        """
        return self._carbohydrates

    @carbohydrates.setter
    def carbohydrates(self, carbohydrates):
        """Sets the carbohydrates of this FoodDiaryDTO.


        :param carbohydrates: The carbohydrates of this FoodDiaryDTO.  # noqa: E501
        :type: float
        """

        self._carbohydrates = carbohydrates

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


        :return: The food_db_version of this FoodDiaryDTO.  # noqa: E501
        :rtype: int
        """
        return self._food_db_version

    @food_db_version.setter
    def food_db_version(self, food_db_version):
        """Sets the food_db_version of this FoodDiaryDTO.


        :param food_db_version: The food_db_version of this FoodDiaryDTO.  # noqa: E501
        :type: int
        """

        self._food_db_version = food_db_version

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


        :return: The created_time of this FoodDiaryDTO.  # noqa: E501
        :rtype: int
        """
        return self._created_time

    @created_time.setter
    def created_time(self, created_time):
        """Sets the created_time of this FoodDiaryDTO.


        :param created_time: The created_time of this FoodDiaryDTO.  # noqa: E501
        :type: int
        """

        self._created_time = created_time

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


        :return: The created_time_zone of this FoodDiaryDTO.  # noqa: E501
        :rtype: FoodDiaryDTOCreatedTimeZone
        """
        return self._created_time_zone

    @created_time_zone.setter
    def created_time_zone(self, created_time_zone):
        """Sets the created_time_zone of this FoodDiaryDTO.


        :param created_time_zone: The created_time_zone of this FoodDiaryDTO.  # noqa: E501
        :type: FoodDiaryDTOCreatedTimeZone
        """

        self._created_time_zone = created_time_zone

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


        :return: The extra of this FoodDiaryDTO.  # noqa: E501
        :rtype: str
        """
        return self._extra

    @extra.setter
    def extra(self, extra):
        """Sets the extra of this FoodDiaryDTO.


        :param extra: The extra of this FoodDiaryDTO.  # noqa: E501
        :type: str
        """

        self._extra = extra

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

        return self.__dict__ == other.__dict__

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