# coding: utf-8

"""
    VPlex REST API

    A defnition for the next-gen VPlex API  # noqa: E501

    OpenAPI spec version: 0.1
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from vplexapi.models.connectivity_status import ConnectivityStatus  # noqa: F401,E501


class LogicalUnit(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 = {
        'name': 'str',
        'active_aao_controller': 'list[str]',
        'passive_aan_controller': 'list[str]',
        'active_aao_visibility': 'list[str]',
        'passive_aan_visibility': 'list[str]',
        'connectivity_status': 'ConnectivityStatus',
        'luns': 'list[str]',
        'storage_volume': 'str',
        'visibility': 'str',
        'alua_support': 'str'
    }

    attribute_map = {
        'name': 'name',
        'active_aao_controller': 'active_aao_controller',
        'passive_aan_controller': 'passive_aan_controller',
        'active_aao_visibility': 'active_aao_visibility',
        'passive_aan_visibility': 'passive_aan_visibility',
        'connectivity_status': 'connectivity_status',
        'luns': 'luns',
        'storage_volume': 'storage_volume',
        'visibility': 'visibility',
        'alua_support': 'alua_support'
    }

    def __init__(self, name=None, active_aao_controller=None, passive_aan_controller=None, active_aao_visibility=None, passive_aan_visibility=None, connectivity_status=None, luns=None, storage_volume=None, visibility=None, alua_support=None):  # noqa: E501
        """LogicalUnit - a model defined in Swagger"""  # noqa: E501

        self._name = None
        self._active_aao_controller = None
        self._passive_aan_controller = None
        self._active_aao_visibility = None
        self._passive_aan_visibility = None
        self._connectivity_status = None
        self._luns = None
        self._storage_volume = None
        self._visibility = None
        self._alua_support = None
        self.discriminator = None

        if name is not None:
            self.name = name
        if active_aao_controller is not None:
            self.active_aao_controller = active_aao_controller
        if passive_aan_controller is not None:
            self.passive_aan_controller = passive_aan_controller
        if active_aao_visibility is not None:
            self.active_aao_visibility = active_aao_visibility
        if passive_aan_visibility is not None:
            self.passive_aan_visibility = passive_aan_visibility
        if connectivity_status is not None:
            self.connectivity_status = connectivity_status
        if luns is not None:
            self.luns = luns
        if storage_volume is not None:
            self.storage_volume = storage_volume
        if visibility is not None:
            self.visibility = visibility
        if alua_support is not None:
            self.alua_support = alua_support

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


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

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


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

        self._name = name

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


        :return: The active_aao_controller of this LogicalUnit.  # noqa: E501
        :rtype: list[str]
        """
        return self._active_aao_controller

    @active_aao_controller.setter
    def active_aao_controller(self, active_aao_controller):
        """Sets the active_aao_controller of this LogicalUnit.


        :param active_aao_controller: The active_aao_controller of this LogicalUnit.  # noqa: E501
        :type: list[str]
        """

        self._active_aao_controller = active_aao_controller

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


        :return: The passive_aan_controller of this LogicalUnit.  # noqa: E501
        :rtype: list[str]
        """
        return self._passive_aan_controller

    @passive_aan_controller.setter
    def passive_aan_controller(self, passive_aan_controller):
        """Sets the passive_aan_controller of this LogicalUnit.


        :param passive_aan_controller: The passive_aan_controller of this LogicalUnit.  # noqa: E501
        :type: list[str]
        """

        self._passive_aan_controller = passive_aan_controller

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


        :return: The active_aao_visibility of this LogicalUnit.  # noqa: E501
        :rtype: list[str]
        """
        return self._active_aao_visibility

    @active_aao_visibility.setter
    def active_aao_visibility(self, active_aao_visibility):
        """Sets the active_aao_visibility of this LogicalUnit.


        :param active_aao_visibility: The active_aao_visibility of this LogicalUnit.  # noqa: E501
        :type: list[str]
        """

        self._active_aao_visibility = active_aao_visibility

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


        :return: The passive_aan_visibility of this LogicalUnit.  # noqa: E501
        :rtype: list[str]
        """
        return self._passive_aan_visibility

    @passive_aan_visibility.setter
    def passive_aan_visibility(self, passive_aan_visibility):
        """Sets the passive_aan_visibility of this LogicalUnit.


        :param passive_aan_visibility: The passive_aan_visibility of this LogicalUnit.  # noqa: E501
        :type: list[str]
        """

        self._passive_aan_visibility = passive_aan_visibility

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


        :return: The connectivity_status of this LogicalUnit.  # noqa: E501
        :rtype: ConnectivityStatus
        """
        return self._connectivity_status

    @connectivity_status.setter
    def connectivity_status(self, connectivity_status):
        """Sets the connectivity_status of this LogicalUnit.


        :param connectivity_status: The connectivity_status of this LogicalUnit.  # noqa: E501
        :type: ConnectivityStatus
        """

        self._connectivity_status = connectivity_status

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


        :return: The luns of this LogicalUnit.  # noqa: E501
        :rtype: list[str]
        """
        return self._luns

    @luns.setter
    def luns(self, luns):
        """Sets the luns of this LogicalUnit.


        :param luns: The luns of this LogicalUnit.  # noqa: E501
        :type: list[str]
        """

        self._luns = luns

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


        :return: The storage_volume of this LogicalUnit.  # noqa: E501
        :rtype: str
        """
        return self._storage_volume

    @storage_volume.setter
    def storage_volume(self, storage_volume):
        """Sets the storage_volume of this LogicalUnit.


        :param storage_volume: The storage_volume of this LogicalUnit.  # noqa: E501
        :type: str
        """

        self._storage_volume = storage_volume

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


        :return: The visibility of this LogicalUnit.  # noqa: E501
        :rtype: str
        """
        return self._visibility

    @visibility.setter
    def visibility(self, visibility):
        """Sets the visibility of this LogicalUnit.


        :param visibility: The visibility of this LogicalUnit.  # noqa: E501
        :type: str
        """
        allowed_values = ["active", "passsive", "active-optimized", "active-non-optimized", "both", "both-alua", "none"]  # noqa: E501
        if visibility not in allowed_values:
            raise ValueError(
                "Invalid value for `visibility` ({0}), must be one of {1}"  # noqa: E501
                .format(visibility, allowed_values)
            )

        self._visibility = visibility

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


        :return: The alua_support of this LogicalUnit.  # noqa: E501
        :rtype: str
        """
        return self._alua_support

    @alua_support.setter
    def alua_support(self, alua_support):
        """Sets the alua_support of this LogicalUnit.


        :param alua_support: The alua_support of this LogicalUnit.  # noqa: E501
        :type: str
        """
        allowed_values = ["implicit", "explicit", "none", "implicit-explicit"]  # noqa: E501
        if alua_support not in allowed_values:
            raise ValueError(
                "Invalid value for `alua_support` ({0}), must be one of {1}"  # noqa: E501
                .format(alua_support, allowed_values)
            )

        self._alua_support = alua_support

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

        return self.__dict__ == other.__dict__

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