# coding: utf-8

"""
    Iot API

    Collection of all public API endpoints.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class ArduinoThinglayout(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',
        'data_retention_days': 'float',
        'deleted_at': 'datetime',
        'device_id': 'str',
        'href': 'str',
        'id': 'str',
        'name': 'str',
        'properties': 'list[ArduinoProperty]',
        'properties_count': 'float',
        'sketch_id': 'str',
        'updated_at': 'datetime',
        'user_id': 'str',
        'webhook_active': 'bool',
        'webhook_uri': 'str'
    }

    attribute_map = {
        'created_at': 'created_at',
        'data_retention_days': 'data_retention_days',
        'deleted_at': 'deleted_at',
        'device_id': 'device_id',
        'href': 'href',
        'id': 'id',
        'name': 'name',
        'properties': 'properties',
        'properties_count': 'properties_count',
        'sketch_id': 'sketch_id',
        'updated_at': 'updated_at',
        'user_id': 'user_id',
        'webhook_active': 'webhook_active',
        'webhook_uri': 'webhook_uri'
    }

    def __init__(self, created_at=None, data_retention_days=None, deleted_at=None, device_id=None, href=None, id=None, name=None, properties=None, properties_count=None, sketch_id=None, updated_at=None, user_id=None, webhook_active=None, webhook_uri=None):  # noqa: E501
        """ArduinoThinglayout - a model defined in OpenAPI"""  # noqa: E501

        self._created_at = None
        self._data_retention_days = None
        self._deleted_at = None
        self._device_id = None
        self._href = None
        self._id = None
        self._name = None
        self._properties = None
        self._properties_count = None
        self._sketch_id = None
        self._updated_at = None
        self._user_id = None
        self._webhook_active = None
        self._webhook_uri = None
        self.discriminator = None

        if created_at is not None:
            self.created_at = created_at
        if data_retention_days is not None:
            self.data_retention_days = data_retention_days
        if deleted_at is not None:
            self.deleted_at = deleted_at
        if device_id is not None:
            self.device_id = device_id
        self.href = href
        self.id = id
        self.name = name
        if properties is not None:
            self.properties = properties
        if properties_count is not None:
            self.properties_count = properties_count
        if sketch_id is not None:
            self.sketch_id = sketch_id
        if updated_at is not None:
            self.updated_at = updated_at
        self.user_id = user_id
        if webhook_active is not None:
            self.webhook_active = webhook_active
        if webhook_uri is not None:
            self.webhook_uri = webhook_uri

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

        Creation date of the thing  # noqa: E501

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

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

        Creation date of the thing  # noqa: E501

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

        self._created_at = created_at

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

        How many days the data will be kept  # noqa: E501

        :return: The data_retention_days of this ArduinoThinglayout.  # noqa: E501
        :rtype: float
        """
        return self._data_retention_days

    @data_retention_days.setter
    def data_retention_days(self, data_retention_days):
        """Sets the data_retention_days of this ArduinoThinglayout.

        How many days the data will be kept  # noqa: E501

        :param data_retention_days: The data_retention_days of this ArduinoThinglayout.  # noqa: E501
        :type: float
        """

        self._data_retention_days = data_retention_days

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

        Delete date of the thing  # noqa: E501

        :return: The deleted_at of this ArduinoThinglayout.  # noqa: E501
        :rtype: datetime
        """
        return self._deleted_at

    @deleted_at.setter
    def deleted_at(self, deleted_at):
        """Sets the deleted_at of this ArduinoThinglayout.

        Delete date of the thing  # noqa: E501

        :param deleted_at: The deleted_at of this ArduinoThinglayout.  # noqa: E501
        :type: datetime
        """

        self._deleted_at = deleted_at

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

        The arn of the device  # noqa: E501

        :return: The device_id of this ArduinoThinglayout.  # noqa: E501
        :rtype: str
        """
        return self._device_id

    @device_id.setter
    def device_id(self, device_id):
        """Sets the device_id of this ArduinoThinglayout.

        The arn of the device  # noqa: E501

        :param device_id: The device_id of this ArduinoThinglayout.  # noqa: E501
        :type: str
        """

        self._device_id = device_id

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

        The api reference of this thing  # noqa: E501

        :return: The href of this ArduinoThinglayout.  # noqa: E501
        :rtype: str
        """
        return self._href

    @href.setter
    def href(self, href):
        """Sets the href of this ArduinoThinglayout.

        The api reference of this thing  # noqa: E501

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

        self._href = href

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

        The id of the thing  # noqa: E501

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

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

        The id of the thing  # noqa: E501

        :param id: The id of this ArduinoThinglayout.  # 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 ArduinoThinglayout.  # noqa: E501

        The friendly name of the thing  # noqa: E501

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

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

        The friendly name of the thing  # noqa: E501

        :param name: The name of this ArduinoThinglayout.  # 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 properties(self):
        """Gets the properties of this ArduinoThinglayout.  # noqa: E501

        ArduinoPropertyCollection is the media type for an array of ArduinoProperty (default view)  # noqa: E501

        :return: The properties of this ArduinoThinglayout.  # noqa: E501
        :rtype: list[ArduinoProperty]
        """
        return self._properties

    @properties.setter
    def properties(self, properties):
        """Sets the properties of this ArduinoThinglayout.

        ArduinoPropertyCollection is the media type for an array of ArduinoProperty (default view)  # noqa: E501

        :param properties: The properties of this ArduinoThinglayout.  # noqa: E501
        :type: list[ArduinoProperty]
        """

        self._properties = properties

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

        The number of properties of the thing  # noqa: E501

        :return: The properties_count of this ArduinoThinglayout.  # noqa: E501
        :rtype: float
        """
        return self._properties_count

    @properties_count.setter
    def properties_count(self, properties_count):
        """Sets the properties_count of this ArduinoThinglayout.

        The number of properties of the thing  # noqa: E501

        :param properties_count: The properties_count of this ArduinoThinglayout.  # noqa: E501
        :type: float
        """

        self._properties_count = properties_count

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

        The id of the attached sketch  # noqa: E501

        :return: The sketch_id of this ArduinoThinglayout.  # noqa: E501
        :rtype: str
        """
        return self._sketch_id

    @sketch_id.setter
    def sketch_id(self, sketch_id):
        """Sets the sketch_id of this ArduinoThinglayout.

        The id of the attached sketch  # noqa: E501

        :param sketch_id: The sketch_id of this ArduinoThinglayout.  # noqa: E501
        :type: str
        """

        self._sketch_id = sketch_id

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

        Update date of the thing  # noqa: E501

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

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

        Update date of the thing  # noqa: E501

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

        self._updated_at = updated_at

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

        The user id of the owner  # noqa: E501

        :return: The user_id of this ArduinoThinglayout.  # noqa: E501
        :rtype: str
        """
        return self._user_id

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

        The user id of the owner  # noqa: E501

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

        self._user_id = user_id

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

        Webhook uri  # noqa: E501

        :return: The webhook_active of this ArduinoThinglayout.  # noqa: E501
        :rtype: bool
        """
        return self._webhook_active

    @webhook_active.setter
    def webhook_active(self, webhook_active):
        """Sets the webhook_active of this ArduinoThinglayout.

        Webhook uri  # noqa: E501

        :param webhook_active: The webhook_active of this ArduinoThinglayout.  # noqa: E501
        :type: bool
        """

        self._webhook_active = webhook_active

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

        Webhook uri  # noqa: E501

        :return: The webhook_uri of this ArduinoThinglayout.  # noqa: E501
        :rtype: str
        """
        return self._webhook_uri

    @webhook_uri.setter
    def webhook_uri(self, webhook_uri):
        """Sets the webhook_uri of this ArduinoThinglayout.

        Webhook uri  # noqa: E501

        :param webhook_uri: The webhook_uri of this ArduinoThinglayout.  # noqa: E501
        :type: str
        """

        self._webhook_uri = webhook_uri

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

        for attr, _ in six.iteritems(self.openapi_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 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, ArduinoThinglayout):
            return False

        return self.__dict__ == other.__dict__

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