# coding: utf-8

"""
    AristaFlowREST/LicenceManager

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

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

import pprint
import re  # noqa: F401

import six
from af_licence_manager.models.ilm_exception import IlmException  # noqa: F401,E501

class InvalidInstanceStateException(IlmException):
    """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 = {
        'instance_id': 'str',
        'execution_state': 'str',
        'migration_state': 'str',
        'preventing_status': 'str'
    }
    if hasattr(IlmException, "swagger_types"):
        swagger_types.update(IlmException.swagger_types)

    attribute_map = {
        'instance_id': 'instanceId',
        'execution_state': 'executionState',
        'migration_state': 'migrationState',
        'preventing_status': 'preventingStatus'
    }
    if hasattr(IlmException, "attribute_map"):
        attribute_map.update(IlmException.attribute_map)

    def __init__(self, instance_id=None, execution_state=None, migration_state=None, preventing_status=None, *args, **kwargs):  # noqa: E501
        """InvalidInstanceStateException - a model defined in Swagger"""  # noqa: E501
        self._instance_id = None
        self._execution_state = None
        self._migration_state = None
        self._preventing_status = None
        if not(hasattr(self, "discriminator")) or not(self.discriminator):
            self.discriminator = None
        self.instance_id = instance_id
        if execution_state is not None:
            self.execution_state = execution_state
        if migration_state is not None:
            self.migration_state = migration_state
        self.preventing_status = preventing_status
        IlmException.__init__(self, *args, **kwargs)

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


        :return: The instance_id of this InvalidInstanceStateException.  # noqa: E501
        :rtype: str
        """
        return self._instance_id

    @instance_id.setter
    def instance_id(self, instance_id):
        """Sets the instance_id of this InvalidInstanceStateException.


        :param instance_id: The instance_id of this InvalidInstanceStateException.  # noqa: E501
        :type: str
        """
        if instance_id is None:
            raise ValueError("Invalid value for `instance_id`, must not be `None`")  # noqa: E501

        self._instance_id = instance_id

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


        :return: The execution_state of this InvalidInstanceStateException.  # noqa: E501
        :rtype: str
        """
        return self._execution_state

    @execution_state.setter
    def execution_state(self, execution_state):
        """Sets the execution_state of this InvalidInstanceStateException.


        :param execution_state: The execution_state of this InvalidInstanceStateException.  # noqa: E501
        :type: str
        """
        allowed_values = ["IE_RUNNING", "IE_SUSPENDED", "IE_SOFTLY_SUSPENDED", "IE_ABORTED", "IE_SOFTLY_ABORTED", "IE_FINISHED"]  # noqa: E501
        if execution_state not in allowed_values:
            raise ValueError(
                "Invalid value for `execution_state` ({0}), must be one of {1}"  # noqa: E501
                .format(execution_state, allowed_values)
            )

        self._execution_state = execution_state

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


        :return: The migration_state of this InvalidInstanceStateException.  # noqa: E501
        :rtype: str
        """
        return self._migration_state

    @migration_state.setter
    def migration_state(self, migration_state):
        """Sets the migration_state of this InvalidInstanceStateException.


        :param migration_state: The migration_state of this InvalidInstanceStateException.  # noqa: E501
        :type: str
        """
        allowed_values = ["IM_MIGRATABLE", "IM_MIGRATING", "IM_NOT_MIGRATABLE"]  # noqa: E501
        if migration_state not in allowed_values:
            raise ValueError(
                "Invalid value for `migration_state` ({0}), must be one of {1}"  # noqa: E501
                .format(migration_state, allowed_values)
            )

        self._migration_state = migration_state

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


        :return: The preventing_status of this InvalidInstanceStateException.  # noqa: E501
        :rtype: str
        """
        return self._preventing_status

    @preventing_status.setter
    def preventing_status(self, preventing_status):
        """Sets the preventing_status of this InvalidInstanceStateException.


        :param preventing_status: The preventing_status of this InvalidInstanceStateException.  # noqa: E501
        :type: str
        """
        if preventing_status is None:
            raise ValueError("Invalid value for `preventing_status`, must not be `None`")  # noqa: E501

        self._preventing_status = preventing_status

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

        return self.__dict__ == other.__dict__

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