# coding: utf-8

"""
    WakaTime API

    REST API for accessing your WakaTime coding activity stats. - Uses GET for retrieval, POST/PUT/PATCH for modification. - All requests must use HTTPS. - Responses are JSON objects. Data is in the `data` key, errors in `error` or `errors`. - Refer to WakaTime usage guidelines when using the trademark or logo.   # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class Range(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 = {
        'start': 'datetime',
        'end': 'datetime',
        'start_date': 'date',
        'end_date': 'date',
        'start_text': 'str',
        'end_text': 'str',
        '_date': 'date',
        'text': 'str',
        'timezone': 'str',
        'name': 'str'
    }

    attribute_map = {
        'start': 'start',
        'end': 'end',
        'start_date': 'start_date',
        'end_date': 'end_date',
        'start_text': 'start_text',
        'end_text': 'end_text',
        '_date': 'date',
        'text': 'text',
        'timezone': 'timezone',
        'name': 'name'
    }

    def __init__(self, start=None, end=None, start_date=None, end_date=None, start_text=None, end_text=None, _date=None, text=None, timezone=None, name=None):  # noqa: E501
        """Range - a model defined in Swagger"""  # noqa: E501
        self._start = None
        self._end = None
        self._start_date = None
        self._end_date = None
        self._start_text = None
        self._end_text = None
        self.__date = None
        self._text = None
        self._timezone = None
        self._name = None
        self.discriminator = None
        if start is not None:
            self.start = start
        if end is not None:
            self.end = end
        if start_date is not None:
            self.start_date = start_date
        if end_date is not None:
            self.end_date = end_date
        if start_text is not None:
            self.start_text = start_text
        if end_text is not None:
            self.end_text = end_text
        if _date is not None:
            self._date = _date
        if text is not None:
            self.text = text
        if timezone is not None:
            self.timezone = timezone
        if name is not None:
            self.name = name

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

        Start of the time range as ISO 8601 UTC datetime.  # noqa: E501

        :return: The start of this Range.  # noqa: E501
        :rtype: datetime
        """
        return self._start

    @start.setter
    def start(self, start):
        """Sets the start of this Range.

        Start of the time range as ISO 8601 UTC datetime.  # noqa: E501

        :param start: The start of this Range.  # noqa: E501
        :type: datetime
        """

        self._start = start

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

        End of the time range as ISO 8601 UTC datetime.  # noqa: E501

        :return: The end of this Range.  # noqa: E501
        :rtype: datetime
        """
        return self._end

    @end.setter
    def end(self, end):
        """Sets the end of this Range.

        End of the time range as ISO 8601 UTC datetime.  # noqa: E501

        :param end: The end of this Range.  # noqa: E501
        :type: datetime
        """

        self._end = end

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

        Start date as Date string in YEAR-MONTH-DAY format.  # noqa: E501

        :return: The start_date of this Range.  # noqa: E501
        :rtype: date
        """
        return self._start_date

    @start_date.setter
    def start_date(self, start_date):
        """Sets the start_date of this Range.

        Start date as Date string in YEAR-MONTH-DAY format.  # noqa: E501

        :param start_date: The start_date of this Range.  # noqa: E501
        :type: date
        """

        self._start_date = start_date

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

        End date as Date string in YEAR-MONTH-DAY format.  # noqa: E501

        :return: The end_date of this Range.  # noqa: E501
        :rtype: date
        """
        return self._end_date

    @end_date.setter
    def end_date(self, end_date):
        """Sets the end_date of this Range.

        End date as Date string in YEAR-MONTH-DAY format.  # noqa: E501

        :param end_date: The end_date of this Range.  # noqa: E501
        :type: date
        """

        self._end_date = end_date

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

        Start of range in human-readable format.  # noqa: E501

        :return: The start_text of this Range.  # noqa: E501
        :rtype: str
        """
        return self._start_text

    @start_text.setter
    def start_text(self, start_text):
        """Sets the start_text of this Range.

        Start of range in human-readable format.  # noqa: E501

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

        self._start_text = start_text

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

        End of range in human-readable format.  # noqa: E501

        :return: The end_text of this Range.  # noqa: E501
        :rtype: str
        """
        return self._end_text

    @end_text.setter
    def end_text(self, end_text):
        """Sets the end_text of this Range.

        End of range in human-readable format.  # noqa: E501

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

        self._end_text = end_text

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

        The specific date for this data point (e.g., in summaries, goals chart).  # noqa: E501

        :return: The _date of this Range.  # noqa: E501
        :rtype: date
        """
        return self.__date

    @_date.setter
    def _date(self, _date):
        """Sets the _date of this Range.

        The specific date for this data point (e.g., in summaries, goals chart).  # noqa: E501

        :param _date: The _date of this Range.  # noqa: E501
        :type: date
        """

        self.__date = _date

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

        The time range in human-readable format.  # noqa: E501

        :return: The text of this Range.  # noqa: E501
        :rtype: str
        """
        return self._text

    @text.setter
    def text(self, text):
        """Sets the text of this Range.

        The time range in human-readable format.  # noqa: E501

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

        self._text = text

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

        Timezone used in Olson Country/Region format (e.g., \"America/Los_Angeles\").  # noqa: E501

        :return: The timezone of this Range.  # noqa: E501
        :rtype: str
        """
        return self._timezone

    @timezone.setter
    def timezone(self, timezone):
        """Sets the timezone of this Range.

        Timezone used in Olson Country/Region format (e.g., \"America/Los_Angeles\").  # noqa: E501

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

        self._timezone = timezone

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

        Name of the range (e.g., \"last_7_days\").  # noqa: E501

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

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

        Name of the range (e.g., \"last_7_days\").  # noqa: E501

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

        self._name = name

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

        return self.__dict__ == other.__dict__

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