"""mindbodypublicapi.

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

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


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

    Attributes:
        client_id (str): The RSSID of the client to remove from the specified class.
        unique_client_id (int): The Unique Id of the client to remove from the
            specified class  Note: you need to provide the 'UniqueClientId' OR the
            'ClientId'. If both are provided, the 'UniqueClientId' takes precedence.
        class_id (int): The ID of the class that you want to remove the client from.
        test (bool): When `true`, the request ensures that its parameters are valid
            without affecting real data.<br />  When `false`, the request performs as
            intended and may affect live client data.<br />  Default: **false**
        send_email (bool): When `true`, indicates that the client should be sent an
            email. Depending on the site and client settings, an email may or may not
            be sent.<br />  Default: **false**  Note: When the Authorization header
            is passed and the SendEmail is set to `true`, then an email will be sent.
            When the Authorization header is passed and the SendEmail is set to
            `false`, then an email will not be sent.  When the Authorization header
            is not passed and the SendEmail is set to either `true` or `false`, then
            an email will not be sent.
        late_cancel (bool): When `true`, indicates that the client is to be late
            cancelled from the class.<br />  When `false`, indicates that the client
            is to be early cancelled from the class.<br />  Default: **false**
        visit_id (int): The ID of the client visit that you want to remove from the
            class.  Default: **0**

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "class_id": "ClassId",
        "client_id": "ClientId",
        "unique_client_id": "UniqueClientId",
        "test": "Test",
        "send_email": "SendEmail",
        "late_cancel": "LateCancel",
        "visit_id": "VisitId",
    }

    _optionals = [
        "client_id",
        "unique_client_id",
        "test",
        "send_email",
        "late_cancel",
        "visit_id",
    ]

    def __init__(
        self,
        class_id=None,
        client_id=APIHelper.SKIP,
        unique_client_id=APIHelper.SKIP,
        test=APIHelper.SKIP,
        send_email=APIHelper.SKIP,
        late_cancel=APIHelper.SKIP,
        visit_id=APIHelper.SKIP):
        """Initialize a RemoveClientFromClassRequest instance."""
        # Initialize members of the class
        if client_id is not APIHelper.SKIP:
            self.client_id = client_id
        if unique_client_id is not APIHelper.SKIP:
            self.unique_client_id = unique_client_id
        self.class_id = class_id
        if test is not APIHelper.SKIP:
            self.test = test
        if send_email is not APIHelper.SKIP:
            self.send_email = send_email
        if late_cancel is not APIHelper.SKIP:
            self.late_cancel = late_cancel
        if visit_id is not APIHelper.SKIP:
            self.visit_id = visit_id

    @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_id =\
            dictionary.get("ClassId")\
            if dictionary.get("ClassId")\
                else None
        client_id =\
            dictionary.get("ClientId")\
            if dictionary.get("ClientId")\
                else APIHelper.SKIP
        unique_client_id =\
            dictionary.get("UniqueClientId")\
            if dictionary.get("UniqueClientId")\
                else APIHelper.SKIP
        test =\
            dictionary.get("Test")\
            if "Test" in dictionary.keys()\
                else APIHelper.SKIP
        send_email =\
            dictionary.get("SendEmail")\
            if "SendEmail" in dictionary.keys()\
                else APIHelper.SKIP
        late_cancel =\
            dictionary.get("LateCancel")\
            if "LateCancel" in dictionary.keys()\
                else APIHelper.SKIP
        visit_id =\
            dictionary.get("VisitId")\
            if dictionary.get("VisitId")\
                else APIHelper.SKIP

        # Return an object of this model
        return cls(class_id,
                   client_id,
                   unique_client_id,
                   test,
                   send_email,
                   late_cancel,
                   visit_id)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _client_id=(
            self.client_id
            if hasattr(self, "client_id")
            else None
        )
        _unique_client_id=(
            self.unique_client_id
            if hasattr(self, "unique_client_id")
            else None
        )
        _class_id=self.class_id
        _test=(
            self.test
            if hasattr(self, "test")
            else None
        )
        _send_email=(
            self.send_email
            if hasattr(self, "send_email")
            else None
        )
        _late_cancel=(
            self.late_cancel
            if hasattr(self, "late_cancel")
            else None
        )
        _visit_id=(
            self.visit_id
            if hasattr(self, "visit_id")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"client_id={_client_id!r}, "
            f"unique_client_id={_unique_client_id!r}, "
            f"class_id={_class_id!r}, "
            f"test={_test!r}, "
            f"send_email={_send_email!r}, "
            f"late_cancel={_late_cancel!r}, "
            f"visit_id={_visit_id!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _client_id=(
            self.client_id
            if hasattr(self, "client_id")
            else None
        )
        _unique_client_id=(
            self.unique_client_id
            if hasattr(self, "unique_client_id")
            else None
        )
        _class_id=self.class_id
        _test=(
            self.test
            if hasattr(self, "test")
            else None
        )
        _send_email=(
            self.send_email
            if hasattr(self, "send_email")
            else None
        )
        _late_cancel=(
            self.late_cancel
            if hasattr(self, "late_cancel")
            else None
        )
        _visit_id=(
            self.visit_id
            if hasattr(self, "visit_id")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"client_id={_client_id!s}, "
            f"unique_client_id={_unique_client_id!s}, "
            f"class_id={_class_id!s}, "
            f"test={_test!s}, "
            f"send_email={_send_email!s}, "
            f"late_cancel={_late_cancel!s}, "
            f"visit_id={_visit_id!s}, "
            f")"
        )
