blob: a85ccfa9ad2cd4d82ab74a24751e3683958ca724 [file] [log] [blame]
#pragma once
#include <app-common/zap-generated/cluster-id.h>
#include <app-common/zap-generated/attribute-id.h>
#include <app/data-model/Nullable.h>
#include <string>
#include <vector>
namespace clusters {
struct LabelStruct
{
CHIP_ERROR Decode(chip::TLV::TLVReader & reader)
{
chip::app::Clusters::detail::Structs::LabelStruct::DecodableType t;
CHIP_ERROR err = t.Decode(reader);
if(err == CHIP_NO_ERROR) {
label = t.label;
value = t.value;
}
return err;
}
CHIP_ERROR Encode(chip::TLV::TLVWriter & writer, chip::TLV::Tag tag) const
{
chip::app::Clusters::detail::Structs::LabelStruct::Type t;
t.label = label;
t.value = value;
return t.Encode(writer, tag);
}
std::string label;
std::string value;
};
}