"""mindbodypublicapi.

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

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


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

    Attributes:
        staff_id (int): The staff member Id
        mtype (Type2Enum): Contains the class description session type.
        id (int): This session type’s unique Id.
        name (str): The name of this session type.
        num_deducted (int): The number of sessions that this session type deducts
            from the pricing option used to pay for this type of session.
        program_id (int): This session type’s service category Id.
        category (str): This session type’s category.
        category_id (int): This session type’s category Id.
        subcategory (str): This session type’s subcategory.
        subcategory_id (int): This session type’s subcategory Id.
        time_length (int): The model property of type int.
        prep_time (int): Prep time in minutes
        finish_time (int): Finish time in minutes
        pay_rate_type (str): The pay rate type
        pay_rate_amount (float): The pay rate amount

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "staff_id": "StaffId",
        "mtype": "Type",
        "id": "Id",
        "name": "Name",
        "num_deducted": "NumDeducted",
        "program_id": "ProgramId",
        "category": "Category",
        "category_id": "CategoryId",
        "subcategory": "Subcategory",
        "subcategory_id": "SubcategoryId",
        "time_length": "TimeLength",
        "prep_time": "PrepTime",
        "finish_time": "FinishTime",
        "pay_rate_type": "PayRateType",
        "pay_rate_amount": "PayRateAmount",
    }

    _optionals = [
        "staff_id",
        "mtype",
        "id",
        "name",
        "num_deducted",
        "program_id",
        "category",
        "category_id",
        "subcategory",
        "subcategory_id",
        "time_length",
        "prep_time",
        "finish_time",
        "pay_rate_type",
        "pay_rate_amount",
    ]

    def __init__(
        self,
        staff_id=APIHelper.SKIP,
        mtype=APIHelper.SKIP,
        id=APIHelper.SKIP,
        name=APIHelper.SKIP,
        num_deducted=APIHelper.SKIP,
        program_id=APIHelper.SKIP,
        category=APIHelper.SKIP,
        category_id=APIHelper.SKIP,
        subcategory=APIHelper.SKIP,
        subcategory_id=APIHelper.SKIP,
        time_length=APIHelper.SKIP,
        prep_time=APIHelper.SKIP,
        finish_time=APIHelper.SKIP,
        pay_rate_type=APIHelper.SKIP,
        pay_rate_amount=APIHelper.SKIP):
        """Initialize a StaffSessionType instance."""
        # Initialize members of the class
        if staff_id is not APIHelper.SKIP:
            self.staff_id = staff_id
        if mtype is not APIHelper.SKIP:
            self.mtype = mtype
        if id is not APIHelper.SKIP:
            self.id = id
        if name is not APIHelper.SKIP:
            self.name = name
        if num_deducted is not APIHelper.SKIP:
            self.num_deducted = num_deducted
        if program_id is not APIHelper.SKIP:
            self.program_id = program_id
        if category is not APIHelper.SKIP:
            self.category = category
        if category_id is not APIHelper.SKIP:
            self.category_id = category_id
        if subcategory is not APIHelper.SKIP:
            self.subcategory = subcategory
        if subcategory_id is not APIHelper.SKIP:
            self.subcategory_id = subcategory_id
        if time_length is not APIHelper.SKIP:
            self.time_length = time_length
        if prep_time is not APIHelper.SKIP:
            self.prep_time = prep_time
        if finish_time is not APIHelper.SKIP:
            self.finish_time = finish_time
        if pay_rate_type is not APIHelper.SKIP:
            self.pay_rate_type = pay_rate_type
        if pay_rate_amount is not APIHelper.SKIP:
            self.pay_rate_amount = pay_rate_amount

    @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 APIHelper.SKIP
        mtype =\
            dictionary.get("Type")\
            if dictionary.get("Type")\
                else APIHelper.SKIP
        id =\
            dictionary.get("Id")\
            if dictionary.get("Id")\
                else APIHelper.SKIP
        name =\
            dictionary.get("Name")\
            if dictionary.get("Name")\
                else APIHelper.SKIP
        num_deducted =\
            dictionary.get("NumDeducted")\
            if dictionary.get("NumDeducted")\
                else APIHelper.SKIP
        program_id =\
            dictionary.get("ProgramId")\
            if dictionary.get("ProgramId")\
                else APIHelper.SKIP
        category =\
            dictionary.get("Category")\
            if dictionary.get("Category")\
                else APIHelper.SKIP
        category_id =\
            dictionary.get("CategoryId")\
            if dictionary.get("CategoryId")\
                else APIHelper.SKIP
        subcategory =\
            dictionary.get("Subcategory")\
            if dictionary.get("Subcategory")\
                else APIHelper.SKIP
        subcategory_id =\
            dictionary.get("SubcategoryId")\
            if dictionary.get("SubcategoryId")\
                else APIHelper.SKIP
        time_length =\
            dictionary.get("TimeLength")\
            if dictionary.get("TimeLength")\
                else APIHelper.SKIP
        prep_time =\
            dictionary.get("PrepTime")\
            if dictionary.get("PrepTime")\
                else APIHelper.SKIP
        finish_time =\
            dictionary.get("FinishTime")\
            if dictionary.get("FinishTime")\
                else APIHelper.SKIP
        pay_rate_type =\
            dictionary.get("PayRateType")\
            if dictionary.get("PayRateType")\
                else APIHelper.SKIP
        pay_rate_amount =\
            dictionary.get("PayRateAmount")\
            if dictionary.get("PayRateAmount")\
                else APIHelper.SKIP

        # Return an object of this model
        return cls(staff_id,
                   mtype,
                   id,
                   name,
                   num_deducted,
                   program_id,
                   category,
                   category_id,
                   subcategory,
                   subcategory_id,
                   time_length,
                   prep_time,
                   finish_time,
                   pay_rate_type,
                   pay_rate_amount)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _staff_id=(
            self.staff_id
            if hasattr(self, "staff_id")
            else None
        )
        _mtype=(
            self.mtype
            if hasattr(self, "mtype")
            else None
        )
        _id=(
            self.id
            if hasattr(self, "id")
            else None
        )
        _name=(
            self.name
            if hasattr(self, "name")
            else None
        )
        _num_deducted=(
            self.num_deducted
            if hasattr(self, "num_deducted")
            else None
        )
        _program_id=(
            self.program_id
            if hasattr(self, "program_id")
            else None
        )
        _category=(
            self.category
            if hasattr(self, "category")
            else None
        )
        _category_id=(
            self.category_id
            if hasattr(self, "category_id")
            else None
        )
        _subcategory=(
            self.subcategory
            if hasattr(self, "subcategory")
            else None
        )
        _subcategory_id=(
            self.subcategory_id
            if hasattr(self, "subcategory_id")
            else None
        )
        _time_length=(
            self.time_length
            if hasattr(self, "time_length")
            else None
        )
        _prep_time=(
            self.prep_time
            if hasattr(self, "prep_time")
            else None
        )
        _finish_time=(
            self.finish_time
            if hasattr(self, "finish_time")
            else None
        )
        _pay_rate_type=(
            self.pay_rate_type
            if hasattr(self, "pay_rate_type")
            else None
        )
        _pay_rate_amount=(
            self.pay_rate_amount
            if hasattr(self, "pay_rate_amount")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"staff_id={_staff_id!r}, "
            f"mtype={_mtype!r}, "
            f"id={_id!r}, "
            f"name={_name!r}, "
            f"num_deducted={_num_deducted!r}, "
            f"program_id={_program_id!r}, "
            f"category={_category!r}, "
            f"category_id={_category_id!r}, "
            f"subcategory={_subcategory!r}, "
            f"subcategory_id={_subcategory_id!r}, "
            f"time_length={_time_length!r}, "
            f"prep_time={_prep_time!r}, "
            f"finish_time={_finish_time!r}, "
            f"pay_rate_type={_pay_rate_type!r}, "
            f"pay_rate_amount={_pay_rate_amount!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _staff_id=(
            self.staff_id
            if hasattr(self, "staff_id")
            else None
        )
        _mtype=(
            self.mtype
            if hasattr(self, "mtype")
            else None
        )
        _id=(
            self.id
            if hasattr(self, "id")
            else None
        )
        _name=(
            self.name
            if hasattr(self, "name")
            else None
        )
        _num_deducted=(
            self.num_deducted
            if hasattr(self, "num_deducted")
            else None
        )
        _program_id=(
            self.program_id
            if hasattr(self, "program_id")
            else None
        )
        _category=(
            self.category
            if hasattr(self, "category")
            else None
        )
        _category_id=(
            self.category_id
            if hasattr(self, "category_id")
            else None
        )
        _subcategory=(
            self.subcategory
            if hasattr(self, "subcategory")
            else None
        )
        _subcategory_id=(
            self.subcategory_id
            if hasattr(self, "subcategory_id")
            else None
        )
        _time_length=(
            self.time_length
            if hasattr(self, "time_length")
            else None
        )
        _prep_time=(
            self.prep_time
            if hasattr(self, "prep_time")
            else None
        )
        _finish_time=(
            self.finish_time
            if hasattr(self, "finish_time")
            else None
        )
        _pay_rate_type=(
            self.pay_rate_type
            if hasattr(self, "pay_rate_type")
            else None
        )
        _pay_rate_amount=(
            self.pay_rate_amount
            if hasattr(self, "pay_rate_amount")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"staff_id={_staff_id!s}, "
            f"mtype={_mtype!s}, "
            f"id={_id!s}, "
            f"name={_name!s}, "
            f"num_deducted={_num_deducted!s}, "
            f"program_id={_program_id!s}, "
            f"category={_category!s}, "
            f"category_id={_category_id!s}, "
            f"subcategory={_subcategory!s}, "
            f"subcategory_id={_subcategory_id!s}, "
            f"time_length={_time_length!s}, "
            f"prep_time={_prep_time!s}, "
            f"finish_time={_finish_time!s}, "
            f"pay_rate_type={_pay_rate_type!s}, "
            f"pay_rate_amount={_pay_rate_amount!s}, "
            f")"
        )
