Redfish remove buildDate property from system

BuildDate does not exist in the Redfish ComputerSystem schema. Checks for
the appropriate properties for system and adds them, rather than adding
all properties returned.

Tested: Verified /redfish/v1/Systems/system/ returns the correct
        properties on a Witherspoon system, and buildDate is no
        longer returned.

Change-Id: I83e8f637b17868eda810cbe342d1569d534a6d1b
Signed-off-by: beccabroek <beccabroek@gmail.com>
diff --git a/redfish-core/lib/systems.hpp b/redfish-core/lib/systems.hpp
index 0b47c09..5e8b9a5 100644
--- a/redfish-core/lib/systems.hpp
+++ b/redfish-core/lib/systems.hpp
@@ -256,15 +256,22 @@
                                                          VariantType>
                                              &property : propertiesList)
                                     {
-                                        const std::string *value =
-                                            sdbusplus::message::variant_ns::
-                                                get_if<std::string>(
-                                                    &property.second);
-                                        if (value != nullptr)
+                                        const std::string &propertyName =
+                                            property.first;
+                                        if ((propertyName == "PartNumber") ||
+                                            (propertyName == "SerialNumber") ||
+                                            (propertyName == "Manufacturer") ||
+                                            (propertyName == "Model"))
                                         {
-                                            aResp->res
-                                                .jsonValue[property.first] =
-                                                *value;
+                                            const std::string *value =
+                                                std::get_if<std::string>(
+                                                    &property.second);
+                                            if (value != nullptr)
+                                            {
+                                                aResp->res
+                                                    .jsonValue[propertyName] =
+                                                    *value;
+                                            }
                                         }
                                     }
                                     aResp->res.jsonValue["Name"] = "system";