# coding: utf-8

"""
    SparkWorks Core API

    Management Service for the SparkWorks Processing Engine  # noqa: E501

    OpenAPI spec version: v2.0
    Contact: info@sparkworks.net
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class ResourceUpdateDTO(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 = {
        'controls': 'str',
        'phenomenon_uuid': 'str',
        'type': 'str',
        'unit_uuid': 'str',
        'user_friendly_name': 'str'
    }

    attribute_map = {
        'controls': 'controls',
        'phenomenon_uuid': 'phenomenonUuid',
        'type': 'type',
        'unit_uuid': 'unitUuid',
        'user_friendly_name': 'userFriendlyName'
    }

    def __init__(self, controls=None, phenomenon_uuid=None, type=None, unit_uuid=None, user_friendly_name=None):  # noqa: E501
        """ResourceUpdateDTO - a model defined in Swagger"""  # noqa: E501

        self._controls = None
        self._phenomenon_uuid = None
        self._type = None
        self._unit_uuid = None
        self._user_friendly_name = None
        self.discriminator = None

        if controls is not None:
            self.controls = controls
        if phenomenon_uuid is not None:
            self.phenomenon_uuid = phenomenon_uuid
        if type is not None:
            self.type = type
        if unit_uuid is not None:
            self.unit_uuid = unit_uuid
        if user_friendly_name is not None:
            self.user_friendly_name = user_friendly_name

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


        :return: The controls of this ResourceUpdateDTO.  # noqa: E501
        :rtype: str
        """
        return self._controls

    @controls.setter
    def controls(self, controls):
        """Sets the controls of this ResourceUpdateDTO.


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

        self._controls = controls

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


        :return: The phenomenon_uuid of this ResourceUpdateDTO.  # noqa: E501
        :rtype: str
        """
        return self._phenomenon_uuid

    @phenomenon_uuid.setter
    def phenomenon_uuid(self, phenomenon_uuid):
        """Sets the phenomenon_uuid of this ResourceUpdateDTO.


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

        self._phenomenon_uuid = phenomenon_uuid

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


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

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


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

        self._type = type

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


        :return: The unit_uuid of this ResourceUpdateDTO.  # noqa: E501
        :rtype: str
        """
        return self._unit_uuid

    @unit_uuid.setter
    def unit_uuid(self, unit_uuid):
        """Sets the unit_uuid of this ResourceUpdateDTO.


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

        self._unit_uuid = unit_uuid

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


        :return: The user_friendly_name of this ResourceUpdateDTO.  # noqa: E501
        :rtype: str
        """
        return self._user_friendly_name

    @user_friendly_name.setter
    def user_friendly_name(self, user_friendly_name):
        """Sets the user_friendly_name of this ResourceUpdateDTO.


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

        self._user_friendly_name = user_friendly_name

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

        return self.__dict__ == other.__dict__

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