Set HidePayload on Task when payload is null

The task payload object can be null in certain cases. As per the schema
for Task, there is a standard property Hidepayload which can be set to
true at this case. Setting this property as true in the response body
when Payload is nil.

Tested: Created a task without creating the task payload object and able
to see Hidepayload as true in response body.

Change-Id: I370d1eb9b5b96adb56cff2216b467357b0b34b42
Signed-off-by: Arun Thomas Baby <arunx.thomas.baby.baby.mathew@intel.com>
Signed-off-by: Ed Tanous <edtanous@google.com>
diff --git a/redfish-core/lib/task.hpp b/redfish-core/lib/task.hpp
index e0058f5..78817ff 100644
--- a/redfish-core/lib/task.hpp
+++ b/redfish-core/lib/task.hpp
@@ -417,6 +417,9 @@
             asyncResp->res.jsonValue["TaskMonitor"] =
                 "/redfish/v1/TaskService/Tasks/" + strParam + "/Monitor";
         }
+
+        asyncResp->res.jsonValue["HidePayload"] = !ptr->payload;
+
         if (ptr->payload)
         {
             const task::Payload& p = *(ptr->payload);