# coding: utf-8

"""
    XMS API

    XMS is the controller of distributed storage system  # noqa: E501

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


import pprint
import re  # noqa: F401
import six


class SmartAttr(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 = {
        'attr_id': 'int',
        'create': 'datetime',
        'flag': 'str',
        'id': 'int',
        'name': 'str',
        'raw_value': 'str',
        'status': 'str',
        'thresh': 'str',
        'type': 'str',
        'value': 'str',
        'when_failed': 'str',
        'worst': 'str'
    }

    attribute_map = {
        'attr_id': 'attr_id',
        'create': 'create',
        'flag': 'flag',
        'id': 'id',
        'name': 'name',
        'raw_value': 'raw_value',
        'status': 'status',
        'thresh': 'thresh',
        'type': 'type',
        'value': 'value',
        'when_failed': 'when_failed',
        'worst': 'worst'
    }

    def __init__(self, attr_id=None, create=None, flag=None, id=None, name=None, raw_value=None, status=None, thresh=None, type=None, value=None, when_failed=None, worst=None):  # noqa: E501
        """SmartAttr - a model defined in Swagger"""  # noqa: E501

        self._attr_id = None
        self._create = None
        self._flag = None
        self._id = None
        self._name = None
        self._raw_value = None
        self._status = None
        self._thresh = None
        self._type = None
        self._value = None
        self._when_failed = None
        self._worst = None
        self.discriminator = None

        if attr_id is not None:
            self.attr_id = attr_id
        if create is not None:
            self.create = create
        if flag is not None:
            self.flag = flag
        if id is not None:
            self.id = id
        if name is not None:
            self.name = name
        if raw_value is not None:
            self.raw_value = raw_value
        if status is not None:
            self.status = status
        if thresh is not None:
            self.thresh = thresh
        if type is not None:
            self.type = type
        if value is not None:
            self.value = value
        if when_failed is not None:
            self.when_failed = when_failed
        if worst is not None:
            self.worst = worst

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


        :return: The attr_id of this SmartAttr.  # noqa: E501
        :rtype: int
        """
        return self._attr_id

    @attr_id.setter
    def attr_id(self, attr_id):
        """Sets the attr_id of this SmartAttr.


        :param attr_id: The attr_id of this SmartAttr.  # noqa: E501
        :type: int
        """

        self._attr_id = attr_id

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


        :return: The create of this SmartAttr.  # noqa: E501
        :rtype: datetime
        """
        return self._create

    @create.setter
    def create(self, create):
        """Sets the create of this SmartAttr.


        :param create: The create of this SmartAttr.  # noqa: E501
        :type: datetime
        """

        self._create = create

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


        :return: The flag of this SmartAttr.  # noqa: E501
        :rtype: str
        """
        return self._flag

    @flag.setter
    def flag(self, flag):
        """Sets the flag of this SmartAttr.


        :param flag: The flag of this SmartAttr.  # noqa: E501
        :type: str
        """

        self._flag = flag

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


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

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


        :param id: The id of this SmartAttr.  # noqa: E501
        :type: int
        """

        self._id = id

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


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

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


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

        self._name = name

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


        :return: The raw_value of this SmartAttr.  # noqa: E501
        :rtype: str
        """
        return self._raw_value

    @raw_value.setter
    def raw_value(self, raw_value):
        """Sets the raw_value of this SmartAttr.


        :param raw_value: The raw_value of this SmartAttr.  # noqa: E501
        :type: str
        """

        self._raw_value = raw_value

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


        :return: The status of this SmartAttr.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this SmartAttr.


        :param status: The status of this SmartAttr.  # noqa: E501
        :type: str
        """

        self._status = status

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


        :return: The thresh of this SmartAttr.  # noqa: E501
        :rtype: str
        """
        return self._thresh

    @thresh.setter
    def thresh(self, thresh):
        """Sets the thresh of this SmartAttr.


        :param thresh: The thresh of this SmartAttr.  # noqa: E501
        :type: str
        """

        self._thresh = thresh

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


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

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


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

        self._type = type

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


        :return: The value of this SmartAttr.  # noqa: E501
        :rtype: str
        """
        return self._value

    @value.setter
    def value(self, value):
        """Sets the value of this SmartAttr.


        :param value: The value of this SmartAttr.  # noqa: E501
        :type: str
        """

        self._value = value

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


        :return: The when_failed of this SmartAttr.  # noqa: E501
        :rtype: str
        """
        return self._when_failed

    @when_failed.setter
    def when_failed(self, when_failed):
        """Sets the when_failed of this SmartAttr.


        :param when_failed: The when_failed of this SmartAttr.  # noqa: E501
        :type: str
        """

        self._when_failed = when_failed

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


        :return: The worst of this SmartAttr.  # noqa: E501
        :rtype: str
        """
        return self._worst

    @worst.setter
    def worst(self, worst):
        """Sets the worst of this SmartAttr.


        :param worst: The worst of this SmartAttr.  # noqa: E501
        :type: str
        """

        self._worst = worst

    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

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

        return self.__dict__ == other.__dict__

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