"""visaacceptancemergedspec.

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

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


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

    Attributes:
        border (str): Border Color
        border_selected (str): Selected Border Color
        button (str): Button Color
        button_text (str): Button Text Color
        checkbox (str): Checkbox Color
        checkbox_check_mark (str): Checkbox Checkmark Color
        header (str): Header Color
        link (str): Link Color
        text (str): Text Color
        additional_properties (Dict[str, Any]): The additional properties for the
            model.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "border": "border",
        "border_selected": "borderSelected",
        "button": "button",
        "button_text": "buttonText",
        "checkbox": "checkbox",
        "checkbox_check_mark": "checkboxCheckMark",
        "header": "header",
        "link": "link",
        "text": "text",
    }

    _optionals = [
        "border",
        "border_selected",
        "button",
        "button_text",
        "checkbox",
        "checkbox_check_mark",
        "header",
        "link",
        "text",
    ]

    def __init__(
        self,
        border=APIHelper.SKIP,
        border_selected=APIHelper.SKIP,
        button=APIHelper.SKIP,
        button_text=APIHelper.SKIP,
        checkbox=APIHelper.SKIP,
        checkbox_check_mark=APIHelper.SKIP,
        header=APIHelper.SKIP,
        link=APIHelper.SKIP,
        text=APIHelper.SKIP,
        additional_properties=None):
        """Initialize a Color instance."""
        # Initialize members of the class
        if border is not APIHelper.SKIP:
            self.border = border
        if border_selected is not APIHelper.SKIP:
            self.border_selected = border_selected
        if button is not APIHelper.SKIP:
            self.button = button
        if button_text is not APIHelper.SKIP:
            self.button_text = button_text
        if checkbox is not APIHelper.SKIP:
            self.checkbox = checkbox
        if checkbox_check_mark is not APIHelper.SKIP:
            self.checkbox_check_mark = checkbox_check_mark
        if header is not APIHelper.SKIP:
            self.header = header
        if link is not APIHelper.SKIP:
            self.link = link
        if text is not APIHelper.SKIP:
            self.text = text

        # 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
        border =\
            dictionary.get("border")\
            if dictionary.get("border")\
                else APIHelper.SKIP
        border_selected =\
            dictionary.get("borderSelected")\
            if dictionary.get("borderSelected")\
                else APIHelper.SKIP
        button =\
            dictionary.get("button")\
            if dictionary.get("button")\
                else APIHelper.SKIP
        button_text =\
            dictionary.get("buttonText")\
            if dictionary.get("buttonText")\
                else APIHelper.SKIP
        checkbox =\
            dictionary.get("checkbox")\
            if dictionary.get("checkbox")\
                else APIHelper.SKIP
        checkbox_check_mark =\
            dictionary.get("checkboxCheckMark")\
            if dictionary.get("checkboxCheckMark")\
                else APIHelper.SKIP
        header =\
            dictionary.get("header")\
            if dictionary.get("header")\
                else APIHelper.SKIP
        link =\
            dictionary.get("link")\
            if dictionary.get("link")\
                else APIHelper.SKIP
        text =\
            dictionary.get("text")\
            if dictionary.get("text")\
                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(border,
                   border_selected,
                   button,
                   button_text,
                   checkbox,
                   checkbox_check_mark,
                   header,
                   link,
                   text,
                   additional_properties)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _border=(
            self.border
            if hasattr(self, "border")
            else None
        )
        _border_selected=(
            self.border_selected
            if hasattr(self, "border_selected")
            else None
        )
        _button=(
            self.button
            if hasattr(self, "button")
            else None
        )
        _button_text=(
            self.button_text
            if hasattr(self, "button_text")
            else None
        )
        _checkbox=(
            self.checkbox
            if hasattr(self, "checkbox")
            else None
        )
        _checkbox_check_mark=(
            self.checkbox_check_mark
            if hasattr(self, "checkbox_check_mark")
            else None
        )
        _header=(
            self.header
            if hasattr(self, "header")
            else None
        )
        _link=(
            self.link
            if hasattr(self, "link")
            else None
        )
        _text=(
            self.text
            if hasattr(self, "text")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"border={_border!r}, "
            f"border_selected={_border_selected!r}, "
            f"button={_button!r}, "
            f"button_text={_button_text!r}, "
            f"checkbox={_checkbox!r}, "
            f"checkbox_check_mark={_checkbox_check_mark!r}, "
            f"header={_header!r}, "
            f"link={_link!r}, "
            f"text={_text!r}, "
            f"additional_properties={_additional_properties!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _border=(
            self.border
            if hasattr(self, "border")
            else None
        )
        _border_selected=(
            self.border_selected
            if hasattr(self, "border_selected")
            else None
        )
        _button=(
            self.button
            if hasattr(self, "button")
            else None
        )
        _button_text=(
            self.button_text
            if hasattr(self, "button_text")
            else None
        )
        _checkbox=(
            self.checkbox
            if hasattr(self, "checkbox")
            else None
        )
        _checkbox_check_mark=(
            self.checkbox_check_mark
            if hasattr(self, "checkbox_check_mark")
            else None
        )
        _header=(
            self.header
            if hasattr(self, "header")
            else None
        )
        _link=(
            self.link
            if hasattr(self, "link")
            else None
        )
        _text=(
            self.text
            if hasattr(self, "text")
            else None
        )
        _additional_properties=self.additional_properties
        return (
            f"{self.__class__.__name__}("
            f"border={_border!s}, "
            f"border_selected={_border_selected!s}, "
            f"button={_button!s}, "
            f"button_text={_button_text!s}, "
            f"checkbox={_checkbox!s}, "
            f"checkbox_check_mark={_checkbox_check_mark!s}, "
            f"header={_header!s}, "
            f"link={_link!s}, "
            f"text={_text!s}, "
            f"additional_properties={_additional_properties!s}, "
            f")"
        )
