# coding: utf-8

"""
    Akeyless API

    The purpose of this application is to provide access to Akeyless API.  # noqa: E501

    The version of the OpenAPI document: 2.0
    Contact: support@akeyless.io
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from akeyless.configuration import Configuration


class ClassicKeyStatusInfo(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'error_date': 'datetime',
        'last_error': 'str',
        'last_status': 'str',
        'version': 'int'
    }

    attribute_map = {
        'error_date': 'error_date',
        'last_error': 'last_error',
        'last_status': 'last_status',
        'version': 'version'
    }

    def __init__(self, error_date=None, last_error=None, last_status=None, version=None, local_vars_configuration=None):  # noqa: E501
        """ClassicKeyStatusInfo - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._error_date = None
        self._last_error = None
        self._last_status = None
        self._version = None
        self.discriminator = None

        if error_date is not None:
            self.error_date = error_date
        if last_error is not None:
            self.last_error = last_error
        if last_status is not None:
            self.last_status = last_status
        if version is not None:
            self.version = version

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


        :return: The error_date of this ClassicKeyStatusInfo.  # noqa: E501
        :rtype: datetime
        """
        return self._error_date

    @error_date.setter
    def error_date(self, error_date):
        """Sets the error_date of this ClassicKeyStatusInfo.


        :param error_date: The error_date of this ClassicKeyStatusInfo.  # noqa: E501
        :type: datetime
        """

        self._error_date = error_date

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


        :return: The last_error of this ClassicKeyStatusInfo.  # noqa: E501
        :rtype: str
        """
        return self._last_error

    @last_error.setter
    def last_error(self, last_error):
        """Sets the last_error of this ClassicKeyStatusInfo.


        :param last_error: The last_error of this ClassicKeyStatusInfo.  # noqa: E501
        :type: str
        """

        self._last_error = last_error

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

        ClassicKeyTargetStatus defines status of classic key target  # noqa: E501

        :return: The last_status of this ClassicKeyStatusInfo.  # noqa: E501
        :rtype: str
        """
        return self._last_status

    @last_status.setter
    def last_status(self, last_status):
        """Sets the last_status of this ClassicKeyStatusInfo.

        ClassicKeyTargetStatus defines status of classic key target  # noqa: E501

        :param last_status: The last_status of this ClassicKeyStatusInfo.  # noqa: E501
        :type: str
        """

        self._last_status = last_status

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


        :return: The version of this ClassicKeyStatusInfo.  # noqa: E501
        :rtype: int
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this ClassicKeyStatusInfo.


        :param version: The version of this ClassicKeyStatusInfo.  # noqa: E501
        :type: int
        """

        self._version = version

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_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, ClassicKeyStatusInfo):
            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, ClassicKeyStatusInfo):
            return True

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