# 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

# from xms_client.models.disk import Disk  # noqa: F401,E501
# from xms_client.models.disk_stat import DiskStat  # noqa: F401,E501
# from xms_client.models.host_nestview import HostNestview  # noqa: F401,E501
# from xms_client.models.partition import Partition  # noqa: F401,E501
# from xms_client.models.smart_attr import SmartAttr  # noqa: F401,E501


class DiskRecord(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 = {
        'action_status': 'str',
        'bytes': 'int',
        'cache_create': 'datetime',
        'create': 'datetime',
        'device': 'str',
        'disk_type': 'str',
        'driver_type': 'str',
        'enclosure_id': 'str',
        'host': 'HostNestview',
        'id': 'int',
        'is_cache': 'bool',
        'is_root': 'bool',
        'lighting_status': 'str',
        'model': 'str',
        'partition_num': 'int',
        'partitions': 'list[Partition]',
        'power_safe': 'bool',
        'rotation_rate': 'str',
        'rotational': 'bool',
        'serial': 'str',
        'slot_id': 'str',
        'smart_attrs': 'list[SmartAttr]',
        'ssd_life_left': 'int',
        'status': 'str',
        'update': 'datetime',
        'used': 'bool',
        'wwid': 'str',
        'samples': 'list[DiskStat]'
    }

    attribute_map = {
        'action_status': 'action_status',
        'bytes': 'bytes',
        'cache_create': 'cache_create',
        'create': 'create',
        'device': 'device',
        'disk_type': 'disk_type',
        'driver_type': 'driver_type',
        'enclosure_id': 'enclosure_id',
        'host': 'host',
        'id': 'id',
        'is_cache': 'is_cache',
        'is_root': 'is_root',
        'lighting_status': 'lighting_status',
        'model': 'model',
        'partition_num': 'partition_num',
        'partitions': 'partitions',
        'power_safe': 'power_safe',
        'rotation_rate': 'rotation_rate',
        'rotational': 'rotational',
        'serial': 'serial',
        'slot_id': 'slot_id',
        'smart_attrs': 'smart_attrs',
        'ssd_life_left': 'ssd_life_left',
        'status': 'status',
        'update': 'update',
        'used': 'used',
        'wwid': 'wwid',
        'samples': 'samples'
    }

    def __init__(self, action_status=None, bytes=None, cache_create=None, create=None, device=None, disk_type=None, driver_type=None, enclosure_id=None, host=None, id=None, is_cache=None, is_root=None, lighting_status=None, model=None, partition_num=None, partitions=None, power_safe=None, rotation_rate=None, rotational=None, serial=None, slot_id=None, smart_attrs=None, ssd_life_left=None, status=None, update=None, used=None, wwid=None, samples=None):  # noqa: E501
        """DiskRecord - a model defined in Swagger"""  # noqa: E501

        self._action_status = None
        self._bytes = None
        self._cache_create = None
        self._create = None
        self._device = None
        self._disk_type = None
        self._driver_type = None
        self._enclosure_id = None
        self._host = None
        self._id = None
        self._is_cache = None
        self._is_root = None
        self._lighting_status = None
        self._model = None
        self._partition_num = None
        self._partitions = None
        self._power_safe = None
        self._rotation_rate = None
        self._rotational = None
        self._serial = None
        self._slot_id = None
        self._smart_attrs = None
        self._ssd_life_left = None
        self._status = None
        self._update = None
        self._used = None
        self._wwid = None
        self._samples = None
        self.discriminator = None

        if action_status is not None:
            self.action_status = action_status
        if bytes is not None:
            self.bytes = bytes
        if cache_create is not None:
            self.cache_create = cache_create
        if create is not None:
            self.create = create
        if device is not None:
            self.device = device
        if disk_type is not None:
            self.disk_type = disk_type
        if driver_type is not None:
            self.driver_type = driver_type
        if enclosure_id is not None:
            self.enclosure_id = enclosure_id
        if host is not None:
            self.host = host
        if id is not None:
            self.id = id
        if is_cache is not None:
            self.is_cache = is_cache
        if is_root is not None:
            self.is_root = is_root
        if lighting_status is not None:
            self.lighting_status = lighting_status
        if model is not None:
            self.model = model
        if partition_num is not None:
            self.partition_num = partition_num
        if partitions is not None:
            self.partitions = partitions
        if power_safe is not None:
            self.power_safe = power_safe
        if rotation_rate is not None:
            self.rotation_rate = rotation_rate
        if rotational is not None:
            self.rotational = rotational
        if serial is not None:
            self.serial = serial
        if slot_id is not None:
            self.slot_id = slot_id
        if smart_attrs is not None:
            self.smart_attrs = smart_attrs
        if ssd_life_left is not None:
            self.ssd_life_left = ssd_life_left
        if status is not None:
            self.status = status
        if update is not None:
            self.update = update
        if used is not None:
            self.used = used
        if wwid is not None:
            self.wwid = wwid
        if samples is not None:
            self.samples = samples

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


        :return: The action_status of this DiskRecord.  # noqa: E501
        :rtype: str
        """
        return self._action_status

    @action_status.setter
    def action_status(self, action_status):
        """Sets the action_status of this DiskRecord.


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

        self._action_status = action_status

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

        size of disk  # noqa: E501

        :return: The bytes of this DiskRecord.  # noqa: E501
        :rtype: int
        """
        return self._bytes

    @bytes.setter
    def bytes(self, bytes):
        """Sets the bytes of this DiskRecord.

        size of disk  # noqa: E501

        :param bytes: The bytes of this DiskRecord.  # noqa: E501
        :type: int
        """

        self._bytes = bytes

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


        :return: The cache_create of this DiskRecord.  # noqa: E501
        :rtype: datetime
        """
        return self._cache_create

    @cache_create.setter
    def cache_create(self, cache_create):
        """Sets the cache_create of this DiskRecord.


        :param cache_create: The cache_create of this DiskRecord.  # noqa: E501
        :type: datetime
        """

        self._cache_create = cache_create

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


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

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


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

        self._create = create

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


        :return: The device of this DiskRecord.  # noqa: E501
        :rtype: str
        """
        return self._device

    @device.setter
    def device(self, device):
        """Sets the device of this DiskRecord.


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

        self._device = device

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


        :return: The disk_type of this DiskRecord.  # noqa: E501
        :rtype: str
        """
        return self._disk_type

    @disk_type.setter
    def disk_type(self, disk_type):
        """Sets the disk_type of this DiskRecord.


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

        self._disk_type = disk_type

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


        :return: The driver_type of this DiskRecord.  # noqa: E501
        :rtype: str
        """
        return self._driver_type

    @driver_type.setter
    def driver_type(self, driver_type):
        """Sets the driver_type of this DiskRecord.


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

        self._driver_type = driver_type

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


        :return: The enclosure_id of this DiskRecord.  # noqa: E501
        :rtype: str
        """
        return self._enclosure_id

    @enclosure_id.setter
    def enclosure_id(self, enclosure_id):
        """Sets the enclosure_id of this DiskRecord.


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

        self._enclosure_id = enclosure_id

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


        :return: The host of this DiskRecord.  # noqa: E501
        :rtype: HostNestview
        """
        return self._host

    @host.setter
    def host(self, host):
        """Sets the host of this DiskRecord.


        :param host: The host of this DiskRecord.  # noqa: E501
        :type: HostNestview
        """

        self._host = host

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


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

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


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

        self._id = id

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

        used as cache disk  # noqa: E501

        :return: The is_cache of this DiskRecord.  # noqa: E501
        :rtype: bool
        """
        return self._is_cache

    @is_cache.setter
    def is_cache(self, is_cache):
        """Sets the is_cache of this DiskRecord.

        used as cache disk  # noqa: E501

        :param is_cache: The is_cache of this DiskRecord.  # noqa: E501
        :type: bool
        """

        self._is_cache = is_cache

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

        used as root disk  # noqa: E501

        :return: The is_root of this DiskRecord.  # noqa: E501
        :rtype: bool
        """
        return self._is_root

    @is_root.setter
    def is_root(self, is_root):
        """Sets the is_root of this DiskRecord.

        used as root disk  # noqa: E501

        :param is_root: The is_root of this DiskRecord.  # noqa: E501
        :type: bool
        """

        self._is_root = is_root

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


        :return: The lighting_status of this DiskRecord.  # noqa: E501
        :rtype: str
        """
        return self._lighting_status

    @lighting_status.setter
    def lighting_status(self, lighting_status):
        """Sets the lighting_status of this DiskRecord.


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

        self._lighting_status = lighting_status

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


        :return: The model of this DiskRecord.  # noqa: E501
        :rtype: str
        """
        return self._model

    @model.setter
    def model(self, model):
        """Sets the model of this DiskRecord.


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

        self._model = model

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


        :return: The partition_num of this DiskRecord.  # noqa: E501
        :rtype: int
        """
        return self._partition_num

    @partition_num.setter
    def partition_num(self, partition_num):
        """Sets the partition_num of this DiskRecord.


        :param partition_num: The partition_num of this DiskRecord.  # noqa: E501
        :type: int
        """

        self._partition_num = partition_num

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


        :return: The partitions of this DiskRecord.  # noqa: E501
        :rtype: list[Partition]
        """
        return self._partitions

    @partitions.setter
    def partitions(self, partitions):
        """Sets the partitions of this DiskRecord.


        :param partitions: The partitions of this DiskRecord.  # noqa: E501
        :type: list[Partition]
        """

        self._partitions = partitions

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


        :return: The power_safe of this DiskRecord.  # noqa: E501
        :rtype: bool
        """
        return self._power_safe

    @power_safe.setter
    def power_safe(self, power_safe):
        """Sets the power_safe of this DiskRecord.


        :param power_safe: The power_safe of this DiskRecord.  # noqa: E501
        :type: bool
        """

        self._power_safe = power_safe

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


        :return: The rotation_rate of this DiskRecord.  # noqa: E501
        :rtype: str
        """
        return self._rotation_rate

    @rotation_rate.setter
    def rotation_rate(self, rotation_rate):
        """Sets the rotation_rate of this DiskRecord.


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

        self._rotation_rate = rotation_rate

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


        :return: The rotational of this DiskRecord.  # noqa: E501
        :rtype: bool
        """
        return self._rotational

    @rotational.setter
    def rotational(self, rotational):
        """Sets the rotational of this DiskRecord.


        :param rotational: The rotational of this DiskRecord.  # noqa: E501
        :type: bool
        """

        self._rotational = rotational

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


        :return: The serial of this DiskRecord.  # noqa: E501
        :rtype: str
        """
        return self._serial

    @serial.setter
    def serial(self, serial):
        """Sets the serial of this DiskRecord.


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

        self._serial = serial

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


        :return: The slot_id of this DiskRecord.  # noqa: E501
        :rtype: str
        """
        return self._slot_id

    @slot_id.setter
    def slot_id(self, slot_id):
        """Sets the slot_id of this DiskRecord.


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

        self._slot_id = slot_id

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


        :return: The smart_attrs of this DiskRecord.  # noqa: E501
        :rtype: list[SmartAttr]
        """
        return self._smart_attrs

    @smart_attrs.setter
    def smart_attrs(self, smart_attrs):
        """Sets the smart_attrs of this DiskRecord.


        :param smart_attrs: The smart_attrs of this DiskRecord.  # noqa: E501
        :type: list[SmartAttr]
        """

        self._smart_attrs = smart_attrs

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


        :return: The ssd_life_left of this DiskRecord.  # noqa: E501
        :rtype: int
        """
        return self._ssd_life_left

    @ssd_life_left.setter
    def ssd_life_left(self, ssd_life_left):
        """Sets the ssd_life_left of this DiskRecord.


        :param ssd_life_left: The ssd_life_left of this DiskRecord.  # noqa: E501
        :type: int
        """

        self._ssd_life_left = ssd_life_left

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


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

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


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

        self._status = status

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


        :return: The update of this DiskRecord.  # noqa: E501
        :rtype: datetime
        """
        return self._update

    @update.setter
    def update(self, update):
        """Sets the update of this DiskRecord.


        :param update: The update of this DiskRecord.  # noqa: E501
        :type: datetime
        """

        self._update = update

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


        :return: The used of this DiskRecord.  # noqa: E501
        :rtype: bool
        """
        return self._used

    @used.setter
    def used(self, used):
        """Sets the used of this DiskRecord.


        :param used: The used of this DiskRecord.  # noqa: E501
        :type: bool
        """

        self._used = used

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


        :return: The wwid of this DiskRecord.  # noqa: E501
        :rtype: str
        """
        return self._wwid

    @wwid.setter
    def wwid(self, wwid):
        """Sets the wwid of this DiskRecord.


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

        self._wwid = wwid

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


        :return: The samples of this DiskRecord.  # noqa: E501
        :rtype: list[DiskStat]
        """
        return self._samples

    @samples.setter
    def samples(self, samples):
        """Sets the samples of this DiskRecord.


        :param samples: The samples of this DiskRecord.  # noqa: E501
        :type: list[DiskStat]
        """

        self._samples = samples

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

        return self.__dict__ == other.__dict__

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