add getter, setter for customAttributes and customValues

for #4037 and #4714