"""mindbodypublicapi.

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

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


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

    Attributes:
        include_inactive (bool): When `true`, filters the results to include subtypes
            and inactive referral types.<br />  When `false`, includes no subtypes
            and only active types.  Default:**false**

    """

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

    _optionals = [
        "include_inactive",
    ]

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

    @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
        include_inactive =\
            dictionary.get("IncludeInactive")\
            if "IncludeInactive" in dictionary.keys()\
                else APIHelper.SKIP

        # Return an object of this model
        return cls(include_inactive)

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

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