"""mindbodypublicapi.

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

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


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

    Attributes:
        contact_log_type_id (int): The requested ContactLogType ID.  Default: **all**
            IDs that the authenticated user’s access level allows.
        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 = {
        "contact_log_type_id": "ContactLogTypeId",
        "limit": "Limit",
        "offset": "Offset",
    }

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

    def __init__(
        self,
        contact_log_type_id=APIHelper.SKIP,
        limit=APIHelper.SKIP,
        offset=APIHelper.SKIP):
        """Initialize a GetContactLogTypesRequest instance."""
        # Initialize members of the class
        if contact_log_type_id is not APIHelper.SKIP:
            self.contact_log_type_id = contact_log_type_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
        contact_log_type_id =\
            dictionary.get("ContactLogTypeId")\
            if dictionary.get("ContactLogTypeId")\
                else APIHelper.SKIP
        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(contact_log_type_id,
                   limit,
                   offset)

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

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