<filename>kubernetes/client/models/io_cert_manager_acme_v1_challenge_status.py
# coding: utf-8

"""
    Kubernetes

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: v1.20.7
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from kubernetes.client.configuration import Configuration


class IoCertManagerAcmeV1ChallengeStatus(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 = {
        'presented': 'bool',
        'processing': 'bool',
        'reason': 'str',
        'state': 'str'
    }

    attribute_map = {
        'presented': 'presented',
        'processing': 'processing',
        'reason': 'reason',
        'state': 'state'
    }

    def __init__(self, presented=None, processing=None, reason=None, state=None, local_vars_configuration=None):  # noqa: E501
        """IoCertManagerAcmeV1ChallengeStatus - 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._presented = None
        self._processing = None
        self._reason = None
        self._state = None
        self.discriminator = None

        if presented is not None:
            self.presented = presented
        if processing is not None:
            self.processing = processing
        if reason is not None:
            self.reason = reason
        if state is not None:
            self.state = state

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

        presented will be set to true if the challenge values for this challenge are currently 'presented'. This *does not* imply the self check is passing. Only that the values have been 'submitted' for the appropriate challenge mechanism (i.e. the DNS01 TXT record has been presented, or the HTTP01 configuration has been configured).  # noqa: E501

        :return: The presented of this IoCertManagerAcmeV1ChallengeStatus.  # noqa: E501
        :rtype: bool
        """
        return self._presented

    @presented.setter
    def presented(self, presented):
        """Sets the presented of this IoCertManagerAcmeV1ChallengeStatus.

        presented will be set to true if the challenge values for this challenge are currently 'presented'. This *does not* imply the self check is passing. Only that the values have been 'submitted' for the appropriate challenge mechanism (i.e. the DNS01 TXT record has been presented, or the HTTP01 configuration has been configured).  # noqa: E501

        :param presented: The presented of this IoCertManagerAcmeV1ChallengeStatus.  # noqa: E501
        :type: bool
        """

        self._presented = presented

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

        Used to denote whether this challenge should be processed or not. This field will only be set to true by the 'scheduling' component. It will only be set to false by the 'challenges' controller, after the challenge has reached a final state or timed out. If this field is set to false, the challenge controller will not take any more action.  # noqa: E501

        :return: The processing of this IoCertManagerAcmeV1ChallengeStatus.  # noqa: E501
        :rtype: bool
        """
        return self._processing

    @processing.setter
    def processing(self, processing):
        """Sets the processing of this IoCertManagerAcmeV1ChallengeStatus.

        Used to denote whether this challenge should be processed or not. This field will only be set to true by the 'scheduling' component. It will only be set to false by the 'challenges' controller, after the challenge has reached a final state or timed out. If this field is set to false, the challenge controller will not take any more action.  # noqa: E501

        :param processing: The processing of this IoCertManagerAcmeV1ChallengeStatus.  # noqa: E501
        :type: bool
        """

        self._processing = processing

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

        Contains human readable information on why the Challenge is in the current state.  # noqa: E501

        :return: The reason of this IoCertManagerAcmeV1ChallengeStatus.  # noqa: E501
        :rtype: str
        """
        return self._reason

    @reason.setter
    def reason(self, reason):
        """Sets the reason of this IoCertManagerAcmeV1ChallengeStatus.

        Contains human readable information on why the Challenge is in the current state.  # noqa: E501

        :param reason: The reason of this IoCertManagerAcmeV1ChallengeStatus.  # noqa: E501
        :type: str
        """

        self._reason = reason

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

        Contains the current 'state' of the challenge. If not set, the state of the challenge is unknown.  # noqa: E501

        :return: The state of this IoCertManagerAcmeV1ChallengeStatus.  # noqa: E501
        :rtype: str
        """
        return self._state

    @state.setter
    def state(self, state):
        """Sets the state of this IoCertManagerAcmeV1ChallengeStatus.

        Contains the current 'state' of the challenge. If not set, the state of the challenge is unknown.  # noqa: E501

        :param state: The state of this IoCertManagerAcmeV1ChallengeStatus.  # noqa: E501
        :type: str
        """
        allowed_values = ["valid", "ready", "pending", "processing", "invalid", "expired", "errored"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and state not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `state` ({0}), must be one of {1}"  # noqa: E501
                .format(state, allowed_values)
            )

        self._state = state

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

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