update the struct of the documents

Signed-off-by: Richard Lea <chigix@zoho.com>
Add the chain-style support for the ChigiService class.

Signed-off-by: Richard Lea <chigix@zoho.com>