#ifndef COMPONENTS_CLOUD_DEVICES_COMMON_CLOUD_DEVICE_DESCRIPTION_H_
#define COMPONENTS_CLOUD_DEVICES_COMMON_CLOUD_DEVICE_DESCRIPTION_H_
#include <memory>
#include <string>
#include <string_view>
#include "base/values.h"
namespace cloud_devices {
class CloudDeviceDescription {
public:
CloudDeviceDescription();
CloudDeviceDescription(const CloudDeviceDescription&) = delete;
CloudDeviceDescription& operator=(const CloudDeviceDescription&) = delete;
~CloudDeviceDescription();
bool InitFromString(const std::string& json);
bool InitFromValue(base::Value::Dict value);
std::string ToStringForTesting() const;
base::Value ToValue() &&;
const base::Value::Dict* GetDictItem(std::string_view path) const;
const base::Value::List* GetListItem(std::string_view path) const;
bool SetDictItem(std::string_view path, base::Value::Dict dict);
bool SetListItem(std::string_view path, base::Value::List list);
private:
base::Value::Dict root_;
};
}
#endif