"""mindbodypublicapi.

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

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


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

    A response object returned from the GetStaffImgURL API.

    Attributes:
        image_url (str): A staff member's image URL.
        mobile_image_url (str): A staff member's mobile image URL.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "image_url": "ImageURL",
        "mobile_image_url": "MobileImageURL",
    }

    _optionals = [
        "image_url",
        "mobile_image_url",
    ]

    def __init__(
        self,
        image_url=APIHelper.SKIP,
        mobile_image_url=APIHelper.SKIP):
        """Initialize a GetStaffImageURLResponse instance."""
        # Initialize members of the class
        if image_url is not APIHelper.SKIP:
            self.image_url = image_url
        if mobile_image_url is not APIHelper.SKIP:
            self.mobile_image_url = mobile_image_url

    @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
        image_url =\
            dictionary.get("ImageURL")\
            if dictionary.get("ImageURL")\
                else APIHelper.SKIP
        mobile_image_url =\
            dictionary.get("MobileImageURL")\
            if dictionary.get("MobileImageURL")\
                else APIHelper.SKIP

        # Return an object of this model
        return cls(image_url,
                   mobile_image_url)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _image_url=(
            self.image_url
            if hasattr(self, "image_url")
            else None
        )
        _mobile_image_url=(
            self.mobile_image_url
            if hasattr(self, "mobile_image_url")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"image_url={_image_url!r}, "
            f"mobile_image_url={_mobile_image_url!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _image_url=(
            self.image_url
            if hasattr(self, "image_url")
            else None
        )
        _mobile_image_url=(
            self.mobile_image_url
            if hasattr(self, "mobile_image_url")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"image_url={_image_url!s}, "
            f"mobile_image_url={_mobile_image_url!s}, "
            f")"
        )
