# coding: utf-8

"""
    Asana

    This is the interface for interacting with the [Asana Platform](https://developers.asana.com). Our API reference is generated from our [OpenAPI spec] (https://raw.githubusercontent.com/Asana/openapi/master/defs/asana_oas.yaml).  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class TaskTemplateRecipe(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 = {
        'name': 'str',
        'task_resource_subtype': 'str',
        'description': 'str',
        'html_description': 'str',
        'memberships': 'list[JobBaseNewProject]',
        'relative_start_on': 'int',
        'relative_due_on': 'int',
        'due_time': 'str',
        'dependencies': 'list[TaskTemplateRecipeDependencies]',
        'dependents': 'list[TaskTemplateRecipeDependencies]',
        'followers': 'list[CustomFieldResponsePeopleValue]',
        'attachments': 'list[TaskTemplateRecipeAttachments]',
        'subtasks': 'list[TaskTemplateRecipeDependencies]',
        'custom_fields': 'list[PortfolioResponseCustomFields]'
    }

    attribute_map = {
        'name': 'name',
        'task_resource_subtype': 'task_resource_subtype',
        'description': 'description',
        'html_description': 'html_description',
        'memberships': 'memberships',
        'relative_start_on': 'relative_start_on',
        'relative_due_on': 'relative_due_on',
        'due_time': 'due_time',
        'dependencies': 'dependencies',
        'dependents': 'dependents',
        'followers': 'followers',
        'attachments': 'attachments',
        'subtasks': 'subtasks',
        'custom_fields': 'custom_fields'
    }

    def __init__(self, name=None, task_resource_subtype=None, description=None, html_description=None, memberships=None, relative_start_on=None, relative_due_on=None, due_time=None, dependencies=None, dependents=None, followers=None, attachments=None, subtasks=None, custom_fields=None):  # noqa: E501
        """TaskTemplateRecipe - a model defined in Swagger"""  # noqa: E501
        self._name = None
        self._task_resource_subtype = None
        self._description = None
        self._html_description = None
        self._memberships = None
        self._relative_start_on = None
        self._relative_due_on = None
        self._due_time = None
        self._dependencies = None
        self._dependents = None
        self._followers = None
        self._attachments = None
        self._subtasks = None
        self._custom_fields = None
        self.discriminator = None
        if name is not None:
            self.name = name
        if task_resource_subtype is not None:
            self.task_resource_subtype = task_resource_subtype
        if description is not None:
            self.description = description
        if html_description is not None:
            self.html_description = html_description
        if memberships is not None:
            self.memberships = memberships
        if relative_start_on is not None:
            self.relative_start_on = relative_start_on
        if relative_due_on is not None:
            self.relative_due_on = relative_due_on
        if due_time is not None:
            self.due_time = due_time
        if dependencies is not None:
            self.dependencies = dependencies
        if dependents is not None:
            self.dependents = dependents
        if followers is not None:
            self.followers = followers
        if attachments is not None:
            self.attachments = attachments
        if subtasks is not None:
            self.subtasks = subtasks
        if custom_fields is not None:
            self.custom_fields = custom_fields

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

        Name of the task that will be created from this template.  # noqa: E501

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

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

        Name of the task that will be created from this template.  # noqa: E501

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

        self._name = name

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

        The subtype of the task that will be created from this template.  # noqa: E501

        :return: The task_resource_subtype of this TaskTemplateRecipe.  # noqa: E501
        :rtype: str
        """
        return self._task_resource_subtype

    @task_resource_subtype.setter
    def task_resource_subtype(self, task_resource_subtype):
        """Sets the task_resource_subtype of this TaskTemplateRecipe.

        The subtype of the task that will be created from this template.  # noqa: E501

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

        self._task_resource_subtype = task_resource_subtype

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

        Description of the task that will be created from this template.  # noqa: E501

        :return: The description of this TaskTemplateRecipe.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this TaskTemplateRecipe.

        Description of the task that will be created from this template.  # noqa: E501

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

        self._description = description

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

        HTML description of the task that will be created from this template.  # noqa: E501

        :return: The html_description of this TaskTemplateRecipe.  # noqa: E501
        :rtype: str
        """
        return self._html_description

    @html_description.setter
    def html_description(self, html_description):
        """Sets the html_description of this TaskTemplateRecipe.

        HTML description of the task that will be created from this template.  # noqa: E501

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

        self._html_description = html_description

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

        Array of projects that the task created from this template will be added to  # noqa: E501

        :return: The memberships of this TaskTemplateRecipe.  # noqa: E501
        :rtype: list[JobBaseNewProject]
        """
        return self._memberships

    @memberships.setter
    def memberships(self, memberships):
        """Sets the memberships of this TaskTemplateRecipe.

        Array of projects that the task created from this template will be added to  # noqa: E501

        :param memberships: The memberships of this TaskTemplateRecipe.  # noqa: E501
        :type: list[JobBaseNewProject]
        """

        self._memberships = memberships

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

        The number of days after the task has been instantiated on which that the task will start  # noqa: E501

        :return: The relative_start_on of this TaskTemplateRecipe.  # noqa: E501
        :rtype: int
        """
        return self._relative_start_on

    @relative_start_on.setter
    def relative_start_on(self, relative_start_on):
        """Sets the relative_start_on of this TaskTemplateRecipe.

        The number of days after the task has been instantiated on which that the task will start  # noqa: E501

        :param relative_start_on: The relative_start_on of this TaskTemplateRecipe.  # noqa: E501
        :type: int
        """

        self._relative_start_on = relative_start_on

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

        The number of days after the task has been instantiated on which that the task will be due  # noqa: E501

        :return: The relative_due_on of this TaskTemplateRecipe.  # noqa: E501
        :rtype: int
        """
        return self._relative_due_on

    @relative_due_on.setter
    def relative_due_on(self, relative_due_on):
        """Sets the relative_due_on of this TaskTemplateRecipe.

        The number of days after the task has been instantiated on which that the task will be due  # noqa: E501

        :param relative_due_on: The relative_due_on of this TaskTemplateRecipe.  # noqa: E501
        :type: int
        """

        self._relative_due_on = relative_due_on

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

        The time of day that the task will be due  # noqa: E501

        :return: The due_time of this TaskTemplateRecipe.  # noqa: E501
        :rtype: str
        """
        return self._due_time

    @due_time.setter
    def due_time(self, due_time):
        """Sets the due_time of this TaskTemplateRecipe.

        The time of day that the task will be due  # noqa: E501

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

        self._due_time = due_time

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

        Array of task templates that the task created from this template will depend on  # noqa: E501

        :return: The dependencies of this TaskTemplateRecipe.  # noqa: E501
        :rtype: list[TaskTemplateRecipeDependencies]
        """
        return self._dependencies

    @dependencies.setter
    def dependencies(self, dependencies):
        """Sets the dependencies of this TaskTemplateRecipe.

        Array of task templates that the task created from this template will depend on  # noqa: E501

        :param dependencies: The dependencies of this TaskTemplateRecipe.  # noqa: E501
        :type: list[TaskTemplateRecipeDependencies]
        """

        self._dependencies = dependencies

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

        Array of task templates that will depend on the task created from this template  # noqa: E501

        :return: The dependents of this TaskTemplateRecipe.  # noqa: E501
        :rtype: list[TaskTemplateRecipeDependencies]
        """
        return self._dependents

    @dependents.setter
    def dependents(self, dependents):
        """Sets the dependents of this TaskTemplateRecipe.

        Array of task templates that will depend on the task created from this template  # noqa: E501

        :param dependents: The dependents of this TaskTemplateRecipe.  # noqa: E501
        :type: list[TaskTemplateRecipeDependencies]
        """

        self._dependents = dependents

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

        Array of users that will be added as followers to the task created from this template  # noqa: E501

        :return: The followers of this TaskTemplateRecipe.  # noqa: E501
        :rtype: list[CustomFieldResponsePeopleValue]
        """
        return self._followers

    @followers.setter
    def followers(self, followers):
        """Sets the followers of this TaskTemplateRecipe.

        Array of users that will be added as followers to the task created from this template  # noqa: E501

        :param followers: The followers of this TaskTemplateRecipe.  # noqa: E501
        :type: list[CustomFieldResponsePeopleValue]
        """

        self._followers = followers

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

        Array of attachments that will be added to the task created from this template  # noqa: E501

        :return: The attachments of this TaskTemplateRecipe.  # noqa: E501
        :rtype: list[TaskTemplateRecipeAttachments]
        """
        return self._attachments

    @attachments.setter
    def attachments(self, attachments):
        """Sets the attachments of this TaskTemplateRecipe.

        Array of attachments that will be added to the task created from this template  # noqa: E501

        :param attachments: The attachments of this TaskTemplateRecipe.  # noqa: E501
        :type: list[TaskTemplateRecipeAttachments]
        """

        self._attachments = attachments

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

        Array of subtasks that will be added to the task created from this template  # noqa: E501

        :return: The subtasks of this TaskTemplateRecipe.  # noqa: E501
        :rtype: list[TaskTemplateRecipeDependencies]
        """
        return self._subtasks

    @subtasks.setter
    def subtasks(self, subtasks):
        """Sets the subtasks of this TaskTemplateRecipe.

        Array of subtasks that will be added to the task created from this template  # noqa: E501

        :param subtasks: The subtasks of this TaskTemplateRecipe.  # noqa: E501
        :type: list[TaskTemplateRecipeDependencies]
        """

        self._subtasks = subtasks

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

        Array of custom fields that will be added to the task created from this template  # noqa: E501

        :return: The custom_fields of this TaskTemplateRecipe.  # noqa: E501
        :rtype: list[PortfolioResponseCustomFields]
        """
        return self._custom_fields

    @custom_fields.setter
    def custom_fields(self, custom_fields):
        """Sets the custom_fields of this TaskTemplateRecipe.

        Array of custom fields that will be added to the task created from this template  # noqa: E501

        :param custom_fields: The custom_fields of this TaskTemplateRecipe.  # noqa: E501
        :type: list[PortfolioResponseCustomFields]
        """

        self._custom_fields = custom_fields

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

        return self.__dict__ == other.__dict__

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