public Map<String, String> toMap(Optional<ObjectMapper> mapper) {
    Map<String, String> map =
      mapper.orElseGet(ObjectMapper::new).convertValue(this, new TypeReference<Map<String, String>>(){});
    if ( !Boolean.parseBoolean(map.get("keyStore")) ) { // keyStore is declared as a primitive value instead of Boolean -> treat false as unset
      map.remove("keyStore");
    }
    return map;
  }
Set the keystore element.

@param keyStore - "true", "false"
ambari-server/src/main/java/org/apache/ambari/server/state/ValueAttributesInfo.java