"""mindbodypublicapi.

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

# ruff: noqa: D410, E501, E101, D206
from apimatic_core.authentication.multiple.single_auth import (
    Single,
)
from apimatic_core.request_builder import RequestBuilder
from apimatic_core.response_handler import ResponseHandler
from apimatic_core.types.parameter import Parameter

from mindbodypublicapi.api_helper import APIHelper
from mindbodypublicapi.configuration import (
    Server,
)
from mindbodypublicapi.controllers.base_controller import (
    BaseController,
)
from mindbodypublicapi.http.http_method_enum import (
    HttpMethodEnum,
)
from mindbodypublicapi.models.add_client_to_class_response import (
    AddClientToClassResponse,
)
from mindbodypublicapi.models.cancel_single_class_response import (
    CancelSingleClassResponse,
)
from mindbodypublicapi.models.get_class_descriptions_response import (
    GetClassDescriptionsResponse,
)
from mindbodypublicapi.models.get_class_schedules_response import (
    GetClassSchedulesResponse,
)
from mindbodypublicapi.models.get_class_visits_response import (
    GetClassVisitsResponse,
)
from mindbodypublicapi.models.get_classes_response import (
    GetClassesResponse,
)
from mindbodypublicapi.models.get_courses_reponse import (
    GetCoursesReponse,
)
from mindbodypublicapi.models.get_semesters_response import (
    GetSemestersResponse,
)
from mindbodypublicapi.models.get_waitlist_entries_response import (
    GetWaitlistEntriesResponse,
)
from mindbodypublicapi.models.remove_client_from_class_response import (
    RemoveClientFromClassResponse,
)
from mindbodypublicapi.models.remove_clients_from_classes_response import (
    RemoveClientsFromClassesResponse,
)
from mindbodypublicapi.models.substitute_class_teacher_response import (
    SubstituteClassTeacherResponse,
)
from mindbodypublicapi.models.written_class_schedules_info import (
    WrittenClassSchedulesInfo,
)


class ClassController(BaseController):
    """A Controller to access Endpoints in the mindbodypublicapi API."""

    def __init__(self, config):
        """Initialize ClassController object."""
        super(ClassController, self).__init__(config)

    def get_class_descriptions(self,
                               version,
                               site_id,
                               authorization=None,
                               request_class_description_id=None,
                               request_end_class_date_time=None,
                               request_include_inactive=None,
                               request_limit=None,
                               request_location_id=None,
                               request_offset=None,
                               request_program_ids=None,
                               request_staff_id=None,
                               request_start_class_date_time=None):
        """Perform a GET request to /public/v{version}/class/classdescriptions.

        To find class descriptions associated with **scheduled classes**, pass
        `StaffId`, `StartClassDateTime`, `EndClassDateTime`, or `LocationId` in the
        request.

        Args:
            version (str): version of the api.
            site_id (str): ID of the site from which to pull data.
            authorization (str, optional): A staff user authorization token.
            request_class_description_id (int, optional): The ID of the requested
                client.
            request_end_class_date_time (datetime, optional): Filters the results to
                class descriptions for scheduled classes that happen before the given
                date and time.
            request_include_inactive (bool, optional): Includes inactive class
                descriptions, defaulting to true. When set to false, it filters out
                inactive class descriptions.
            request_limit (int, optional): Number of results to include, defaults to
                100
            request_location_id (int, optional): Filters results to classes
                descriptions for schedule classes as the given location.
            request_offset (int, optional): Page offset, defaults to 0.
            request_program_ids (List[int], optional): A list of requested program
                IDs.
            request_staff_id (int, optional): Filters results to class descriptions
                for scheduled classes taught by the given staff member.
            request_start_class_date_time (datetime, optional): Filters the results
                to class descriptions for scheduled classes that happen on or after
                the given date and time.

        Returns:
            GetClassDescriptionsResponse: Response from the API. OK

        Raises:
            APIException: When an error occurs while fetching the data from the
                remote API. This exception includes the HTTP Response code, an error
                message, and the HTTP body that was received in the request.

        """
        return super().new_api_call_builder.request(
            RequestBuilder().server(Server.DEFAULT)
            .path("/public/v{version}/class/classdescriptions")
            .http_method(HttpMethodEnum.GET)
            .template_param(Parameter()
                .key("version")
                .value(version)
                .should_encode(True))
            .header_param(Parameter()
                .key("siteId")
                .value(site_id))
            .header_param(Parameter()
                .key("authorization")
                .value(authorization))
            .query_param(Parameter()
                .key("request.classDescriptionId")
                .value(request_class_description_id))
            .query_param(Parameter()
                .key("request.endClassDateTime")
                .value(APIHelper.when_defined(APIHelper.RFC3339DateTime,
                    request_end_class_date_time)))
            .query_param(Parameter()
                .key("request.includeInactive")
                .value(request_include_inactive))
            .query_param(Parameter()
                .key("request.limit")
                .value(request_limit))
            .query_param(Parameter()
                .key("request.locationId")
                .value(request_location_id))
            .query_param(Parameter()
                .key("request.offset")
                .value(request_offset))
            .query_param(Parameter()
                .key("request.programIds")
                .value(request_program_ids))
            .query_param(Parameter()
                .key("request.staffId")
                .value(request_staff_id))
            .query_param(Parameter()
                .key("request.startClassDateTime")
                .value(APIHelper.when_defined(APIHelper.RFC3339DateTime,
                    request_start_class_date_time)))
            .header_param(Parameter()
                .key("accept")
                .value("application/json"))
            .auth(Single("API-Key")),
        ).response(
            ResponseHandler()
            .deserializer(APIHelper.json_deserialize)
            .deserialize_into(GetClassDescriptionsResponse.from_dictionary),
        ).execute()

    def get_classes(self,
                    version,
                    site_id,
                    authorization=None,
                    request_class_description_ids=None,
                    request_class_ids=None,
                    request_class_schedule_ids=None,
                    request_client_id=None,
                    request_end_date_time=None,
                    request_hide_canceled_classes=None,
                    request_last_modified_date=None,
                    request_limit=None,
                    request_location_ids=None,
                    request_offset=None,
                    request_program_ids=None,
                    request_scheduling_window=None,
                    request_semester_ids=None,
                    request_session_type_ids=None,
                    request_staff_ids=None,
                    request_start_date_time=None,
                    request_unique_client_id=None):
        """Perform a GET request to /public/v{version}/class/classes.

        Get scheduled classes.

        Args:
            version (str): version of the api.
            site_id (str): ID of the site from which to pull data.
            authorization (str, optional): A staff user authorization token.
            request_class_description_ids (List[int], optional): The requested class
                description IDs.
            request_class_ids (List[int], optional): The requested class IDs.
            request_class_schedule_ids (List[int], optional): The requested
                classSchedule Ids.
            request_client_id (str, optional): The client ID of the client who is
                viewing this class list. Based on identity, the client may be able to
                see additional information, such as membership specials.
            request_end_date_time (datetime, optional): The requested end date for
                filtering.  NOTE: ClassDate does not take Class Time into
                consideration.  <br />Default: **today’s date**
            request_hide_canceled_classes (bool, optional): When `true`, canceled
                classes are removed from the response.<br />  When `false`, canceled
                classes are included in the response.<br />  Default: **false**
            request_last_modified_date (datetime, optional): When included in the
                request, only records modified on or after the `LastModifiedDate`
                specified are included in the response.
            request_limit (int, optional): Number of results to include, defaults to
                100
            request_location_ids (List[int], optional): A list of location IDs on
                which to base the search.
            request_offset (int, optional): Page offset, defaults to 0.
            request_program_ids (List[int], optional): A list of program IDs on which
                to base the search.
            request_scheduling_window (bool, optional): When `true`, classes outside
                scheduling window are removed from the response.<br />  When `false`,
                classes are included in the response, regardless of the scheduling
                window.<br />  Default: **false**
            request_semester_ids (List[int], optional): A list of semester IDs on
                which to base the search.
            request_session_type_ids (List[int], optional): A list of session type
                IDs on which to base the search.
            request_staff_ids (List[int], optional): The requested IDs of the
                teaching staff members.
            request_start_date_time (datetime, optional): The requested start date
                for filtering. This also determines what you will see for the
                ‘BookingWindow’ StartDateTime in the response. For example, if you
                pass a StartDateTime that is on OR before the BookingWindow ‘Open’
                days of the class, you will retrieve the actual ‘StartDateTime’ for
                the Booking Window. If you pass a StartDateTime that is after the
                BookingWindow ‘date’, then you will receive results based on that
                start date.  NOTE: ClassDate does not take Class Time into
                consideration.
            request_unique_client_id (int, optional): The unique ID of the client who
                is viewing this class list. Based on identity, the client may be able
                to see additional information, such as membership specials.  Note:
                you need to provide the 'UniqueClientId' OR the 'ClientId'. If both
                are provided, the 'UniqueClientId' takes precedence.

        Returns:
            GetClassesResponse: Response from the API. OK

        Raises:
            APIException: When an error occurs while fetching the data from the
                remote API. This exception includes the HTTP Response code, an error
                message, and the HTTP body that was received in the request.

        """
        return super().new_api_call_builder.request(
            RequestBuilder().server(Server.DEFAULT)
            .path("/public/v{version}/class/classes")
            .http_method(HttpMethodEnum.GET)
            .template_param(Parameter()
                .key("version")
                .value(version)
                .should_encode(True))
            .header_param(Parameter()
                .key("siteId")
                .value(site_id))
            .header_param(Parameter()
                .key("authorization")
                .value(authorization))
            .query_param(Parameter()
                .key("request.classDescriptionIds")
                .value(request_class_description_ids))
            .query_param(Parameter()
                .key("request.classIds")
                .value(request_class_ids))
            .query_param(Parameter()
                .key("request.classScheduleIds")
                .value(request_class_schedule_ids))
            .query_param(Parameter()
                .key("request.clientId")
                .value(request_client_id))
            .query_param(Parameter()
                .key("request.endDateTime")
                .value(APIHelper.when_defined(APIHelper.RFC3339DateTime,
                    request_end_date_time)))
            .query_param(Parameter()
                .key("request.hideCanceledClasses")
                .value(request_hide_canceled_classes))
            .query_param(Parameter()
                .key("request.lastModifiedDate")
                .value(APIHelper.when_defined(APIHelper.RFC3339DateTime,
                    request_last_modified_date)))
            .query_param(Parameter()
                .key("request.limit")
                .value(request_limit))
            .query_param(Parameter()
                .key("request.locationIds")
                .value(request_location_ids))
            .query_param(Parameter()
                .key("request.offset")
                .value(request_offset))
            .query_param(Parameter()
                .key("request.programIds")
                .value(request_program_ids))
            .query_param(Parameter()
                .key("request.schedulingWindow")
                .value(request_scheduling_window))
            .query_param(Parameter()
                .key("request.semesterIds")
                .value(request_semester_ids))
            .query_param(Parameter()
                .key("request.sessionTypeIds")
                .value(request_session_type_ids))
            .query_param(Parameter()
                .key("request.staffIds")
                .value(request_staff_ids))
            .query_param(Parameter()
                .key("request.startDateTime")
                .value(APIHelper.when_defined(APIHelper.RFC3339DateTime,
                    request_start_date_time)))
            .query_param(Parameter()
                .key("request.uniqueClientId")
                .value(request_unique_client_id))
            .header_param(Parameter()
                .key("accept")
                .value("application/json"))
            .auth(Single("API-Key")),
        ).response(
            ResponseHandler()
            .deserializer(APIHelper.json_deserialize)
            .deserialize_into(GetClassesResponse.from_dictionary),
        ).execute()

    def get_class_schedules(self,
                            version,
                            site_id,
                            authorization=None,
                            request_class_schedule_ids=None,
                            request_end_date=None,
                            request_limit=None,
                            request_location_ids=None,
                            request_offset=None,
                            request_program_ids=None,
                            request_session_type_ids=None,
                            request_staff_ids=None,
                            request_start_date=None):
        """Perform a GET request to /public/v{version}/class/classschedules.

        Get class schedules.

        Args:
            version (str): version of the api.
            site_id (str): ID of the site from which to pull data.
            authorization (str, optional): A staff user authorization token.
            request_class_schedule_ids (List[int], optional): The class schedule IDs.
                <br />Default: **all**
            request_end_date (datetime, optional): The end date of the range. Return
                any active enrollments that occur on or before this day.  <br
                />Default: **StartDate**
            request_limit (int, optional): Number of results to include, defaults to
                100
            request_location_ids (List[int], optional): The location IDs.   <br
                />Default: **all**
            request_offset (int, optional): Page offset, defaults to 0.
            request_program_ids (List[int], optional): The program IDs.   <br
                />Default: **all**
            request_session_type_ids (List[int], optional): The session type IDs.
                <br />Default: **all**
            request_staff_ids (List[int], optional): The staff IDs.   <br />Default:
                **all**
            request_start_date (datetime, optional): The start date of the range.
                Return any active enrollments that occur on or after this day.  <br
                />Default: **today’s date**

        Returns:
            GetClassSchedulesResponse: Response from the API. OK

        Raises:
            APIException: When an error occurs while fetching the data from the
                remote API. This exception includes the HTTP Response code, an error
                message, and the HTTP body that was received in the request.

        """
        return super().new_api_call_builder.request(
            RequestBuilder().server(Server.DEFAULT)
            .path("/public/v{version}/class/classschedules")
            .http_method(HttpMethodEnum.GET)
            .template_param(Parameter()
                .key("version")
                .value(version)
                .should_encode(True))
            .header_param(Parameter()
                .key("siteId")
                .value(site_id))
            .header_param(Parameter()
                .key("authorization")
                .value(authorization))
            .query_param(Parameter()
                .key("request.classScheduleIds")
                .value(request_class_schedule_ids))
            .query_param(Parameter()
                .key("request.endDate")
                .value(APIHelper.when_defined(APIHelper.RFC3339DateTime,
                    request_end_date)))
            .query_param(Parameter()
                .key("request.limit")
                .value(request_limit))
            .query_param(Parameter()
                .key("request.locationIds")
                .value(request_location_ids))
            .query_param(Parameter()
                .key("request.offset")
                .value(request_offset))
            .query_param(Parameter()
                .key("request.programIds")
                .value(request_program_ids))
            .query_param(Parameter()
                .key("request.sessionTypeIds")
                .value(request_session_type_ids))
            .query_param(Parameter()
                .key("request.staffIds")
                .value(request_staff_ids))
            .query_param(Parameter()
                .key("request.startDate")
                .value(APIHelper.when_defined(APIHelper.RFC3339DateTime,
                    request_start_date)))
            .header_param(Parameter()
                .key("accept")
                .value("application/json"))
            .auth(Single("API-Key")),
        ).response(
            ResponseHandler()
            .deserializer(APIHelper.json_deserialize)
            .deserialize_into(GetClassSchedulesResponse.from_dictionary),
        ).execute()

    def get_class_visits(self,
                         version,
                         request_class_id,
                         site_id,
                         authorization=None,
                         request_last_modified_date=None,
                         request_use_site_settings_staff_name=None):
        """Perform a GET request to /public/v{version}/class/classvisits.

        Returns a list of visits that contain information for a specified class. On
        success, this request returns the class object in the response with a list of
        visits.

        Args:
            version (str): version of the api.
            request_class_id (int): The class ID.
            site_id (str): ID of the site from which to pull data.
            authorization (str, optional): A staff user authorization token.
            request_last_modified_date (datetime, optional): When included in the
                request, only records modified on or after the `LastModifiedDate`
                specified are included in the response.
            request_use_site_settings_staff_name (bool, optional): When `true`, the
                staff DisplayName will be populated based on site-level settings.
                When `false` or omitted, the staff DisplayName will contain only the
                FirstName.

        Returns:
            GetClassVisitsResponse: Response from the API. OK

        Raises:
            APIException: When an error occurs while fetching the data from the
                remote API. This exception includes the HTTP Response code, an error
                message, and the HTTP body that was received in the request.

        """
        return super().new_api_call_builder.request(
            RequestBuilder().server(Server.DEFAULT)
            .path("/public/v{version}/class/classvisits")
            .http_method(HttpMethodEnum.GET)
            .template_param(Parameter()
                .key("version")
                .value(version)
                .should_encode(True))
            .query_param(Parameter()
                .key("request.classID")
                .value(request_class_id))
            .header_param(Parameter()
                .key("siteId")
                .value(site_id))
            .header_param(Parameter()
                .key("authorization")
                .value(authorization))
            .query_param(Parameter()
                .key("request.lastModifiedDate")
                .value(APIHelper.when_defined(APIHelper.RFC3339DateTime,
                    request_last_modified_date)))
            .query_param(Parameter()
                .key("request.useSiteSettingsStaffName")
                .value(request_use_site_settings_staff_name))
            .header_param(Parameter()
                .key("accept")
                .value("application/json"))
            .auth(Single("API-Key")),
        ).response(
            ResponseHandler()
            .deserializer(APIHelper.json_deserialize)
            .deserialize_into(GetClassVisitsResponse.from_dictionary),
        ).execute()

    def get_courses(self,
                    version,
                    site_id,
                    authorization=None,
                    get_courses_request_course_i_ds=None,
                    get_courses_request_end_date=None,
                    get_courses_request_limit=None,
                    get_courses_request_location_i_ds=None,
                    get_courses_request_offset=None,
                    get_courses_request_program_i_ds=None,
                    get_courses_request_semester_i_ds=None,
                    get_courses_request_staff_i_ds=None,
                    get_courses_request_start_date=None):
        """Perform a GET request to /public/v{version}/class/courses.

        This endpoint will provide all the data related to courses depending on the
        access level.<br />
        Note: The Authorization is an optional header.If Authorization header is not
        passed, the response will be masked else full response will be provided.

        Args:
            version (str): version of the api.
            site_id (str): ID of the site from which to pull data.
            authorization (str, optional): A staff user authorization token.
            get_courses_request_course_i_ds (List[int], optional): Return only
                courses that are available for the specified CourseIds.
            get_courses_request_end_date (datetime, optional): The end date range.
                Any active courses that are on or before this day.  <br />(optional)
                Defaults to StartDate.
            get_courses_request_limit (int, optional): Number of results to include,
                defaults to 100
            get_courses_request_location_i_ds (List[int], optional): Return only
                courses that are available for the specified LocationIds.
            get_courses_request_offset (int, optional): Page offset, defaults to 0.
            get_courses_request_program_i_ds (List[int], optional): Return only
                courses that are available for the specified ProgramIds.
            get_courses_request_semester_i_ds (List[int], optional): Return only
                courses that are available for the specified SemesterIds.
            get_courses_request_staff_i_ds (List[int], optional): Return only courses
                that are available for the specified StaffIds.
            get_courses_request_start_date (datetime, optional): The start date
                range. Any active courses that are on or after this day.  <br
                />(optional) Defaults to today.

        Returns:
            GetCoursesReponse: Response from the API. OK

        Raises:
            APIException: When an error occurs while fetching the data from the
                remote API. This exception includes the HTTP Response code, an error
                message, and the HTTP body that was received in the request.

        """
        return super().new_api_call_builder.request(
            RequestBuilder().server(Server.DEFAULT)
            .path("/public/v{version}/class/courses")
            .http_method(HttpMethodEnum.GET)
            .template_param(Parameter()
                .key("version")
                .value(version)
                .should_encode(True))
            .header_param(Parameter()
                .key("siteId")
                .value(site_id))
            .header_param(Parameter()
                .key("authorization")
                .value(authorization))
            .query_param(Parameter()
                .key("getCoursesRequest.courseIDs")
                .value(get_courses_request_course_i_ds))
            .query_param(Parameter()
                .key("getCoursesRequest.endDate")
                .value(APIHelper.when_defined(APIHelper.RFC3339DateTime,
                    get_courses_request_end_date)))
            .query_param(Parameter()
                .key("getCoursesRequest.limit")
                .value(get_courses_request_limit))
            .query_param(Parameter()
                .key("getCoursesRequest.locationIDs")
                .value(get_courses_request_location_i_ds))
            .query_param(Parameter()
                .key("getCoursesRequest.offset")
                .value(get_courses_request_offset))
            .query_param(Parameter()
                .key("getCoursesRequest.programIDs")
                .value(get_courses_request_program_i_ds))
            .query_param(Parameter()
                .key("getCoursesRequest.semesterIDs")
                .value(get_courses_request_semester_i_ds))
            .query_param(Parameter()
                .key("getCoursesRequest.staffIDs")
                .value(get_courses_request_staff_i_ds))
            .query_param(Parameter()
                .key("getCoursesRequest.startDate")
                .value(APIHelper.when_defined(APIHelper.RFC3339DateTime,
                    get_courses_request_start_date)))
            .header_param(Parameter()
                .key("accept")
                .value("application/json"))
            .auth(Single("API-Key")),
        ).response(
            ResponseHandler()
            .deserializer(APIHelper.json_deserialize)
            .deserialize_into(GetCoursesReponse.from_dictionary),
        ).execute()

    def get_semesters(self,
                      version,
                      site_id,
                      authorization=None,
                      request_active=None,
                      request_end_date=None,
                      request_limit=None,
                      request_offset=None,
                      request_semester_i_ds=None,
                      request_start_date=None):
        """Perform a GET request to /public/v{version}/class/semesters.

        This endpoint retrieves the business class semesters.

        Args:
            version (str): version of the api.
            site_id (str): ID of the site from which to pull data.
            authorization (str, optional): A staff user authorization token.
            request_active (bool, optional): When true, the response only contains
                semesters which are activated. When false, only deactivated semesters
                are returned.  Default: **All semesters**
            request_end_date (datetime, optional): The end date for the range. All
                semesters that are on or before this day.  Default: **StartDate**
            request_limit (int, optional): Number of results to include, defaults to
                100
            request_offset (int, optional): Page offset, defaults to 0.
            request_semester_i_ds (List[int], optional): The requested semester IDs.
            request_start_date (datetime, optional): The start date for the range.
                All semesters that are on or after this day.  Default: **today’s
                date**

        Returns:
            GetSemestersResponse: Response from the API. OK

        Raises:
            APIException: When an error occurs while fetching the data from the
                remote API. This exception includes the HTTP Response code, an error
                message, and the HTTP body that was received in the request.

        """
        return super().new_api_call_builder.request(
            RequestBuilder().server(Server.DEFAULT)
            .path("/public/v{version}/class/semesters")
            .http_method(HttpMethodEnum.GET)
            .template_param(Parameter()
                .key("version")
                .value(version)
                .should_encode(True))
            .header_param(Parameter()
                .key("siteId")
                .value(site_id))
            .header_param(Parameter()
                .key("authorization")
                .value(authorization))
            .query_param(Parameter()
                .key("request.active")
                .value(request_active))
            .query_param(Parameter()
                .key("request.endDate")
                .value(APIHelper.when_defined(APIHelper.RFC3339DateTime,
                    request_end_date)))
            .query_param(Parameter()
                .key("request.limit")
                .value(request_limit))
            .query_param(Parameter()
                .key("request.offset")
                .value(request_offset))
            .query_param(Parameter()
                .key("request.semesterIDs")
                .value(request_semester_i_ds))
            .query_param(Parameter()
                .key("request.startDate")
                .value(APIHelper.when_defined(APIHelper.RFC3339DateTime,
                    request_start_date)))
            .header_param(Parameter()
                .key("accept")
                .value("application/json"))
            .auth(Single("API-Key")),
        ).response(
            ResponseHandler()
            .deserializer(APIHelper.json_deserialize)
            .deserialize_into(GetSemestersResponse.from_dictionary),
        ).execute()

    def get_waitlist_entries(self,
                             version,
                             site_id,
                             authorization=None,
                             request_class_ids=None,
                             request_class_schedule_ids=None,
                             request_client_ids=None,
                             request_hide_past_entries=None,
                             request_limit=None,
                             request_offset=None,
                             request_waitlist_entry_ids=None):
        """Perform a GET request to /public/v{version}/class/waitlistentries.

        Returns a list of waiting list entries for a specified class schedule or
        class. The request requires staff credentials and either a class schedule ID
        or class ID.

        Args:
            version (str): version of the api.
            site_id (str): ID of the site from which to pull data.
            authorization (str, optional): A staff user authorization token.
            request_class_ids (List[int], optional): The requested class IDs. If a
                class ID is present, the request automatically disregards any class
                schedule IDs in the request. <br />  Either `ClassScheduleIds`,
                `ClientIds`, `WaitlistEntryIds`, or `ClassIds` is required; the
                others become optional.<br />  Default: **all ClassIds**
            request_class_schedule_ids (List[int], optional): The requested class
                schedule IDs. If a class ID is present, the request automatically
                disregards any class schedule IDs in the request.<br />  Either
                `ClassScheduleIds`, `ClientIds`, `WaitlistEntryIds`, or `ClassIds` is
                required; the others become optional.<br />  Default: **all
                ClassScheduleIds**
            request_client_ids (List[str], optional): The requested client IDs.<br />
                Either `ClassScheduleIds`, `ClientIds`, `WaitlistEntryIds`, or
                `ClassIds` is required; the others become optional.<br />  Default:
                **all ClientIds**
            request_hide_past_entries (bool, optional): When `true`, indicates that
                past waiting list entries are hidden from clients.<br />  When
                `false`, indicates that past entries are not hidden from clients.<br
                />  Default: **false**
            request_limit (int, optional): Number of results to include, defaults to
                100
            request_offset (int, optional): Page offset, defaults to 0.
            request_waitlist_entry_ids (List[int], optional): The requested waiting
                list entry IDs.<br />  Either `ClassScheduleIds`, `ClientIds`,
                `WaitlistEntryIds`, or `ClassIds` is required; the others become
                optional.<br />  Default: **all WaitlistEntryIds**

        Returns:
            GetWaitlistEntriesResponse: Response from the API. OK

        Raises:
            APIException: When an error occurs while fetching the data from the
                remote API. This exception includes the HTTP Response code, an error
                message, and the HTTP body that was received in the request.

        """
        return super().new_api_call_builder.request(
            RequestBuilder().server(Server.DEFAULT)
            .path("/public/v{version}/class/waitlistentries")
            .http_method(HttpMethodEnum.GET)
            .template_param(Parameter()
                .key("version")
                .value(version)
                .should_encode(True))
            .header_param(Parameter()
                .key("siteId")
                .value(site_id))
            .header_param(Parameter()
                .key("authorization")
                .value(authorization))
            .query_param(Parameter()
                .key("request.classIds")
                .value(request_class_ids))
            .query_param(Parameter()
                .key("request.classScheduleIds")
                .value(request_class_schedule_ids))
            .query_param(Parameter()
                .key("request.clientIds")
                .value(request_client_ids))
            .query_param(Parameter()
                .key("request.hidePastEntries")
                .value(request_hide_past_entries))
            .query_param(Parameter()
                .key("request.limit")
                .value(request_limit))
            .query_param(Parameter()
                .key("request.offset")
                .value(request_offset))
            .query_param(Parameter()
                .key("request.waitlistEntryIds")
                .value(request_waitlist_entry_ids))
            .header_param(Parameter()
                .key("accept")
                .value("application/json"))
            .auth(Single("API-Key")),
        ).response(
            ResponseHandler()
            .deserializer(APIHelper.json_deserialize)
            .deserialize_into(GetWaitlistEntriesResponse.from_dictionary),
        ).execute()

    def add_class_schedule(self,
                           version,
                           request,
                           site_id,
                           authorization=None):
        """Perform a POST request to /public/v{version}/class/addclassschedule.

        This endpoint adds a class schedule. For a single day schedule, the EndDate
        parameter can be omitted.

        Args:
            version (str): version of the api.
            request (AddClassEnrollmentScheduleRequest): The request body parameter.
            site_id (str): ID of the site from which to pull data.
            authorization (str, optional): A staff user authorization token.

        Returns:
            WrittenClassSchedulesInfo: Response from the API. OK

        Raises:
            APIException: When an error occurs while fetching the data from the
                remote API. This exception includes the HTTP Response code, an error
                message, and the HTTP body that was received in the request.

        """
        return super().new_api_call_builder.request(
            RequestBuilder().server(Server.DEFAULT)
            .path("/public/v{version}/class/addclassschedule")
            .http_method(HttpMethodEnum.POST)
            .template_param(Parameter()
                .key("version")
                .value(version)
                .should_encode(True))
            .body_param(Parameter()
                .value(request))
            .header_param(Parameter()
                .key("siteId")
                .value(site_id))
            .header_param(Parameter()
                .key("Content-Type")
                .value("application/json"))
            .header_param(Parameter()
                .key("authorization")
                .value(authorization))
            .header_param(Parameter()
                .key("accept")
                .value("application/json"))
            .body_serializer(APIHelper.json_serialize)
            .auth(Single("API-Key")),
        ).response(
            ResponseHandler()
            .deserializer(APIHelper.json_deserialize)
            .deserialize_into(WrittenClassSchedulesInfo.from_dictionary),
        ).execute()

    def add_client_to_class(self,
                            version,
                            request,
                            site_id,
                            authorization=None):
        """Perform a POST request to /public/v{version}/class/addclienttoclass.

        This endpoint adds a client to a class or to a class waiting list. To prevent
        overbooking a class or booking outside the schedule windows set forth by the
        business, it is necessary to first check the capacity level of the class
        (‘MaxCapacity’ and 'TotalBooked’) and the 'IsAvailable’ parameter by running
        the GetClasses REQUEST. It is helpful to use this endpoint in the following
        situations:
        * Use after calling `GET Clients` and `GET Classes` so that you are sure
        which client to book in which class.
        * If adding a client to a class from a waiting list, use this call after you
        call `GET WaitlistEntries` and determine the ID of the waiting list from
        which you are moving the client.
        * If adding a client to a class and using a pricing option that the client
        has already purchased, use this call after you call `GET ClientServices` to
        determine the ID of the pricing option that the client wants to use.
        If you add a client to a class and the client purchases a new pricing option,
        use `GET Services`, `GET Classes`, and then `POST CheckoutShoppingCart` in
        place of this call.
        This endpoint also supports cross-regional class bookings. If you want to
        perform a cross-regional class booking, set `CrossRegionalBooking` to `true`.
        This endpoint does not support adding a user to a waiting list using a
        cross-regional client pricing option(service). Cross-regional booking
        workflows do not support client service scheduling restrictions.
        When performing a cross-regional class booking, this endpoint loops through
        the first ten sites that the client is associated with, looks for client
        pricing options at each of those sites, and then uses the oldest client
        pricing option found.It is important to note that this endpoint only loops
        through a maximum of ten associated client sites. If a `ClientID` is
        associated with more than ten sites in an organization, this endpoint only
        loops through the first ten.If you know that a client has a client service at
        another site, you can specify that site using the
        `CrossRegionalBookingClientServiceSiteId` query parameter.
        If you perform a cross-regional booking, two additional fields are included
        in the `SessionType` object of the response:
        * `SiteID`, which specifies where the client service is coming from
        * `CrossRegionalBookingPerformed`, a Boolean field that is set to `true`
        As a prerequisite to using this endpoint, your `SourceName` must have been
        granted access to the organization to which the site belongs.

        Note: Request deduplication is enabled for this endpoint. More information
        can be found in the [Request Deduplication
        Page](https://developers.mindbodyonline.com/ui/documentation/public-api#/net-s
        tandard-library/mindbody-public-api-v6-0/request-deduplication).
        Use the `X-RequestDeduplication-Skip` header to bypass deduplication if
        necessary. This may be useful in scenarios where you want to ensure a new
        appointment is created regardless of previous identical requests.

        Args:
            version (str): version of the api.
            request (AddClientToClassRequest): The request body parameter.
            site_id (str): ID of the site from which to pull data.
            authorization (str, optional): A staff user authorization token.

        Returns:
            AddClientToClassResponse: Response from the API. OK

        Raises:
            APIException: When an error occurs while fetching the data from the
                remote API. This exception includes the HTTP Response code, an error
                message, and the HTTP body that was received in the request.

        """
        return super().new_api_call_builder.request(
            RequestBuilder().server(Server.DEFAULT)
            .path("/public/v{version}/class/addclienttoclass")
            .http_method(HttpMethodEnum.POST)
            .template_param(Parameter()
                .key("version")
                .value(version)
                .should_encode(True))
            .body_param(Parameter()
                .value(request))
            .header_param(Parameter()
                .key("siteId")
                .value(site_id))
            .header_param(Parameter()
                .key("Content-Type")
                .value("application/json"))
            .header_param(Parameter()
                .key("authorization")
                .value(authorization))
            .header_param(Parameter()
                .key("accept")
                .value("application/json"))
            .body_serializer(APIHelper.json_serialize)
            .auth(Single("API-Key")),
        ).response(
            ResponseHandler()
            .deserializer(APIHelper.json_deserialize)
            .deserialize_into(AddClientToClassResponse.from_dictionary),
        ).execute()

    def cancel_single_class(self,
                            version,
                            request,
                            site_id,
                            authorization=None):
        """Perform a POST request to
        /public/v{version}/class/cancelsingleclass.

        This endpoint will cancel a single class from studio.

        Args:
            version (str): version of the api.
            request (CancelSingleClassRequest): The request body parameter.
            site_id (str): ID of the site from which to pull data.
            authorization (str, optional): A staff user authorization token.

        Returns:
            CancelSingleClassResponse: Response from the API. OK

        Raises:
            APIException: When an error occurs while fetching the data from the
                remote API. This exception includes the HTTP Response code, an error
                message, and the HTTP body that was received in the request.

        """
        return super().new_api_call_builder.request(
            RequestBuilder().server(Server.DEFAULT)
            .path("/public/v{version}/class/cancelsingleclass")
            .http_method(HttpMethodEnum.POST)
            .template_param(Parameter()
                .key("version")
                .value(version)
                .should_encode(True))
            .body_param(Parameter()
                .value(request))
            .header_param(Parameter()
                .key("siteId")
                .value(site_id))
            .header_param(Parameter()
                .key("Content-Type")
                .value("application/json"))
            .header_param(Parameter()
                .key("authorization")
                .value(authorization))
            .header_param(Parameter()
                .key("accept")
                .value("application/json"))
            .body_serializer(APIHelper.json_serialize)
            .auth(Single("API-Key")),
        ).response(
            ResponseHandler()
            .deserializer(APIHelper.json_deserialize)
            .deserialize_into(CancelSingleClassResponse.from_dictionary),
        ).execute()

    def remove_client_from_class(self,
                                 version,
                                 request,
                                 site_id,
                                 authorization=None):
        """Perform a POST request to
        /public/v{version}/class/removeclientfromclass.

        Remove a client from a class.

        Args:
            version (str): version of the api.
            request (RemoveClientFromClassRequest): The request body parameter.
            site_id (str): ID of the site from which to pull data.
            authorization (str, optional): A staff user authorization token.

        Returns:
            RemoveClientFromClassResponse: Response from the API. OK

        Raises:
            APIException: When an error occurs while fetching the data from the
                remote API. This exception includes the HTTP Response code, an error
                message, and the HTTP body that was received in the request.

        """
        return super().new_api_call_builder.request(
            RequestBuilder().server(Server.DEFAULT)
            .path("/public/v{version}/class/removeclientfromclass")
            .http_method(HttpMethodEnum.POST)
            .template_param(Parameter()
                .key("version")
                .value(version)
                .should_encode(True))
            .body_param(Parameter()
                .value(request))
            .header_param(Parameter()
                .key("siteId")
                .value(site_id))
            .header_param(Parameter()
                .key("Content-Type")
                .value("application/json"))
            .header_param(Parameter()
                .key("authorization")
                .value(authorization))
            .header_param(Parameter()
                .key("accept")
                .value("application/json"))
            .body_serializer(APIHelper.json_serialize)
            .auth(Single("API-Key")),
        ).response(
            ResponseHandler()
            .deserializer(APIHelper.json_deserialize)
            .deserialize_into(RemoveClientFromClassResponse.from_dictionary),
        ).execute()

    def remove_clients_from_classes(self,
                                    version,
                                    request,
                                    site_id,
                                    authorization=None):
        """Perform a POST request to
        /public/v{version}/class/removeclientsfromclasses.

        This endpoint can be utilized for removing multiple clients from multiple
        classes in one request.

        Args:
            version (str): version of the api.
            request (RemoveClientsFromClassesRequest): The request body parameter.
            site_id (str): ID of the site from which to pull data.
            authorization (str, optional): A staff user authorization token.

        Returns:
            RemoveClientsFromClassesResponse: Response from the API. OK

        Raises:
            APIException: When an error occurs while fetching the data from the
                remote API. This exception includes the HTTP Response code, an error
                message, and the HTTP body that was received in the request.

        """
        return super().new_api_call_builder.request(
            RequestBuilder().server(Server.DEFAULT)
            .path("/public/v{version}/class/removeclientsfromclasses")
            .http_method(HttpMethodEnum.POST)
            .template_param(Parameter()
                .key("version")
                .value(version)
                .should_encode(True))
            .body_param(Parameter()
                .value(request))
            .header_param(Parameter()
                .key("siteId")
                .value(site_id))
            .header_param(Parameter()
                .key("Content-Type")
                .value("application/json"))
            .header_param(Parameter()
                .key("authorization")
                .value(authorization))
            .header_param(Parameter()
                .key("accept")
                .value("application/json"))
            .body_serializer(APIHelper.json_serialize)
            .auth(Single("API-Key")),
        ).response(
            ResponseHandler()
            .deserializer(APIHelper.json_deserialize)
            .deserialize_into(RemoveClientsFromClassesResponse.from_dictionary),
        ).execute()

    def remove_from_waitlist(self,
                             version,
                             request_waitlist_entry_ids,
                             site_id,
                             authorization=None):
        """Perform a POST request to
        /public/v{version}/class/removefromwaitlist.

        This endpoint does not return a response. If a call to this endpoint results
        in a 200 OK HTTP status code, then the call was successful.

        Args:
            version (str): version of the api.
            request_waitlist_entry_ids (List[int]): A list of `WaitlistEntryIds` to
                remove from the waiting list.
            site_id (str): ID of the site from which to pull data.
            authorization (str, optional): A staff user authorization token.

        Returns:
            Any: Response from the API. OK

        Raises:
            APIException: When an error occurs while fetching the data from the
                remote API. This exception includes the HTTP Response code, an error
                message, and the HTTP body that was received in the request.

        """
        return super().new_api_call_builder.request(
            RequestBuilder().server(Server.DEFAULT)
            .path("/public/v{version}/class/removefromwaitlist")
            .http_method(HttpMethodEnum.POST)
            .template_param(Parameter()
                .key("version")
                .value(version)
                .should_encode(True))
            .query_param(Parameter()
                .key("request.waitlistEntryIds")
                .value(request_waitlist_entry_ids))
            .header_param(Parameter()
                .key("siteId")
                .value(site_id))
            .header_param(Parameter()
                .key("authorization")
                .value(authorization))
            .header_param(Parameter()
                .key("accept")
                .value("application/json"))
            .auth(Single("API-Key")),
        ).response(
            ResponseHandler()
            .deserializer(APIHelper.json_deserialize),
        ).execute()

    def substitute_class_teacher(self,
                                 version,
                                 request,
                                 site_id,
                                 authorization=None):
        """Perform a POST request to
        /public/v{version}/class/substituteclassteacher.

        Substitute a class teacher.

        Args:
            version (str): version of the api.
            request (SubstituteClassTeacherRequest): The request body parameter.
            site_id (str): ID of the site from which to pull data.
            authorization (str, optional): A staff user authorization token.

        Returns:
            SubstituteClassTeacherResponse: Response from the API. OK

        Raises:
            APIException: When an error occurs while fetching the data from the
                remote API. This exception includes the HTTP Response code, an error
                message, and the HTTP body that was received in the request.

        """
        return super().new_api_call_builder.request(
            RequestBuilder().server(Server.DEFAULT)
            .path("/public/v{version}/class/substituteclassteacher")
            .http_method(HttpMethodEnum.POST)
            .template_param(Parameter()
                .key("version")
                .value(version)
                .should_encode(True))
            .body_param(Parameter()
                .value(request))
            .header_param(Parameter()
                .key("siteId")
                .value(site_id))
            .header_param(Parameter()
                .key("Content-Type")
                .value("application/json"))
            .header_param(Parameter()
                .key("authorization")
                .value(authorization))
            .header_param(Parameter()
                .key("accept")
                .value("application/json"))
            .body_serializer(APIHelper.json_serialize)
            .auth(Single("API-Key")),
        ).response(
            ResponseHandler()
            .deserializer(APIHelper.json_deserialize)
            .deserialize_into(SubstituteClassTeacherResponse.from_dictionary),
        ).execute()

    def update_class_schedule(self,
                              version,
                              request,
                              site_id,
                              authorization=None):
        """Perform a POST request to
        /public/v{version}/class/updateclassschedule.

        This endpoint updates a class schedule.

        Args:
            version (str): version of the api.
            request (UpdateClassEnrollmentScheduleRequest): The request body
                parameter.
            site_id (str): ID of the site from which to pull data.
            authorization (str, optional): A staff user authorization token.

        Returns:
            WrittenClassSchedulesInfo: Response from the API. OK

        Raises:
            APIException: When an error occurs while fetching the data from the
                remote API. This exception includes the HTTP Response code, an error
                message, and the HTTP body that was received in the request.

        """
        return super().new_api_call_builder.request(
            RequestBuilder().server(Server.DEFAULT)
            .path("/public/v{version}/class/updateclassschedule")
            .http_method(HttpMethodEnum.POST)
            .template_param(Parameter()
                .key("version")
                .value(version)
                .should_encode(True))
            .body_param(Parameter()
                .value(request))
            .header_param(Parameter()
                .key("siteId")
                .value(site_id))
            .header_param(Parameter()
                .key("Content-Type")
                .value("application/json"))
            .header_param(Parameter()
                .key("authorization")
                .value(authorization))
            .header_param(Parameter()
                .key("accept")
                .value("application/json"))
            .body_serializer(APIHelper.json_serialize)
            .auth(Single("API-Key")),
        ).response(
            ResponseHandler()
            .deserializer(APIHelper.json_deserialize)
            .deserialize_into(WrittenClassSchedulesInfo.from_dictionary),
        ).execute()

    def update_class_schedule_notes(self,
                                    version,
                                    class_schedule_id,
                                    request,
                                    site_id,
                                    authorization=None):
        """Perform a PATCH request to
        /public/v{version}/class/updateclassschedulenotes/{classScheduleId}.

        This endpoint updates the notes of class instances based on the schedule's
        schedule ID.
        Note: Every coming class instance for the given ScheduleID will have the
        notes updated the same way.

        Args:
            version (str): version of the api.
            class_schedule_id (int): The request template parameter.
            request (UpdateClassScheduleNotesRequest): The request body parameter.
            site_id (str): ID of the site from which to pull data.
            authorization (str, optional): A staff user authorization token.

        Returns:
            void: Response from the API. No Content

        Raises:
            APIException: When an error occurs while fetching the data from the
                remote API. This exception includes the HTTP Response code, an error
                message, and the HTTP body that was received in the request.

        """
        return super().new_api_call_builder.request(
            RequestBuilder().server(Server.DEFAULT)
            .path("/public/v{version}/class/updateclassschedulenotes/{classScheduleId}")
            .http_method(HttpMethodEnum.PATCH)
            .template_param(Parameter()
                .key("version")
                .value(version)
                .should_encode(True))
            .template_param(Parameter()
                .key("classScheduleId")
                .value(class_schedule_id)
                .should_encode(True))
            .body_param(Parameter()
                .value(request))
            .header_param(Parameter()
                .key("siteId")
                .value(site_id))
            .header_param(Parameter()
                .key("Content-Type")
                .value("application/json"))
            .header_param(Parameter()
                .key("authorization")
                .value(authorization))
            .body_serializer(APIHelper.json_serialize)
            .auth(Single("API-Key")),
        ).execute()
