# coding: utf-8

"""
    Knetik Platform API Documentation latest 

    This is the spec for the Knetik API.  Use this in conjunction with the documentation found at https://knetikcloud.com.

    OpenAPI spec version: latest 
    Contact: support@knetik.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from pprint import pformat
from six import iteritems
import re


class BehaviorDefinitionResource(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 = {
        'description': 'str',
        'prerequisite_behaviors': 'list[Behavior]',
        'properties': 'list[PropertyFieldResource]',
        'type_hint': 'str'
    }

    attribute_map = {
        'description': 'description',
        'prerequisite_behaviors': 'prerequisite_behaviors',
        'properties': 'properties',
        'type_hint': 'type_hint'
    }

    def __init__(self, description=None, prerequisite_behaviors=None, properties=None, type_hint=None):
        """
        BehaviorDefinitionResource - a model defined in Swagger
        """

        self._description = None
        self._prerequisite_behaviors = None
        self._properties = None
        self._type_hint = None
        self.discriminator = None

        if description is not None:
          self.description = description
        if prerequisite_behaviors is not None:
          self.prerequisite_behaviors = prerequisite_behaviors
        self.properties = properties
        self.type_hint = type_hint

    @property
    def description(self):
        """
        Gets the description of this BehaviorDefinitionResource.
        Description of the behavior

        :return: The description of this BehaviorDefinitionResource.
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """
        Sets the description of this BehaviorDefinitionResource.
        Description of the behavior

        :param description: The description of this BehaviorDefinitionResource.
        :type: str
        """

        self._description = description

    @property
    def prerequisite_behaviors(self):
        """
        Gets the prerequisite_behaviors of this BehaviorDefinitionResource.
        Pre-requisite behaviors that an item must have in order to also have this behavior

        :return: The prerequisite_behaviors of this BehaviorDefinitionResource.
        :rtype: list[Behavior]
        """
        return self._prerequisite_behaviors

    @prerequisite_behaviors.setter
    def prerequisite_behaviors(self, prerequisite_behaviors):
        """
        Sets the prerequisite_behaviors of this BehaviorDefinitionResource.
        Pre-requisite behaviors that an item must have in order to also have this behavior

        :param prerequisite_behaviors: The prerequisite_behaviors of this BehaviorDefinitionResource.
        :type: list[Behavior]
        """

        self._prerequisite_behaviors = prerequisite_behaviors

    @property
    def properties(self):
        """
        Gets the properties of this BehaviorDefinitionResource.
        Configurable properties of the behavior

        :return: The properties of this BehaviorDefinitionResource.
        :rtype: list[PropertyFieldResource]
        """
        return self._properties

    @properties.setter
    def properties(self, properties):
        """
        Sets the properties of this BehaviorDefinitionResource.
        Configurable properties of the behavior

        :param properties: The properties of this BehaviorDefinitionResource.
        :type: list[PropertyFieldResource]
        """
        if properties is None:
            raise ValueError("Invalid value for `properties`, must not be `None`")

        self._properties = properties

    @property
    def type_hint(self):
        """
        Gets the type_hint of this BehaviorDefinitionResource.
        The behavior type

        :return: The type_hint of this BehaviorDefinitionResource.
        :rtype: str
        """
        return self._type_hint

    @type_hint.setter
    def type_hint(self, type_hint):
        """
        Sets the type_hint of this BehaviorDefinitionResource.
        The behavior type

        :param type_hint: The type_hint of this BehaviorDefinitionResource.
        :type: str
        """
        if type_hint is None:
            raise ValueError("Invalid value for `type_hint`, must not be `None`")

        self._type_hint = type_hint

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

        for attr, _ in 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

        return result

    def to_str(self):
        """
        Returns the string representation of the model
        """
        return 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, BehaviorDefinitionResource):
            return False

        return self.__dict__ == other.__dict__

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