Source code for netapp.santricity.models.symbol.cache_memory_dimm

# coding: utf-8

"""
CacheMemoryDimm.py

 The Clear BSD License

 Copyright (c) – 2016, NetApp, Inc. All rights reserved.

 Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

 * Neither the name of NetApp, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

 NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""

from pprint import pformat
from six import iteritems


[docs]class CacheMemoryDimm(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self): """ CacheMemoryDimm - a model defined in Swagger :param dict swaggerTypes: The key is attribute name and the value is attribute type. :param dict attributeMap: The key is attribute name and the value is json key in definition. """ self.swagger_types = { 'cache_memory_dimm_ref': 'str', # (required parameter) 'status': 'str', # (required parameter) 'capacity_in_megabytes': 'int', # (required parameter) 'serial_number': 'str', # (required parameter) 'part_number': 'str', # (required parameter) 'oem_part_number': 'str', # (required parameter) 'manufacturer_part_number': 'str', # (required parameter) 'manufacturer': 'str', # (required parameter) 'manufacture_date': 'int', # (required parameter) 'repair_policy': 'RepairPolicy', # (required parameter) 'physical_location': 'Location', # (required parameter) 'shared': 'bool', # (required parameter) 'revision_code': 'str' } self.attribute_map = { 'cache_memory_dimm_ref': 'cacheMemoryDimmRef', # (required parameter) 'status': 'status', # (required parameter) 'capacity_in_megabytes': 'capacityInMegabytes', # (required parameter) 'serial_number': 'serialNumber', # (required parameter) 'part_number': 'partNumber', # (required parameter) 'oem_part_number': 'oemPartNumber', # (required parameter) 'manufacturer_part_number': 'manufacturerPartNumber', # (required parameter) 'manufacturer': 'manufacturer', # (required parameter) 'manufacture_date': 'manufactureDate', # (required parameter) 'repair_policy': 'repairPolicy', # (required parameter) 'physical_location': 'physicalLocation', # (required parameter) 'shared': 'shared', # (required parameter) 'revision_code': 'revisionCode' } self._cache_memory_dimm_ref = None self._status = None self._capacity_in_megabytes = None self._serial_number = None self._part_number = None self._oem_part_number = None self._manufacturer_part_number = None self._manufacturer = None self._manufacture_date = None self._repair_policy = None self._physical_location = None self._shared = None self._revision_code = None @property def cache_memory_dimm_ref(self): """ Gets the cache_memory_dimm_ref of this CacheMemoryDimm. The SYMbol reference value that uniquely identifies an instance of a cache memory DIMM object. :return: The cache_memory_dimm_ref of this CacheMemoryDimm. :rtype: str :required/optional: required """ return self._cache_memory_dimm_ref @cache_memory_dimm_ref.setter def cache_memory_dimm_ref(self, cache_memory_dimm_ref): """ Sets the cache_memory_dimm_ref of this CacheMemoryDimm. The SYMbol reference value that uniquely identifies an instance of a cache memory DIMM object. :param cache_memory_dimm_ref: The cache_memory_dimm_ref of this CacheMemoryDimm. :type: str """ self._cache_memory_dimm_ref = cache_memory_dimm_ref @property def status(self): """ Gets the status of this CacheMemoryDimm. The operational status of the DIMM. :return: The status of this CacheMemoryDimm. :rtype: str :required/optional: required """ return self._status @status.setter def status(self, status): """ Sets the status of this CacheMemoryDimm. The operational status of the DIMM. :param status: The status of this CacheMemoryDimm. :type: str """ allowed_values = ["unknown", "optimal", "empty", "failed", "__UNDEFINED"] if status not in allowed_values: raise ValueError( "Invalid value for `status`, must be one of {0}" .format(allowed_values) ) self._status = status @property def capacity_in_megabytes(self): """ Gets the capacity_in_megabytes of this CacheMemoryDimm. The capacity of the DIMM expressed in megabytes. :return: The capacity_in_megabytes of this CacheMemoryDimm. :rtype: int :required/optional: required """ return self._capacity_in_megabytes @capacity_in_megabytes.setter def capacity_in_megabytes(self, capacity_in_megabytes): """ Sets the capacity_in_megabytes of this CacheMemoryDimm. The capacity of the DIMM expressed in megabytes. :param capacity_in_megabytes: The capacity_in_megabytes of this CacheMemoryDimm. :type: int """ self._capacity_in_megabytes = capacity_in_megabytes @property def serial_number(self): """ Gets the serial_number of this CacheMemoryDimm. The serial number of the DIMM. :return: The serial_number of this CacheMemoryDimm. :rtype: str :required/optional: required """ return self._serial_number @serial_number.setter def serial_number(self, serial_number): """ Sets the serial_number of this CacheMemoryDimm. The serial number of the DIMM. :param serial_number: The serial_number of this CacheMemoryDimm. :type: str """ self._serial_number = serial_number @property def part_number(self): """ Gets the part_number of this CacheMemoryDimm. The LSI Logic part number of the DIMM. :return: The part_number of this CacheMemoryDimm. :rtype: str :required/optional: required """ return self._part_number @part_number.setter def part_number(self, part_number): """ Sets the part_number of this CacheMemoryDimm. The LSI Logic part number of the DIMM. :param part_number: The part_number of this CacheMemoryDimm. :type: str """ self._part_number = part_number @property def oem_part_number(self): """ Gets the oem_part_number of this CacheMemoryDimm. The OEM part number of the DIMM. :return: The oem_part_number of this CacheMemoryDimm. :rtype: str :required/optional: required """ return self._oem_part_number @oem_part_number.setter def oem_part_number(self, oem_part_number): """ Sets the oem_part_number of this CacheMemoryDimm. The OEM part number of the DIMM. :param oem_part_number: The oem_part_number of this CacheMemoryDimm. :type: str """ self._oem_part_number = oem_part_number @property def manufacturer_part_number(self): """ Gets the manufacturer_part_number of this CacheMemoryDimm. The manufacturer part number of the DIMM. :return: The manufacturer_part_number of this CacheMemoryDimm. :rtype: str :required/optional: required """ return self._manufacturer_part_number @manufacturer_part_number.setter def manufacturer_part_number(self, manufacturer_part_number): """ Sets the manufacturer_part_number of this CacheMemoryDimm. The manufacturer part number of the DIMM. :param manufacturer_part_number: The manufacturer_part_number of this CacheMemoryDimm. :type: str """ self._manufacturer_part_number = manufacturer_part_number @property def manufacturer(self): """ Gets the manufacturer of this CacheMemoryDimm. The manufacturer part number of the DIMM. :return: The manufacturer of this CacheMemoryDimm. :rtype: str :required/optional: required """ return self._manufacturer @manufacturer.setter def manufacturer(self, manufacturer): """ Sets the manufacturer of this CacheMemoryDimm. The manufacturer part number of the DIMM. :param manufacturer: The manufacturer of this CacheMemoryDimm. :type: str """ self._manufacturer = manufacturer @property def manufacture_date(self): """ Gets the manufacture_date of this CacheMemoryDimm. The manufacture date of the DIMM :return: The manufacture_date of this CacheMemoryDimm. :rtype: int :required/optional: required """ return self._manufacture_date @manufacture_date.setter def manufacture_date(self, manufacture_date): """ Sets the manufacture_date of this CacheMemoryDimm. The manufacture date of the DIMM :param manufacture_date: The manufacture_date of this CacheMemoryDimm. :type: int """ self._manufacture_date = manufacture_date @property def repair_policy(self): """ Gets the repair_policy of this CacheMemoryDimm. The repair policy for the cache memory DIMM component. :return: The repair_policy of this CacheMemoryDimm. :rtype: RepairPolicy :required/optional: required """ return self._repair_policy @repair_policy.setter def repair_policy(self, repair_policy): """ Sets the repair_policy of this CacheMemoryDimm. The repair policy for the cache memory DIMM component. :param repair_policy: The repair_policy of this CacheMemoryDimm. :type: RepairPolicy """ self._repair_policy = repair_policy @property def physical_location(self): """ Gets the physical_location of this CacheMemoryDimm. The physical location of the cache memory DIMM. The parent reference in Location identifies the controller where the DIMM physically resides, and the position field is the parent-relative/like-component relative slot number of the DIMM, starting at 1. :return: The physical_location of this CacheMemoryDimm. :rtype: Location :required/optional: required """ return self._physical_location @physical_location.setter def physical_location(self, physical_location): """ Sets the physical_location of this CacheMemoryDimm. The physical location of the cache memory DIMM. The parent reference in Location identifies the controller where the DIMM physically resides, and the position field is the parent-relative/like-component relative slot number of the DIMM, starting at 1. :param physical_location: The physical_location of this CacheMemoryDimm. :type: Location """ self._physical_location = physical_location @property def shared(self): """ Gets the shared of this CacheMemoryDimm. This field is set to true if the DIMM is shared between processor and cache. It is set to false if the DIMM is dedicated to the cache. :return: The shared of this CacheMemoryDimm. :rtype: bool :required/optional: required """ return self._shared @shared.setter def shared(self, shared): """ Sets the shared of this CacheMemoryDimm. This field is set to true if the DIMM is shared between processor and cache. It is set to false if the DIMM is dedicated to the cache. :param shared: The shared of this CacheMemoryDimm. :type: bool """ self._shared = shared @property def revision_code(self): """ Gets the revision_code of this CacheMemoryDimm. The module revision code of the DIMM. :return: The revision_code of this CacheMemoryDimm. :rtype: str :required/optional: required """ return self._revision_code @revision_code.setter def revision_code(self, revision_code): """ Sets the revision_code of this CacheMemoryDimm. The module revision code of the DIMM. :param revision_code: The revision_code of this CacheMemoryDimm. :type: str """ self._revision_code = revision_code
[docs] def to_dict(self): """ Returns the model properties as a dict """ result = {} for attr, _ in 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
[docs] def to_str(self): """ Returns the string representation of the model """ return pformat(self.to_dict())
def __repr__(self): """ For `print` and `pprint` """ if self is None: return None return self.to_str() def __eq__(self, other): """ Returns true if both objects are equal """ if self is None or other is None: return None return self.__dict__ == other.__dict__ def __ne__(self, other): """ Returns true if both objects are not equal """ return not self == other