"""mindbodypublicapi.

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

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


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

    Attributes:
        client_id (str): The client ID of the client whose formula note needs to be
            deleted.
        formula_note_id (int): The formula note ID for the note to be deleted.
        limit (int): Number of results to include, defaults to 100
        offset (int): Page offset, defaults to 0.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "client_id": "ClientId",
        "formula_note_id": "FormulaNoteId",
        "limit": "Limit",
        "offset": "Offset",
    }

    _optionals = [
        "limit",
        "offset",
    ]

    def __init__(
        self,
        client_id=None,
        formula_note_id=None,
        limit=APIHelper.SKIP,
        offset=APIHelper.SKIP):
        """Initialize a DeleteClientFormulaNoteRequest instance."""
        # Initialize members of the class
        self.client_id = client_id
        self.formula_note_id = formula_note_id
        if limit is not APIHelper.SKIP:
            self.limit = limit
        if offset is not APIHelper.SKIP:
            self.offset = offset

    @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
        formula_note_id =\
            dictionary.get("FormulaNoteId")\
            if dictionary.get("FormulaNoteId")\
                else None
        limit =\
            dictionary.get("Limit")\
            if dictionary.get("Limit")\
                else APIHelper.SKIP
        offset =\
            dictionary.get("Offset")\
            if dictionary.get("Offset")\
                else APIHelper.SKIP

        # Return an object of this model
        return cls(client_id,
                   formula_note_id,
                   limit,
                   offset)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _client_id=self.client_id
        _formula_note_id=self.formula_note_id
        _limit=(
            self.limit
            if hasattr(self, "limit")
            else None
        )
        _offset=(
            self.offset
            if hasattr(self, "offset")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"client_id={_client_id!r}, "
            f"formula_note_id={_formula_note_id!r}, "
            f"limit={_limit!r}, "
            f"offset={_offset!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _client_id=self.client_id
        _formula_note_id=self.formula_note_id
        _limit=(
            self.limit
            if hasattr(self, "limit")
            else None
        )
        _offset=(
            self.offset
            if hasattr(self, "offset")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"client_id={_client_id!s}, "
            f"formula_note_id={_formula_note_id!s}, "
            f"limit={_limit!s}, "
            f"offset={_offset!s}, "
            f")"
        )
