# coding: utf-8

"""
HostBoard.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


class HostBoard(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self):
        """
        HostBoard - 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 = {
            'parent_controller': 'str',  # (required parameter)
            'part_number': 'str',  # (required parameter)
            'serial_number': 'str',  # (required parameter)
            'vendor_name': 'str',  # (required parameter)
            'manufacturer_date': 'int',  # (required parameter)
            'fru_type': 'str',  # (required parameter)
            'host_board_id': 'str',  # (required parameter)
            'status': 'str',  # (required parameter)
            'type': 'str',  # (required parameter)
            'host_board_ref': 'str',  # (required parameter)
            'number_of_ports': 'int',  # (required parameter)
            'hb_type_data': 'HostBoardTypeData',  # (required parameter)
            'oem_part_number': 'str',  # (required parameter)
            'host_board_controller_slot': 'int',  # (required parameter)
            'repair_policy': 'RepairPolicy',  # (required parameter)
            'physical_location': 'Location',  # (required parameter)
            'id': 'str'
        }

        self.attribute_map = {
            'parent_controller': 'parentController',  # (required parameter)
            'part_number': 'partNumber',  # (required parameter)
            'serial_number': 'serialNumber',  # (required parameter)
            'vendor_name': 'vendorName',  # (required parameter)
            'manufacturer_date': 'manufacturerDate',  # (required parameter)
            'fru_type': 'fruType',  # (required parameter)
            'host_board_id': 'hostBoardId',  # (required parameter)
            'status': 'status',  # (required parameter)
            'type': 'type',  # (required parameter)
            'host_board_ref': 'hostBoardRef',  # (required parameter)
            'number_of_ports': 'numberOfPorts',  # (required parameter)
            'hb_type_data': 'hbTypeData',  # (required parameter)
            'oem_part_number': 'oemPartNumber',  # (required parameter)
            'host_board_controller_slot': 'hostBoardControllerSlot',  # (required parameter)
            'repair_policy': 'repairPolicy',  # (required parameter)
            'physical_location': 'physicalLocation',  # (required parameter)
            'id': 'id'
        }

        self._parent_controller = None
        self._part_number = None
        self._serial_number = None
        self._vendor_name = None
        self._manufacturer_date = None
        self._fru_type = None
        self._host_board_id = None
        self._status = None
        self._type = None
        self._host_board_ref = None
        self._number_of_ports = None
        self._hb_type_data = None
        self._oem_part_number = None
        self._host_board_controller_slot = None
        self._repair_policy = None
        self._physical_location = None
        self._id = None

    @property
    def parent_controller(self):
        """
        Gets the parent_controller of this HostBoard.
        The controller associated with the host board.

        :return: The parent_controller of this HostBoard.
        :rtype: str
        :required/optional: required
        """
        return self._parent_controller

    @parent_controller.setter
    def parent_controller(self, parent_controller):
        """
        Sets the parent_controller of this HostBoard.
        The controller associated with the host board.

        :param parent_controller: The parent_controller of this HostBoard.
        :type: str
        """
        self._parent_controller = parent_controller

    @property
    def part_number(self):
        """
        Gets the part_number of this HostBoard.
        The host board's part number, from VPD.

        :return: The part_number of this HostBoard.
        :rtype: str
        :required/optional: required
        """
        return self._part_number

    @part_number.setter
    def part_number(self, part_number):
        """
        Sets the part_number of this HostBoard.
        The host board's part number, from VPD.

        :param part_number: The part_number of this HostBoard.
        :type: str
        """
        self._part_number = part_number

    @property
    def serial_number(self):
        """
        Gets the serial_number of this HostBoard.
        The host board's serial number, from VPD.

        :return: The serial_number of this HostBoard.
        :rtype: str
        :required/optional: required
        """
        return self._serial_number

    @serial_number.setter
    def serial_number(self, serial_number):
        """
        Sets the serial_number of this HostBoard.
        The host board's serial number, from VPD.

        :param serial_number: The serial_number of this HostBoard.
        :type: str
        """
        self._serial_number = serial_number

    @property
    def vendor_name(self):
        """
        Gets the vendor_name of this HostBoard.
        The host board's vendor name, from VPD.

        :return: The vendor_name of this HostBoard.
        :rtype: str
        :required/optional: required
        """
        return self._vendor_name

    @vendor_name.setter
    def vendor_name(self, vendor_name):
        """
        Sets the vendor_name of this HostBoard.
        The host board's vendor name, from VPD.

        :param vendor_name: The vendor_name of this HostBoard.
        :type: str
        """
        self._vendor_name = vendor_name

    @property
    def manufacturer_date(self):
        """
        Gets the manufacturer_date of this HostBoard.
        The host board's date of manufacture, from VPD.

        :return: The manufacturer_date of this HostBoard.
        :rtype: int
        :required/optional: required
        """
        return self._manufacturer_date

    @manufacturer_date.setter
    def manufacturer_date(self, manufacturer_date):
        """
        Sets the manufacturer_date of this HostBoard.
        The host board's date of manufacture, from VPD.

        :param manufacturer_date: The manufacturer_date of this HostBoard.
        :type: int
        """
        self._manufacturer_date = manufacturer_date

    @property
    def fru_type(self):
        """
        Gets the fru_type of this HostBoard.
        The field replaceable unit type string, from VPD.

        :return: The fru_type of this HostBoard.
        :rtype: str
        :required/optional: required
        """
        return self._fru_type

    @fru_type.setter
    def fru_type(self, fru_type):
        """
        Sets the fru_type of this HostBoard.
        The field replaceable unit type string, from VPD.

        :param fru_type: The fru_type of this HostBoard.
        :type: str
        """
        self._fru_type = fru_type

    @property
    def host_board_id(self):
        """
        Gets the host_board_id of this HostBoard.
        The board ID of the controller's host card.

        :return: The host_board_id of this HostBoard.
        :rtype: str
        :required/optional: required
        """
        return self._host_board_id

    @host_board_id.setter
    def host_board_id(self, host_board_id):
        """
        Sets the host_board_id of this HostBoard.
        The board ID of the controller's host card.

        :param host_board_id: The host_board_id of this HostBoard.
        :type: str
        """
        self._host_board_id = host_board_id

    @property
    def status(self):
        """
        Gets the status of this HostBoard.
        The host board's status.

        :return: The status of this HostBoard.
        :rtype: str
        :required/optional: required
        """
        return self._status

    @status.setter
    def status(self, status):
        """
        Sets the status of this HostBoard.
        The host board's status.

        :param status: The status of this HostBoard.
        :type: str
        """
        allowed_values = ["unknown", "optimal", "needsAttention", "notPresent", "degraded", "failed", "diagInProgress", "__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 type(self):
        """
        Gets the type of this HostBoard.
        The host board's type.

        :return: The type of this HostBoard.
        :rtype: str
        :required/optional: required
        """
        return self._type

    @type.setter
    def type(self, type):
        """
        Sets the type of this HostBoard.
        The host board's type.

        :param type: The type of this HostBoard.
        :type: str
        """
        allowed_values = ["typeUnknown", "type4portFc", "type20portSwitchedFc", "type1portSas", "type2portFc", "type2portIscsi", "type2portSas", "type2portIb", "type8portFc", "type4portIscsi", "type4portSas", "type4portSasGlacier", "type2portFcIscsiSamoa", "type4portFcIscsiSamoa", "type2portIscsiZion", "type2portSasAcadia", "type4portSasAcadia", "type2portIbDenali", "type2portFcSamoa", "type4portFcSamoa", "type2portIscsiSamoa", "type4portIscsiSamoa", "__UNDEFINED"]
        if type not in allowed_values:
            raise ValueError(
                "Invalid value for `type`, must be one of {0}"
                .format(allowed_values)
            )
        self._type = type

    @property
    def host_board_ref(self):
        """
        Gets the host_board_ref of this HostBoard.
        The reference for this physical host board.

        :return: The host_board_ref of this HostBoard.
        :rtype: str
        :required/optional: required
        """
        return self._host_board_ref

    @host_board_ref.setter
    def host_board_ref(self, host_board_ref):
        """
        Sets the host_board_ref of this HostBoard.
        The reference for this physical host board.

        :param host_board_ref: The host_board_ref of this HostBoard.
        :type: str
        """
        self._host_board_ref = host_board_ref

    @property
    def number_of_ports(self):
        """
        Gets the number_of_ports of this HostBoard.
        The number of ports provided by the host board.

        :return: The number_of_ports of this HostBoard.
        :rtype: int
        :required/optional: required
        """
        return self._number_of_ports

    @number_of_ports.setter
    def number_of_ports(self, number_of_ports):
        """
        Sets the number_of_ports of this HostBoard.
        The number of ports provided by the host board.

        :param number_of_ports: The number_of_ports of this HostBoard.
        :type: int
        """
        self._number_of_ports = number_of_ports

    @property
    def hb_type_data(self):
        """
        Gets the hb_type_data of this HostBoard.
        Data that is specific to the type of host board.

        :return: The hb_type_data of this HostBoard.
        :rtype: HostBoardTypeData
        :required/optional: required
        """
        return self._hb_type_data

    @hb_type_data.setter
    def hb_type_data(self, hb_type_data):
        """
        Sets the hb_type_data of this HostBoard.
        Data that is specific to the type of host board.

        :param hb_type_data: The hb_type_data of this HostBoard.
        :type: HostBoardTypeData
        """
        self._hb_type_data = hb_type_data

    @property
    def oem_part_number(self):
        """
        Gets the oem_part_number of this HostBoard.
        The OEM part number of the host board.

        :return: The oem_part_number of this HostBoard.
        :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 HostBoard.
        The OEM part number of the host board.

        :param oem_part_number: The oem_part_number of this HostBoard.
        :type: str
        """
        self._oem_part_number = oem_part_number

    @property
    def host_board_controller_slot(self):
        """
        Gets the host_board_controller_slot of this HostBoard.
        The number of the slot on the controller where the host board resides. Host board slots are numbered starting at one, independent of other types of slots (e.g., cache backup device slots) on the controller.

        :return: The host_board_controller_slot of this HostBoard.
        :rtype: int
        :required/optional: required
        """
        return self._host_board_controller_slot

    @host_board_controller_slot.setter
    def host_board_controller_slot(self, host_board_controller_slot):
        """
        Sets the host_board_controller_slot of this HostBoard.
        The number of the slot on the controller where the host board resides. Host board slots are numbered starting at one, independent of other types of slots (e.g., cache backup device slots) on the controller.

        :param host_board_controller_slot: The host_board_controller_slot of this HostBoard.
        :type: int
        """
        self._host_board_controller_slot = host_board_controller_slot

    @property
    def repair_policy(self):
        """
        Gets the repair_policy of this HostBoard.
        The repair policy for the host board component.

        :return: The repair_policy of this HostBoard.
        :rtype: RepairPolicy
        :required/optional: required
        """
        return self._repair_policy

    @repair_policy.setter
    def repair_policy(self, repair_policy):
        """
        Sets the repair_policy of this HostBoard.
        The repair policy for the host board component.

        :param repair_policy: The repair_policy of this HostBoard.
        :type: RepairPolicy
        """
        self._repair_policy = repair_policy

    @property
    def physical_location(self):
        """
        Gets the physical_location of this HostBoard.
        The physical location of the host board. The parent reference in Location identifies the controller where the host board is physically located, and the position field is the parent-relative/like-component relative slot number of the host card, starting at 1.

        :return: The physical_location of this HostBoard.
        :rtype: Location
        :required/optional: required
        """
        return self._physical_location

    @physical_location.setter
    def physical_location(self, physical_location):
        """
        Sets the physical_location of this HostBoard.
        The physical location of the host board. The parent reference in Location identifies the controller where the host board is physically located, and the position field is the parent-relative/like-component relative slot number of the host card, starting at 1.

        :param physical_location: The physical_location of this HostBoard.
        :type: Location
        """
        self._physical_location = physical_location

    @property
    def id(self):
        """
        Gets the id of this HostBoard.


        :return: The id of this HostBoard.
        :rtype: str
        :required/optional: optional
        """
        return self._id

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


        :param id: The id of this HostBoard.
        :type: str
        """
        self._id = id

    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

    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

