From 41d65a7a0de849da3579d435369f7fb4e426c821 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Wed, 26 Jan 2022 13:24:17 -0500 Subject: [PATCH] Regen zap --- .../cluster/ComplexArgumentParser.cpp | 72 +++++++++++++++++++ .../cluster/ComplexArgumentParser.h | 12 ++++ 2 files changed, 84 insertions(+) diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 0328a0cbe543ad..3c906baf1a7b53 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -227,6 +227,54 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::GeneralCommissioning:: { ComplexArgumentParser::Finalize(request.failSafeExpiryLengthMs); } +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::PowerSource::Structs::BatChargeFaultChangeType::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("BatChargeFaultChangeType.current", value.isMember("current"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("BatChargeFaultChangeType.previous", value.isMember("previous"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "current"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.current, value["current"])); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "previous"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.previous, value["previous"])); + + return CHIP_NO_ERROR; +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::PowerSource::Structs::BatChargeFaultChangeType::Type & request) +{ + ComplexArgumentParser::Finalize(request.current); + ComplexArgumentParser::Finalize(request.previous); +} +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::PowerSource::Structs::BatFaultChangeType::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("BatFaultChangeType.current", value.isMember("current"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("BatFaultChangeType.previous", value.isMember("previous"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "current"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.current, value["current"])); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "previous"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.previous, value["previous"])); + + return CHIP_NO_ERROR; +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::PowerSource::Structs::BatFaultChangeType::Type & request) +{ + ComplexArgumentParser::Finalize(request.current); + ComplexArgumentParser::Finalize(request.previous); +} CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::ContentLauncher::Structs::BrandingInformation::Type & request, Json::Value & value) @@ -1967,3 +2015,27 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::NetworkCommissioning:: ComplexArgumentParser::Finalize(request.wiFiBand); ComplexArgumentParser::Finalize(request.rssi); } +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::PowerSource::Structs::WiredFaultChangeType::Type & request, + Json::Value & value) +{ + VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); + + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WiredFaultChangeType.current", value.isMember("current"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("WiredFaultChangeType.previous", value.isMember("previous"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "current"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.current, value["current"])); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "previous"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.previous, value["previous"])); + + return CHIP_NO_ERROR; +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::PowerSource::Structs::WiredFaultChangeType::Type & request) +{ + ComplexArgumentParser::Finalize(request.current); + ComplexArgumentParser::Finalize(request.previous); +} diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index e32f501d990916..c378324558ea59 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h @@ -48,6 +48,14 @@ static CHIP_ERROR Setup(const char * label, Json::Value & value); static void Finalize(chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfoType::Type & request); +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::PowerSource::Structs::BatChargeFaultChangeType::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::PowerSource::Structs::BatChargeFaultChangeType::Type & request); +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::PowerSource::Structs::BatFaultChangeType::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::PowerSource::Structs::BatFaultChangeType::Type & request); static CHIP_ERROR Setup(const char * label, chip::app::Clusters::ContentLauncher::Structs::BrandingInformation::Type & request, Json::Value & value); @@ -238,3 +246,7 @@ static CHIP_ERROR Setup(const char * label, Json::Value & value); static void Finalize(chip::app::Clusters::NetworkCommissioning::Structs::WiFiInterfaceScanResult::Type & request); +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::PowerSource::Structs::WiredFaultChangeType::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::PowerSource::Structs::WiredFaultChangeType::Type & request);