# coding: utf-8

"""
    Lists

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: v3
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from hubspot.crm.lists.configuration import Configuration


class PublicListFolder(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        "created_at": "datetime",
        "parent_folder_id": "int",
        "child_nodes": "list[PublicListFolder]",
        "name": "str",
        "id": "int",
        "child_lists": "list[int]",
        "updated_contents_at": "datetime",
        "user_id": "int",
        "updated_at": "datetime",
    }

    attribute_map = {
        "created_at": "createdAt",
        "parent_folder_id": "parentFolderId",
        "child_nodes": "childNodes",
        "name": "name",
        "id": "id",
        "child_lists": "childLists",
        "updated_contents_at": "updatedContentsAt",
        "user_id": "userId",
        "updated_at": "updatedAt",
    }

    def __init__(
        self, created_at=None, parent_folder_id=None, child_nodes=None, name=None, id=None, child_lists=None, updated_contents_at=None, user_id=None, updated_at=None, local_vars_configuration=None
    ):  # noqa: E501
        """PublicListFolder - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._created_at = None
        self._parent_folder_id = None
        self._child_nodes = None
        self._name = None
        self._id = None
        self._child_lists = None
        self._updated_contents_at = None
        self._user_id = None
        self._updated_at = None
        self.discriminator = None

        if created_at is not None:
            self.created_at = created_at
        self.parent_folder_id = parent_folder_id
        self.child_nodes = child_nodes
        if name is not None:
            self.name = name
        self.id = id
        self.child_lists = child_lists
        if updated_contents_at is not None:
            self.updated_contents_at = updated_contents_at
        if user_id is not None:
            self.user_id = user_id
        if updated_at is not None:
            self.updated_at = updated_at

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

        The time the folder was created at.  # noqa: E501

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

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

        The time the folder was created at.  # noqa: E501

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

        self._created_at = created_at

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

        The Id of the folder this folder is in, the root folder is represented as 0.  # noqa: E501

        :return: The parent_folder_id of this PublicListFolder.  # noqa: E501
        :rtype: int
        """
        return self._parent_folder_id

    @parent_folder_id.setter
    def parent_folder_id(self, parent_folder_id):
        """Sets the parent_folder_id of this PublicListFolder.

        The Id of the folder this folder is in, the root folder is represented as 0.  # noqa: E501

        :param parent_folder_id: The parent_folder_id of this PublicListFolder.  # noqa: E501
        :type parent_folder_id: int
        """
        if self.local_vars_configuration.client_side_validation and parent_folder_id is None:  # noqa: E501
            raise ValueError("Invalid value for `parent_folder_id`, must not be `None`")  # noqa: E501

        self._parent_folder_id = parent_folder_id

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


        :return: The child_nodes of this PublicListFolder.  # noqa: E501
        :rtype: list[PublicListFolder]
        """
        return self._child_nodes

    @child_nodes.setter
    def child_nodes(self, child_nodes):
        """Sets the child_nodes of this PublicListFolder.


        :param child_nodes: The child_nodes of this PublicListFolder.  # noqa: E501
        :type child_nodes: list[PublicListFolder]
        """
        if self.local_vars_configuration.client_side_validation and child_nodes is None:  # noqa: E501
            raise ValueError("Invalid value for `child_nodes`, must not be `None`")  # noqa: E501

        self._child_nodes = child_nodes

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

        The name of the folder.  # noqa: E501

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

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

        The name of the folder.  # noqa: E501

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

        self._name = name

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

        The Id of the folder.  # noqa: E501

        :return: The id of this PublicListFolder.  # noqa: E501
        :rtype: int
        """
        return self._id

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

        The Id of the folder.  # noqa: E501

        :param id: The id of this PublicListFolder.  # noqa: E501
        :type id: int
        """
        if self.local_vars_configuration.client_side_validation and id is None:  # noqa: E501
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

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

        An array of list Id's contained in this folder.  # noqa: E501

        :return: The child_lists of this PublicListFolder.  # noqa: E501
        :rtype: list[int]
        """
        return self._child_lists

    @child_lists.setter
    def child_lists(self, child_lists):
        """Sets the child_lists of this PublicListFolder.

        An array of list Id's contained in this folder.  # noqa: E501

        :param child_lists: The child_lists of this PublicListFolder.  # noqa: E501
        :type child_lists: list[int]
        """
        if self.local_vars_configuration.client_side_validation and child_lists is None:  # noqa: E501
            raise ValueError("Invalid value for `child_lists`, must not be `None`")  # noqa: E501

        self._child_lists = child_lists

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

        The time that the contents of the folder was last updated at.  # noqa: E501

        :return: The updated_contents_at of this PublicListFolder.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_contents_at

    @updated_contents_at.setter
    def updated_contents_at(self, updated_contents_at):
        """Sets the updated_contents_at of this PublicListFolder.

        The time that the contents of the folder was last updated at.  # noqa: E501

        :param updated_contents_at: The updated_contents_at of this PublicListFolder.  # noqa: E501
        :type updated_contents_at: datetime
        """

        self._updated_contents_at = updated_contents_at

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

        The user Id of the owner of the folder.  # noqa: E501

        :return: The user_id of this PublicListFolder.  # noqa: E501
        :rtype: int
        """
        return self._user_id

    @user_id.setter
    def user_id(self, user_id):
        """Sets the user_id of this PublicListFolder.

        The user Id of the owner of the folder.  # noqa: E501

        :param user_id: The user_id of this PublicListFolder.  # noqa: E501
        :type user_id: int
        """

        self._user_id = user_id

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

        The time the folder was last updated at.  # noqa: E501

        :return: The updated_at of this PublicListFolder.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """Sets the updated_at of this PublicListFolder.

        The time the folder was last updated at.  # noqa: E501

        :param updated_at: The updated_at of this PublicListFolder.  # noqa: E501
        :type updated_at: datetime
        """

        self._updated_at = updated_at

    def to_dict(self, serialize=False):
        """Returns the model properties as a dict"""
        result = {}

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(lambda x: convert(x), value))
            elif isinstance(value, dict):
                result[attr] = dict(map(lambda item: (item[0], convert(item[1])), value.items()))
            else:
                result[attr] = convert(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, PublicListFolder):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
