# coding: utf-8

"""
    Agilicus API

    Agilicus API endpoints  # noqa: E501

    The version of the OpenAPI document: 2021.04.16
    Contact: dev@agilicus.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from agilicus_api.configuration import Configuration


class X509CertificateStatus(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 = {
        'not_before': 'datetime',
        'not_after': 'datetime',
        'renewal_time': 'datetime'
    }

    attribute_map = {
        'not_before': 'not_before',
        'not_after': 'not_after',
        'renewal_time': 'renewal_time'
    }

    def __init__(self, not_before=None, not_after=None, renewal_time=None, local_vars_configuration=None):  # noqa: E501
        """X509CertificateStatus - 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._not_before = None
        self._not_after = None
        self._renewal_time = None
        self.discriminator = None

        if not_before is not None:
            self.not_before = not_before
        if not_after is not None:
            self.not_after = not_after
        if renewal_time is not None:
            self.renewal_time = renewal_time

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

        date/time for which certificate is valid  # noqa: E501

        :return: The not_before of this X509CertificateStatus.  # noqa: E501
        :rtype: datetime
        """
        return self._not_before

    @not_before.setter
    def not_before(self, not_before):
        """Sets the not_before of this X509CertificateStatus.

        date/time for which certificate is valid  # noqa: E501

        :param not_before: The not_before of this X509CertificateStatus.  # noqa: E501
        :type: datetime
        """

        self._not_before = not_before

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

        date/time of certificate expiry  # noqa: E501

        :return: The not_after of this X509CertificateStatus.  # noqa: E501
        :rtype: datetime
        """
        return self._not_after

    @not_after.setter
    def not_after(self, not_after):
        """Sets the not_after of this X509CertificateStatus.

        date/time of certificate expiry  # noqa: E501

        :param not_after: The not_after of this X509CertificateStatus.  # noqa: E501
        :type: datetime
        """

        self._not_after = not_after

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

        date/time of certificate renewal  # noqa: E501

        :return: The renewal_time of this X509CertificateStatus.  # noqa: E501
        :rtype: datetime
        """
        return self._renewal_time

    @renewal_time.setter
    def renewal_time(self, renewal_time):
        """Sets the renewal_time of this X509CertificateStatus.

        date/time of certificate renewal  # noqa: E501

        :param renewal_time: The renewal_time of this X509CertificateStatus.  # noqa: E501
        :type: datetime
        """

        self._renewal_time = renewal_time

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

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