"""mindbodypublicapi.

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

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


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

    Attributes:
        liability_waiver (str): Contains Liability Waiver text for a site

    """

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

    _optionals = [
        "liability_waiver",
    ]

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

    @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
        liability_waiver =\
            dictionary.get("LiabilityWaiver")\
            if dictionary.get("LiabilityWaiver")\
                else APIHelper.SKIP

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

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

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