# coding: utf-8

"""
HostEx.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 HostEx(object):
    """
    NOTE: This class is auto generated by the swagger code generator program.
    Do not edit the class manually.
    """
    def __init__(self):
        """
        HostEx - 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 = {
            'host_ref': 'str',  # (required parameter)
            'cluster_ref': 'str',  # (required parameter)
            'label': 'str',  # (required parameter)
            'is_sa_controlled': 'bool',  # (required parameter)
            'confirm_lun_mapping_creation': 'bool',  # (required parameter)
            'host_type_index': 'int',  # (required parameter)
            'protection_information_capable_access_method': 'bool',  # (required parameter)
            'is_large_block_format_host': 'bool',  # (required parameter)
            'ports': 'list[HostPort]',  
            'initiators': 'list[Initiator]',  
            'host_side_ports': 'list[HostSidePort]',  
            'id': 'str',  
            'name': 'str'
        }

        self.attribute_map = {
            'host_ref': 'hostRef',  # (required parameter)
            'cluster_ref': 'clusterRef',  # (required parameter)
            'label': 'label',  # (required parameter)
            'is_sa_controlled': 'isSAControlled',  # (required parameter)
            'confirm_lun_mapping_creation': 'confirmLUNMappingCreation',  # (required parameter)
            'host_type_index': 'hostTypeIndex',  # (required parameter)
            'protection_information_capable_access_method': 'protectionInformationCapableAccessMethod',  # (required parameter)
            'is_large_block_format_host': 'isLargeBlockFormatHost',  # (required parameter)
            'ports': 'ports',  
            'initiators': 'initiators',  
            'host_side_ports': 'hostSidePorts',  
            'id': 'id',  
            'name': 'name'
        }

        self._host_ref = None
        self._cluster_ref = None
        self._label = None
        self._is_sa_controlled = None
        self._confirm_lun_mapping_creation = None
        self._host_type_index = None
        self._protection_information_capable_access_method = None
        self._is_large_block_format_host = None
        self._ports = None
        self._initiators = None
        self._host_side_ports = None
        self._id = None
        self._name = None

    @property
    def host_ref(self):
        """
        Gets the host_ref of this HostEx.
        The unique identification value for this object. Other objects may use this reference value to refer to the host.

        :return: The host_ref of this HostEx.
        :rtype: str
        :required/optional: required
        """
        return self._host_ref

    @host_ref.setter
    def host_ref(self, host_ref):
        """
        Sets the host_ref of this HostEx.
        The unique identification value for this object. Other objects may use this reference value to refer to the host.

        :param host_ref: The host_ref of this HostEx.
        :type: str
        """
        self._host_ref = host_ref

    @property
    def cluster_ref(self):
        """
        Gets the cluster_ref of this HostEx.
        The cluster reference value of the cluster in which this host resides. A NULL reference value indicates that the host has not been assigned to a cluster.

        :return: The cluster_ref of this HostEx.
        :rtype: str
        :required/optional: required
        """
        return self._cluster_ref

    @cluster_ref.setter
    def cluster_ref(self, cluster_ref):
        """
        Sets the cluster_ref of this HostEx.
        The cluster reference value of the cluster in which this host resides. A NULL reference value indicates that the host has not been assigned to a cluster.

        :param cluster_ref: The cluster_ref of this HostEx.
        :type: str
        """
        self._cluster_ref = cluster_ref

    @property
    def label(self):
        """
        Gets the label of this HostEx.
        The user-assigned, descriptive label string for the host.

        :return: The label of this HostEx.
        :rtype: str
        :required/optional: required
        """
        return self._label

    @label.setter
    def label(self, label):
        """
        Sets the label of this HostEx.
        The user-assigned, descriptive label string for the host.

        :param label: The label of this HostEx.
        :type: str
        """
        self._label = label

    @property
    def is_sa_controlled(self):
        """
        Gets the is_sa_controlled of this HostEx.
        If true, indicates that I/O accesses from this host are subject to the storage array's default LUN-to-volume mappings. If false, indicates that I/O accesses from the host are subject to host-specific or cluster-specific LUN-to-volume mappings.

        :return: The is_sa_controlled of this HostEx.
        :rtype: bool
        :required/optional: required
        """
        return self._is_sa_controlled

    @is_sa_controlled.setter
    def is_sa_controlled(self, is_sa_controlled):
        """
        Sets the is_sa_controlled of this HostEx.
        If true, indicates that I/O accesses from this host are subject to the storage array's default LUN-to-volume mappings. If false, indicates that I/O accesses from the host are subject to host-specific or cluster-specific LUN-to-volume mappings.

        :param is_sa_controlled: The is_sa_controlled of this HostEx.
        :type: bool
        """
        self._is_sa_controlled = is_sa_controlled

    @property
    def confirm_lun_mapping_creation(self):
        """
        Gets the confirm_lun_mapping_creation of this HostEx.
        If true, indicates that creation of LUN-to-volume mappings should require careful confirmation from the end-user, since such a mapping will alter the volume access rights of other hosts, in addition to this one.

        :return: The confirm_lun_mapping_creation of this HostEx.
        :rtype: bool
        :required/optional: required
        """
        return self._confirm_lun_mapping_creation

    @confirm_lun_mapping_creation.setter
    def confirm_lun_mapping_creation(self, confirm_lun_mapping_creation):
        """
        Sets the confirm_lun_mapping_creation of this HostEx.
        If true, indicates that creation of LUN-to-volume mappings should require careful confirmation from the end-user, since such a mapping will alter the volume access rights of other hosts, in addition to this one.

        :param confirm_lun_mapping_creation: The confirm_lun_mapping_creation of this HostEx.
        :type: bool
        """
        self._confirm_lun_mapping_creation = confirm_lun_mapping_creation

    @property
    def host_type_index(self):
        """
        Gets the host_type_index of this HostEx.
        An integer index indicating the type of host.

        :return: The host_type_index of this HostEx.
        :rtype: int
        :required/optional: required
        """
        return self._host_type_index

    @host_type_index.setter
    def host_type_index(self, host_type_index):
        """
        Sets the host_type_index of this HostEx.
        An integer index indicating the type of host.

        :param host_type_index: The host_type_index of this HostEx.
        :type: int
        """
        self._host_type_index = host_type_index

    @property
    def protection_information_capable_access_method(self):
        """
        Gets the protection_information_capable_access_method of this HostEx.
        This field is true if the host has a PI capable access method.

        :return: The protection_information_capable_access_method of this HostEx.
        :rtype: bool
        :required/optional: required
        """
        return self._protection_information_capable_access_method

    @protection_information_capable_access_method.setter
    def protection_information_capable_access_method(self, protection_information_capable_access_method):
        """
        Sets the protection_information_capable_access_method of this HostEx.
        This field is true if the host has a PI capable access method.

        :param protection_information_capable_access_method: The protection_information_capable_access_method of this HostEx.
        :type: bool
        """
        self._protection_information_capable_access_method = protection_information_capable_access_method

    @property
    def is_large_block_format_host(self):
        """
        Gets the is_large_block_format_host of this HostEx.
        If true, the host is capable of supporting large block formats.

        :return: The is_large_block_format_host of this HostEx.
        :rtype: bool
        :required/optional: required
        """
        return self._is_large_block_format_host

    @is_large_block_format_host.setter
    def is_large_block_format_host(self, is_large_block_format_host):
        """
        Sets the is_large_block_format_host of this HostEx.
        If true, the host is capable of supporting large block formats.

        :param is_large_block_format_host: The is_large_block_format_host of this HostEx.
        :type: bool
        """
        self._is_large_block_format_host = is_large_block_format_host

    @property
    def ports(self):
        """
        Gets the ports of this HostEx.


        :return: The ports of this HostEx.
        :rtype: list[HostPort]
        :required/optional: optional
        """
        return self._ports

    @ports.setter
    def ports(self, ports):
        """
        Sets the ports of this HostEx.


        :param ports: The ports of this HostEx.
        :type: list[HostPort]
        """
        self._ports = ports

    @property
    def initiators(self):
        """
        Gets the initiators of this HostEx.


        :return: The initiators of this HostEx.
        :rtype: list[Initiator]
        :required/optional: optional
        """
        return self._initiators

    @initiators.setter
    def initiators(self, initiators):
        """
        Sets the initiators of this HostEx.


        :param initiators: The initiators of this HostEx.
        :type: list[Initiator]
        """
        self._initiators = initiators

    @property
    def host_side_ports(self):
        """
        Gets the host_side_ports of this HostEx.


        :return: The host_side_ports of this HostEx.
        :rtype: list[HostSidePort]
        :required/optional: optional
        """
        return self._host_side_ports

    @host_side_ports.setter
    def host_side_ports(self, host_side_ports):
        """
        Sets the host_side_ports of this HostEx.


        :param host_side_ports: The host_side_ports of this HostEx.
        :type: list[HostSidePort]
        """
        self._host_side_ports = host_side_ports

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


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

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


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

    @property
    def name(self):
        """
        Gets the name of this HostEx.


        :return: The name of this HostEx.
        :rtype: str
        :required/optional: optional
        """
        return self._name

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


        :param name: The name of this HostEx.
        :type: str
        """
        self._name = name

    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

