# 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.cloud_datacenter_nestview import CloudDatacenterNestview  # noqa: F401,E501
# from xms_client.models.cloud_instance import CloudInstance  # noqa: F401,E501
# from xms_client.models.cloud_instance_stat import CloudInstanceStat  # noqa: F401,E501
# from xms_client.models.cloud_platform_nestview import CloudPlatformNestview  # noqa: F401,E501


class CloudInstanceRecord(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 = {
        'cloud_datacenter': 'CloudDatacenterNestview',
        'cloud_instance_id': 'str',
        'cloud_platform': 'CloudPlatformNestview',
        'cloud_volume_num': 'int',
        'cores': 'int',
        'create': 'datetime',
        'hostname': 'str',
        'id': 'int',
        'memory_kbyte': 'int',
        'name': 'str',
        'root_device_type': 'str',
        'update': 'datetime',
        'samples': 'list[CloudInstanceStat]'
    }

    attribute_map = {
        'cloud_datacenter': 'cloud_datacenter',
        'cloud_instance_id': 'cloud_instance_id',
        'cloud_platform': 'cloud_platform',
        'cloud_volume_num': 'cloud_volume_num',
        'cores': 'cores',
        'create': 'create',
        'hostname': 'hostname',
        'id': 'id',
        'memory_kbyte': 'memory_kbyte',
        'name': 'name',
        'root_device_type': 'root_device_type',
        'update': 'update',
        'samples': 'samples'
    }

    def __init__(self, cloud_datacenter=None, cloud_instance_id=None, cloud_platform=None, cloud_volume_num=None, cores=None, create=None, hostname=None, id=None, memory_kbyte=None, name=None, root_device_type=None, update=None, samples=None):  # noqa: E501
        """CloudInstanceRecord - a model defined in Swagger"""  # noqa: E501

        self._cloud_datacenter = None
        self._cloud_instance_id = None
        self._cloud_platform = None
        self._cloud_volume_num = None
        self._cores = None
        self._create = None
        self._hostname = None
        self._id = None
        self._memory_kbyte = None
        self._name = None
        self._root_device_type = None
        self._update = None
        self._samples = None
        self.discriminator = None

        if cloud_datacenter is not None:
            self.cloud_datacenter = cloud_datacenter
        if cloud_instance_id is not None:
            self.cloud_instance_id = cloud_instance_id
        if cloud_platform is not None:
            self.cloud_platform = cloud_platform
        if cloud_volume_num is not None:
            self.cloud_volume_num = cloud_volume_num
        if cores is not None:
            self.cores = cores
        if create is not None:
            self.create = create
        if hostname is not None:
            self.hostname = hostname
        if id is not None:
            self.id = id
        if memory_kbyte is not None:
            self.memory_kbyte = memory_kbyte
        if name is not None:
            self.name = name
        if root_device_type is not None:
            self.root_device_type = root_device_type
        if update is not None:
            self.update = update
        if samples is not None:
            self.samples = samples

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


        :return: The cloud_datacenter of this CloudInstanceRecord.  # noqa: E501
        :rtype: CloudDatacenterNestview
        """
        return self._cloud_datacenter

    @cloud_datacenter.setter
    def cloud_datacenter(self, cloud_datacenter):
        """Sets the cloud_datacenter of this CloudInstanceRecord.


        :param cloud_datacenter: The cloud_datacenter of this CloudInstanceRecord.  # noqa: E501
        :type: CloudDatacenterNestview
        """

        self._cloud_datacenter = cloud_datacenter

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


        :return: The cloud_instance_id of this CloudInstanceRecord.  # noqa: E501
        :rtype: str
        """
        return self._cloud_instance_id

    @cloud_instance_id.setter
    def cloud_instance_id(self, cloud_instance_id):
        """Sets the cloud_instance_id of this CloudInstanceRecord.


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

        self._cloud_instance_id = cloud_instance_id

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


        :return: The cloud_platform of this CloudInstanceRecord.  # noqa: E501
        :rtype: CloudPlatformNestview
        """
        return self._cloud_platform

    @cloud_platform.setter
    def cloud_platform(self, cloud_platform):
        """Sets the cloud_platform of this CloudInstanceRecord.


        :param cloud_platform: The cloud_platform of this CloudInstanceRecord.  # noqa: E501
        :type: CloudPlatformNestview
        """

        self._cloud_platform = cloud_platform

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


        :return: The cloud_volume_num of this CloudInstanceRecord.  # noqa: E501
        :rtype: int
        """
        return self._cloud_volume_num

    @cloud_volume_num.setter
    def cloud_volume_num(self, cloud_volume_num):
        """Sets the cloud_volume_num of this CloudInstanceRecord.


        :param cloud_volume_num: The cloud_volume_num of this CloudInstanceRecord.  # noqa: E501
        :type: int
        """

        self._cloud_volume_num = cloud_volume_num

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


        :return: The cores of this CloudInstanceRecord.  # noqa: E501
        :rtype: int
        """
        return self._cores

    @cores.setter
    def cores(self, cores):
        """Sets the cores of this CloudInstanceRecord.


        :param cores: The cores of this CloudInstanceRecord.  # noqa: E501
        :type: int
        """

        self._cores = cores

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


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

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


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

        self._create = create

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


        :return: The hostname of this CloudInstanceRecord.  # noqa: E501
        :rtype: str
        """
        return self._hostname

    @hostname.setter
    def hostname(self, hostname):
        """Sets the hostname of this CloudInstanceRecord.


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

        self._hostname = hostname

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


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

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


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

        self._id = id

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


        :return: The memory_kbyte of this CloudInstanceRecord.  # noqa: E501
        :rtype: int
        """
        return self._memory_kbyte

    @memory_kbyte.setter
    def memory_kbyte(self, memory_kbyte):
        """Sets the memory_kbyte of this CloudInstanceRecord.


        :param memory_kbyte: The memory_kbyte of this CloudInstanceRecord.  # noqa: E501
        :type: int
        """

        self._memory_kbyte = memory_kbyte

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


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

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


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

        self._name = name

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


        :return: The root_device_type of this CloudInstanceRecord.  # noqa: E501
        :rtype: str
        """
        return self._root_device_type

    @root_device_type.setter
    def root_device_type(self, root_device_type):
        """Sets the root_device_type of this CloudInstanceRecord.


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

        self._root_device_type = root_device_type

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


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

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


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

        self._update = update

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


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

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


        :param samples: The samples of this CloudInstanceRecord.  # noqa: E501
        :type: list[CloudInstanceStat]
        """

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

        return self.__dict__ == other.__dict__

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