"""mindbodypublicapi.

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

# ruff: noqa: E501
class UpdateStaffPermissionsRequest(object):
    """Implementation of the 'UpdateStaffPermissionsRequest' model.

    Attributes:
        staff_id (int): The ID of the staff member whose permission you want to
            change. Staff member must have a login.
        permission_group_name (str): The name of the permission group.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "staff_id": "StaffId",
        "permission_group_name": "PermissionGroupName",
    }

    def __init__(
        self,
        staff_id=None,
        permission_group_name=None):
        """Initialize a UpdateStaffPermissionsRequest instance."""
        # Initialize members of the class
        self.staff_id = staff_id
        self.permission_group_name = permission_group_name

    @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
        staff_id =\
            dictionary.get("StaffId")\
            if dictionary.get("StaffId")\
                else None
        permission_group_name =\
            dictionary.get("PermissionGroupName")\
            if dictionary.get("PermissionGroupName")\
                else None

        # Return an object of this model
        return cls(staff_id,
                   permission_group_name)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _staff_id=self.staff_id
        _permission_group_name=self.permission_group_name
        return (
            f"{self.__class__.__name__}("
            f"staff_id={_staff_id!r}, "
            f"permission_group_name={_permission_group_name!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _staff_id=self.staff_id
        _permission_group_name=self.permission_group_name
        return (
            f"{self.__class__.__name__}("
            f"staff_id={_staff_id!s}, "
            f"permission_group_name={_permission_group_name!s}, "
            f")"
        )
