def serialize(self,writer: SerializationWriter) -> None:
        """
        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        """
        if writer is None:
            raise TypeError("writer cannot be null.")
        super().serialize(writer)
        writer.write_collection_of_object_values("androidEnrollmentAssignments", self.android_enrollment_assignments)
        writer.write_bool_value("androidOnboarded", self.android_onboarded)
        writer.write_str_value("displayName", self.display_name)
        writer.write_collection_of_object_values("iosEnrollmentAssignments", self.ios_enrollment_assignments)
        writer.write_bool_value("iosOnboarded", self.ios_onboarded)
        writer.write_datetime_value("lastHeartbeatDateTime", self.last_heartbeat_date_time)
        writer.write_collection_of_object_values("macOsEnrollmentAssignments", self.mac_os_enrollment_assignments)
        writer.write_bool_value("macOsOnboarded", self.mac_os_onboarded)
        writer.write_enum_value("partnerState", self.partner_state)

        Serializes information the current object
        param writer: Serialization writer to use to serialize this model
        Returns: None
        
msgraph/generated/models/compliance_management_partner.py