"""mindbodypublicapi.

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

# ruff: noqa: E501
from mindbodypublicapi.models.client_document import (
    ClientDocument,
)


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

    Attributes:
        client_id (str): The RSSID of the client for whom the document is to be
            uploaded.
        file (ClientDocument): The model property of type ClientDocument.

    """

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

    def __init__(
        self,
        client_id=None,
        file=None):
        """Initialize a UploadClientDocumentRequest instance."""
        # Initialize members of the class
        self.client_id = client_id
        self.file = file

    @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 None
        file =\
            ClientDocument.from_dictionary(
                dictionary.get("File"))\
                if dictionary.get("File") else None

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

    def __repr__(self):
        """Return a unambiguous string representation."""
        _client_id=self.client_id
        _file=self.file
        return (
            f"{self.__class__.__name__}("
            f"client_id={_client_id!r}, "
            f"file={_file!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _client_id=self.client_id
        _file=self.file
        return (
            f"{self.__class__.__name__}("
            f"client_id={_client_id!s}, "
            f"file={_file!s}, "
            f")"
        )
