# coding: utf-8

"""
    Zadara VPSA Storage Array REST API

     # Overview  This document outlines the methods available for administrating your Zadara Storage VPSA&#8482;. The Zadara Storage Array REST API   supports form-encoded, JSON, and XML requests, and can return either JSON or XML responses.  ## Usage  The majority of the APIs available require authentication which requires an API token to use. You can retrieve this token through the   Users section of your VPSA, or through the API using the \"Return a user's access key\" API in the Users Section below.  ## Authentication Methods  The authentication token can be passed either through the access_key parameter inside of the body of the REST API request, or   through the X-Access-Key header.  ## Timeouts  By default, all operations that don't complete within five seconds will return a message informing you that the action may take some  time to complete. When using the API, this can cause some actions, such as large volume creation, to be undesirably asynchronous.  You can specify your own timeout with the timeout parameter, in seconds, and a timeout value of -1 specifies an infinite timeout.  ## Specific Fields For Product  Some of the fields/actions used in the API should be used only for a specific product. The following tags are used to mark which   product responds to the fields/actions  VPSA Flash Array  VPSA Storage Array - Hybrid VPSA  ## Questions  If you have any questions or need support involving the REST API, please contact for assistance.   # noqa: E501

    OpenAPI spec version: 23.03-sp1
    Contact: support@zadarastorage.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from Vpsa.configuration import Configuration


class UpdateServer(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 = {
        'force': 'str',
        'display_name': 'str',
        'os': 'str',
        'vpsachapuser': 'str',
        'vpsachapsecret': 'str',
        'hostchapuser': 'str',
        'hostchapsecret': 'str',
        'iqn': 'str',
        'iscsi': 'str',
        'ipsec_iscsi': 'str',
        'ipsec_nfs': 'str',
        'monitoring': 'str',
        'remove_wwpns': 'list[str]',
        'add_wwpns': 'list[str]'
    }

    attribute_map = {
        'force': 'force',
        'display_name': 'display_name',
        'os': 'os',
        'vpsachapuser': 'vpsachapuser',
        'vpsachapsecret': 'vpsachapsecret',
        'hostchapuser': 'hostchapuser',
        'hostchapsecret': 'hostchapsecret',
        'iqn': 'iqn',
        'iscsi': 'iscsi',
        'ipsec_iscsi': 'ipsec_iscsi',
        'ipsec_nfs': 'ipsec_nfs',
        'monitoring': 'monitoring',
        'remove_wwpns': 'remove_wwpns',
        'add_wwpns': 'add_wwpns'
    }

    def __init__(self, force=None, display_name=None, os=None, vpsachapuser=None, vpsachapsecret=None, hostchapuser=None, hostchapsecret=None, iqn=None, iscsi=None, ipsec_iscsi=None, ipsec_nfs=None, monitoring=None, remove_wwpns=None, add_wwpns=None, _configuration=None):  # noqa: E501
        """UpdateServer - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._force = None
        self._display_name = None
        self._os = None
        self._vpsachapuser = None
        self._vpsachapsecret = None
        self._hostchapuser = None
        self._hostchapsecret = None
        self._iqn = None
        self._iscsi = None
        self._ipsec_iscsi = None
        self._ipsec_nfs = None
        self._monitoring = None
        self._remove_wwpns = None
        self._add_wwpns = None
        self.discriminator = None

        if force is not None:
            self.force = force
        if display_name is not None:
            self.display_name = display_name
        if os is not None:
            self.os = os
        if vpsachapuser is not None:
            self.vpsachapuser = vpsachapuser
        if vpsachapsecret is not None:
            self.vpsachapsecret = vpsachapsecret
        if hostchapuser is not None:
            self.hostchapuser = hostchapuser
        if hostchapsecret is not None:
            self.hostchapsecret = hostchapsecret
        if iqn is not None:
            self.iqn = iqn
        if iscsi is not None:
            self.iscsi = iscsi
        if ipsec_iscsi is not None:
            self.ipsec_iscsi = ipsec_iscsi
        if ipsec_nfs is not None:
            self.ipsec_nfs = ipsec_nfs
        if monitoring is not None:
            self.monitoring = monitoring
        if remove_wwpns is not None:
            self.remove_wwpns = remove_wwpns
        if add_wwpns is not None:
            self.add_wwpns = add_wwpns

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


        :return: The force of this UpdateServer.  # noqa: E501
        :rtype: str
        """
        return self._force

    @force.setter
    def force(self, force):
        """Sets the force of this UpdateServer.


        :param force: The force of this UpdateServer.  # noqa: E501
        :type: str
        """
        allowed_values = ["YES", "NO"]  # noqa: E501
        if (self._configuration.client_side_validation and
                force not in allowed_values):
            raise ValueError(
                "Invalid value for `force` ({0}), must be one of {1}"  # noqa: E501
                .format(force, allowed_values)
            )

        self._force = force

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

        The server display name  # noqa: E501

        :return: The display_name of this UpdateServer.  # noqa: E501
        :rtype: str
        """
        return self._display_name

    @display_name.setter
    def display_name(self, display_name):
        """Sets the display_name of this UpdateServer.

        The server display name  # noqa: E501

        :param display_name: The display_name of this UpdateServer.  # noqa: E501
        :type: str
        """

        self._display_name = display_name

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

        Server's OS  # noqa: E501

        :return: The os of this UpdateServer.  # noqa: E501
        :rtype: str
        """
        return self._os

    @os.setter
    def os(self, os):
        """Sets the os of this UpdateServer.

        Server's OS  # noqa: E501

        :param os: The os of this UpdateServer.  # noqa: E501
        :type: str
        """
        allowed_values = ["Windows", "Linux", "Solaris", "AIX", "ESXi"]  # noqa: E501
        if (self._configuration.client_side_validation and
                os not in allowed_values):
            raise ValueError(
                "Invalid value for `os` ({0}), must be one of {1}"  # noqa: E501
                .format(os, allowed_values)
            )

        self._os = os

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

        VPSA chap user.  # noqa: E501

        :return: The vpsachapuser of this UpdateServer.  # noqa: E501
        :rtype: str
        """
        return self._vpsachapuser

    @vpsachapuser.setter
    def vpsachapuser(self, vpsachapuser):
        """Sets the vpsachapuser of this UpdateServer.

        VPSA chap user.  # noqa: E501

        :param vpsachapuser: The vpsachapuser of this UpdateServer.  # noqa: E501
        :type: str
        """

        self._vpsachapuser = vpsachapuser

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

        VPSA chap secret. 12-16 characters.  # noqa: E501

        :return: The vpsachapsecret of this UpdateServer.  # noqa: E501
        :rtype: str
        """
        return self._vpsachapsecret

    @vpsachapsecret.setter
    def vpsachapsecret(self, vpsachapsecret):
        """Sets the vpsachapsecret of this UpdateServer.

        VPSA chap secret. 12-16 characters.  # noqa: E501

        :param vpsachapsecret: The vpsachapsecret of this UpdateServer.  # noqa: E501
        :type: str
        """

        self._vpsachapsecret = vpsachapsecret

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

        Host chap user.  # noqa: E501

        :return: The hostchapuser of this UpdateServer.  # noqa: E501
        :rtype: str
        """
        return self._hostchapuser

    @hostchapuser.setter
    def hostchapuser(self, hostchapuser):
        """Sets the hostchapuser of this UpdateServer.

        Host chap user.  # noqa: E501

        :param hostchapuser: The hostchapuser of this UpdateServer.  # noqa: E501
        :type: str
        """

        self._hostchapuser = hostchapuser

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

        Host chap secret. 12-16 characters.  # noqa: E501

        :return: The hostchapsecret of this UpdateServer.  # noqa: E501
        :rtype: str
        """
        return self._hostchapsecret

    @hostchapsecret.setter
    def hostchapsecret(self, hostchapsecret):
        """Sets the hostchapsecret of this UpdateServer.

        Host chap secret. 12-16 characters.  # noqa: E501

        :param hostchapsecret: The hostchapsecret of this UpdateServer.  # noqa: E501
        :type: str
        """

        self._hostchapsecret = hostchapsecret

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


        :return: The iqn of this UpdateServer.  # noqa: E501
        :rtype: str
        """
        return self._iqn

    @iqn.setter
    def iqn(self, iqn):
        """Sets the iqn of this UpdateServer.


        :param iqn: The iqn of this UpdateServer.  # noqa: E501
        :type: str
        """
        if (self._configuration.client_side_validation and
                iqn is not None and not re.search(r'^(?:iqn\\.[0-9]{4}-[0-9]{2}(?:\\.[A-Za-z](?:[A-Za-z0-9\\-]*[A-Za-z0-9])?)+(?::.*)?|eui\\.[0-9A-Fa_f]{16})\'', iqn)):  # noqa: E501
            raise ValueError(r"Invalid value for `iqn`, must be a follow pattern or equal to `/^(?:iqn\\.[0-9]{4}-[0-9]{2}(?:\\.[A-Za-z](?:[A-Za-z0-9\\-]*[A-Za-z0-9])?)+(?::.*)?|eui\\.[0-9A-Fa_f]{16})'/`")  # noqa: E501

        self._iqn = iqn

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

        The server's iSCSI IP  # noqa: E501

        :return: The iscsi of this UpdateServer.  # noqa: E501
        :rtype: str
        """
        return self._iscsi

    @iscsi.setter
    def iscsi(self, iscsi):
        """Sets the iscsi of this UpdateServer.

        The server's iSCSI IP  # noqa: E501

        :param iscsi: The iscsi of this UpdateServer.  # noqa: E501
        :type: str
        """

        self._iscsi = iscsi

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


        :return: The ipsec_iscsi of this UpdateServer.  # noqa: E501
        :rtype: str
        """
        return self._ipsec_iscsi

    @ipsec_iscsi.setter
    def ipsec_iscsi(self, ipsec_iscsi):
        """Sets the ipsec_iscsi of this UpdateServer.


        :param ipsec_iscsi: The ipsec_iscsi of this UpdateServer.  # noqa: E501
        :type: str
        """
        allowed_values = ["YES", "NO"]  # noqa: E501
        if (self._configuration.client_side_validation and
                ipsec_iscsi not in allowed_values):
            raise ValueError(
                "Invalid value for `ipsec_iscsi` ({0}), must be one of {1}"  # noqa: E501
                .format(ipsec_iscsi, allowed_values)
            )

        self._ipsec_iscsi = ipsec_iscsi

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


        :return: The ipsec_nfs of this UpdateServer.  # noqa: E501
        :rtype: str
        """
        return self._ipsec_nfs

    @ipsec_nfs.setter
    def ipsec_nfs(self, ipsec_nfs):
        """Sets the ipsec_nfs of this UpdateServer.


        :param ipsec_nfs: The ipsec_nfs of this UpdateServer.  # noqa: E501
        :type: str
        """
        allowed_values = ["YES", "NO"]  # noqa: E501
        if (self._configuration.client_side_validation and
                ipsec_nfs not in allowed_values):
            raise ValueError(
                "Invalid value for `ipsec_nfs` ({0}), must be one of {1}"  # noqa: E501
                .format(ipsec_nfs, allowed_values)
            )

        self._ipsec_nfs = ipsec_nfs

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

        connectivity monitoring  # noqa: E501

        :return: The monitoring of this UpdateServer.  # noqa: E501
        :rtype: str
        """
        return self._monitoring

    @monitoring.setter
    def monitoring(self, monitoring):
        """Sets the monitoring of this UpdateServer.

        connectivity monitoring  # noqa: E501

        :param monitoring: The monitoring of this UpdateServer.  # noqa: E501
        :type: str
        """
        allowed_values = ["YES", "NO"]  # noqa: E501
        if (self._configuration.client_side_validation and
                monitoring not in allowed_values):
            raise ValueError(
                "Invalid value for `monitoring` ({0}), must be one of {1}"  # noqa: E501
                .format(monitoring, allowed_values)
            )

        self._monitoring = monitoring

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

        wwpns to remove  # noqa: E501

        :return: The remove_wwpns of this UpdateServer.  # noqa: E501
        :rtype: list[str]
        """
        return self._remove_wwpns

    @remove_wwpns.setter
    def remove_wwpns(self, remove_wwpns):
        """Sets the remove_wwpns of this UpdateServer.

        wwpns to remove  # noqa: E501

        :param remove_wwpns: The remove_wwpns of this UpdateServer.  # noqa: E501
        :type: list[str]
        """

        self._remove_wwpns = remove_wwpns

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

        wwpns to add  # noqa: E501

        :return: The add_wwpns of this UpdateServer.  # noqa: E501
        :rtype: list[str]
        """
        return self._add_wwpns

    @add_wwpns.setter
    def add_wwpns(self, add_wwpns):
        """Sets the add_wwpns of this UpdateServer.

        wwpns to add  # noqa: E501

        :param add_wwpns: The add_wwpns of this UpdateServer.  # noqa: E501
        :type: list[str]
        """

        self._add_wwpns = add_wwpns

    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
        if issubclass(UpdateServer, dict):
            for key, value in self.items():
                result[key] = 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, UpdateServer):
            return False

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
