"""mindbodypublicapi.

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

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


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

    Attributes:
        client_id (str): The RSSID of the client for whom the photo was uploaded.
        photo_url (str): The URL of the uploaded photo.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "client_id": "ClientId",
        "photo_url": "PhotoUrl",
    }

    _optionals = [
        "client_id",
        "photo_url",
    ]

    def __init__(
        self,
        client_id=APIHelper.SKIP,
        photo_url=APIHelper.SKIP):
        """Initialize a UploadClientPhotoResponse instance."""
        # Initialize members of the class
        if client_id is not APIHelper.SKIP:
            self.client_id = client_id
        if photo_url is not APIHelper.SKIP:
            self.photo_url = photo_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
        client_id =\
            dictionary.get("ClientId")\
            if dictionary.get("ClientId")\
                else APIHelper.SKIP
        photo_url =\
            dictionary.get("PhotoUrl")\
            if dictionary.get("PhotoUrl")\
                else APIHelper.SKIP

        # Return an object of this model
        return cls(client_id,
                   photo_url)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _client_id=(
            self.client_id
            if hasattr(self, "client_id")
            else None
        )
        _photo_url=(
            self.photo_url
            if hasattr(self, "photo_url")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"client_id={_client_id!r}, "
            f"photo_url={_photo_url!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _client_id=(
            self.client_id
            if hasattr(self, "client_id")
            else None
        )
        _photo_url=(
            self.photo_url
            if hasattr(self, "photo_url")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"client_id={_client_id!s}, "
            f"photo_url={_photo_url!s}, "
            f")"
        )
