# 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 Goal(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 = {
        'average_status': 'str',
        'chart_data': 'list[GoalChartData]',
        'created_at': 'datetime',
        'cumulative_status': 'str',
        'custom_title': 'str',
        'delta': 'str',
        'editors': 'list[str]',
        'id': 'str',
        'ignore_days': 'list[str]',
        'ignore_zero_days': 'bool',
        'improve_by_percent': 'float',
        'is_current_user_owner': 'bool',
        'is_enabled': 'bool',
        'is_inverse': 'bool',
        'is_snoozed': 'bool',
        'is_tweeting': 'bool',
        'languages': 'list[str]',
        'modified_at': 'datetime',
        'owner': 'UserSummary',
        'projects': 'list[str]',
        'range_text': 'str',
        'seconds': 'int',
        'shared_with': 'list[GoalSharedWith]',
        'snooze_until': 'datetime',
        'status': 'str',
        'status_percent_calculated': 'int',
        'subscribers': 'list[GoalSubscriber]',
        'title': 'str',
        'type': 'str'
    }

    attribute_map = {
        'average_status': 'average_status',
        'chart_data': 'chart_data',
        'created_at': 'created_at',
        'cumulative_status': 'cumulative_status',
        'custom_title': 'custom_title',
        'delta': 'delta',
        'editors': 'editors',
        'id': 'id',
        'ignore_days': 'ignore_days',
        'ignore_zero_days': 'ignore_zero_days',
        'improve_by_percent': 'improve_by_percent',
        'is_current_user_owner': 'is_current_user_owner',
        'is_enabled': 'is_enabled',
        'is_inverse': 'is_inverse',
        'is_snoozed': 'is_snoozed',
        'is_tweeting': 'is_tweeting',
        'languages': 'languages',
        'modified_at': 'modified_at',
        'owner': 'owner',
        'projects': 'projects',
        'range_text': 'range_text',
        'seconds': 'seconds',
        'shared_with': 'shared_with',
        'snooze_until': 'snooze_until',
        'status': 'status',
        'status_percent_calculated': 'status_percent_calculated',
        'subscribers': 'subscribers',
        'title': 'title',
        'type': 'type'
    }

    def __init__(self, average_status=None, chart_data=None, created_at=None, cumulative_status=None, custom_title=None, delta=None, editors=None, id=None, ignore_days=None, ignore_zero_days=None, improve_by_percent=None, is_current_user_owner=None, is_enabled=None, is_inverse=None, is_snoozed=None, is_tweeting=None, languages=None, modified_at=None, owner=None, projects=None, range_text=None, seconds=None, shared_with=None, snooze_until=None, status=None, status_percent_calculated=None, subscribers=None, title=None, type=None):  # noqa: E501
        """Goal - a model defined in Swagger"""  # noqa: E501
        self._average_status = None
        self._chart_data = None
        self._created_at = None
        self._cumulative_status = None
        self._custom_title = None
        self._delta = None
        self._editors = None
        self._id = None
        self._ignore_days = None
        self._ignore_zero_days = None
        self._improve_by_percent = None
        self._is_current_user_owner = None
        self._is_enabled = None
        self._is_inverse = None
        self._is_snoozed = None
        self._is_tweeting = None
        self._languages = None
        self._modified_at = None
        self._owner = None
        self._projects = None
        self._range_text = None
        self._seconds = None
        self._shared_with = None
        self._snooze_until = None
        self._status = None
        self._status_percent_calculated = None
        self._subscribers = None
        self._title = None
        self._type = None
        self.discriminator = None
        if average_status is not None:
            self.average_status = average_status
        if chart_data is not None:
            self.chart_data = chart_data
        if created_at is not None:
            self.created_at = created_at
        if cumulative_status is not None:
            self.cumulative_status = cumulative_status
        if custom_title is not None:
            self.custom_title = custom_title
        if delta is not None:
            self.delta = delta
        if editors is not None:
            self.editors = editors
        if id is not None:
            self.id = id
        if ignore_days is not None:
            self.ignore_days = ignore_days
        if ignore_zero_days is not None:
            self.ignore_zero_days = ignore_zero_days
        if improve_by_percent is not None:
            self.improve_by_percent = improve_by_percent
        if is_current_user_owner is not None:
            self.is_current_user_owner = is_current_user_owner
        if is_enabled is not None:
            self.is_enabled = is_enabled
        if is_inverse is not None:
            self.is_inverse = is_inverse
        if is_snoozed is not None:
            self.is_snoozed = is_snoozed
        if is_tweeting is not None:
            self.is_tweeting = is_tweeting
        if languages is not None:
            self.languages = languages
        if modified_at is not None:
            self.modified_at = modified_at
        if owner is not None:
            self.owner = owner
        if projects is not None:
            self.projects = projects
        if range_text is not None:
            self.range_text = range_text
        if seconds is not None:
            self.seconds = seconds
        if shared_with is not None:
            self.shared_with = shared_with
        if snooze_until is not None:
            self.snooze_until = snooze_until
        if status is not None:
            self.status = status
        if status_percent_calculated is not None:
            self.status_percent_calculated = status_percent_calculated
        if subscribers is not None:
            self.subscribers = subscribers
        if title is not None:
            self.title = title
        if type is not None:
            self.type = type

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


        :return: The average_status of this Goal.  # noqa: E501
        :rtype: str
        """
        return self._average_status

    @average_status.setter
    def average_status(self, average_status):
        """Sets the average_status of this Goal.


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

        self._average_status = average_status

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


        :return: The chart_data of this Goal.  # noqa: E501
        :rtype: list[GoalChartData]
        """
        return self._chart_data

    @chart_data.setter
    def chart_data(self, chart_data):
        """Sets the chart_data of this Goal.


        :param chart_data: The chart_data of this Goal.  # noqa: E501
        :type: list[GoalChartData]
        """

        self._chart_data = chart_data

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


        :return: The created_at of this Goal.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this Goal.


        :param created_at: The created_at of this Goal.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

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


        :return: The cumulative_status of this Goal.  # noqa: E501
        :rtype: str
        """
        return self._cumulative_status

    @cumulative_status.setter
    def cumulative_status(self, cumulative_status):
        """Sets the cumulative_status of this Goal.


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

        self._cumulative_status = cumulative_status

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


        :return: The custom_title of this Goal.  # noqa: E501
        :rtype: str
        """
        return self._custom_title

    @custom_title.setter
    def custom_title(self, custom_title):
        """Sets the custom_title of this Goal.


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

        self._custom_title = custom_title

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


        :return: The delta of this Goal.  # noqa: E501
        :rtype: str
        """
        return self._delta

    @delta.setter
    def delta(self, delta):
        """Sets the delta of this Goal.


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

        self._delta = delta

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


        :return: The editors of this Goal.  # noqa: E501
        :rtype: list[str]
        """
        return self._editors

    @editors.setter
    def editors(self, editors):
        """Sets the editors of this Goal.


        :param editors: The editors of this Goal.  # noqa: E501
        :type: list[str]
        """

        self._editors = editors

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


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

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


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

        self._id = id

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


        :return: The ignore_days of this Goal.  # noqa: E501
        :rtype: list[str]
        """
        return self._ignore_days

    @ignore_days.setter
    def ignore_days(self, ignore_days):
        """Sets the ignore_days of this Goal.


        :param ignore_days: The ignore_days of this Goal.  # noqa: E501
        :type: list[str]
        """

        self._ignore_days = ignore_days

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


        :return: The ignore_zero_days of this Goal.  # noqa: E501
        :rtype: bool
        """
        return self._ignore_zero_days

    @ignore_zero_days.setter
    def ignore_zero_days(self, ignore_zero_days):
        """Sets the ignore_zero_days of this Goal.


        :param ignore_zero_days: The ignore_zero_days of this Goal.  # noqa: E501
        :type: bool
        """

        self._ignore_zero_days = ignore_zero_days

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


        :return: The improve_by_percent of this Goal.  # noqa: E501
        :rtype: float
        """
        return self._improve_by_percent

    @improve_by_percent.setter
    def improve_by_percent(self, improve_by_percent):
        """Sets the improve_by_percent of this Goal.


        :param improve_by_percent: The improve_by_percent of this Goal.  # noqa: E501
        :type: float
        """

        self._improve_by_percent = improve_by_percent

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


        :return: The is_current_user_owner of this Goal.  # noqa: E501
        :rtype: bool
        """
        return self._is_current_user_owner

    @is_current_user_owner.setter
    def is_current_user_owner(self, is_current_user_owner):
        """Sets the is_current_user_owner of this Goal.


        :param is_current_user_owner: The is_current_user_owner of this Goal.  # noqa: E501
        :type: bool
        """

        self._is_current_user_owner = is_current_user_owner

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


        :return: The is_enabled of this Goal.  # noqa: E501
        :rtype: bool
        """
        return self._is_enabled

    @is_enabled.setter
    def is_enabled(self, is_enabled):
        """Sets the is_enabled of this Goal.


        :param is_enabled: The is_enabled of this Goal.  # noqa: E501
        :type: bool
        """

        self._is_enabled = is_enabled

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


        :return: The is_inverse of this Goal.  # noqa: E501
        :rtype: bool
        """
        return self._is_inverse

    @is_inverse.setter
    def is_inverse(self, is_inverse):
        """Sets the is_inverse of this Goal.


        :param is_inverse: The is_inverse of this Goal.  # noqa: E501
        :type: bool
        """

        self._is_inverse = is_inverse

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


        :return: The is_snoozed of this Goal.  # noqa: E501
        :rtype: bool
        """
        return self._is_snoozed

    @is_snoozed.setter
    def is_snoozed(self, is_snoozed):
        """Sets the is_snoozed of this Goal.


        :param is_snoozed: The is_snoozed of this Goal.  # noqa: E501
        :type: bool
        """

        self._is_snoozed = is_snoozed

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


        :return: The is_tweeting of this Goal.  # noqa: E501
        :rtype: bool
        """
        return self._is_tweeting

    @is_tweeting.setter
    def is_tweeting(self, is_tweeting):
        """Sets the is_tweeting of this Goal.


        :param is_tweeting: The is_tweeting of this Goal.  # noqa: E501
        :type: bool
        """

        self._is_tweeting = is_tweeting

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


        :return: The languages of this Goal.  # noqa: E501
        :rtype: list[str]
        """
        return self._languages

    @languages.setter
    def languages(self, languages):
        """Sets the languages of this Goal.


        :param languages: The languages of this Goal.  # noqa: E501
        :type: list[str]
        """

        self._languages = languages

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


        :return: The modified_at of this Goal.  # noqa: E501
        :rtype: datetime
        """
        return self._modified_at

    @modified_at.setter
    def modified_at(self, modified_at):
        """Sets the modified_at of this Goal.


        :param modified_at: The modified_at of this Goal.  # noqa: E501
        :type: datetime
        """

        self._modified_at = modified_at

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


        :return: The owner of this Goal.  # noqa: E501
        :rtype: UserSummary
        """
        return self._owner

    @owner.setter
    def owner(self, owner):
        """Sets the owner of this Goal.


        :param owner: The owner of this Goal.  # noqa: E501
        :type: UserSummary
        """

        self._owner = owner

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


        :return: The projects of this Goal.  # noqa: E501
        :rtype: list[str]
        """
        return self._projects

    @projects.setter
    def projects(self, projects):
        """Sets the projects of this Goal.


        :param projects: The projects of this Goal.  # noqa: E501
        :type: list[str]
        """

        self._projects = projects

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


        :return: The range_text of this Goal.  # noqa: E501
        :rtype: str
        """
        return self._range_text

    @range_text.setter
    def range_text(self, range_text):
        """Sets the range_text of this Goal.


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

        self._range_text = range_text

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


        :return: The seconds of this Goal.  # noqa: E501
        :rtype: int
        """
        return self._seconds

    @seconds.setter
    def seconds(self, seconds):
        """Sets the seconds of this Goal.


        :param seconds: The seconds of this Goal.  # noqa: E501
        :type: int
        """

        self._seconds = seconds

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


        :return: The shared_with of this Goal.  # noqa: E501
        :rtype: list[GoalSharedWith]
        """
        return self._shared_with

    @shared_with.setter
    def shared_with(self, shared_with):
        """Sets the shared_with of this Goal.


        :param shared_with: The shared_with of this Goal.  # noqa: E501
        :type: list[GoalSharedWith]
        """

        self._shared_with = shared_with

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


        :return: The snooze_until of this Goal.  # noqa: E501
        :rtype: datetime
        """
        return self._snooze_until

    @snooze_until.setter
    def snooze_until(self, snooze_until):
        """Sets the snooze_until of this Goal.


        :param snooze_until: The snooze_until of this Goal.  # noqa: E501
        :type: datetime
        """

        self._snooze_until = snooze_until

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


        :return: The status of this Goal.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this Goal.


        :param status: The status of this Goal.  # noqa: E501
        :type: str
        """
        allowed_values = ["success", "fail", "ignored", "pending"]  # noqa: E501
        if status not in allowed_values:
            raise ValueError(
                "Invalid value for `status` ({0}), must be one of {1}"  # noqa: E501
                .format(status, allowed_values)
            )

        self._status = status

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


        :return: The status_percent_calculated of this Goal.  # noqa: E501
        :rtype: int
        """
        return self._status_percent_calculated

    @status_percent_calculated.setter
    def status_percent_calculated(self, status_percent_calculated):
        """Sets the status_percent_calculated of this Goal.


        :param status_percent_calculated: The status_percent_calculated of this Goal.  # noqa: E501
        :type: int
        """

        self._status_percent_calculated = status_percent_calculated

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


        :return: The subscribers of this Goal.  # noqa: E501
        :rtype: list[GoalSubscriber]
        """
        return self._subscribers

    @subscribers.setter
    def subscribers(self, subscribers):
        """Sets the subscribers of this Goal.


        :param subscribers: The subscribers of this Goal.  # noqa: E501
        :type: list[GoalSubscriber]
        """

        self._subscribers = subscribers

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


        :return: The title of this Goal.  # noqa: E501
        :rtype: str
        """
        return self._title

    @title.setter
    def title(self, title):
        """Sets the title of this Goal.


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

        self._title = title

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


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

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


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

        self._type = type

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

        return self.__dict__ == other.__dict__

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