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

# coding: utf-8

"""
ProcessorMemoryDimm.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 ProcessorMemoryDimm(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self): """ ProcessorMemoryDimm - 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 = { 'processor_memory_dimm_ref': 'str', # (required parameter) 'parent_controller': 'str', # (required parameter) 'dimm_controller_slot': 'int', # (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) 'revision_code': 'str' } self.attribute_map = { 'processor_memory_dimm_ref': 'processorMemoryDimmRef', # (required parameter) 'parent_controller': 'parentController', # (required parameter) 'dimm_controller_slot': 'dimmControllerSlot', # (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) 'revision_code': 'revisionCode' } self._processor_memory_dimm_ref = None self._parent_controller = None self._dimm_controller_slot = 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._revision_code = None @property def processor_memory_dimm_ref(self): """ Gets the processor_memory_dimm_ref of this ProcessorMemoryDimm. The SYMbol reference value that uniquely identifies an instance of a cache memory DIMM object. :return: The processor_memory_dimm_ref of this ProcessorMemoryDimm. :rtype: str :required/optional: required """ return self._processor_memory_dimm_ref @processor_memory_dimm_ref.setter def processor_memory_dimm_ref(self, processor_memory_dimm_ref): """ Sets the processor_memory_dimm_ref of this ProcessorMemoryDimm. The SYMbol reference value that uniquely identifies an instance of a cache memory DIMM object. :param processor_memory_dimm_ref: The processor_memory_dimm_ref of this ProcessorMemoryDimm. :type: str """ self._processor_memory_dimm_ref = processor_memory_dimm_ref @property def parent_controller(self): """ Gets the parent_controller of this ProcessorMemoryDimm. The SYMbol reference of the DIMM's parent controller. :return: The parent_controller of this ProcessorMemoryDimm. :rtype: str :required/optional: required """ return self._parent_controller @parent_controller.setter def parent_controller(self, parent_controller): """ Sets the parent_controller of this ProcessorMemoryDimm. The SYMbol reference of the DIMM's parent controller. :param parent_controller: The parent_controller of this ProcessorMemoryDimm. :type: str """ self._parent_controller = parent_controller @property def dimm_controller_slot(self): """ Gets the dimm_controller_slot of this ProcessorMemoryDimm. The controller-relative slot number of the DIMM, where \"1\" is the first slot number. :return: The dimm_controller_slot of this ProcessorMemoryDimm. :rtype: int :required/optional: required """ return self._dimm_controller_slot @dimm_controller_slot.setter def dimm_controller_slot(self, dimm_controller_slot): """ Sets the dimm_controller_slot of this ProcessorMemoryDimm. The controller-relative slot number of the DIMM, where \"1\" is the first slot number. :param dimm_controller_slot: The dimm_controller_slot of this ProcessorMemoryDimm. :type: int """ self._dimm_controller_slot = dimm_controller_slot @property def status(self): """ Gets the status of this ProcessorMemoryDimm. The operational status of the DIMM. :return: The status of this ProcessorMemoryDimm. :rtype: str :required/optional: required """ return self._status @status.setter def status(self, status): """ Sets the status of this ProcessorMemoryDimm. The operational status of the DIMM. :param status: The status of this ProcessorMemoryDimm. :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 ProcessorMemoryDimm. The capacity of the DIMM expressed in megabytes. :return: The capacity_in_megabytes of this ProcessorMemoryDimm. :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 ProcessorMemoryDimm. The capacity of the DIMM expressed in megabytes. :param capacity_in_megabytes: The capacity_in_megabytes of this ProcessorMemoryDimm. :type: int """ self._capacity_in_megabytes = capacity_in_megabytes @property def serial_number(self): """ Gets the serial_number of this ProcessorMemoryDimm. The serial number of the DIMM. :return: The serial_number of this ProcessorMemoryDimm. :rtype: str :required/optional: required """ return self._serial_number @serial_number.setter def serial_number(self, serial_number): """ Sets the serial_number of this ProcessorMemoryDimm. The serial number of the DIMM. :param serial_number: The serial_number of this ProcessorMemoryDimm. :type: str """ self._serial_number = serial_number @property def part_number(self): """ Gets the part_number of this ProcessorMemoryDimm. The LSI Logic part number of the DIMM. :return: The part_number of this ProcessorMemoryDimm. :rtype: str :required/optional: required """ return self._part_number @part_number.setter def part_number(self, part_number): """ Sets the part_number of this ProcessorMemoryDimm. The LSI Logic part number of the DIMM. :param part_number: The part_number of this ProcessorMemoryDimm. :type: str """ self._part_number = part_number @property def oem_part_number(self): """ Gets the oem_part_number of this ProcessorMemoryDimm. The OEM part number of the DIMM. :return: The oem_part_number of this ProcessorMemoryDimm. :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 ProcessorMemoryDimm. The OEM part number of the DIMM. :param oem_part_number: The oem_part_number of this ProcessorMemoryDimm. :type: str """ self._oem_part_number = oem_part_number @property def manufacturer_part_number(self): """ Gets the manufacturer_part_number of this ProcessorMemoryDimm. The manufacturer part number of the DIMM. :return: The manufacturer_part_number of this ProcessorMemoryDimm. :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 ProcessorMemoryDimm. The manufacturer part number of the DIMM. :param manufacturer_part_number: The manufacturer_part_number of this ProcessorMemoryDimm. :type: str """ self._manufacturer_part_number = manufacturer_part_number @property def manufacturer(self): """ Gets the manufacturer of this ProcessorMemoryDimm. The manufacturer part number of the DIMM. :return: The manufacturer of this ProcessorMemoryDimm. :rtype: str :required/optional: required """ return self._manufacturer @manufacturer.setter def manufacturer(self, manufacturer): """ Sets the manufacturer of this ProcessorMemoryDimm. The manufacturer part number of the DIMM. :param manufacturer: The manufacturer of this ProcessorMemoryDimm. :type: str """ self._manufacturer = manufacturer @property def manufacture_date(self): """ Gets the manufacture_date of this ProcessorMemoryDimm. The manufacture date of the DIMM :return: The manufacture_date of this ProcessorMemoryDimm. :rtype: int :required/optional: required """ return self._manufacture_date @manufacture_date.setter def manufacture_date(self, manufacture_date): """ Sets the manufacture_date of this ProcessorMemoryDimm. The manufacture date of the DIMM :param manufacture_date: The manufacture_date of this ProcessorMemoryDimm. :type: int """ self._manufacture_date = manufacture_date @property def repair_policy(self): """ Gets the repair_policy of this ProcessorMemoryDimm. The repair policy for the processor memory DIMM component. :return: The repair_policy of this ProcessorMemoryDimm. :rtype: RepairPolicy :required/optional: required """ return self._repair_policy @repair_policy.setter def repair_policy(self, repair_policy): """ Sets the repair_policy of this ProcessorMemoryDimm. The repair policy for the processor memory DIMM component. :param repair_policy: The repair_policy of this ProcessorMemoryDimm. :type: RepairPolicy """ self._repair_policy = repair_policy @property def physical_location(self): """ Gets the physical_location of this ProcessorMemoryDimm. The physical location of the processor memory DIMM. The parent field of Location is set to 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 one. :return: The physical_location of this ProcessorMemoryDimm. :rtype: Location :required/optional: required """ return self._physical_location @physical_location.setter def physical_location(self, physical_location): """ Sets the physical_location of this ProcessorMemoryDimm. The physical location of the processor memory DIMM. The parent field of Location is set to 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 one. :param physical_location: The physical_location of this ProcessorMemoryDimm. :type: Location """ self._physical_location = physical_location @property def revision_code(self): """ Gets the revision_code of this ProcessorMemoryDimm. The module revision code of the DIMM. :return: The revision_code of this ProcessorMemoryDimm. :rtype: str :required/optional: required """ return self._revision_code @revision_code.setter def revision_code(self, revision_code): """ Sets the revision_code of this ProcessorMemoryDimm. The module revision code of the DIMM. :param revision_code: The revision_code of this ProcessorMemoryDimm. :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