"""visaacceptancemergedspec.

This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
"""

# ruff: noqa: E501
from visaacceptancemergedspec.api_helper import (
    APIHelper,
)


class MerchantDefinedSecureInformation2(object):
    """Implementation of the 'MerchantDefinedSecureInformation2' model.

    Attributes:
        secure_1 (str): The value you assign for your merchant-secure data field 1.
        secure_2 (str): The value you assign for your merchant-secure data field 2.
        secure_3 (str): The value you assign for your merchant-secure data field 3.
        secure_4 (str): The value you assign for your merchant-secure data field 4.
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "secure_1": "secure1",
        "secure_2": "secure2",
        "secure_3": "secure3",
        "secure_4": "secure4",
    }

    _optionals = [
        "secure_1",
        "secure_2",
        "secure_3",
        "secure_4",
    ]

    def __init__(
        self,
        secure_1=APIHelper.SKIP,
        secure_2=APIHelper.SKIP,
        secure_3=APIHelper.SKIP,
        secure_4=APIHelper.SKIP,
        additional_properties=None):
        """Initialize a MerchantDefinedSecureInformation2 instance."""
        # Initialize members of the class
        if secure_1 is not APIHelper.SKIP:
            self.secure_1 = secure_1
        if secure_2 is not APIHelper.SKIP:
            self.secure_2 = secure_2
        if secure_3 is not APIHelper.SKIP:
            self.secure_3 = secure_3
        if secure_4 is not APIHelper.SKIP:
            self.secure_4 = secure_4

        # Add additional model properties to the instance
        if additional_properties is None:
            additional_properties = {}
        self.additional_properties = additional_properties

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Create an instance of this model from a dictionary

        Args:
            dictionary (dictionary): A dictionary representation of the object
            as obtained from the deserialization of the server's response. The
            keys MUST match property names in the API description.

        Returns:
            object: An instance of this structure class.

        """
        if not isinstance(dictionary, dict) or dictionary is None:
            return None

        # Extract variables from the dictionary
        secure_1 =\
            dictionary.get("secure1")\
            if dictionary.get("secure1")\
                else APIHelper.SKIP
        secure_2 =\
            dictionary.get("secure2")\
            if dictionary.get("secure2")\
                else APIHelper.SKIP
        secure_3 =\
            dictionary.get("secure3")\
            if dictionary.get("secure3")\
                else APIHelper.SKIP
        secure_4 =\
            dictionary.get("secure4")\
            if dictionary.get("secure4")\
                else APIHelper.SKIP

        additional_properties = APIHelper.get_additional_properties(
            dictionary={k: v for k, v in dictionary.items()
                        if k not in cls._names.values()},
            unboxing_function=lambda value: value)

        # Return an object of this model
        return cls(secure_1,
                   secure_2,
                   secure_3,
                   secure_4,
                   additional_properties)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _secure_1=(
            self.secure_1
            if hasattr(self, "secure_1")
            else None
        )
        _secure_2=(
            self.secure_2
            if hasattr(self, "secure_2")
            else None
        )
        _secure_3=(
            self.secure_3
            if hasattr(self, "secure_3")
            else None
        )
        _secure_4=(
            self.secure_4
            if hasattr(self, "secure_4")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"secure_1={_secure_1!r}, "
            f"secure_2={_secure_2!r}, "
            f"secure_3={_secure_3!r}, "
            f"secure_4={_secure_4!r}, "
            f"additional_properties={_additional_properties!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _secure_1=(
            self.secure_1
            if hasattr(self, "secure_1")
            else None
        )
        _secure_2=(
            self.secure_2
            if hasattr(self, "secure_2")
            else None
        )
        _secure_3=(
            self.secure_3
            if hasattr(self, "secure_3")
            else None
        )
        _secure_4=(
            self.secure_4
            if hasattr(self, "secure_4")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"secure_1={_secure_1!s}, "
            f"secure_2={_secure_2!s}, "
            f"secure_3={_secure_3!s}, "
            f"secure_4={_secure_4!s}, "
            f"additional_properties={_additional_properties!s}, "
            f")"
        )
