api update, format and fixed incorrect set message type
API update for chained setters and obsolete setMessageType
use chained setters in field