# coding: utf-8

"""
    CardPay REST API

    Welcome to the CardPay REST API. The CardPay API uses HTTP verbs and a [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) resources endpoint structure (see more info about REST). Request and response payloads are formatted as JSON. Merchant uses API to create payments, refunds, payouts or recurrings, check or update transaction status and get information about created transactions. In API authentication process based on [OAuth 2.0](https://oauth.net/2/) standard. For recent changes see changelog section.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class ThreeDSecureResponse(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 = {
        "card_enrollment": "str",
        "cardholder_info": "str",
        "cavv": "str",
        "cavv_algorithm": "str",
        "challenge_cancel": "str",
        "ds_transaction_id": "str",
        "eci": "str",
        "pa_res": "str",
        "protocol_version": "str",
        "status": "str",
        "status_reason": "str",
        "three_d_secure2_passed": "bool",
        "three_d_secure_flow": "str",
        "xid": "str",
    }

    attribute_map = {
        "card_enrollment": "card_enrollment",
        "cardholder_info": "cardholder_info",
        "cavv": "cavv",
        "cavv_algorithm": "cavv_algorithm",
        "challenge_cancel": "challenge_cancel",
        "ds_transaction_id": "ds_transaction_id",
        "eci": "eci",
        "pa_res": "pa_res",
        "protocol_version": "protocol_version",
        "status": "status",
        "status_reason": "status_reason",
        "three_d_secure2_passed": "three_d_secure2_passed",
        "three_d_secure_flow": "three_d_secure_flow",
        "xid": "xid",
    }

    def __init__(
        self,
        card_enrollment=None,
        cardholder_info=None,
        cavv=None,
        cavv_algorithm=None,
        challenge_cancel=None,
        ds_transaction_id=None,
        eci=None,
        pa_res=None,
        protocol_version=None,
        status=None,
        status_reason=None,
        three_d_secure2_passed=None,
        three_d_secure_flow=None,
        xid=None,
    ):  # noqa: E501
        """ThreeDSecureResponse - a model defined in Swagger"""  # noqa: E501

        self._card_enrollment = None
        self._cardholder_info = None
        self._cavv = None
        self._cavv_algorithm = None
        self._challenge_cancel = None
        self._ds_transaction_id = None
        self._eci = None
        self._pa_res = None
        self._protocol_version = None
        self._status = None
        self._status_reason = None
        self._three_d_secure2_passed = None
        self._three_d_secure_flow = None
        self._xid = None
        self.discriminator = None

        if card_enrollment is not None:
            self.card_enrollment = card_enrollment
        if cardholder_info is not None:
            self.cardholder_info = cardholder_info
        if cavv is not None:
            self.cavv = cavv
        if cavv_algorithm is not None:
            self.cavv_algorithm = cavv_algorithm
        if challenge_cancel is not None:
            self.challenge_cancel = challenge_cancel
        if ds_transaction_id is not None:
            self.ds_transaction_id = ds_transaction_id
        if eci is not None:
            self.eci = eci
        if pa_res is not None:
            self.pa_res = pa_res
        if protocol_version is not None:
            self.protocol_version = protocol_version
        if status is not None:
            self.status = status
        if status_reason is not None:
            self.status_reason = status_reason
        if three_d_secure2_passed is not None:
            self.three_d_secure2_passed = three_d_secure2_passed
        if three_d_secure_flow is not None:
            self.three_d_secure_flow = three_d_secure_flow
        if xid is not None:
            self.xid = xid

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

        Card enrollment in 3DS flow, possible values are: S - 3D Secure Skipped, N - 3D Secure not enrolled, Y - 3D Secure enrolled  # noqa: E501

        :return: The card_enrollment of this ThreeDSecureResponse.  # noqa: E501
        :rtype: str
        """
        return self._card_enrollment

    @card_enrollment.setter
    def card_enrollment(self, card_enrollment):
        """Sets the card_enrollment of this ThreeDSecureResponse.

        Card enrollment in 3DS flow, possible values are: S - 3D Secure Skipped, N - 3D Secure not enrolled, Y - 3D Secure enrolled  # noqa: E501

        :param card_enrollment: The card_enrollment of this ThreeDSecureResponse.  # noqa: E501
        :type: str
        """

        self._card_enrollment = card_enrollment

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

        Text provided by the ACS/Issuer to Cardholder during a Frictionless transaction  by the ACS.  # noqa: E501

        :return: The cardholder_info of this ThreeDSecureResponse.  # noqa: E501
        :rtype: str
        """
        return self._cardholder_info

    @cardholder_info.setter
    def cardholder_info(self, cardholder_info):
        """Sets the cardholder_info of this ThreeDSecureResponse.

        Text provided by the ACS/Issuer to Cardholder during a Frictionless transaction  by the ACS.  # noqa: E501

        :param cardholder_info: The cardholder_info of this ThreeDSecureResponse.  # noqa: E501
        :type: str
        """

        self._cardholder_info = cardholder_info

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

        Cardholder authentication verification value  # noqa: E501

        :return: The cavv of this ThreeDSecureResponse.  # noqa: E501
        :rtype: str
        """
        return self._cavv

    @cavv.setter
    def cavv(self, cavv):
        """Sets the cavv of this ThreeDSecureResponse.

        Cardholder authentication verification value  # noqa: E501

        :param cavv: The cavv of this ThreeDSecureResponse.  # noqa: E501
        :type: str
        """

        self._cavv = cavv

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

        CAVV algorithm  # noqa: E501

        :return: The cavv_algorithm of this ThreeDSecureResponse.  # noqa: E501
        :rtype: str
        """
        return self._cavv_algorithm

    @cavv_algorithm.setter
    def cavv_algorithm(self, cavv_algorithm):
        """Sets the cavv_algorithm of this ThreeDSecureResponse.

        CAVV algorithm  # noqa: E501

        :param cavv_algorithm: The cavv_algorithm of this ThreeDSecureResponse.  # noqa: E501
        :type: str
        """

        self._cavv_algorithm = cavv_algorithm

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

        Indicator informing that the authentication has been cancelled  # noqa: E501

        :return: The challenge_cancel of this ThreeDSecureResponse.  # noqa: E501
        :rtype: str
        """
        return self._challenge_cancel

    @challenge_cancel.setter
    def challenge_cancel(self, challenge_cancel):
        """Sets the challenge_cancel of this ThreeDSecureResponse.

        Indicator informing that the authentication has been cancelled  # noqa: E501

        :param challenge_cancel: The challenge_cancel of this ThreeDSecureResponse.  # noqa: E501
        :type: str
        """

        self._challenge_cancel = challenge_cancel

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

        Transaction Id  # noqa: E501

        :return: The ds_transaction_id of this ThreeDSecureResponse.  # noqa: E501
        :rtype: str
        """
        return self._ds_transaction_id

    @ds_transaction_id.setter
    def ds_transaction_id(self, ds_transaction_id):
        """Sets the ds_transaction_id of this ThreeDSecureResponse.

        Transaction Id  # noqa: E501

        :param ds_transaction_id: The ds_transaction_id of this ThreeDSecureResponse.  # noqa: E501
        :type: str
        """

        self._ds_transaction_id = ds_transaction_id

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

        The electronic commerce indicator  # noqa: E501

        :return: The eci of this ThreeDSecureResponse.  # noqa: E501
        :rtype: str
        """
        return self._eci

    @eci.setter
    def eci(self, eci):
        """Sets the eci of this ThreeDSecureResponse.

        The electronic commerce indicator  # noqa: E501

        :param eci: The eci of this ThreeDSecureResponse.  # noqa: E501
        :type: str
        """

        self._eci = eci

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

        PaRes bank authentication result  # noqa: E501

        :return: The pa_res of this ThreeDSecureResponse.  # noqa: E501
        :rtype: str
        """
        return self._pa_res

    @pa_res.setter
    def pa_res(self, pa_res):
        """Sets the pa_res of this ThreeDSecureResponse.

        PaRes bank authentication result  # noqa: E501

        :param pa_res: The pa_res of this ThreeDSecureResponse.  # noqa: E501
        :type: str
        """

        self._pa_res = pa_res

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

        Protocol version identifier  # noqa: E501

        :return: The protocol_version of this ThreeDSecureResponse.  # noqa: E501
        :rtype: str
        """
        return self._protocol_version

    @protocol_version.setter
    def protocol_version(self, protocol_version):
        """Sets the protocol_version of this ThreeDSecureResponse.

        Protocol version identifier  # noqa: E501

        :param protocol_version: The protocol_version of this ThreeDSecureResponse.  # noqa: E501
        :type: str
        """

        self._protocol_version = protocol_version

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

        3DS status (from PaRes for 3Ds 1.0, ARes message for 3Ds 2.0) (possible values Y,A,U,N)  # noqa: E501

        :return: The status of this ThreeDSecureResponse.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this ThreeDSecureResponse.

        3DS status (from PaRes for 3Ds 1.0, ARes message for 3Ds 2.0) (possible values Y,A,U,N)  # noqa: E501

        :param status: The status of this ThreeDSecureResponse.  # noqa: E501
        :type: str
        """

        self._status = status

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

        Provides information on why the Status field has the specified value  # noqa: E501

        :return: The status_reason of this ThreeDSecureResponse.  # noqa: E501
        :rtype: str
        """
        return self._status_reason

    @status_reason.setter
    def status_reason(self, status_reason):
        """Sets the status_reason of this ThreeDSecureResponse.

        Provides information on why the Status field has the specified value  # noqa: E501

        :param status_reason: The status_reason of this ThreeDSecureResponse.  # noqa: E501
        :type: str
        """

        self._status_reason = status_reason

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

        Sign of trying to pass 3ds2  # noqa: E501

        :return: The three_d_secure2_passed of this ThreeDSecureResponse.  # noqa: E501
        :rtype: bool
        """
        return self._three_d_secure2_passed

    @three_d_secure2_passed.setter
    def three_d_secure2_passed(self, three_d_secure2_passed):
        """Sets the three_d_secure2_passed of this ThreeDSecureResponse.

        Sign of trying to pass 3ds2  # noqa: E501

        :param three_d_secure2_passed: The three_d_secure2_passed of this ThreeDSecureResponse.  # noqa: E501
        :type: bool
        """

        self._three_d_secure2_passed = three_d_secure2_passed

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

        Possible values: 3DS1 - 3DS 1.0 flow, 3DS2C - 3DS 2.0 challenge flow, 3DS2F - 3DS 2.0 frictionless flow  # noqa: E501

        :return: The three_d_secure_flow of this ThreeDSecureResponse.  # noqa: E501
        :rtype: str
        """
        return self._three_d_secure_flow

    @three_d_secure_flow.setter
    def three_d_secure_flow(self, three_d_secure_flow):
        """Sets the three_d_secure_flow of this ThreeDSecureResponse.

        Possible values: 3DS1 - 3DS 1.0 flow, 3DS2C - 3DS 2.0 challenge flow, 3DS2F - 3DS 2.0 frictionless flow  # noqa: E501

        :param three_d_secure_flow: The three_d_secure_flow of this ThreeDSecureResponse.  # noqa: E501
        :type: str
        """

        self._three_d_secure_flow = three_d_secure_flow

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

        Transaction Id in PaRes  # noqa: E501

        :return: The xid of this ThreeDSecureResponse.  # noqa: E501
        :rtype: str
        """
        return self._xid

    @xid.setter
    def xid(self, xid):
        """Sets the xid of this ThreeDSecureResponse.

        Transaction Id in PaRes  # noqa: E501

        :param xid: The xid of this ThreeDSecureResponse.  # noqa: E501
        :type: str
        """

        self._xid = xid

    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:
                if value is not None:
                    result[attr] = value
        if issubclass(ThreeDSecureResponse, 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, ThreeDSecureResponse):
            return False

        return self.__dict__ == other.__dict__

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