"""mindbodypublicapi.

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

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


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

    Attributes:
        appointment_id (int): The appointment’s ID.
        appointment_gender_preference (AppointmentGenderPreference1Enum): The gender
            of staff member with whom the client prefers to book appointments.
        appointment_status (AppointmentStatusEnum): The status of the appointment.
        class_id (int): The class ID that was used to retrieve the visits.
        client_id (str): The ID of the client associated with the visit.
        start_date_time (datetime): The time this class is scheduled to start.
        end_date_time (datetime): The date and time the visit ends. The Public API
            returns UTC dates and times. For example, a class that occurs on June
            25th, 2018 at 2:15PM (EST) appears as “2018-06-25T19:15:00Z” because EST
            is five hours behind UTC. Date time pairs always return in the format
            YYYY-MM-DDTHH:mm:ssZ.
        id (int): The ID of the visit.
        last_modified_date_time (datetime): When included in the request, only
            records modified on or after the specified `LastModifiedDate` are
            included in the response. The Public API returns UTC dates and times. For
            example, a class that occurs on June 25th, 2018 at 2:15PM (EST) appears
            as “2018-06-25T19:15:00Z” because EST is five hours behind UTC. Date time
            pairs always return in the format YYYY-MM-DDTHH:mm:ssZ.
        late_cancelled (bool): When `true`, indicates that the class has been
            `LateCancelled`.<br />  When `false`, indicates that the class has not
            been `LateCancelled`.
        location_id (int): The ID of the location where the visit took place or is to
            take place.
        make_up (bool): When `true`, the client can make up this session and a
            session is not deducted from the pricing option that was used to sign the
            client into the enrollment. When the client has the make-up session, a
            session is automatically removed from a pricing option that matches the
            service category of the enrollment and is within the same date range of
            the missed session.<br />  When `false`, the client cannot make up this
            session. See [Enrollments:
            Make-ups](https://support.mindbodyonline.com/s/article/203259433-Enrollmen
            ts-Make-ups?language=en_US) for more information.
        name (str): The name of the class.
        service_id (int): The ID of the client's pricing option applied to the class
            visit.
        service_name (str): The name of the pricing option applied to the class visit.
        product_id (int): The business' ID of the type of pricing option used to pay
            for the class visit.
        signed_in (bool): When `true`, indicates that the client has been signed
            in.<br />  When `false`, indicates that the client has not been signed in.
        staff_id (int): The ID of the staff member who is teaching the class.
        web_signup (bool): When `true`, indicates that the client signed up
            online.<br />  When `false`, indicates that the client was signed up by a
            staff member.
        action (Action1Enum): The action taken.
        cross_regional_booking_performed (bool): When `true`, indicates that the
            client is paying for the visit using a pricing option from one of their
            associated cross-regional profiles.
        site_id (int): The ID of the business from which cross-regional payment is
            applied.
        waitlist_entry_id (int): When this value is not null, it indicates that the
            client is on the waiting list for the requested class. The only
            additional fields that are populated when this is not null are:  *
            ClassId  * ClientId    You can call GET WaitlistEntries using
            `WaitlistEntryId` to obtain more data about this waiting list entry.

    """

    # Create a mapping from Model property names to API property names
    _names = {
        "appointment_id": "AppointmentId",
        "appointment_gender_preference": "AppointmentGenderPreference",
        "appointment_status": "AppointmentStatus",
        "class_id": "ClassId",
        "client_id": "ClientId",
        "start_date_time": "StartDateTime",
        "end_date_time": "EndDateTime",
        "id": "Id",
        "last_modified_date_time": "LastModifiedDateTime",
        "late_cancelled": "LateCancelled",
        "location_id": "LocationId",
        "make_up": "MakeUp",
        "name": "Name",
        "service_id": "ServiceId",
        "service_name": "ServiceName",
        "product_id": "ProductId",
        "signed_in": "SignedIn",
        "staff_id": "StaffId",
        "web_signup": "WebSignup",
        "action": "Action",
        "cross_regional_booking_performed": "CrossRegionalBookingPerformed",
        "site_id": "SiteId",
        "waitlist_entry_id": "WaitlistEntryId",
    }

    _optionals = [
        "appointment_id",
        "appointment_gender_preference",
        "appointment_status",
        "class_id",
        "client_id",
        "start_date_time",
        "end_date_time",
        "id",
        "last_modified_date_time",
        "late_cancelled",
        "location_id",
        "make_up",
        "name",
        "service_id",
        "service_name",
        "product_id",
        "signed_in",
        "staff_id",
        "web_signup",
        "action",
        "cross_regional_booking_performed",
        "site_id",
        "waitlist_entry_id",
    ]

    def __init__(
        self,
        appointment_id=APIHelper.SKIP,
        appointment_gender_preference=APIHelper.SKIP,
        appointment_status=APIHelper.SKIP,
        class_id=APIHelper.SKIP,
        client_id=APIHelper.SKIP,
        start_date_time=APIHelper.SKIP,
        end_date_time=APIHelper.SKIP,
        id=APIHelper.SKIP,
        last_modified_date_time=APIHelper.SKIP,
        late_cancelled=APIHelper.SKIP,
        location_id=APIHelper.SKIP,
        make_up=APIHelper.SKIP,
        name=APIHelper.SKIP,
        service_id=APIHelper.SKIP,
        service_name=APIHelper.SKIP,
        product_id=APIHelper.SKIP,
        signed_in=APIHelper.SKIP,
        staff_id=APIHelper.SKIP,
        web_signup=APIHelper.SKIP,
        action=APIHelper.SKIP,
        cross_regional_booking_performed=APIHelper.SKIP,
        site_id=APIHelper.SKIP,
        waitlist_entry_id=APIHelper.SKIP):
        """Initialize a AddClientToClassVisit instance."""
        # Initialize members of the class
        if appointment_id is not APIHelper.SKIP:
            self.appointment_id = appointment_id
        if appointment_gender_preference is not APIHelper.SKIP:
            self.appointment_gender_preference = appointment_gender_preference
        if appointment_status is not APIHelper.SKIP:
            self.appointment_status = appointment_status
        if class_id is not APIHelper.SKIP:
            self.class_id = class_id
        if client_id is not APIHelper.SKIP:
            self.client_id = client_id
        if start_date_time is not APIHelper.SKIP:
            self.start_date_time =\
                 APIHelper.apply_datetime_converter(
                start_date_time, APIHelper.RFC3339DateTime)\
                 if start_date_time else None
        if end_date_time is not APIHelper.SKIP:
            self.end_date_time =\
                 APIHelper.apply_datetime_converter(
                end_date_time, APIHelper.RFC3339DateTime)\
                 if end_date_time else None
        if id is not APIHelper.SKIP:
            self.id = id
        if last_modified_date_time is not APIHelper.SKIP:
            self.last_modified_date_time =\
                 APIHelper.apply_datetime_converter(
                last_modified_date_time, APIHelper.RFC3339DateTime)\
                 if last_modified_date_time else None
        if late_cancelled is not APIHelper.SKIP:
            self.late_cancelled = late_cancelled
        if location_id is not APIHelper.SKIP:
            self.location_id = location_id
        if make_up is not APIHelper.SKIP:
            self.make_up = make_up
        if name is not APIHelper.SKIP:
            self.name = name
        if service_id is not APIHelper.SKIP:
            self.service_id = service_id
        if service_name is not APIHelper.SKIP:
            self.service_name = service_name
        if product_id is not APIHelper.SKIP:
            self.product_id = product_id
        if signed_in is not APIHelper.SKIP:
            self.signed_in = signed_in
        if staff_id is not APIHelper.SKIP:
            self.staff_id = staff_id
        if web_signup is not APIHelper.SKIP:
            self.web_signup = web_signup
        if action is not APIHelper.SKIP:
            self.action = action
        if cross_regional_booking_performed is not APIHelper.SKIP:
            self.cross_regional_booking_performed = cross_regional_booking_performed
        if site_id is not APIHelper.SKIP:
            self.site_id = site_id
        if waitlist_entry_id is not APIHelper.SKIP:
            self.waitlist_entry_id = waitlist_entry_id

    @classmethod
    def from_dictionary(cls,
                        dictionary):
        """Create an instance of this model from a dictionary

        Args:
            dictionary (dictionary): A dictionary representation of the object
            as obtained from the deserialization of the server's response. The
            keys MUST match property names in the API description.

        Returns:
            object: An instance of this structure class.

        """
        if not isinstance(dictionary, dict) or dictionary is None:
            return None

        # Extract variables from the dictionary
        appointment_id =\
            dictionary.get("AppointmentId")\
            if dictionary.get("AppointmentId")\
                else APIHelper.SKIP
        appointment_gender_preference =\
            dictionary.get("AppointmentGenderPreference")\
            if dictionary.get("AppointmentGenderPreference")\
                else APIHelper.SKIP
        appointment_status =\
            dictionary.get("AppointmentStatus")\
            if dictionary.get("AppointmentStatus")\
                else APIHelper.SKIP
        class_id =\
            dictionary.get("ClassId")\
            if dictionary.get("ClassId")\
                else APIHelper.SKIP
        client_id =\
            dictionary.get("ClientId")\
            if dictionary.get("ClientId")\
                else APIHelper.SKIP
        start_date_time = APIHelper.RFC3339DateTime.from_value(
            dictionary.get("StartDateTime")).datetime\
            if dictionary.get("StartDateTime") else APIHelper.SKIP
        end_date_time = APIHelper.RFC3339DateTime.from_value(
            dictionary.get("EndDateTime")).datetime\
            if dictionary.get("EndDateTime") else APIHelper.SKIP
        id =\
            dictionary.get("Id")\
            if dictionary.get("Id")\
                else APIHelper.SKIP
        last_modified_date_time = APIHelper.RFC3339DateTime.from_value(
            dictionary.get("LastModifiedDateTime")).datetime\
            if dictionary.get("LastModifiedDateTime") else APIHelper.SKIP
        late_cancelled =\
            dictionary.get("LateCancelled")\
            if "LateCancelled" in dictionary.keys()\
                else APIHelper.SKIP
        location_id =\
            dictionary.get("LocationId")\
            if dictionary.get("LocationId")\
                else APIHelper.SKIP
        make_up =\
            dictionary.get("MakeUp")\
            if "MakeUp" in dictionary.keys()\
                else APIHelper.SKIP
        name =\
            dictionary.get("Name")\
            if dictionary.get("Name")\
                else APIHelper.SKIP
        service_id =\
            dictionary.get("ServiceId")\
            if dictionary.get("ServiceId")\
                else APIHelper.SKIP
        service_name =\
            dictionary.get("ServiceName")\
            if dictionary.get("ServiceName")\
                else APIHelper.SKIP
        product_id =\
            dictionary.get("ProductId")\
            if dictionary.get("ProductId")\
                else APIHelper.SKIP
        signed_in =\
            dictionary.get("SignedIn")\
            if "SignedIn" in dictionary.keys()\
                else APIHelper.SKIP
        staff_id =\
            dictionary.get("StaffId")\
            if dictionary.get("StaffId")\
                else APIHelper.SKIP
        web_signup =\
            dictionary.get("WebSignup")\
            if "WebSignup" in dictionary.keys()\
                else APIHelper.SKIP
        action =\
            dictionary.get("Action")\
            if dictionary.get("Action")\
                else APIHelper.SKIP
        cross_regional_booking_performed =\
            dictionary.get("CrossRegionalBookingPerformed")\
            if "CrossRegionalBookingPerformed" in dictionary.keys()\
                else APIHelper.SKIP
        site_id =\
            dictionary.get("SiteId")\
            if dictionary.get("SiteId")\
                else APIHelper.SKIP
        waitlist_entry_id =\
            dictionary.get("WaitlistEntryId")\
            if dictionary.get("WaitlistEntryId")\
                else APIHelper.SKIP

        # Return an object of this model
        return cls(appointment_id,
                   appointment_gender_preference,
                   appointment_status,
                   class_id,
                   client_id,
                   start_date_time,
                   end_date_time,
                   id,
                   last_modified_date_time,
                   late_cancelled,
                   location_id,
                   make_up,
                   name,
                   service_id,
                   service_name,
                   product_id,
                   signed_in,
                   staff_id,
                   web_signup,
                   action,
                   cross_regional_booking_performed,
                   site_id,
                   waitlist_entry_id)

    def __repr__(self):
        """Return a unambiguous string representation."""
        _appointment_id=(
            self.appointment_id
            if hasattr(self, "appointment_id")
            else None
        )
        _appointment_gender_preference=(
            self.appointment_gender_preference
            if hasattr(self, "appointment_gender_preference")
            else None
        )
        _appointment_status=(
            self.appointment_status
            if hasattr(self, "appointment_status")
            else None
        )
        _class_id=(
            self.class_id
            if hasattr(self, "class_id")
            else None
        )
        _client_id=(
            self.client_id
            if hasattr(self, "client_id")
            else None
        )
        _start_date_time=(
            self.start_date_time
            if hasattr(self, "start_date_time")
            else None
        )
        _end_date_time=(
            self.end_date_time
            if hasattr(self, "end_date_time")
            else None
        )
        _id=(
            self.id
            if hasattr(self, "id")
            else None
        )
        _last_modified_date_time=(
            self.last_modified_date_time
            if hasattr(self, "last_modified_date_time")
            else None
        )
        _late_cancelled=(
            self.late_cancelled
            if hasattr(self, "late_cancelled")
            else None
        )
        _location_id=(
            self.location_id
            if hasattr(self, "location_id")
            else None
        )
        _make_up=(
            self.make_up
            if hasattr(self, "make_up")
            else None
        )
        _name=(
            self.name
            if hasattr(self, "name")
            else None
        )
        _service_id=(
            self.service_id
            if hasattr(self, "service_id")
            else None
        )
        _service_name=(
            self.service_name
            if hasattr(self, "service_name")
            else None
        )
        _product_id=(
            self.product_id
            if hasattr(self, "product_id")
            else None
        )
        _signed_in=(
            self.signed_in
            if hasattr(self, "signed_in")
            else None
        )
        _staff_id=(
            self.staff_id
            if hasattr(self, "staff_id")
            else None
        )
        _web_signup=(
            self.web_signup
            if hasattr(self, "web_signup")
            else None
        )
        _action=(
            self.action
            if hasattr(self, "action")
            else None
        )
        _cross_regional_booking_performed=(
            self.cross_regional_booking_performed
            if hasattr(self, "cross_regional_booking_performed")
            else None
        )
        _site_id=(
            self.site_id
            if hasattr(self, "site_id")
            else None
        )
        _waitlist_entry_id=(
            self.waitlist_entry_id
            if hasattr(self, "waitlist_entry_id")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"appointment_id={_appointment_id!r}, "
            f"appointment_gender_preference={_appointment_gender_preference!r}, "
            f"appointment_status={_appointment_status!r}, "
            f"class_id={_class_id!r}, "
            f"client_id={_client_id!r}, "
            f"start_date_time={_start_date_time!r}, "
            f"end_date_time={_end_date_time!r}, "
            f"id={_id!r}, "
            f"last_modified_date_time={_last_modified_date_time!r}, "
            f"late_cancelled={_late_cancelled!r}, "
            f"location_id={_location_id!r}, "
            f"make_up={_make_up!r}, "
            f"name={_name!r}, "
            f"service_id={_service_id!r}, "
            f"service_name={_service_name!r}, "
            f"product_id={_product_id!r}, "
            f"signed_in={_signed_in!r}, "
            f"staff_id={_staff_id!r}, "
            f"web_signup={_web_signup!r}, "
            f"action={_action!r}, "
            f"cross_regional_booking_performed={_cross_regional_booking_performed!r}, "
            f"site_id={_site_id!r}, "
            f"waitlist_entry_id={_waitlist_entry_id!r}, "
            f")"
        )

    def __str__(self):
        """Return a human-readable string representation."""
        _appointment_id=(
            self.appointment_id
            if hasattr(self, "appointment_id")
            else None
        )
        _appointment_gender_preference=(
            self.appointment_gender_preference
            if hasattr(self, "appointment_gender_preference")
            else None
        )
        _appointment_status=(
            self.appointment_status
            if hasattr(self, "appointment_status")
            else None
        )
        _class_id=(
            self.class_id
            if hasattr(self, "class_id")
            else None
        )
        _client_id=(
            self.client_id
            if hasattr(self, "client_id")
            else None
        )
        _start_date_time=(
            self.start_date_time
            if hasattr(self, "start_date_time")
            else None
        )
        _end_date_time=(
            self.end_date_time
            if hasattr(self, "end_date_time")
            else None
        )
        _id=(
            self.id
            if hasattr(self, "id")
            else None
        )
        _last_modified_date_time=(
            self.last_modified_date_time
            if hasattr(self, "last_modified_date_time")
            else None
        )
        _late_cancelled=(
            self.late_cancelled
            if hasattr(self, "late_cancelled")
            else None
        )
        _location_id=(
            self.location_id
            if hasattr(self, "location_id")
            else None
        )
        _make_up=(
            self.make_up
            if hasattr(self, "make_up")
            else None
        )
        _name=(
            self.name
            if hasattr(self, "name")
            else None
        )
        _service_id=(
            self.service_id
            if hasattr(self, "service_id")
            else None
        )
        _service_name=(
            self.service_name
            if hasattr(self, "service_name")
            else None
        )
        _product_id=(
            self.product_id
            if hasattr(self, "product_id")
            else None
        )
        _signed_in=(
            self.signed_in
            if hasattr(self, "signed_in")
            else None
        )
        _staff_id=(
            self.staff_id
            if hasattr(self, "staff_id")
            else None
        )
        _web_signup=(
            self.web_signup
            if hasattr(self, "web_signup")
            else None
        )
        _action=(
            self.action
            if hasattr(self, "action")
            else None
        )
        _cross_regional_booking_performed=(
            self.cross_regional_booking_performed
            if hasattr(self, "cross_regional_booking_performed")
            else None
        )
        _site_id=(
            self.site_id
            if hasattr(self, "site_id")
            else None
        )
        _waitlist_entry_id=(
            self.waitlist_entry_id
            if hasattr(self, "waitlist_entry_id")
            else None
        )
        return (
            f"{self.__class__.__name__}("
            f"appointment_id={_appointment_id!s}, "
            f"appointment_gender_preference={_appointment_gender_preference!s}, "
            f"appointment_status={_appointment_status!s}, "
            f"class_id={_class_id!s}, "
            f"client_id={_client_id!s}, "
            f"start_date_time={_start_date_time!s}, "
            f"end_date_time={_end_date_time!s}, "
            f"id={_id!s}, "
            f"last_modified_date_time={_last_modified_date_time!s}, "
            f"late_cancelled={_late_cancelled!s}, "
            f"location_id={_location_id!s}, "
            f"make_up={_make_up!s}, "
            f"name={_name!s}, "
            f"service_id={_service_id!s}, "
            f"service_name={_service_name!s}, "
            f"product_id={_product_id!s}, "
            f"signed_in={_signed_in!s}, "
            f"staff_id={_staff_id!s}, "
            f"web_signup={_web_signup!s}, "
            f"action={_action!s}, "
            f"cross_regional_booking_performed={_cross_regional_booking_performed!s}, "
            f"site_id={_site_id!s}, "
            f"waitlist_entry_id={_waitlist_entry_id!s}, "
            f")"
        )
