# 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 SleepDataDTO(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 = {
        'log_id': 'str',
        'type': 'str',
        'date_of_sleep': 'str',
        'start_time': 'datetime',
        'end_time': 'datetime',
        'duration': 'int',
        'efficiency': 'int',
        'levels': 'SleepLevelsDTO',
        'minutes_after_wakeup': 'int',
        'minutes_asleep': 'int',
        'minutes_awake': 'int',
        'minutes_to_fall_asleep': 'int',
        'time_in_bed': 'int',
        'info_code': 'int',
        'main_sleep': 'bool',
        'is_main_sleep': 'bool'
    }

    attribute_map = {
        'log_id': 'logId',
        'type': 'type',
        'date_of_sleep': 'dateOfSleep',
        'start_time': 'startTime',
        'end_time': 'endTime',
        'duration': 'duration',
        'efficiency': 'efficiency',
        'levels': 'levels',
        'minutes_after_wakeup': 'minutesAfterWakeup',
        'minutes_asleep': 'minutesAsleep',
        'minutes_awake': 'minutesAwake',
        'minutes_to_fall_asleep': 'minutesToFallAsleep',
        'time_in_bed': 'timeInBed',
        'info_code': 'infoCode',
        'main_sleep': 'mainSleep',
        'is_main_sleep': 'isMainSleep'
    }

    def __init__(self, log_id=None, type=None, date_of_sleep=None, start_time=None, end_time=None, duration=None, efficiency=None, levels=None, minutes_after_wakeup=None, minutes_asleep=None, minutes_awake=None, minutes_to_fall_asleep=None, time_in_bed=None, info_code=None, main_sleep=None, is_main_sleep=None):  # noqa: E501
        """SleepDataDTO - a model defined in Swagger"""  # noqa: E501
        self._log_id = None
        self._type = None
        self._date_of_sleep = None
        self._start_time = None
        self._end_time = None
        self._duration = None
        self._efficiency = None
        self._levels = None
        self._minutes_after_wakeup = None
        self._minutes_asleep = None
        self._minutes_awake = None
        self._minutes_to_fall_asleep = None
        self._time_in_bed = None
        self._info_code = None
        self._main_sleep = None
        self._is_main_sleep = None
        self.discriminator = None
        if log_id is not None:
            self.log_id = log_id
        if type is not None:
            self.type = type
        if date_of_sleep is not None:
            self.date_of_sleep = date_of_sleep
        if start_time is not None:
            self.start_time = start_time
        if end_time is not None:
            self.end_time = end_time
        if duration is not None:
            self.duration = duration
        if efficiency is not None:
            self.efficiency = efficiency
        if levels is not None:
            self.levels = levels
        if minutes_after_wakeup is not None:
            self.minutes_after_wakeup = minutes_after_wakeup
        if minutes_asleep is not None:
            self.minutes_asleep = minutes_asleep
        if minutes_awake is not None:
            self.minutes_awake = minutes_awake
        if minutes_to_fall_asleep is not None:
            self.minutes_to_fall_asleep = minutes_to_fall_asleep
        if time_in_bed is not None:
            self.time_in_bed = time_in_bed
        if info_code is not None:
            self.info_code = info_code
        if main_sleep is not None:
            self.main_sleep = main_sleep
        if is_main_sleep is not None:
            self.is_main_sleep = is_main_sleep

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


        :return: The log_id of this SleepDataDTO.  # noqa: E501
        :rtype: str
        """
        return self._log_id

    @log_id.setter
    def log_id(self, log_id):
        """Sets the log_id of this SleepDataDTO.


        :param log_id: The log_id of this SleepDataDTO.  # noqa: E501
        :type: str
        """

        self._log_id = log_id

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


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

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


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

        self._type = type

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


        :return: The date_of_sleep of this SleepDataDTO.  # noqa: E501
        :rtype: str
        """
        return self._date_of_sleep

    @date_of_sleep.setter
    def date_of_sleep(self, date_of_sleep):
        """Sets the date_of_sleep of this SleepDataDTO.


        :param date_of_sleep: The date_of_sleep of this SleepDataDTO.  # noqa: E501
        :type: str
        """

        self._date_of_sleep = date_of_sleep

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


        :return: The start_time of this SleepDataDTO.  # noqa: E501
        :rtype: datetime
        """
        return self._start_time

    @start_time.setter
    def start_time(self, start_time):
        """Sets the start_time of this SleepDataDTO.


        :param start_time: The start_time of this SleepDataDTO.  # noqa: E501
        :type: datetime
        """

        self._start_time = start_time

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


        :return: The end_time of this SleepDataDTO.  # noqa: E501
        :rtype: datetime
        """
        return self._end_time

    @end_time.setter
    def end_time(self, end_time):
        """Sets the end_time of this SleepDataDTO.


        :param end_time: The end_time of this SleepDataDTO.  # noqa: E501
        :type: datetime
        """

        self._end_time = end_time

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


        :return: The duration of this SleepDataDTO.  # noqa: E501
        :rtype: int
        """
        return self._duration

    @duration.setter
    def duration(self, duration):
        """Sets the duration of this SleepDataDTO.


        :param duration: The duration of this SleepDataDTO.  # noqa: E501
        :type: int
        """

        self._duration = duration

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


        :return: The efficiency of this SleepDataDTO.  # noqa: E501
        :rtype: int
        """
        return self._efficiency

    @efficiency.setter
    def efficiency(self, efficiency):
        """Sets the efficiency of this SleepDataDTO.


        :param efficiency: The efficiency of this SleepDataDTO.  # noqa: E501
        :type: int
        """

        self._efficiency = efficiency

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


        :return: The levels of this SleepDataDTO.  # noqa: E501
        :rtype: SleepLevelsDTO
        """
        return self._levels

    @levels.setter
    def levels(self, levels):
        """Sets the levels of this SleepDataDTO.


        :param levels: The levels of this SleepDataDTO.  # noqa: E501
        :type: SleepLevelsDTO
        """

        self._levels = levels

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


        :return: The minutes_after_wakeup of this SleepDataDTO.  # noqa: E501
        :rtype: int
        """
        return self._minutes_after_wakeup

    @minutes_after_wakeup.setter
    def minutes_after_wakeup(self, minutes_after_wakeup):
        """Sets the minutes_after_wakeup of this SleepDataDTO.


        :param minutes_after_wakeup: The minutes_after_wakeup of this SleepDataDTO.  # noqa: E501
        :type: int
        """

        self._minutes_after_wakeup = minutes_after_wakeup

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


        :return: The minutes_asleep of this SleepDataDTO.  # noqa: E501
        :rtype: int
        """
        return self._minutes_asleep

    @minutes_asleep.setter
    def minutes_asleep(self, minutes_asleep):
        """Sets the minutes_asleep of this SleepDataDTO.


        :param minutes_asleep: The minutes_asleep of this SleepDataDTO.  # noqa: E501
        :type: int
        """

        self._minutes_asleep = minutes_asleep

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


        :return: The minutes_awake of this SleepDataDTO.  # noqa: E501
        :rtype: int
        """
        return self._minutes_awake

    @minutes_awake.setter
    def minutes_awake(self, minutes_awake):
        """Sets the minutes_awake of this SleepDataDTO.


        :param minutes_awake: The minutes_awake of this SleepDataDTO.  # noqa: E501
        :type: int
        """

        self._minutes_awake = minutes_awake

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


        :return: The minutes_to_fall_asleep of this SleepDataDTO.  # noqa: E501
        :rtype: int
        """
        return self._minutes_to_fall_asleep

    @minutes_to_fall_asleep.setter
    def minutes_to_fall_asleep(self, minutes_to_fall_asleep):
        """Sets the minutes_to_fall_asleep of this SleepDataDTO.


        :param minutes_to_fall_asleep: The minutes_to_fall_asleep of this SleepDataDTO.  # noqa: E501
        :type: int
        """

        self._minutes_to_fall_asleep = minutes_to_fall_asleep

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


        :return: The time_in_bed of this SleepDataDTO.  # noqa: E501
        :rtype: int
        """
        return self._time_in_bed

    @time_in_bed.setter
    def time_in_bed(self, time_in_bed):
        """Sets the time_in_bed of this SleepDataDTO.


        :param time_in_bed: The time_in_bed of this SleepDataDTO.  # noqa: E501
        :type: int
        """

        self._time_in_bed = time_in_bed

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


        :return: The info_code of this SleepDataDTO.  # noqa: E501
        :rtype: int
        """
        return self._info_code

    @info_code.setter
    def info_code(self, info_code):
        """Sets the info_code of this SleepDataDTO.


        :param info_code: The info_code of this SleepDataDTO.  # noqa: E501
        :type: int
        """

        self._info_code = info_code

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


        :return: The main_sleep of this SleepDataDTO.  # noqa: E501
        :rtype: bool
        """
        return self._main_sleep

    @main_sleep.setter
    def main_sleep(self, main_sleep):
        """Sets the main_sleep of this SleepDataDTO.


        :param main_sleep: The main_sleep of this SleepDataDTO.  # noqa: E501
        :type: bool
        """

        self._main_sleep = main_sleep

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


        :return: The is_main_sleep of this SleepDataDTO.  # noqa: E501
        :rtype: bool
        """
        return self._is_main_sleep

    @is_main_sleep.setter
    def is_main_sleep(self, is_main_sleep):
        """Sets the is_main_sleep of this SleepDataDTO.


        :param is_main_sleep: The is_main_sleep of this SleepDataDTO.  # noqa: E501
        :type: bool
        """

        self._is_main_sleep = is_main_sleep

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

        return self.__dict__ == other.__dict__

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