# coding: utf-8

"""
    Internal API

    SmartDiagnostics REST API for internal users only  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class TreeItemResponse(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 = {
        'tree_item_type': 'GroupTypeCodes',
        'sort_order': 'int',
        'has_children': 'bool',
        'alarm_severity_level': 'int',
        'asset_class_code': 'str',
        'is_collector_dependent_system': 'bool',
        'has_alarms': 'bool',
        'has_warnings': 'bool',
        'asset_type': 'AssetTypeChild',
        'asset_category': 'AssetCategoryChild',
        'asset_size': 'AssetSizeChild',
        'parent': 'ParentChild',
        'children': 'list[TreeItemDescendantChild]',
        'hierarchy': 'list[HierarchyChild]',
        'id': 'str',
        'name': 'str',
        'abbreviation': 'str',
        'active': 'bool',
        'is_paused': 'bool',
        'is_snoozed': 'bool',
        'created': 'datetime',
        'corporation': 'CorporationChild',
        'location': 'LocationChild'
    }

    attribute_map = {
        'tree_item_type': 'TreeItemType',
        'sort_order': 'SortOrder',
        'has_children': 'HasChildren',
        'alarm_severity_level': 'AlarmSeverityLevel',
        'asset_class_code': 'AssetClassCode',
        'is_collector_dependent_system': 'IsCollectorDependentSystem',
        'has_alarms': 'HasAlarms',
        'has_warnings': 'HasWarnings',
        'asset_type': 'AssetType',
        'asset_category': 'AssetCategory',
        'asset_size': 'AssetSize',
        'parent': 'Parent',
        'children': 'Children',
        'hierarchy': 'Hierarchy',
        'id': 'Id',
        'name': 'Name',
        'abbreviation': 'Abbreviation',
        'active': 'Active',
        'is_paused': 'IsPaused',
        'is_snoozed': 'IsSnoozed',
        'created': 'Created',
        'corporation': 'Corporation',
        'location': 'Location'
    }

    def __init__(self, tree_item_type=None, sort_order=None, has_children=None, alarm_severity_level=None, asset_class_code=None, is_collector_dependent_system=None, has_alarms=None, has_warnings=None, asset_type=None, asset_category=None, asset_size=None, parent=None, children=None, hierarchy=None, id=None, name=None, abbreviation=None, active=None, is_paused=None, is_snoozed=None, created=None, corporation=None, location=None):  # noqa: E501
        """TreeItemResponse - a model defined in Swagger"""  # noqa: E501
        self._tree_item_type = None
        self._sort_order = None
        self._has_children = None
        self._alarm_severity_level = None
        self._asset_class_code = None
        self._is_collector_dependent_system = None
        self._has_alarms = None
        self._has_warnings = None
        self._asset_type = None
        self._asset_category = None
        self._asset_size = None
        self._parent = None
        self._children = None
        self._hierarchy = None
        self._id = None
        self._name = None
        self._abbreviation = None
        self._active = None
        self._is_paused = None
        self._is_snoozed = None
        self._created = None
        self._corporation = None
        self._location = None
        self.discriminator = None
        self.tree_item_type = tree_item_type
        self.sort_order = sort_order
        self.has_children = has_children
        self.alarm_severity_level = alarm_severity_level
        if asset_class_code is not None:
            self.asset_class_code = asset_class_code
        if is_collector_dependent_system is not None:
            self.is_collector_dependent_system = is_collector_dependent_system
        if has_alarms is not None:
            self.has_alarms = has_alarms
        if has_warnings is not None:
            self.has_warnings = has_warnings
        if asset_type is not None:
            self.asset_type = asset_type
        if asset_category is not None:
            self.asset_category = asset_category
        if asset_size is not None:
            self.asset_size = asset_size
        if parent is not None:
            self.parent = parent
        if children is not None:
            self.children = children
        if hierarchy is not None:
            self.hierarchy = hierarchy
        self.id = id
        self.name = name
        if abbreviation is not None:
            self.abbreviation = abbreviation
        self.active = active
        self.is_paused = is_paused
        self.is_snoozed = is_snoozed
        self.created = created
        self.corporation = corporation
        self.location = location

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


        :return: The tree_item_type of this TreeItemResponse.  # noqa: E501
        :rtype: GroupTypeCodes
        """
        return self._tree_item_type

    @tree_item_type.setter
    def tree_item_type(self, tree_item_type):
        """Sets the tree_item_type of this TreeItemResponse.


        :param tree_item_type: The tree_item_type of this TreeItemResponse.  # noqa: E501
        :type: GroupTypeCodes
        """
        if tree_item_type is None:
            raise ValueError("Invalid value for `tree_item_type`, must not be `None`")  # noqa: E501

        self._tree_item_type = tree_item_type

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


        :return: The sort_order of this TreeItemResponse.  # noqa: E501
        :rtype: int
        """
        return self._sort_order

    @sort_order.setter
    def sort_order(self, sort_order):
        """Sets the sort_order of this TreeItemResponse.


        :param sort_order: The sort_order of this TreeItemResponse.  # noqa: E501
        :type: int
        """
        if sort_order is None:
            raise ValueError("Invalid value for `sort_order`, must not be `None`")  # noqa: E501

        self._sort_order = sort_order

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


        :return: The has_children of this TreeItemResponse.  # noqa: E501
        :rtype: bool
        """
        return self._has_children

    @has_children.setter
    def has_children(self, has_children):
        """Sets the has_children of this TreeItemResponse.


        :param has_children: The has_children of this TreeItemResponse.  # noqa: E501
        :type: bool
        """
        if has_children is None:
            raise ValueError("Invalid value for `has_children`, must not be `None`")  # noqa: E501

        self._has_children = has_children

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


        :return: The alarm_severity_level of this TreeItemResponse.  # noqa: E501
        :rtype: int
        """
        return self._alarm_severity_level

    @alarm_severity_level.setter
    def alarm_severity_level(self, alarm_severity_level):
        """Sets the alarm_severity_level of this TreeItemResponse.


        :param alarm_severity_level: The alarm_severity_level of this TreeItemResponse.  # noqa: E501
        :type: int
        """
        if alarm_severity_level is None:
            raise ValueError("Invalid value for `alarm_severity_level`, must not be `None`")  # noqa: E501

        self._alarm_severity_level = alarm_severity_level

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


        :return: The asset_class_code of this TreeItemResponse.  # noqa: E501
        :rtype: str
        """
        return self._asset_class_code

    @asset_class_code.setter
    def asset_class_code(self, asset_class_code):
        """Sets the asset_class_code of this TreeItemResponse.


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

        self._asset_class_code = asset_class_code

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


        :return: The is_collector_dependent_system of this TreeItemResponse.  # noqa: E501
        :rtype: bool
        """
        return self._is_collector_dependent_system

    @is_collector_dependent_system.setter
    def is_collector_dependent_system(self, is_collector_dependent_system):
        """Sets the is_collector_dependent_system of this TreeItemResponse.


        :param is_collector_dependent_system: The is_collector_dependent_system of this TreeItemResponse.  # noqa: E501
        :type: bool
        """

        self._is_collector_dependent_system = is_collector_dependent_system

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


        :return: The has_alarms of this TreeItemResponse.  # noqa: E501
        :rtype: bool
        """
        return self._has_alarms

    @has_alarms.setter
    def has_alarms(self, has_alarms):
        """Sets the has_alarms of this TreeItemResponse.


        :param has_alarms: The has_alarms of this TreeItemResponse.  # noqa: E501
        :type: bool
        """

        self._has_alarms = has_alarms

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


        :return: The has_warnings of this TreeItemResponse.  # noqa: E501
        :rtype: bool
        """
        return self._has_warnings

    @has_warnings.setter
    def has_warnings(self, has_warnings):
        """Sets the has_warnings of this TreeItemResponse.


        :param has_warnings: The has_warnings of this TreeItemResponse.  # noqa: E501
        :type: bool
        """

        self._has_warnings = has_warnings

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


        :return: The asset_type of this TreeItemResponse.  # noqa: E501
        :rtype: AssetTypeChild
        """
        return self._asset_type

    @asset_type.setter
    def asset_type(self, asset_type):
        """Sets the asset_type of this TreeItemResponse.


        :param asset_type: The asset_type of this TreeItemResponse.  # noqa: E501
        :type: AssetTypeChild
        """

        self._asset_type = asset_type

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


        :return: The asset_category of this TreeItemResponse.  # noqa: E501
        :rtype: AssetCategoryChild
        """
        return self._asset_category

    @asset_category.setter
    def asset_category(self, asset_category):
        """Sets the asset_category of this TreeItemResponse.


        :param asset_category: The asset_category of this TreeItemResponse.  # noqa: E501
        :type: AssetCategoryChild
        """

        self._asset_category = asset_category

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


        :return: The asset_size of this TreeItemResponse.  # noqa: E501
        :rtype: AssetSizeChild
        """
        return self._asset_size

    @asset_size.setter
    def asset_size(self, asset_size):
        """Sets the asset_size of this TreeItemResponse.


        :param asset_size: The asset_size of this TreeItemResponse.  # noqa: E501
        :type: AssetSizeChild
        """

        self._asset_size = asset_size

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


        :return: The parent of this TreeItemResponse.  # noqa: E501
        :rtype: ParentChild
        """
        return self._parent

    @parent.setter
    def parent(self, parent):
        """Sets the parent of this TreeItemResponse.


        :param parent: The parent of this TreeItemResponse.  # noqa: E501
        :type: ParentChild
        """

        self._parent = parent

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


        :return: The children of this TreeItemResponse.  # noqa: E501
        :rtype: list[TreeItemDescendantChild]
        """
        return self._children

    @children.setter
    def children(self, children):
        """Sets the children of this TreeItemResponse.


        :param children: The children of this TreeItemResponse.  # noqa: E501
        :type: list[TreeItemDescendantChild]
        """

        self._children = children

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


        :return: The hierarchy of this TreeItemResponse.  # noqa: E501
        :rtype: list[HierarchyChild]
        """
        return self._hierarchy

    @hierarchy.setter
    def hierarchy(self, hierarchy):
        """Sets the hierarchy of this TreeItemResponse.


        :param hierarchy: The hierarchy of this TreeItemResponse.  # noqa: E501
        :type: list[HierarchyChild]
        """

        self._hierarchy = hierarchy

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


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

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


        :param id: The id of this TreeItemResponse.  # noqa: E501
        :type: str
        """
        if id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501

        self._id = id

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


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

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


        :param name: The name of this TreeItemResponse.  # noqa: E501
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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


        :return: The abbreviation of this TreeItemResponse.  # noqa: E501
        :rtype: str
        """
        return self._abbreviation

    @abbreviation.setter
    def abbreviation(self, abbreviation):
        """Sets the abbreviation of this TreeItemResponse.


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

        self._abbreviation = abbreviation

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


        :return: The active of this TreeItemResponse.  # noqa: E501
        :rtype: bool
        """
        return self._active

    @active.setter
    def active(self, active):
        """Sets the active of this TreeItemResponse.


        :param active: The active of this TreeItemResponse.  # noqa: E501
        :type: bool
        """
        if active is None:
            raise ValueError("Invalid value for `active`, must not be `None`")  # noqa: E501

        self._active = active

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


        :return: The is_paused of this TreeItemResponse.  # noqa: E501
        :rtype: bool
        """
        return self._is_paused

    @is_paused.setter
    def is_paused(self, is_paused):
        """Sets the is_paused of this TreeItemResponse.


        :param is_paused: The is_paused of this TreeItemResponse.  # noqa: E501
        :type: bool
        """
        if is_paused is None:
            raise ValueError("Invalid value for `is_paused`, must not be `None`")  # noqa: E501

        self._is_paused = is_paused

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


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

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


        :param is_snoozed: The is_snoozed of this TreeItemResponse.  # noqa: E501
        :type: bool
        """
        if is_snoozed is None:
            raise ValueError("Invalid value for `is_snoozed`, must not be `None`")  # noqa: E501

        self._is_snoozed = is_snoozed

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


        :return: The created of this TreeItemResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._created

    @created.setter
    def created(self, created):
        """Sets the created of this TreeItemResponse.


        :param created: The created of this TreeItemResponse.  # noqa: E501
        :type: datetime
        """
        if created is None:
            raise ValueError("Invalid value for `created`, must not be `None`")  # noqa: E501

        self._created = created

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


        :return: The corporation of this TreeItemResponse.  # noqa: E501
        :rtype: CorporationChild
        """
        return self._corporation

    @corporation.setter
    def corporation(self, corporation):
        """Sets the corporation of this TreeItemResponse.


        :param corporation: The corporation of this TreeItemResponse.  # noqa: E501
        :type: CorporationChild
        """
        if corporation is None:
            raise ValueError("Invalid value for `corporation`, must not be `None`")  # noqa: E501

        self._corporation = corporation

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


        :return: The location of this TreeItemResponse.  # noqa: E501
        :rtype: LocationChild
        """
        return self._location

    @location.setter
    def location(self, location):
        """Sets the location of this TreeItemResponse.


        :param location: The location of this TreeItemResponse.  # noqa: E501
        :type: LocationChild
        """
        if location is None:
            raise ValueError("Invalid value for `location`, must not be `None`")  # noqa: E501

        self._location = location

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

        return self.__dict__ == other.__dict__

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