# 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.09-sp2
    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 UpdateProtection(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 = {
        'alertmode': 'int',
        'emergencymode': 'int',
        'capacityhistory': 'int',
        'autoexpand': 'str',
        'maxcapacity': 'str',
        'autoexpandby': 'str'
    }

    attribute_map = {
        'alertmode': 'alertmode',
        'emergencymode': 'emergencymode',
        'capacityhistory': 'capacityhistory',
        'autoexpand': 'autoexpand',
        'maxcapacity': 'maxcapacity',
        'autoexpandby': 'autoexpandby'
    }

    def __init__(self, alertmode=None, emergencymode=None, capacityhistory=None, autoexpand=None, maxcapacity=None, autoexpandby=None, _configuration=None):  # noqa: E501
        """UpdateProtection - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._alertmode = None
        self._emergencymode = None
        self._capacityhistory = None
        self._autoexpand = None
        self._maxcapacity = None
        self._autoexpandby = None
        self.discriminator = None

        if alertmode is not None:
            self.alertmode = alertmode
        if emergencymode is not None:
            self.emergencymode = emergencymode
        if capacityhistory is not None:
            self.capacityhistory = capacityhistory
        if autoexpand is not None:
            self.autoexpand = autoexpand
        if maxcapacity is not None:
            self.maxcapacity = maxcapacity
        if autoexpandby is not None:
            self.autoexpandby = autoexpandby

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

        Alert me when it is estimated that the Volume will be at full capacity in X minutes.  # noqa: E501

        :return: The alertmode of this UpdateProtection.  # noqa: E501
        :rtype: int
        """
        return self._alertmode

    @alertmode.setter
    def alertmode(self, alertmode):
        """Sets the alertmode of this UpdateProtection.

        Alert me when it is estimated that the Volume will be at full capacity in X minutes.  # noqa: E501

        :param alertmode: The alertmode of this UpdateProtection.  # noqa: E501
        :type: int
        """

        self._alertmode = alertmode

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

        When the Volume has less than this number of GB left, the volume will start deleting snapshots, starting with the oldest, and trigger auto expand.  # noqa: E501

        :return: The emergencymode of this UpdateProtection.  # noqa: E501
        :rtype: int
        """
        return self._emergencymode

    @emergencymode.setter
    def emergencymode(self, emergencymode):
        """Sets the emergencymode of this UpdateProtection.

        When the Volume has less than this number of GB left, the volume will start deleting snapshots, starting with the oldest, and trigger auto expand.  # noqa: E501

        :param emergencymode: The emergencymode of this UpdateProtection.  # noqa: E501
        :type: int
        """

        self._emergencymode = emergencymode

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

        Window size in minutes which is used to calculate the rate of which free Volume capacity is consumed. This rate is used to calculate the estimated time until a Volume is full  # noqa: E501

        :return: The capacityhistory of this UpdateProtection.  # noqa: E501
        :rtype: int
        """
        return self._capacityhistory

    @capacityhistory.setter
    def capacityhistory(self, capacityhistory):
        """Sets the capacityhistory of this UpdateProtection.

        Window size in minutes which is used to calculate the rate of which free Volume capacity is consumed. This rate is used to calculate the estimated time until a Volume is full  # noqa: E501

        :param capacityhistory: The capacityhistory of this UpdateProtection.  # noqa: E501
        :type: int
        """

        self._capacityhistory = capacityhistory

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

        Enable capacity auto expand  # noqa: E501

        :return: The autoexpand of this UpdateProtection.  # noqa: E501
        :rtype: str
        """
        return self._autoexpand

    @autoexpand.setter
    def autoexpand(self, autoexpand):
        """Sets the autoexpand of this UpdateProtection.

        Enable capacity auto expand  # noqa: E501

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

        self._autoexpand = autoexpand

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

        Max Capacity to expand in GB followed by the letter G.  # noqa: E501

        :return: The maxcapacity of this UpdateProtection.  # noqa: E501
        :rtype: str
        """
        return self._maxcapacity

    @maxcapacity.setter
    def maxcapacity(self, maxcapacity):
        """Sets the maxcapacity of this UpdateProtection.

        Max Capacity to expand in GB followed by the letter G.  # noqa: E501

        :param maxcapacity: The maxcapacity of this UpdateProtection.  # noqa: E501
        :type: str
        """

        self._maxcapacity = maxcapacity

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

        Capacity to expand by in GB followed by the letter G.  # noqa: E501

        :return: The autoexpandby of this UpdateProtection.  # noqa: E501
        :rtype: str
        """
        return self._autoexpandby

    @autoexpandby.setter
    def autoexpandby(self, autoexpandby):
        """Sets the autoexpandby of this UpdateProtection.

        Capacity to expand by in GB followed by the letter G.  # noqa: E501

        :param autoexpandby: The autoexpandby of this UpdateProtection.  # noqa: E501
        :type: str
        """

        self._autoexpandby = autoexpandby

    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(UpdateProtection, 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, UpdateProtection):
            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, UpdateProtection):
            return True

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