"""mindbodypublicapi.

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

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


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

    Attributes:
        client_index_id (int): ID of the client index.
        client_index_name (str): The name of the client index.
        active (bool): Indicates if Client Index is Active
        show_on_new_client (bool): Indicates if Client Index is shown on a new client
            profile
        show_on_enrollment_roster (bool): Indicates if Client Index is shown on
            Enrollement Roster
        edit_on_enrollment_roster (bool): Indicates if Client Index can be edited on
            Enrollement Roster
        sort_order (int): Indicates sort order
        show_in_consumer_mode (bool): Indicates if Client Index is shown in consumer
            mode.
        required_consumer_mode (bool): Indicates if the index is required when
            creating profiles in consumer mode.
        required_biz_mode (bool): Indicates if the index is required when creating
            profiles in business mode.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "client_index_id": "ClientIndexID",
        "client_index_name": "ClientIndexName",
        "active": "Active",
        "show_on_new_client": "ShowOnNewClient",
        "show_on_enrollment_roster": "ShowOnEnrollmentRoster",
        "edit_on_enrollment_roster": "EditOnEnrollmentRoster",
        "sort_order": "SortOrder",
        "show_in_consumer_mode": "ShowInConsumerMode",
        "required_consumer_mode": "RequiredConsumerMode",
        "required_biz_mode": "RequiredBizMode",
    }

    _optionals = [
        "client_index_id",
        "client_index_name",
        "active",
        "show_on_new_client",
        "show_on_enrollment_roster",
        "edit_on_enrollment_roster",
        "sort_order",
        "show_in_consumer_mode",
        "required_consumer_mode",
        "required_biz_mode",
    ]

    def __init__(
        self,
        client_index_id=APIHelper.SKIP,
        client_index_name=APIHelper.SKIP,
        active=APIHelper.SKIP,
        show_on_new_client=APIHelper.SKIP,
        show_on_enrollment_roster=APIHelper.SKIP,
        edit_on_enrollment_roster=APIHelper.SKIP,
        sort_order=APIHelper.SKIP,
        show_in_consumer_mode=APIHelper.SKIP,
        required_consumer_mode=APIHelper.SKIP,
        required_biz_mode=APIHelper.SKIP):
        """Initialize a UpdateSiteClientIndexResponse instance."""
        # Initialize members of the class
        if client_index_id is not APIHelper.SKIP:
            self.client_index_id = client_index_id
        if client_index_name is not APIHelper.SKIP:
            self.client_index_name = client_index_name
        if active is not APIHelper.SKIP:
            self.active = active
        if show_on_new_client is not APIHelper.SKIP:
            self.show_on_new_client = show_on_new_client
        if show_on_enrollment_roster is not APIHelper.SKIP:
            self.show_on_enrollment_roster = show_on_enrollment_roster
        if edit_on_enrollment_roster is not APIHelper.SKIP:
            self.edit_on_enrollment_roster = edit_on_enrollment_roster
        if sort_order is not APIHelper.SKIP:
            self.sort_order = sort_order
        if show_in_consumer_mode is not APIHelper.SKIP:
            self.show_in_consumer_mode = show_in_consumer_mode
        if required_consumer_mode is not APIHelper.SKIP:
            self.required_consumer_mode = required_consumer_mode
        if required_biz_mode is not APIHelper.SKIP:
            self.required_biz_mode = required_biz_mode

    @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_index_id =\
            dictionary.get("ClientIndexID")\
            if dictionary.get("ClientIndexID")\
                else APIHelper.SKIP
        client_index_name =\
            dictionary.get("ClientIndexName")\
            if dictionary.get("ClientIndexName")\
                else APIHelper.SKIP
        active =\
            dictionary.get("Active")\
            if "Active" in dictionary.keys()\
                else APIHelper.SKIP
        show_on_new_client =\
            dictionary.get("ShowOnNewClient")\
            if "ShowOnNewClient" in dictionary.keys()\
                else APIHelper.SKIP
        show_on_enrollment_roster =\
            dictionary.get("ShowOnEnrollmentRoster")\
            if "ShowOnEnrollmentRoster" in dictionary.keys()\
                else APIHelper.SKIP
        edit_on_enrollment_roster =\
            dictionary.get("EditOnEnrollmentRoster")\
            if "EditOnEnrollmentRoster" in dictionary.keys()\
                else APIHelper.SKIP
        sort_order =\
            dictionary.get("SortOrder")\
            if dictionary.get("SortOrder")\
                else APIHelper.SKIP
        show_in_consumer_mode =\
            dictionary.get("ShowInConsumerMode")\
            if "ShowInConsumerMode" in dictionary.keys()\
                else APIHelper.SKIP
        required_consumer_mode =\
            dictionary.get("RequiredConsumerMode")\
            if "RequiredConsumerMode" in dictionary.keys()\
                else APIHelper.SKIP
        required_biz_mode =\
            dictionary.get("RequiredBizMode")\
            if "RequiredBizMode" in dictionary.keys()\
                else APIHelper.SKIP

        # Return an object of this model
        return cls(client_index_id,
                   client_index_name,
                   active,
                   show_on_new_client,
                   show_on_enrollment_roster,
                   edit_on_enrollment_roster,
                   sort_order,
                   show_in_consumer_mode,
                   required_consumer_mode,
                   required_biz_mode)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _client_index_id=(
            self.client_index_id
            if hasattr(self, "client_index_id")
            else None
        )
        _client_index_name=(
            self.client_index_name
            if hasattr(self, "client_index_name")
            else None
        )
        _active=(
            self.active
            if hasattr(self, "active")
            else None
        )
        _show_on_new_client=(
            self.show_on_new_client
            if hasattr(self, "show_on_new_client")
            else None
        )
        _show_on_enrollment_roster=(
            self.show_on_enrollment_roster
            if hasattr(self, "show_on_enrollment_roster")
            else None
        )
        _edit_on_enrollment_roster=(
            self.edit_on_enrollment_roster
            if hasattr(self, "edit_on_enrollment_roster")
            else None
        )
        _sort_order=(
            self.sort_order
            if hasattr(self, "sort_order")
            else None
        )
        _show_in_consumer_mode=(
            self.show_in_consumer_mode
            if hasattr(self, "show_in_consumer_mode")
            else None
        )
        _required_consumer_mode=(
            self.required_consumer_mode
            if hasattr(self, "required_consumer_mode")
            else None
        )
        _required_biz_mode=(
            self.required_biz_mode
            if hasattr(self, "required_biz_mode")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"client_index_id={_client_index_id!r}, "
            f"client_index_name={_client_index_name!r}, "
            f"active={_active!r}, "
            f"show_on_new_client={_show_on_new_client!r}, "
            f"show_on_enrollment_roster={_show_on_enrollment_roster!r}, "
            f"edit_on_enrollment_roster={_edit_on_enrollment_roster!r}, "
            f"sort_order={_sort_order!r}, "
            f"show_in_consumer_mode={_show_in_consumer_mode!r}, "
            f"required_consumer_mode={_required_consumer_mode!r}, "
            f"required_biz_mode={_required_biz_mode!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _client_index_id=(
            self.client_index_id
            if hasattr(self, "client_index_id")
            else None
        )
        _client_index_name=(
            self.client_index_name
            if hasattr(self, "client_index_name")
            else None
        )
        _active=(
            self.active
            if hasattr(self, "active")
            else None
        )
        _show_on_new_client=(
            self.show_on_new_client
            if hasattr(self, "show_on_new_client")
            else None
        )
        _show_on_enrollment_roster=(
            self.show_on_enrollment_roster
            if hasattr(self, "show_on_enrollment_roster")
            else None
        )
        _edit_on_enrollment_roster=(
            self.edit_on_enrollment_roster
            if hasattr(self, "edit_on_enrollment_roster")
            else None
        )
        _sort_order=(
            self.sort_order
            if hasattr(self, "sort_order")
            else None
        )
        _show_in_consumer_mode=(
            self.show_in_consumer_mode
            if hasattr(self, "show_in_consumer_mode")
            else None
        )
        _required_consumer_mode=(
            self.required_consumer_mode
            if hasattr(self, "required_consumer_mode")
            else None
        )
        _required_biz_mode=(
            self.required_biz_mode
            if hasattr(self, "required_biz_mode")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"client_index_id={_client_index_id!s}, "
            f"client_index_name={_client_index_name!s}, "
            f"active={_active!s}, "
            f"show_on_new_client={_show_on_new_client!s}, "
            f"show_on_enrollment_roster={_show_on_enrollment_roster!s}, "
            f"edit_on_enrollment_roster={_edit_on_enrollment_roster!s}, "
            f"sort_order={_sort_order!s}, "
            f"show_in_consumer_mode={_show_in_consumer_mode!s}, "
            f"required_consumer_mode={_required_consumer_mode!s}, "
            f"required_biz_mode={_required_biz_mode!s}, "
            f")"
        )
