"""mindbodypublicapi.

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

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


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

    Attributes:
        class_ids (List[int]): The requested class IDs. If a class ID is present, the
            request automatically disregards any class schedule IDs in the request.
            <br />  Either `ClassScheduleIds`, `ClientIds`, `WaitlistEntryIds`, or
            `ClassIds` is required; the others become optional.<br />  Default: **all
            ClassIds**
        class_schedule_ids (List[int]): The requested class schedule IDs. If a class
            ID is present, the request automatically disregards any class schedule
            IDs in the request.<br />  Either `ClassScheduleIds`, `ClientIds`,
            `WaitlistEntryIds`, or `ClassIds` is required; the others become
            optional.<br />  Default: **all ClassScheduleIds**
        client_ids (List[str]): The requested client IDs.<br />  Either
            `ClassScheduleIds`, `ClientIds`, `WaitlistEntryIds`, or `ClassIds` is
            required; the others become optional.<br />  Default: **all ClientIds**
        hide_past_entries (bool): When `true`, indicates that past waiting list
            entries are hidden from clients.<br />  When `false`, indicates that past
            entries are not hidden from clients.<br />  Default: **false**
        waitlist_entry_ids (List[int]): The requested waiting list entry IDs.<br />
            Either `ClassScheduleIds`, `ClientIds`, `WaitlistEntryIds`, or `ClassIds`
            is required; the others become optional.<br />  Default: **all
            WaitlistEntryIds**
        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 = {
        "class_ids": "ClassIds",
        "class_schedule_ids": "ClassScheduleIds",
        "client_ids": "ClientIds",
        "hide_past_entries": "HidePastEntries",
        "waitlist_entry_ids": "WaitlistEntryIds",
        "limit": "Limit",
        "offset": "Offset",
    }

    _optionals = [
        "class_ids",
        "class_schedule_ids",
        "client_ids",
        "hide_past_entries",
        "waitlist_entry_ids",
        "limit",
        "offset",
    ]

    def __init__(
        self,
        class_ids=APIHelper.SKIP,
        class_schedule_ids=APIHelper.SKIP,
        client_ids=APIHelper.SKIP,
        hide_past_entries=APIHelper.SKIP,
        waitlist_entry_ids=APIHelper.SKIP,
        limit=APIHelper.SKIP,
        offset=APIHelper.SKIP):
        """Initialize a GetWaitlistEntriesRequest instance."""
        # Initialize members of the class
        if class_ids is not APIHelper.SKIP:
            self.class_ids = class_ids
        if class_schedule_ids is not APIHelper.SKIP:
            self.class_schedule_ids = class_schedule_ids
        if client_ids is not APIHelper.SKIP:
            self.client_ids = client_ids
        if hide_past_entries is not APIHelper.SKIP:
            self.hide_past_entries = hide_past_entries
        if waitlist_entry_ids is not APIHelper.SKIP:
            self.waitlist_entry_ids = waitlist_entry_ids
        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
        class_ids =\
            dictionary.get("ClassIds")\
            if dictionary.get("ClassIds")\
                else APIHelper.SKIP
        class_schedule_ids =\
            dictionary.get("ClassScheduleIds")\
            if dictionary.get("ClassScheduleIds")\
                else APIHelper.SKIP
        client_ids =\
            dictionary.get("ClientIds")\
            if dictionary.get("ClientIds")\
                else APIHelper.SKIP
        hide_past_entries =\
            dictionary.get("HidePastEntries")\
            if "HidePastEntries" in dictionary.keys()\
                else APIHelper.SKIP
        waitlist_entry_ids =\
            dictionary.get("WaitlistEntryIds")\
            if dictionary.get("WaitlistEntryIds")\
                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(class_ids,
                   class_schedule_ids,
                   client_ids,
                   hide_past_entries,
                   waitlist_entry_ids,
                   limit,
                   offset)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _class_ids=(
            self.class_ids
            if hasattr(self, "class_ids")
            else None
        )
        _class_schedule_ids=(
            self.class_schedule_ids
            if hasattr(self, "class_schedule_ids")
            else None
        )
        _client_ids=(
            self.client_ids
            if hasattr(self, "client_ids")
            else None
        )
        _hide_past_entries=(
            self.hide_past_entries
            if hasattr(self, "hide_past_entries")
            else None
        )
        _waitlist_entry_ids=(
            self.waitlist_entry_ids
            if hasattr(self, "waitlist_entry_ids")
            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"class_ids={_class_ids!r}, "
            f"class_schedule_ids={_class_schedule_ids!r}, "
            f"client_ids={_client_ids!r}, "
            f"hide_past_entries={_hide_past_entries!r}, "
            f"waitlist_entry_ids={_waitlist_entry_ids!r}, "
            f"limit={_limit!r}, "
            f"offset={_offset!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _class_ids=(
            self.class_ids
            if hasattr(self, "class_ids")
            else None
        )
        _class_schedule_ids=(
            self.class_schedule_ids
            if hasattr(self, "class_schedule_ids")
            else None
        )
        _client_ids=(
            self.client_ids
            if hasattr(self, "client_ids")
            else None
        )
        _hide_past_entries=(
            self.hide_past_entries
            if hasattr(self, "hide_past_entries")
            else None
        )
        _waitlist_entry_ids=(
            self.waitlist_entry_ids
            if hasattr(self, "waitlist_entry_ids")
            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"class_ids={_class_ids!s}, "
            f"class_schedule_ids={_class_schedule_ids!s}, "
            f"client_ids={_client_ids!s}, "
            f"hide_past_entries={_hide_past_entries!s}, "
            f"waitlist_entry_ids={_waitlist_entry_ids!s}, "
            f"limit={_limit!s}, "
            f"offset={_offset!s}, "
            f")"
        )
