"""mindbodypublicapi.

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

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


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

    Attributes:
        client_i_ds (List[str]): The requested client IDs.  Default: **all IDs** that
            the authenticated user’s access level allows.<br />  Note: You can fetch
            information for maximum 20 clients at once.
        search_text (str): Text to use in the search. Can include FirstName,
            LastName, and Email. Note that user credentials must be provided.
        is_prospect (bool): When `true`, filters the results to include only those
            clients marked as prospects for the business.<br />  When `false`,
            indicates that only those clients who are not marked prospects should be
            returned.
        last_modified_date (datetime): Filters the results to include only the
            clients that have been modified on or after this date.
        unique_ids (List[int]): Filters results to clients with these `UniqueIDs`.
            This parameter cannot be used with `ClientIDs` or `SearchText`.  Default:
            **all UniqueIDs** that the authenticated user’s access level allows.
        include_inactive (bool): When `true`, indicates the results to include active
            and inactive clients.<br />  When `false`, indicates that only those
            clients who are marked as active should be returned.  Default: **false**
        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_i_ds": "ClientIDs",
        "search_text": "SearchText",
        "is_prospect": "IsProspect",
        "last_modified_date": "LastModifiedDate",
        "unique_ids": "UniqueIds",
        "include_inactive": "IncludeInactive",
        "limit": "Limit",
        "offset": "Offset",
    }

    _optionals = [
        "client_i_ds",
        "search_text",
        "is_prospect",
        "last_modified_date",
        "unique_ids",
        "include_inactive",
        "limit",
        "offset",
    ]

    def __init__(
        self,
        client_i_ds=APIHelper.SKIP,
        search_text=APIHelper.SKIP,
        is_prospect=APIHelper.SKIP,
        last_modified_date=APIHelper.SKIP,
        unique_ids=APIHelper.SKIP,
        include_inactive=APIHelper.SKIP,
        limit=APIHelper.SKIP,
        offset=APIHelper.SKIP):
        """Initialize a GetClientsRequest instance."""
        # Initialize members of the class
        if client_i_ds is not APIHelper.SKIP:
            self.client_i_ds = client_i_ds
        if search_text is not APIHelper.SKIP:
            self.search_text = search_text
        if is_prospect is not APIHelper.SKIP:
            self.is_prospect = is_prospect
        if last_modified_date is not APIHelper.SKIP:
            self.last_modified_date =\
                 APIHelper.apply_datetime_converter(
                last_modified_date, APIHelper.RFC3339DateTime)\
                 if last_modified_date else None
        if unique_ids is not APIHelper.SKIP:
            self.unique_ids = unique_ids
        if include_inactive is not APIHelper.SKIP:
            self.include_inactive = include_inactive
        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_i_ds =\
            dictionary.get("ClientIDs")\
            if dictionary.get("ClientIDs")\
                else APIHelper.SKIP
        search_text =\
            dictionary.get("SearchText")\
            if dictionary.get("SearchText")\
                else APIHelper.SKIP
        is_prospect =\
            dictionary.get("IsProspect")\
            if "IsProspect" in dictionary.keys()\
                else APIHelper.SKIP
        last_modified_date = APIHelper.RFC3339DateTime.from_value(
            dictionary.get("LastModifiedDate")).datetime\
            if dictionary.get("LastModifiedDate") else APIHelper.SKIP
        unique_ids =\
            dictionary.get("UniqueIds")\
            if dictionary.get("UniqueIds")\
                else APIHelper.SKIP
        include_inactive =\
            dictionary.get("IncludeInactive")\
            if "IncludeInactive" in dictionary.keys()\
                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(client_i_ds,
                   search_text,
                   is_prospect,
                   last_modified_date,
                   unique_ids,
                   include_inactive,
                   limit,
                   offset)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _client_i_ds=(
            self.client_i_ds
            if hasattr(self, "client_i_ds")
            else None
        )
        _search_text=(
            self.search_text
            if hasattr(self, "search_text")
            else None
        )
        _is_prospect=(
            self.is_prospect
            if hasattr(self, "is_prospect")
            else None
        )
        _last_modified_date=(
            self.last_modified_date
            if hasattr(self, "last_modified_date")
            else None
        )
        _unique_ids=(
            self.unique_ids
            if hasattr(self, "unique_ids")
            else None
        )
        _include_inactive=(
            self.include_inactive
            if hasattr(self, "include_inactive")
            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"client_i_ds={_client_i_ds!r}, "
            f"search_text={_search_text!r}, "
            f"is_prospect={_is_prospect!r}, "
            f"last_modified_date={_last_modified_date!r}, "
            f"unique_ids={_unique_ids!r}, "
            f"include_inactive={_include_inactive!r}, "
            f"limit={_limit!r}, "
            f"offset={_offset!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _client_i_ds=(
            self.client_i_ds
            if hasattr(self, "client_i_ds")
            else None
        )
        _search_text=(
            self.search_text
            if hasattr(self, "search_text")
            else None
        )
        _is_prospect=(
            self.is_prospect
            if hasattr(self, "is_prospect")
            else None
        )
        _last_modified_date=(
            self.last_modified_date
            if hasattr(self, "last_modified_date")
            else None
        )
        _unique_ids=(
            self.unique_ids
            if hasattr(self, "unique_ids")
            else None
        )
        _include_inactive=(
            self.include_inactive
            if hasattr(self, "include_inactive")
            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"client_i_ds={_client_i_ds!s}, "
            f"search_text={_search_text!s}, "
            f"is_prospect={_is_prospect!s}, "
            f"last_modified_date={_last_modified_date!s}, "
            f"unique_ids={_unique_ids!s}, "
            f"include_inactive={_include_inactive!s}, "
            f"limit={_limit!s}, "
            f"offset={_offset!s}, "
            f")"
        )
