"""mindbodypublicapi.

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

# ruff: noqa: E501
from mindbodypublicapi.api_helper import APIHelper


class M0CultureNeutralPublicKeyTokenB77a5c561934e089(object):
    """Implementation of the
    '0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' model.

    Attributes:
        key (str): The model property of type str.
        value (List[str]): The model property of type List[str].

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "key": "key",
        "value": "value",
    }

    _optionals = [
        "key",
        "value",
    ]

    def __init__(
        self,
        key=APIHelper.SKIP,
        value=APIHelper.SKIP):
        """Initialize a M0CultureNeutralPublicKeyTokenB77a5c561934e089 instance."""
        # Initialize members of the class
        if key is not APIHelper.SKIP:
            self.key = key
        if value is not APIHelper.SKIP:
            self.value = value

    @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
        key =\
            dictionary.get("key")\
            if dictionary.get("key")\
                else APIHelper.SKIP
        value =\
            dictionary.get("value")\
            if dictionary.get("value")\
                else APIHelper.SKIP

        # Return an object of this model
        return cls(key,
                   value)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _key=(
            self.key
            if hasattr(self, "key")
            else None
        )
        _value=(
            self.value
            if hasattr(self, "value")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"key={_key!r}, "
            f"value={_value!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _key=(
            self.key
            if hasattr(self, "key")
            else None
        )
        _value=(
            self.value
            if hasattr(self, "value")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"key={_key!s}, "
            f"value={_value!s}, "
            f")"
        )
