"""mindbodypublicapi.

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

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


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

    Attributes:
        class_description_id (int): The Id of the class/enrollment description. This
            can be found in GetClassDescriptions.
        location_id (int): The Location Id of the enrollment schedule.
        start_date (datetime): The start date of the enrollment schedule.
        end_date (datetime): The end date of the enrollment schedule.
        start_time (datetime): Enrollment start time (use null or omit for TBD).
        end_time (datetime): Enrollment end time (ignored if StartTime is null or
            omitted).
        day_sunday (bool): If the enrollment occurs on Sunday(s).
        day_monday (bool): If the enrollment occurs on Monday(s).
        day_tuesday (bool): If the enrollment occurs on Tuesday(s).
        day_wednesday (bool): If the enrollment occurs on Wednesday(s).
        day_thursday (bool): If the enrollment occurs on Thursday(s).
        day_friday (bool): If the enrollment occurs on Friday(s).
        day_saturday (bool): If the enrollment occurs on Saturday(s).
        staff_id (int): The staff member teaching the enrollment.
        staff_pay_rate (int): The staff pay rate. Must be between 1-21.
        resource_id (int): The room where the enrollment is taking place.
        max_capacity (int): How many people can attend.
        web_capacity (int): How many people can signup online.  Default: **0**
        waitlist_capacity (int): How many people can waitlist.  Default:**0**
        booking_status (str): One of: PaymentRequired, BookAndPayLater, Free
        allow_open_enrollment (bool): Allow clients to choose which sessions they’d
            like to sign up for.  Default: **false**
        allow_date_forward_enrollment (bool): Allow booking after the enrollment has
            started.  Default: **false**
        pricing_options_product_ids (List[int]): Pricing Options for this schedule
        show_to_public (bool): Allow clients to see this schedule  Default: **true**

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "class_description_id": "ClassDescriptionId",
        "location_id": "LocationId",
        "start_date": "StartDate",
        "end_date": "EndDate",
        "start_time": "StartTime",
        "end_time": "EndTime",
        "day_sunday": "DaySunday",
        "day_monday": "DayMonday",
        "day_tuesday": "DayTuesday",
        "day_wednesday": "DayWednesday",
        "day_thursday": "DayThursday",
        "day_friday": "DayFriday",
        "day_saturday": "DaySaturday",
        "staff_id": "StaffId",
        "staff_pay_rate": "StaffPayRate",
        "resource_id": "ResourceId",
        "max_capacity": "MaxCapacity",
        "web_capacity": "WebCapacity",
        "waitlist_capacity": "WaitlistCapacity",
        "booking_status": "BookingStatus",
        "allow_open_enrollment": "AllowOpenEnrollment",
        "allow_date_forward_enrollment": "AllowDateForwardEnrollment",
        "pricing_options_product_ids": "PricingOptionsProductIds",
        "show_to_public": "ShowToPublic",
    }

    _optionals = [
        "class_description_id",
        "location_id",
        "start_date",
        "end_date",
        "start_time",
        "end_time",
        "day_sunday",
        "day_monday",
        "day_tuesday",
        "day_wednesday",
        "day_thursday",
        "day_friday",
        "day_saturday",
        "staff_id",
        "staff_pay_rate",
        "resource_id",
        "max_capacity",
        "web_capacity",
        "waitlist_capacity",
        "booking_status",
        "allow_open_enrollment",
        "allow_date_forward_enrollment",
        "pricing_options_product_ids",
        "show_to_public",
    ]

    def __init__(
        self,
        class_description_id=APIHelper.SKIP,
        location_id=APIHelper.SKIP,
        start_date=APIHelper.SKIP,
        end_date=APIHelper.SKIP,
        start_time=APIHelper.SKIP,
        end_time=APIHelper.SKIP,
        day_sunday=APIHelper.SKIP,
        day_monday=APIHelper.SKIP,
        day_tuesday=APIHelper.SKIP,
        day_wednesday=APIHelper.SKIP,
        day_thursday=APIHelper.SKIP,
        day_friday=APIHelper.SKIP,
        day_saturday=APIHelper.SKIP,
        staff_id=APIHelper.SKIP,
        staff_pay_rate=APIHelper.SKIP,
        resource_id=APIHelper.SKIP,
        max_capacity=APIHelper.SKIP,
        web_capacity=APIHelper.SKIP,
        waitlist_capacity=APIHelper.SKIP,
        booking_status=APIHelper.SKIP,
        allow_open_enrollment=APIHelper.SKIP,
        allow_date_forward_enrollment=APIHelper.SKIP,
        pricing_options_product_ids=APIHelper.SKIP,
        show_to_public=APIHelper.SKIP):
        """Initialize a AddClassEnrollmentScheduleRequest instance."""
        # Initialize members of the class
        if class_description_id is not APIHelper.SKIP:
            self.class_description_id = class_description_id
        if location_id is not APIHelper.SKIP:
            self.location_id = location_id
        if start_date is not APIHelper.SKIP:
            self.start_date =\
                 APIHelper.apply_datetime_converter(
                start_date, APIHelper.RFC3339DateTime)\
                 if start_date else None
        if end_date is not APIHelper.SKIP:
            self.end_date =\
                 APIHelper.apply_datetime_converter(
                end_date, APIHelper.RFC3339DateTime)\
                 if end_date else None
        if start_time is not APIHelper.SKIP:
            self.start_time =\
                 APIHelper.apply_datetime_converter(
                start_time, APIHelper.RFC3339DateTime)\
                 if start_time else None
        if end_time is not APIHelper.SKIP:
            self.end_time =\
                 APIHelper.apply_datetime_converter(
                end_time, APIHelper.RFC3339DateTime)\
                 if end_time else None
        if day_sunday is not APIHelper.SKIP:
            self.day_sunday = day_sunday
        if day_monday is not APIHelper.SKIP:
            self.day_monday = day_monday
        if day_tuesday is not APIHelper.SKIP:
            self.day_tuesday = day_tuesday
        if day_wednesday is not APIHelper.SKIP:
            self.day_wednesday = day_wednesday
        if day_thursday is not APIHelper.SKIP:
            self.day_thursday = day_thursday
        if day_friday is not APIHelper.SKIP:
            self.day_friday = day_friday
        if day_saturday is not APIHelper.SKIP:
            self.day_saturday = day_saturday
        if staff_id is not APIHelper.SKIP:
            self.staff_id = staff_id
        if staff_pay_rate is not APIHelper.SKIP:
            self.staff_pay_rate = staff_pay_rate
        if resource_id is not APIHelper.SKIP:
            self.resource_id = resource_id
        if max_capacity is not APIHelper.SKIP:
            self.max_capacity = max_capacity
        if web_capacity is not APIHelper.SKIP:
            self.web_capacity = web_capacity
        if waitlist_capacity is not APIHelper.SKIP:
            self.waitlist_capacity = waitlist_capacity
        if booking_status is not APIHelper.SKIP:
            self.booking_status = booking_status
        if allow_open_enrollment is not APIHelper.SKIP:
            self.allow_open_enrollment = allow_open_enrollment
        if allow_date_forward_enrollment is not APIHelper.SKIP:
            self.allow_date_forward_enrollment = allow_date_forward_enrollment
        if pricing_options_product_ids is not APIHelper.SKIP:
            self.pricing_options_product_ids = pricing_options_product_ids
        if show_to_public is not APIHelper.SKIP:
            self.show_to_public = show_to_public

    @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_description_id =\
            dictionary.get("ClassDescriptionId")\
            if dictionary.get("ClassDescriptionId")\
                else APIHelper.SKIP
        location_id =\
            dictionary.get("LocationId")\
            if dictionary.get("LocationId")\
                else APIHelper.SKIP
        start_date = APIHelper.RFC3339DateTime.from_value(
            dictionary.get("StartDate")).datetime\
            if dictionary.get("StartDate") else APIHelper.SKIP
        end_date = APIHelper.RFC3339DateTime.from_value(
            dictionary.get("EndDate")).datetime\
            if dictionary.get("EndDate") else APIHelper.SKIP
        start_time = APIHelper.RFC3339DateTime.from_value(
            dictionary.get("StartTime")).datetime\
            if dictionary.get("StartTime") else APIHelper.SKIP
        end_time = APIHelper.RFC3339DateTime.from_value(
            dictionary.get("EndTime")).datetime\
            if dictionary.get("EndTime") else APIHelper.SKIP
        day_sunday =\
            dictionary.get("DaySunday")\
            if "DaySunday" in dictionary.keys()\
                else APIHelper.SKIP
        day_monday =\
            dictionary.get("DayMonday")\
            if "DayMonday" in dictionary.keys()\
                else APIHelper.SKIP
        day_tuesday =\
            dictionary.get("DayTuesday")\
            if "DayTuesday" in dictionary.keys()\
                else APIHelper.SKIP
        day_wednesday =\
            dictionary.get("DayWednesday")\
            if "DayWednesday" in dictionary.keys()\
                else APIHelper.SKIP
        day_thursday =\
            dictionary.get("DayThursday")\
            if "DayThursday" in dictionary.keys()\
                else APIHelper.SKIP
        day_friday =\
            dictionary.get("DayFriday")\
            if "DayFriday" in dictionary.keys()\
                else APIHelper.SKIP
        day_saturday =\
            dictionary.get("DaySaturday")\
            if "DaySaturday" in dictionary.keys()\
                else APIHelper.SKIP
        staff_id =\
            dictionary.get("StaffId")\
            if dictionary.get("StaffId")\
                else APIHelper.SKIP
        staff_pay_rate =\
            dictionary.get("StaffPayRate")\
            if dictionary.get("StaffPayRate")\
                else APIHelper.SKIP
        resource_id =\
            dictionary.get("ResourceId")\
            if dictionary.get("ResourceId")\
                else APIHelper.SKIP
        max_capacity =\
            dictionary.get("MaxCapacity")\
            if dictionary.get("MaxCapacity")\
                else APIHelper.SKIP
        web_capacity =\
            dictionary.get("WebCapacity")\
            if dictionary.get("WebCapacity")\
                else APIHelper.SKIP
        waitlist_capacity =\
            dictionary.get("WaitlistCapacity")\
            if dictionary.get("WaitlistCapacity")\
                else APIHelper.SKIP
        booking_status =\
            dictionary.get("BookingStatus")\
            if dictionary.get("BookingStatus")\
                else APIHelper.SKIP
        allow_open_enrollment =\
            dictionary.get("AllowOpenEnrollment")\
            if "AllowOpenEnrollment" in dictionary.keys()\
                else APIHelper.SKIP
        allow_date_forward_enrollment =\
            dictionary.get("AllowDateForwardEnrollment")\
            if "AllowDateForwardEnrollment" in dictionary.keys()\
                else APIHelper.SKIP
        pricing_options_product_ids =\
            dictionary.get("PricingOptionsProductIds")\
            if dictionary.get("PricingOptionsProductIds")\
                else APIHelper.SKIP
        show_to_public =\
            dictionary.get("ShowToPublic")\
            if "ShowToPublic" in dictionary.keys()\
                else APIHelper.SKIP

        # Return an object of this model
        return cls(class_description_id,
                   location_id,
                   start_date,
                   end_date,
                   start_time,
                   end_time,
                   day_sunday,
                   day_monday,
                   day_tuesday,
                   day_wednesday,
                   day_thursday,
                   day_friday,
                   day_saturday,
                   staff_id,
                   staff_pay_rate,
                   resource_id,
                   max_capacity,
                   web_capacity,
                   waitlist_capacity,
                   booking_status,
                   allow_open_enrollment,
                   allow_date_forward_enrollment,
                   pricing_options_product_ids,
                   show_to_public)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _class_description_id=(
            self.class_description_id
            if hasattr(self, "class_description_id")
            else None
        )
        _location_id=(
            self.location_id
            if hasattr(self, "location_id")
            else None
        )
        _start_date=(
            self.start_date
            if hasattr(self, "start_date")
            else None
        )
        _end_date=(
            self.end_date
            if hasattr(self, "end_date")
            else None
        )
        _start_time=(
            self.start_time
            if hasattr(self, "start_time")
            else None
        )
        _end_time=(
            self.end_time
            if hasattr(self, "end_time")
            else None
        )
        _day_sunday=(
            self.day_sunday
            if hasattr(self, "day_sunday")
            else None
        )
        _day_monday=(
            self.day_monday
            if hasattr(self, "day_monday")
            else None
        )
        _day_tuesday=(
            self.day_tuesday
            if hasattr(self, "day_tuesday")
            else None
        )
        _day_wednesday=(
            self.day_wednesday
            if hasattr(self, "day_wednesday")
            else None
        )
        _day_thursday=(
            self.day_thursday
            if hasattr(self, "day_thursday")
            else None
        )
        _day_friday=(
            self.day_friday
            if hasattr(self, "day_friday")
            else None
        )
        _day_saturday=(
            self.day_saturday
            if hasattr(self, "day_saturday")
            else None
        )
        _staff_id=(
            self.staff_id
            if hasattr(self, "staff_id")
            else None
        )
        _staff_pay_rate=(
            self.staff_pay_rate
            if hasattr(self, "staff_pay_rate")
            else None
        )
        _resource_id=(
            self.resource_id
            if hasattr(self, "resource_id")
            else None
        )
        _max_capacity=(
            self.max_capacity
            if hasattr(self, "max_capacity")
            else None
        )
        _web_capacity=(
            self.web_capacity
            if hasattr(self, "web_capacity")
            else None
        )
        _waitlist_capacity=(
            self.waitlist_capacity
            if hasattr(self, "waitlist_capacity")
            else None
        )
        _booking_status=(
            self.booking_status
            if hasattr(self, "booking_status")
            else None
        )
        _allow_open_enrollment=(
            self.allow_open_enrollment
            if hasattr(self, "allow_open_enrollment")
            else None
        )
        _allow_date_forward_enrollment=(
            self.allow_date_forward_enrollment
            if hasattr(self, "allow_date_forward_enrollment")
            else None
        )
        _pricing_options_product_ids=(
            self.pricing_options_product_ids
            if hasattr(self, "pricing_options_product_ids")
            else None
        )
        _show_to_public=(
            self.show_to_public
            if hasattr(self, "show_to_public")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"class_description_id={_class_description_id!r}, "
            f"location_id={_location_id!r}, "
            f"start_date={_start_date!r}, "
            f"end_date={_end_date!r}, "
            f"start_time={_start_time!r}, "
            f"end_time={_end_time!r}, "
            f"day_sunday={_day_sunday!r}, "
            f"day_monday={_day_monday!r}, "
            f"day_tuesday={_day_tuesday!r}, "
            f"day_wednesday={_day_wednesday!r}, "
            f"day_thursday={_day_thursday!r}, "
            f"day_friday={_day_friday!r}, "
            f"day_saturday={_day_saturday!r}, "
            f"staff_id={_staff_id!r}, "
            f"staff_pay_rate={_staff_pay_rate!r}, "
            f"resource_id={_resource_id!r}, "
            f"max_capacity={_max_capacity!r}, "
            f"web_capacity={_web_capacity!r}, "
            f"waitlist_capacity={_waitlist_capacity!r}, "
            f"booking_status={_booking_status!r}, "
            f"allow_open_enrollment={_allow_open_enrollment!r}, "
            f"allow_date_forward_enrollment={_allow_date_forward_enrollment!r}, "
            f"pricing_options_product_ids={_pricing_options_product_ids!r}, "
            f"show_to_public={_show_to_public!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _class_description_id=(
            self.class_description_id
            if hasattr(self, "class_description_id")
            else None
        )
        _location_id=(
            self.location_id
            if hasattr(self, "location_id")
            else None
        )
        _start_date=(
            self.start_date
            if hasattr(self, "start_date")
            else None
        )
        _end_date=(
            self.end_date
            if hasattr(self, "end_date")
            else None
        )
        _start_time=(
            self.start_time
            if hasattr(self, "start_time")
            else None
        )
        _end_time=(
            self.end_time
            if hasattr(self, "end_time")
            else None
        )
        _day_sunday=(
            self.day_sunday
            if hasattr(self, "day_sunday")
            else None
        )
        _day_monday=(
            self.day_monday
            if hasattr(self, "day_monday")
            else None
        )
        _day_tuesday=(
            self.day_tuesday
            if hasattr(self, "day_tuesday")
            else None
        )
        _day_wednesday=(
            self.day_wednesday
            if hasattr(self, "day_wednesday")
            else None
        )
        _day_thursday=(
            self.day_thursday
            if hasattr(self, "day_thursday")
            else None
        )
        _day_friday=(
            self.day_friday
            if hasattr(self, "day_friday")
            else None
        )
        _day_saturday=(
            self.day_saturday
            if hasattr(self, "day_saturday")
            else None
        )
        _staff_id=(
            self.staff_id
            if hasattr(self, "staff_id")
            else None
        )
        _staff_pay_rate=(
            self.staff_pay_rate
            if hasattr(self, "staff_pay_rate")
            else None
        )
        _resource_id=(
            self.resource_id
            if hasattr(self, "resource_id")
            else None
        )
        _max_capacity=(
            self.max_capacity
            if hasattr(self, "max_capacity")
            else None
        )
        _web_capacity=(
            self.web_capacity
            if hasattr(self, "web_capacity")
            else None
        )
        _waitlist_capacity=(
            self.waitlist_capacity
            if hasattr(self, "waitlist_capacity")
            else None
        )
        _booking_status=(
            self.booking_status
            if hasattr(self, "booking_status")
            else None
        )
        _allow_open_enrollment=(
            self.allow_open_enrollment
            if hasattr(self, "allow_open_enrollment")
            else None
        )
        _allow_date_forward_enrollment=(
            self.allow_date_forward_enrollment
            if hasattr(self, "allow_date_forward_enrollment")
            else None
        )
        _pricing_options_product_ids=(
            self.pricing_options_product_ids
            if hasattr(self, "pricing_options_product_ids")
            else None
        )
        _show_to_public=(
            self.show_to_public
            if hasattr(self, "show_to_public")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"class_description_id={_class_description_id!s}, "
            f"location_id={_location_id!s}, "
            f"start_date={_start_date!s}, "
            f"end_date={_end_date!s}, "
            f"start_time={_start_time!s}, "
            f"end_time={_end_time!s}, "
            f"day_sunday={_day_sunday!s}, "
            f"day_monday={_day_monday!s}, "
            f"day_tuesday={_day_tuesday!s}, "
            f"day_wednesday={_day_wednesday!s}, "
            f"day_thursday={_day_thursday!s}, "
            f"day_friday={_day_friday!s}, "
            f"day_saturday={_day_saturday!s}, "
            f"staff_id={_staff_id!s}, "
            f"staff_pay_rate={_staff_pay_rate!s}, "
            f"resource_id={_resource_id!s}, "
            f"max_capacity={_max_capacity!s}, "
            f"web_capacity={_web_capacity!s}, "
            f"waitlist_capacity={_waitlist_capacity!s}, "
            f"booking_status={_booking_status!s}, "
            f"allow_open_enrollment={_allow_open_enrollment!s}, "
            f"allow_date_forward_enrollment={_allow_date_forward_enrollment!s}, "
            f"pricing_options_product_ids={_pricing_options_product_ids!s}, "
            f"show_to_public={_show_to_public!s}, "
            f")"
        )
